From 863cbb88230d59ee3506edf8f7d9227bd49c4b4f Mon Sep 17 00:00:00 2001 From: Lee Howard Date: Tue, 4 Jan 2011 02:38:51 +0000 Subject: [PATCH] * libtiff/tif_jpeg.c: Fix regression with 3 band image caused by commit on 2010-12-14 submitted by e-mail from Even Rouault --- ChangeLog | 6 ++++++ libtiff/tif_jpeg.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b431f560..9c6c154d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-01-03 Lee Howard + + * libtiff/tif_jpeg.c: Fix regression with 3 band image caused by + commit on 2010-12-14 submitted by e-mail from + Even Rouault + 2010-12-31 Olivier Paquet * libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE. diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index 400f7da7..93e85a63 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -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 */ }