bulia byak wrote:
... So, perhaps a more correct description is that, on the contrary, it's Inkscape that always uses the fixed order of r, g, b, and a bytes. Cairo on the other hand relies on uint32 values, and these get written with different byte order depending on endianness of the plarform. Perhaps some cairo expert can chime in to confirm or deny this.
If that is the case you can ignore my earlier remark about my patch, as it would then be correct in its assumption that the alpha channel is the last byte in a pixel (if there is an alpha channel).
(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)
Yes, I think that's a correct assumption.
Now you mention it, that is indeed how nr-compose.cpp handles the components, so I guess that more or less settles it (otherwise there would be rendering bugs pretty much all over the place).