change ifd entry to use uint following libtiff interface

This commit is contained in:
Eric Soroos 2016-01-14 04:31:24 -08:00 committed by wiredfool
parent 6dcbf5bd96
commit 5fdf23ab1c
2 changed files with 8 additions and 5 deletions

View File

@ -222,8 +222,8 @@ int ImagingLibTiffDecode(Imaging im, ImagingCodecState state, UINT8* buffer, int
if (clientstate->ifd){ if (clientstate->ifd){
int rv; int rv;
unsigned int ifdoffset = clientstate->ifd; uint32 ifdoffset = clientstate->ifd;
TRACE(("reading tiff ifd %d\n", ifdoffset)); TRACE(("reading tiff ifd %u\n", ifdoffset));
rv = TIFFSetSubDirectory(tiff, ifdoffset); rv = TIFFSetSubDirectory(tiff, ifdoffset);
if (!rv){ if (!rv){
TRACE(("error in TIFFSetSubDirectory")); TRACE(("error in TIFFSetSubDirectory"));

View File

@ -32,10 +32,13 @@ typedef struct {
toff_t loc; /* toff_t == uint32 */ toff_t loc; /* toff_t == uint32 */
tsize_t size; /* tsize_t == int32 */ tsize_t size; /* tsize_t == int32 */
int fp; int fp;
int ifd; /* offset of the ifd, used for multipage */ uint32 ifd; /* offset of the ifd, used for multipage
TIFF *tiff; /* Used in write */ * Should be uint32 for libtiff 3.9.x
* uint64 for libtiff 4.0.x
*/
TIFF *tiff; /* Used in write */
toff_t eof; toff_t eof;
int flrealloc; /* may we realloc */ int flrealloc;/* may we realloc */
} TIFFSTATE; } TIFFSTATE;