diff options
author | faxguy <faxguy> | 2011-01-04 02:51:17 +0000 |
---|---|---|
committer | faxguy <faxguy> | 2011-01-04 02:51:17 +0000 |
commit | 8f14d5f019f4d0087053052815387202f60b9d32 (patch) | |
tree | abe91a49f98018e6ae3071e930f61267e7ed466c | |
parent | f892aebb66c96f602c3b445616ada76ba2aff9fe (diff) | |
download | libtiff-8f14d5f019f4d0087053052815387202f60b9d32.tar.gz |
One more regression fix.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | libtiff/tif_jpeg.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,7 @@ 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 + * libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images + 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> diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index 3abeb6b2..7fc3e959 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_jpeg.c,v 1.50.2.16 2011-01-04 02:42:46 faxguy Exp $ */ +/* $Id: tif_jpeg.c,v 1.50.2.17 2011-01-04 02:51:17 faxguy Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -1358,7 +1358,7 @@ JPEGPreEncode(TIFF* tif, tsample_t s) sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling; sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling; } else { - if (td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) + if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) && td->td_samplesperpixel == 1) sp->cinfo.c.in_color_space = JCS_GRAYSCALE; else if (td->td_photometric == PHOTOMETRIC_RGB) sp->cinfo.c.in_color_space = JCS_RGB; |