[Pixman] image byte order?
Jonathan Morton
jonathan.morton at movial.com
Thu Oct 11 06:34:15 PDT 2012
On Thu, 11 Oct 2012 12:56:57 +0200, Gerd Hoffmann <kraxel at redhat.com>
wrote:
> How are the 32bpp image formats like PIXMAN_x8r8g8b8 defined to look
> like in memory? Fixed format, i.e. always the same no matter whenever
> the box is big or little endian? Or native endian?
Native endian. The format is defined in terms of bitfields in a 32-bit
integer. The 16-bit formats (such as r5g6b5) are also defined
similarly. The 24-bit formats are not.
So to convert to or from a particular on-disk image format, or one
which is defined in terms of bytes (as OpenGL does), you could use
ntohl() and htonl() from the sockets subsystem.
--
From: Jonathan Morton
jonathan.morton at movial.com
More information about the Pixman
mailing list