diff options
author | Lee Howard <faxguy@howardsilvan.com> | 2010-02-22 19:07:23 +0000 |
---|---|---|
committer | Lee Howard <faxguy@howardsilvan.com> | 2010-02-22 19:07:23 +0000 |
commit | df49ff17ed9ea641bd697ea44c7589c2c14baa44 (patch) | |
tree | 5103d7de4ee6d7ce2fc9ca74b161c9309e19456a /libtiff | |
parent | f132add071bc50223a4b0b31fd18ddce53eeae1f (diff) | |
download | libtiff-git-df49ff17ed9ea641bd697ea44c7589c2c14baa44.tar.gz |
* libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating
the JPEG TIFF as is is not required in order to prevent it from
being unused and filled with invalid data. (Leave it to be
generated by later activity.)
* tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip
data rather than skipping them. This fixes the ability to view in
Acrobat Reader, Evince, and Ghostscript.
Diffstat (limited to 'libtiff')
-rw-r--r-- | libtiff/tif_jpeg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index 286310f5..b17ff386 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_jpeg.c,v 1.50.2.5 2009-12-04 01:04:00 fwarmerdam Exp $ */ +/* $Id: tif_jpeg.c,v 1.50.2.6 2010-02-22 19:07:23 faxguy Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -2026,7 +2026,14 @@ TIFFInitJPEG(TIFF* tif, int scheme) if( tif->tif_diroff == 0 ) { #define SIZE_OF_JPEGTABLES 2000 +/* +The following line assumes incorrectly that all JPEG-in-TIFF files will have +a JPEGTABLES tag generated and causes null-filled JPEGTABLES tags to be written +when the JPEG data is placed with TIFFWriteRawStrip. The field bit should be +set, anyway, later when actual JPEGTABLES header is generated, so removing it +here hopefully is harmless. TIFFSetFieldBit(tif, FIELD_JPEGTABLES); +*/ sp->jpegtables_length = SIZE_OF_JPEGTABLES; sp->jpegtables = (void *) _TIFFmalloc(sp->jpegtables_length); _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES); |