[cairo] byte data storage format

Dan Ventura dventura7 at gmail.com
Tue Feb 10 15:03:27 PST 2009


Hello,
If I set my R, G, B, A values to 0.25, 0.5, 0.75 and 1.0 respectively and
then cairo_paint() a surface, I get a nice mostly blue color output, just as
I would expect.

However, if I then grab the data from that surface using
cairo_image_surface_get_data() and look at the first four bytes, I see
(after normalizing) 0.75, 0.5, 0.25, 1.0.

I thought I read somewhere in the documentation that the data were stored in
native-endian format, and I thought that intel processors (I'm using a
macbook pro) were little endian.  In any case, this doesn't look little or
big endian.  What gives?


Thanks,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090210/9ae32a2f/attachment.html 


More information about the cairo mailing list