http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.23.tar.gz
[xscreensaver] / hacks / glx / grab-ximage.c
index f7e44873266ef9ff37119ceae2af722b4f5786c5..b1c1cf45a6fdeb28ae691658659feb9874fbbad3 100644 (file)
@@ -141,6 +141,13 @@ convert_ximage_to_rgba32 (Screen *screen, XImage *image)
                              0);
   to->data = (char *) calloc (to->height, to->bytes_per_line);
 
+  /* Set the bit order in the XImage structure to whatever the
+     local host's native bit order is.
+   */
+  to->bitmap_bit_order =
+    to->byte_order =
+    (bigendian() ? MSBFirst : LSBFirst);
+
   if (visual_class (screen, visual) == PseudoColor ||
       visual_class (screen, visual) == GrayScale)
     {