What a shame no one uses grb as the values are at least in the correct value order from brightest to dullest. This allows easy conversion to a contour mat\m that corresponds to the size of the data in the array.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Raul Miller Sent: Thursday, March 17, 2011 10:49 AM To: Programming forum Subject: Re: [Jprogramming] J pixel data format Ok, that makes sense. In essence, "RGB" and "BGR" mean different things for people talking about byte order and people talking about little endian encoding. Which makes this a difficult subject to search on. Apparently, OpenGL supports both formats, but I have not yet found a good reference on packed pixel formats in OpenGL that is explicitly clear on this byte order issue. I am sure there must be such references, but I have not seen them recently. But I imagine that Linux and Mac running on Intel CPUs must also use little endian integer encodings. -- Raul On Thu, Mar 17, 2011 at 9:55 AM, bill lam <[email protected]> wrote: > From your link to directx page, it said blue component is stored in the > lowest byte, this is the same order as J6 glpixels/glqpixels used. > > Чтв, 17 Мар 2011, Raul Miller писал(а): >> On Wed, Mar 16, 2011 at 8:31 PM, bill lam <[email protected]> wrote: >> > Yes, flip_rgb is needed for cairo and gdi32 but not gdiplus. >> > J seems had chosen an inefficient way to represent pixsel color as an >> > integer. >> >> http://msdn.microsoft.com/en-us/library/ee719797(v=vs.85).aspx >> >> Efficient pixel formats are 32 bits wide. >> >> rgb is for directx >> http://msdn.microsoft.com/en-us/library/aa753543(v=vs.85).aspx >> >> I am not sure what bgr is for. I have a vague memory of it being used >> in .bmp files, but when I looke them up, wikipedia says they are rgb >> (wikipedia is inaccurate often enough but I still would hope that for >> something this narrow and specific someone would have noticed and >> fixed it if it was wrong) >> >> -- >> Raul > > -- > regards, > ==================================================== > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
