Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Converting to MacOSX for remote sensing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting to MacOSX for remote sensing



At 10:00 PM -0800 3/6/03, Mark Lucas wrote:
5)  X11 beta seems to be working well.  I do have some internal issues
to resolve on the X11 backing store and byte ordering. (little/big
endian)  Currently when I display back from a linux box the color in
the image is swapped.  We can fix it by hard coding, but need to figure
out how we can tell X the 'endianness' of the client and server so it
can handle it correctly.

You can't tell the X server the endianess of the X client, the X server tells the client what endianess it uses. Unfortunately many poorly written X clients assume a byte order rather then querying the X server. You can use ImageByteOrder() and BitmapBitOrder() to see which byte and bit order is used by the server. See "man ImageByteOrder" for details.


For example, if you use XCreateImage() to create a client side image the byte_order member of the XImage structure is filled in to be the byte order of the specified display. Some poorly written clients will just ignore this and write into the image data using an assumed byte order. This is much more efficient then using XPutPixel() which corrects for byte order and much easier to code then having separate cases for various image formats.

--Torrey
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.





Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.