Don't use estimate strip byte count for one tile/strip images with an
offset, and byte count of zero. These could be "unpopulated" images.
This commit is contained in:
parent
159348246d
commit
78563b4ff9
@ -1,4 +1,4 @@
|
|||||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v 1.5 2000-01-28 21:00:20 warmerda Exp $ */
|
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v 1.6 2000-04-21 21:45:33 warmerda Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -506,7 +506,7 @@ TIFFReadDirectory(TIFF* tif)
|
|||||||
_TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
|
_TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
|
||||||
EstimateStripByteCounts(tif, dir, dircount);
|
EstimateStripByteCounts(tif, dir, dircount);
|
||||||
#define BYTECOUNTLOOKSBAD \
|
#define BYTECOUNTLOOKSBAD \
|
||||||
(td->td_stripbytecount[0] == 0 || \
|
((td->td_stripbytecount[0] == 0 && td->td_stripoffset[0] != 0) || \
|
||||||
(td->td_compression == COMPRESSION_NONE && \
|
(td->td_compression == COMPRESSION_NONE && \
|
||||||
td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0]))
|
td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0]))
|
||||||
} else if (td->td_nstrips == 1 && BYTECOUNTLOOKSBAD) {
|
} else if (td->td_nstrips == 1 && BYTECOUNTLOOKSBAD) {
|
||||||
|
Loading…
Reference in New Issue
Block a user