* tools/tiffgt.c: Fix problem on big-endian CPUs so that images
display more correctly. Images display brighter than they should on a Sun workstation.
This commit is contained in:
parent
6159fe5bab
commit
97367b465e
@ -1,3 +1,9 @@
|
|||||||
|
2005-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||||
|
|
||||||
|
* tools/tiffgt.c: Fix problem on big-endian CPUs so that images
|
||||||
|
display more correctly. Images display brighter than they should
|
||||||
|
on a Sun workstation.
|
||||||
|
|
||||||
2005-02-03 Andrey Kiselev <dron@remotesensing.org>
|
2005-02-03 Andrey Kiselev <dron@remotesensing.org>
|
||||||
|
|
||||||
* libtiff/tif_dirread.c: Estimate strip size in case of wrong or
|
* libtiff/tif_dirread.c: Estimate strip size in case of wrong or
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tiffgt.c,v 1.2 2004-09-12 16:40:40 bfriesen Exp $ */
|
/* $Id: tiffgt.c,v 1.3 2005-02-03 19:46:49 bfriesen Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -222,6 +222,9 @@ initImage(void)
|
|||||||
height = h;
|
height = h;
|
||||||
}
|
}
|
||||||
TIFFRGBAImageGet(&img, raster, img.width, img.height);
|
TIFFRGBAImageGet(&img, raster, img.width, img.height);
|
||||||
|
#if HOST_BIGENDIAN
|
||||||
|
TIFFSwabArrayOfLong(raster,img.width*img.height);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -263,7 +266,7 @@ setWindowSize(void)
|
|||||||
static void
|
static void
|
||||||
raster_draw(void)
|
raster_draw(void)
|
||||||
{
|
{
|
||||||
glDrawPixels(img.width, img.height, GL_RGBA, GL_UNSIGNED_BYTE, raster);
|
glDrawPixels(img.width, img.height, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid *) raster);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user