fixed CMYK problem in getimage
This commit is contained in:
parent
7afe0a69bc
commit
abf486d1fa
@ -1,3 +1,10 @@
|
||||
2001-08-28 Frank Warmerdam <warmerdam@pobox.com>
|
||||
|
||||
* 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 <warmerdam@pobox.com>
|
||||
|
||||
* libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy()
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user