<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1451578172551_3194"><span id="yui_3_16_0_1_1451578172551_4466">You're making a jump from "iemgui has a lossy color representation" </span></div><div id="yui_3_16_0_1_1451578172551_3194" dir="ltr"><span id="yui_3_16_0_1_1451578172551_4499">to "Pd's float precision is a problem".</span></div><div id="yui_3_16_0_1_1451578172551_3194"><span><br></span></div><div id="yui_3_16_0_1_1451578172551_3194"><span id="yui_3_16_0_1_1451578172551_3195">Both may be true, but they aren't related. Pd has symbols, which are capable of </span></div><div id="yui_3_16_0_1_1451578172551_3194"><span id="yui_3_16_0_1_1451578172551_4556">losslessly storing rgb color values in </span>any of the standard forms you see on the web (#abc, #abcdef, blue, etc.).  Additionally, Pd messages are capable of losslessly storing rgb color values (as well as just about any other color format).</div><div id="yui_3_16_0_1_1451578172551_3194" dir="ltr">[foreground 80 160 240( is a valid Pd message, as is [background 1 2 3( or </div><div id="yui_3_16_0_1_1451578172551_3194" dir="ltr">[fill 42 42 42(.</div><div dir="ltr" id="yui_3_16_0_1_1451578172551_3192"><span><br></span></div><div dir="ltr" id="yui_3_16_0_1_1451578172551_3192">Also, notice that the lossy, human-unreadable iemgui color representation isn't </div><div dir="ltr" id="yui_3_16_0_1_1451578172551_3192">a standard format, and that this thread is six levels deep.  Those two facts </div><div dir="ltr" id="yui_3_16_0_1_1451578172551_3192">are definitely related.</div><div dir="ltr" id="yui_3_16_0_1_1451578172551_3192"><br></div><div dir="ltr" id="yui_3_16_0_1_1451578172551_3192">-Jonathan</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Thursday, December 31, 2015 10:55 AM, William Huston <williamahuston@gmail.com> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv6748754651"><div>Well if there are 4x 8 bit values (RGB+alpha) =32 bits trying to be encoded/decoded into a single precision float, there will be loss of fidelity. <br clear="none"><br clear="none">It amazes me that it works for encoding 24 bit values (I tested it for RGB only and can send a demo patch, or check the one Katja posted here: <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/pipermail/pd-list/2015-12/112694.html">http://lists.puredata.info/pipermail/pd-list/2015-12/112694.html</a> )<br clear="none"><br clear="none">Check out Katja's page and video about "Pd Double" for the best explanation of this problem. <br clear="none"><br clear="none">I personally wish there was a 32 bit integer data type in Pd for counters and binary registers and such, which I know will never get converted into floats, and risk strange rounding errors or noise in the Least Significant Bits. <br clear="none"><br clear="none"><div class="yiv6748754651yqt1063417774" id="yiv6748754651yqtfd60185"><br clear="none">On Thursday, December 31, 2015, João Pais <<a rel="nofollow" shape="rect" ymailto="mailto:jmmmpais@gmail.com" target="_blank" href="mailto:jmmmpais@gmail.com">jmmmpais@gmail.com</a>> wrote:<br clear="none">> Ok. Do you know what should be done to convert to Pd's rgb format?<br clear="none">><br clear="none">>> I'm pretty sure the 4th value is alpha<br clear="none">>><br clear="none">>> Sent from my iPhone<br clear="none">>><br clear="none">>>> On Dec 31, 2015, at 7:53 AM, João Pais <<a rel="nofollow" shape="rect" ymailto="mailto:jmmmpais@gmail.com" target="_blank" href="mailto:jmmmpais@gmail.com">jmmmpais@gmail.com</a>> wrote:<br clear="none">>>><br clear="none">>>> Hello list,<br clear="none">>>><br clear="none">>>> I'm trying to use [pix_data] to get the RGB values from an image, and color a canvas using them. But the results come out a bit weird, as not all colors match.<br clear="none">>>><br clear="none">>>> I can try to some a more detailed patch in a couple of days, but wanted to ask first the there is any example of how to use the values coming out of [pix_data]:<br clear="none">>>> - should the gray value be used?<br clear="none">>>> - the middle outlet should send a list of RGB values, but I noticed that instead a list of 4 values comes out. This isn't documented, what is the 4th value?<br clear="none">>>><br clear="none">>>> Attached are 2 pictures that should exemplifiy the issue:<br clear="none">>>> - rgb.tif - a rgb palette<br clear="none">>>> - rgb-conv.tif - the result after my interpretation of the data<br clear="none">>>><br clear="none">>>> Best,<br clear="none">>>><br clear="none">>>> Joao<br clear="none">>>> <rgb.tif><br clear="none">>>> <rgb-conv.tif><br clear="none">>>> _______________________________________________<br clear="none">>>> <a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">>>> UNSUBSCRIBE and account-management -> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">> UNSUBSCRIBE and account-management -> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a></div><br clear="none">><br clear="none"><br clear="none">-- <br clear="none"><div dir="ltr"><div><div dir="ltr">--<br clear="none">
May you, and all beings<br clear="none">
be happy and free from suffering :)<br clear="none">
-- ancient Buddhist Prayer (Metta)<div class="yiv6748754651yqt1063417774" id="yiv6748754651yqtfd24413"><br clear="none"></div></div></div></div><div class="yiv6748754651yqt1063417774" id="yiv6748754651yqtfd91857"><br clear="none"></div></div></div><br><div class="yqt1063417774" id="yqtfd88221">_______________________________________________<br clear="none"><a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>