Sun, 25 Feb 2007 11:10:16 -0500 "bulia byak" <buliabyak@...400...> kirjoitti:
When drawing into a memory buffer, cairo uses a fixed byte order of the R, G, B, A bytes regardless of the platform.
Inkscape and GDK (which is used by Inkscape for drawing to screen), however, both use system-dependent byte order, i.e. the order of R, G, B, A is determined by the hardware and is different on PC and Mac platforms.
Umh, ok... So this means, that NRPixBlocks have different byte orders depending on system?
Is it just that, that colours are somewhere handled as 32-bit integers and as such, the platform byte order (high endian / low endian) makes a difference? Or is there some still deeper problem here?
And further, how do I properly determine the byte order for rgba images? I am now coding the support for the feBlend filter, and for that it is really important to know, from which byte to read the opacity value ;)
(Also, this really should be documented. As the mode for rgba images is called NR_PIXBLOCK_MODE_R8G8B8A8P, I've always assumed, that the format is R8 G8 B8 A8)