* libtiff/tif_dirread.c: tolerate some cases where
FIELD_COLORMAP is missing http://bugzilla.maptools.org/show_bug.cgi?id=2189
This commit is contained in:
parent
69bb27992d
commit
bf44739aea
@ -1,3 +1,9 @@
|
||||
2010-12-14 Lee Howard <faxguy@howardsilvan.com>
|
||||
|
||||
* libtiff/tif_dirread.c: tolerate some cases where
|
||||
FIELD_COLORMAP is missing
|
||||
http://bugzilla.maptools.org/show_bug.cgi?id=2189
|
||||
|
||||
2010-12-14 Lee Howard <faxguy@howardsilvan.com>
|
||||
|
||||
* libtiff/tif_read.c: change read_ahead to tmsize_t
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_dirread.c,v 1.164 2010-12-14 03:03:24 faxguy Exp $ */
|
||||
/* $Id: tif_dirread.c,v 1.165 2010-12-15 01:05:02 faxguy Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -3845,8 +3845,14 @@ TIFFReadDirectory(TIFF* tif)
|
||||
*/
|
||||
if (tif->tif_dir.td_photometric == PHOTOMETRIC_PALETTE &&
|
||||
!TIFFFieldSet(tif, FIELD_COLORMAP)) {
|
||||
MissingRequired(tif, "Colormap");
|
||||
goto bad;
|
||||
if ( tif->tif_dir.td_bitspersample>=8 && tif->tif_dir.td_samplesperpixel==3)
|
||||
tif->tif_dir.td_photometric = PHOTOMETRIC_RGB;
|
||||
else if (tif->tif_dir.td_bitspersample>=8)
|
||||
tif->tif_dir.td_photometric = PHOTOMETRIC_MINISBLACK;
|
||||
else {
|
||||
MissingRequired(tif, "Colormap");
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* OJPEG hack:
|
||||
|
Loading…
Reference in New Issue
Block a user