Ximage's byte_order field

Adam Jackson ajax at nwnk.net
Mon Feb 23 08:01:30 PST 2009


On Thu, 2009-02-19 at 10:54 -0700, McDonald, Michael-p7438c wrote:
> Am I allowed to change the value of the XImage byte_order field? And if
> I do, will subsequent XPutImage() calls do the "right thing"? Does the
> value of byte_order default to the client's byte order?

The default byte order is the server's byte order.  You _can_ change the
image's byte_order field, and xlib will do the right thing with that (in
the sense of transmitting the bits as you pass them in).  But the server
will only do the right thing with it if it was built with
MATCH_CLIENT_ENDIAN defined, which I don't think is ever the case.

Swapping client-side is the Done Thing.  We could argue whether that's
philosophically correct, and it's probably not, but I think it's what
you're stuck with, sorry.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20090223/745b27a0/attachment.pgp>


More information about the xorg mailing list