Commit d2686aa9 authored by Matthias Clasen's avatar Matthias Clasen

Check for endianness.

	* configure.in: Check for endianness.

	* io-tiff.c (tiff_image_parse): fix packing order on bigendian
	systems.  (#81702)
parent 66828553
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
......
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
......
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
......
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
......
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
......
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
......
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment