forked from AuroraMiddleware/gtk
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:
parent
6682855390
commit
d2686aa951
@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness. Sorry about REBUILD_PNGS...
|
||||
|
||||
Fri May 17 16:05:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (REBUILD_PNGS): Re-add REBUILD_PNGS
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness. Sorry about REBUILD_PNGS...
|
||||
|
||||
Fri May 17 16:05:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (REBUILD_PNGS): Re-add REBUILD_PNGS
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness. Sorry about REBUILD_PNGS...
|
||||
|
||||
Fri May 17 16:05:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (REBUILD_PNGS): Re-add REBUILD_PNGS
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness. Sorry about REBUILD_PNGS...
|
||||
|
||||
Fri May 17 16:05:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (REBUILD_PNGS): Re-add REBUILD_PNGS
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness. Sorry about REBUILD_PNGS...
|
||||
|
||||
Fri May 17 16:05:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (REBUILD_PNGS): Re-add REBUILD_PNGS
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Check for endianness. Sorry about REBUILD_PNGS...
|
||||
|
||||
Fri May 17 16:05:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (REBUILD_PNGS): Re-add REBUILD_PNGS
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user