[cairo] CAIRO_FORMAT_ARGB32 format [ was: Re: "data" in cairo_image_surface_get_data ()

Nguyen Vu Hung vuhung16plus at gmail.com
Tue Nov 27 22:07:17 PST 2007

Hi all,

Can anyone explain how 8 bits ( one bytes ) are stored in a cairo's
surface under CAIRO_FORMAT_ARGB32 format?

For example, when I get data from a surface like:

unsigned char *data_cairo = cairo_image_surface_get_data (m_pSurface);

then, how to get A, R, G, B quantities inside *data_cairo?

# Baz said it is a endianness thingy but I don't fully understand it!

Best Regards,
Nguyen Hung Vu
An inquisitive look at Harajuku

More information about the cairo mailing list