[cairo] ARGB, BGRA, RGBA mess
Bill Spitzak
spitzak at d2.com
Fri Jan 14 20:19:34 PST 2005
Ned Konz wrote:
> On Thursday 13 January 2005 2:41 pm, Bill Spitzak wrote:
>
>>In addition having "RGBA" describe anything other than the order of
>>bytes in memory is pretty useless if you want to describe data larger
>>than bytes, such as 16-bit or float or half (16-bit floats).
>
>
> I think that the problem comes from the distinction between the *pixel format*
> (the layout of *bits* in a pixel *word*) and the *serialization format* (how
> you would stream the pixels as a series of bytes).
The problem is much simpler.
In the "real world", outside of writing device drivers, there is ZERO
interest in working with images where the size of each channel in the
image is anything other than 8,16,32. Any API that expects images of any
other forms WILL NOT BE USED and therefore no time should be wasted
writing them. Therefore any format where the size of a channel is not
8,16, or 32 is an internal implementation issue and should not in any
way be exposed by a Cairo api.
When talking about things that are 8 bits or larger, it appears that 95%
of the programmers out there think the word "RGBA" means that "R" is in
a memory location with an address that is LESS than where "G" is.
I thereby state that use of the term RGBA to mean ANYTHING other than R
being in a lower address than G, and R being at least 8 bits, is going
to confuse people and make them hate Cairo.
More information about the cairo
mailing list