- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is possible to run the graphical examples over the network, e.g., using "ssh -X". However, if client and server use different endianness, the colours look unfamiliar compared to an all-local setup.
If you're familiar with the X Window System, you might consider contributing a solution that uses XImage::byte_order to conditionally swap the bytes returned from get_color() and whatever else is needed to make this problem go away, so I can go read a book instead (I'm getting only partial success so far). :-)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind, it's a writeable field:
[cpp]
{
// Note: It may be more efficient to adopt the server's byte order
// and swap once per get_color() call instead of once per pixel.
const uint32_t probe =0x03020100;
const bool big_endian = (((const char*)(&probe))[0]==0x03);
ximage->byte_order = big_endian ? MSBFirst : LSBFirst;
}
[/cpp]
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page