[cairo] ARGB, BGRA, RGBA mess
Carl Worth
cworth at cworth.org
Thu Jan 13 13:36:55 PST 2005
On Thu, 13 Jan 2005 13:24:55 -0800, Bill Spitzak wrote:
> I think what several people here have been saying, me included, is that
> the "standard" is that "RGBA" means R is in the byte with the lowest
> address.
"address" to me sounds like we are talking about an image in memory.
> I just checked sevearal interfaces to file reading/writing code
File reading/writing to me sounds like a bytestream-oriented interface
which is fundamentally different than an in-memory image. (But some of
the confusion here may be a bit of "culture clash" between these two
kinds of image interfaces).
> (libjpeg, libpng, and libtiff, imagemagic, etc) and every single one of
> them uses RGBA. I do not see ARGB or BGRA anywhere! I also thing ABGR is
> rarely used, except to handle endian issues.
Quoting from libpng(3) I see the following input transformations
available in that library:
PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA
to BGRA
PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA
to AG
So this library clearly advertises support for RGBA, BGRA, and
ARGB. And presumably if both transforms are enabled simultaneously one
would get ABGR. Note: I'm just looking at the manual now, not
examining any images in memory nor in files.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050113/f44b671b/attachment.pgp
More information about the cairo
mailing list