applied a patch done by Brion Vibber and Philip Lafleur that fixes loading

2004-07-14  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/tiff.c: applied a patch done by Brion Vibber
	and Philip Lafleur that fixes loading of CMYK TIFF images on
	big-endian hardware (bug #147328).
This commit is contained in:
Sven Neumann 2004-07-14 10:57:13 +00:00 committed by Sven Neumann
parent cf6ae91996
commit 00fed8dcba
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-07-14 Sven Neumann <sven@gimp.org>
* plug-ins/common/tiff.c: applied a patch done by Brion Vibber
and Philip Lafleur that fixes loading of CMYK TIFF images on
big-endian hardware (bug #147328).
2004-07-14 Philip Lafleur <plafleur@cvs.gnome.org>
* plug-ins/common/mng.c (respin_cmap): Properly check the return

View file

@ -981,6 +981,15 @@ load_rgba (TIFF *tif,
for (row = 0; row < imageLength; ++row)
{
#if G_BYTE_ORDER != G_LITTLE_ENDIAN
/* Make sure our channels are in the right order */
uint32 i;
uint32 rowStart = row * imageWidth;
uint32 rowEnd = rowStart + imageWidth;
for (i = rowStart; i < rowEnd; i++)
buffer[i] = GUINT32_TO_LE (buffer[i]);
#endif
gimp_pixel_rgn_set_rect (&(channel[0].pixel_rgn),
channel[0].pixels + row * imageWidth * 4,
0, imageLength -row -1, imageWidth, 1);