[cairo] Direct manipulation and write to PNG
Carlos López González
genetita at gmail.com
Mon Jul 9 13:13:05 PDT 2012
Ok, thank you very much for the quick and helpful response.
After modify the code for little endian system it works great!
> The ARGB32 format docs say:
> * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with
> * alpha in the upper 8 bits, then red, then green, then blue.
> * The 32-bit quantities are stored native-endian. Pre-multiplied
> * alpha is used. (That is, 50% transparent red is 0x80800000,
> * not 0x80ff0000.) (Since 1.0)
> Which means, on a little-endian system, the in-memory layout is BGRA. But you
> are assuming that it is ARGB in memory.
More information about the cairo