Little-endian fix for 16bit TIFF

and Use same endian-detect as other plug-ins for PCX
This commit is contained in:
Nick Lamb /GIMP 2000-11-19 23:54:46 +00:00
parent 55c617dc33
commit 97294fc0d4
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-11-19 Nick Lamb <njl195@zepler.org.uk>
* plug-ins/common/tiff.c: Little-endian fix for 16bit TIFF
* plug-ins/common/pcx.c: Use same endian-detect as other plug-ins
2000-11-19 Michael Natterer <mitch@gimp.org>
* libgimp/gimpenv.c: a missing newline confused gtk-doc. Minor doc fixes.

View File

@ -37,7 +37,7 @@ static void run (gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
#if defined(_BIG_ENDIAN) || defined(sparc) || defined (__sgi)
#if G_BYTE_ORDER == G_BIG_ENDIAN
#define qtohl(x) \
((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
(((unsigned long int)(x) & 0x0000ff00U) << 8) | \

View File

@ -864,6 +864,10 @@ read_16bit (guchar *source,
startcol, startrow, cols, rows, TRUE, FALSE);
}
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
source++; /* offset source once, to look at the high byte */
#endif
for (row = 0; row < rows; ++row) {
dest= channel[0].pixels + row * cols * channel[0].drawable->bpp;