fix for non-YCbCr jpeg compressed files

This commit is contained in:
Frank Warmerdam 2006-02-07 14:28:48 +00:00
parent a03acbb37c
commit 0a02af9e2d
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-02-07 Frank Warmerdam <warmerdam@pobox.com>
* tools/tiff2pdf.c: Fixed support for non-YCbCr encoded JPEG
compressed TIFF files, per submission from Dan Cobra.
2006-02-07 Andrey Kiselev <dron@remotesensing.org>
* libtiff/{tif_dirread.c, tif_packbits.c, tif_win32.c}: Properly

View File

@ -1,9 +1,12 @@
/* $Id: tiff2pdf.c,v 1.25 2005-12-27 12:24:07 dron Exp $
/* $Id: tiff2pdf.c,v 1.26 2006-02-07 14:28:49 fwarmerdam Exp $
*
* tiff2pdf - converts a TIFF image to a PDF document
*
* $Log: tiff2pdf.c,v $
* Revision 1.25 2005-12-27 12:24:07 dron
* Revision 1.26 2006-02-07 14:28:49 fwarmerdam
* fix for non-YCbCr jpeg compressed files
*
* Revision 1.25 2005/12/27 12:24:07 dron
* Avoid warnings.
*
* Revision 1.24 2005/09/20 11:19:38 dron
@ -5087,6 +5090,11 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
#ifdef JPEG_SUPPORT
case T2P_COMPRESS_JPEG:
written += TIFFWriteFile(output, (tdata_t) "/DCTDecode ", 11);
if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR) {
written += TIFFWriteFile(output, (tdata_t) "/DecodeParms ", 13);
written += TIFFWriteFile(output, (tdata_t) "<< /ColorTransform 0 >>\r", 24);
}
break;
#endif
#ifdef ZIP_SUPPORT