* libtiff/tif_jpeg.c: Fix regression with 3 band image caused by

commit on 2010-12-14 submitted by e-mail from
        Even Rouault <even.rouault@mines-paris.org>
This commit is contained in:
Lee Howard 2011-01-04 02:38:51 +00:00
parent cb413f61f5
commit 863cbb8823
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-01-03 Lee Howard <faxguy@howardsilvan.com>
* libtiff/tif_jpeg.c: Fix regression with 3 band image caused by
commit on 2010-12-14 submitted by e-mail from
Even Rouault <even.rouault@mines-paris.org>
2010-12-31 Olivier Paquet <olivier.paquet@gmail.com>
* libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE.

View File

@ -1,4 +1,4 @@
/* $Id: tif_jpeg.c,v 1.96 2010-12-14 23:58:39 faxguy Exp $ */
/* $Id: tif_jpeg.c,v 1.97 2011-01-04 02:38:52 faxguy Exp $ */
/*
* Copyright (c) 1994-1997 Sam Leffler
@ -1709,7 +1709,7 @@ JPEGPreEncode(TIFF* tif, uint16 s)
sp->cinfo.c.in_color_space = JCS_CMYK;
else
sp->cinfo.c.in_color_space = JCS_UNKNOWN;
if (!TIFFjpeg_set_colorspace(sp, (sp->cinfo.c.in_color_space == JCS_RGB) ? JCS_YCbCr : sp->cinfo.c.in_color_space))
if (!TIFFjpeg_set_colorspace(sp, sp->cinfo.c.in_color_space))
return (0);
/* jpeg_set_colorspace set all sampling factors to 1 */
}