Check for endianness.
* configure.in: Check for endianness. * io-tiff.c (tiff_image_parse): fix packing order on bigendian systems. (#81702)
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness.
|
||||
|
||||
Thu May 16 19:49:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness.
|
||||
|
||||
Thu May 16 19:49:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness.
|
||||
|
||||
Thu May 16 19:49:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness.
|
||||
|
||||
Thu May 16 19:49:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness.
|
||||
|
||||
Thu May 16 19:49:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness.
|
||||
|
||||
Thu May 16 19:49:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
||||
@@ -500,6 +500,8 @@ AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
|
||||
saved_cflags="$CFLAGS"
|
||||
saved_ldflags="$LDFLAGS"
|
||||
|
||||
# check for bytesex stuff
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* io-tiff.c (tiff_image_parse): fix packing order on bigendian
|
||||
systems. (#81702)
|
||||
|
||||
Thu May 16 15:17:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixops/pixops.c: Patch from Matthias Clasen to fix some typos
|
||||
|
||||
@@ -268,6 +268,21 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
|
||||
TIFFRGBAImageGet (&img, (uint32 *)pixels, width, height);
|
||||
TIFFRGBAImageEnd (&img);
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
/* Turns out that the packing used by TIFFRGBAImage depends on the host byte order... */
|
||||
while (pixels < pixbuf->pixels + bytes) {
|
||||
uint32 pixel = *(uint32 *)pixels;
|
||||
int r = TIFFGetR(pixel);
|
||||
int g = TIFFGetG(pixel);
|
||||
int b = TIFFGetB(pixel);
|
||||
int a = TIFFGetA(pixel);
|
||||
*pixels++ = r;
|
||||
*pixels++ = g;
|
||||
*pixels++ = b;
|
||||
*pixels++ = a;
|
||||
}
|
||||
#endif
|
||||
|
||||
G_UNLOCK (tiff_loader);
|
||||
if (context)
|
||||
(* context->update_func) (pixbuf, 0, 0, width, height, context->user_data);
|
||||
|
||||
Reference in New Issue
Block a user