diff --git a/ChangeLog b/ChangeLog index a74685d3..e39e3fd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-08-28 Frank Warmerdam + + * libtiff/tif_getimage.c: Don't complain for CMYK (separated) + images with more than four samples per pixel. See: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=73 + 2001-08-10 Frank Warmerdam * libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c index 285ed053..a1be1b2c 100644 --- a/libtiff/tif_getimage.c +++ b/libtiff/tif_getimage.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_getimage.c,v 1.11 2001-08-11 03:41:07 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_getimage.c,v 1.12 2001-08-28 13:11:38 warmerda Exp $ */ /* * Copyright (c) 1991-1997 Sam Leffler @@ -111,7 +111,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) "InkSet", td->td_inkset); return (0); } - if (td->td_samplesperpixel != 4) { + if (td->td_samplesperpixel < 4) { sprintf(emsg, "Sorry, can not handle separated image with %s=%d", "Samples/pixel", td->td_samplesperpixel); return (0); @@ -280,6 +280,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) /* can rely on libjpeg to convert to RGB */ /* XXX should restore current state on exit */ switch (compress) { + case COMPRESSION_OJPEG: case COMPRESSION_JPEG: TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); img->photometric = PHOTOMETRIC_RGB; @@ -305,7 +306,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) "InkSet", inkset); return (0); } - if (img->samplesperpixel != 4) { + if (img->samplesperpixel < 4) { sprintf(emsg, "Sorry, can not handle separated image with %s=%d", "Samples/pixel", img->samplesperpixel); return (0);