* libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs

do_fancy_upsampling=FALSE in order to read raw data.  Resolves
"Bug 2090 - OJPEG crash with libjpeg v7".
http://bugzilla.maptools.org/show_bug.cgi?id=2090
This commit is contained in:
Bob Friesenhahn 2009-09-03 20:45:22 +00:00
parent 867070ff59
commit 05a3dfef44
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2009-09-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs
do_fancy_upsampling=FALSE in order to read raw data. Resolves
"Bug 2090 - OJPEG crash with libjpeg v7".
http://bugzilla.maptools.org/show_bug.cgi?id=2090
2009-09-03 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_getimage.c: Fixed error recognition handling in RGBA

View File

@ -1,4 +1,4 @@
/* $Id: tif_ojpeg.c,v 1.45 2009-05-03 14:29:36 fwarmerdam Exp $ */
/* $Id: tif_ojpeg.c,v 1.46 2009-09-03 20:45:22 bfriesen Exp $ */
/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
specification is now totally obsolete and deprecated for new applications and
@ -1155,6 +1155,9 @@ OJPEGWriteHeaderInfo(TIFF* tif)
if ((sp->subsampling_force_desubsampling_inside_decompression==0) && (sp->samples_per_pixel_per_plane>1))
{
sp->libjpeg_jpeg_decompress_struct.raw_data_out=1;
#if JPEG_LIB_VERSION >= 70
sp->libjpeg_jpeg_decompress_struct.do_fancy_upsampling=FALSE;
#endif
sp->libjpeg_jpeg_query_style=0;
if (sp->subsampling_convert_log==0)
{