diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gdk-pixbuf-xlib/ChangeLog | 11 | ||||
-rw-r--r-- | contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/contrib/gdk-pixbuf-xlib/ChangeLog b/contrib/gdk-pixbuf-xlib/ChangeLog index f29c11f5f..ca15378d8 100644 --- a/contrib/gdk-pixbuf-xlib/ChangeLog +++ b/contrib/gdk-pixbuf-xlib/ChangeLog @@ -1,3 +1,14 @@ +2002-01-25 Federico Mena Quintero <federico@ximian.com> + + Merge from gdk-pixbuf stable. + + * gdk-pixbuf-xlib-drawable.c (rgb565msb): Fixed the endianness + conversion --- swap the individual 16 bit values instead of taking + everying as a 32 bit value. + (rgb565lsb): Likewise. + (rgb555lsb): Likewise. + (rgb555msb): Likewise. + 2001-11-26 Akira TAGOH <tagoh@redhat.com> * Makefile.am (libgdk_pixbuf_xlib_1_3_la_LDFLAGS): diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c index 9e007bdb4..e84d97638 100644 --- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c +++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c @@ -365,7 +365,7 @@ rgb565lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; #else /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24; s += 4; *o++ = (data & 0xf800) | (data & 0xe000) >> 5 | (data & 0x7e0) >> 3 | (data & 0x600) >> 9; @@ -428,7 +428,7 @@ rgb565msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap register guint32 data; #ifdef LITTLE /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24; s += 4; *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 | (data & 0x7e0) << 5 | (data & 0x600) >> 1; @@ -617,7 +617,7 @@ rgb555lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; #else /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24; s += 4; *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4 | (data & 0x3e0) >> 2 | (data & 0x380) >> 7; @@ -676,7 +676,7 @@ rgb555msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap register guint32 data; #ifdef LITTLE /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24; s += 4; *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 | (data & 0x3e0) << 6 | (data & 0x380) << 1; |