summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2002-01-25 21:38:13 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2002-01-25 21:38:13 +0000
commit2ca60b920be228e0b13d4acd0aadd7af9f2fde64 (patch)
tree194cf7ce829ab95b9b027d06af5abe6fbcc92f09 /contrib
parent165e970296cf0fb8e317ce803fb6c8ff0bd31fc3 (diff)
downloadgtk+-2ca60b920be228e0b13d4acd0aadd7af9f2fde64.tar.gz
Merge from gdk-pixbuf stable.
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gdk-pixbuf-xlib/ChangeLog11
-rw-r--r--contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c8
2 files changed, 15 insertions, 4 deletions
diff --git a/contrib/gdk-pixbuf-xlib/ChangeLog b/contrib/gdk-pixbuf-xlib/ChangeLog
index f29c11f5f7..ca15378d86 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 9e007bdb49..e84d976381 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;