libtiff problems

Newer versions of libtiff than 3.8.0 have a problem when converting TIFF images to PDF files; the colors goes all wrong.

For this test, I have used three different mages, which I have scanned with The GIMP, and saved in TIFF format. Each image is saved twice, once with LZW compression, and once with JPEG compression (just in case it matters).

Test source images, with JPEG compression: hp-testpage.tiff.gz, mmore.tiff.gz, tiger.tiff.gz, with LZW compression: hp-testpage-2.tiff.gz, mmore-2.tiff.gz, tiger-2.tiff.gz. For some reason, the files was converted to jpeg on upload here, so I had to gzip them. Two of the files was to large to upload (even here, Google?).

Unless otherwise noted, I have used Adobe's Acrobat Reader (acroread) to view the PDF files.

back to operating systems page.


2021-08-26: I re-created this page on my self-hosted web server.

2013-02-16: FreeBSD. Using FreeBSD 8.3-stable / amd64. Using the tiger.tiff image as source. Converting with tiff2pdf -p a4 -n -j -q 75 -o filename.pdf filename.tiff. Result file: tiger_20130216.pdf. I used xpdf and acroread for viewing result file. The problem is still present. Details:

tingo@kg-v2$ uname -a
FreeBSD 8.3-STABLE FreeBSD 8.3-STABLE #6: Fri Apr 27 23:50:55 CEST 2012  amd64
tingo@kg-v2$ portversion -v tiff
tiff-4.0.3                  =  up-to-date with port
tingo@kg-v2$ portversion -v xpdf
xpdf-3.03_3                 =  up-to-date with port
tingo@kg-v2$ portversion -v acroread9
acroread9-9.5.3             =  up-to-date with port

That's all.

2010-12-12: FreeBSD. Using FreeBSD 8.1-stable / amd64 (from 2010-09-16) and tiff-4.0.0 from ports for the test. The command line was tiff2pdf -p a4 -n -j -q 75 -o filename.pdf filename.tiff. Source images as listed above. Result files: mmore_20101212.pdf, tiger_20101212.pdf. I used xpdf (from ports) to view the pdf files. I also viewed the files with acroread (9.3.4), which also show the same problem.

2009-12-07: FreeBSD. Using FreeBSD 7.2-stable / amd64 (from 2009-10-30) and tiff-3.9.2 (/usr/ports/graphics/tiff) from ports for the test. The command line was tiff2pdf -p a4 -n -j -q 75 -o filename.pdf filename.tiff. Result files: mmore_20091207.pdf, tiger_20091207.pdf. Source images are the ones listed above.

2007-03-27: FreeBSD. Finding bug 1371 in the libtiff bugzilla, I decided to test tiff2pdf without the -j option. I used the command tiff2pdf -p a4 -n -z -o filename.pdf filename.tiff. Results: z_mmore.pdf. This file displays without problem in acroread.

2007-03-27: Linux test: I tried converting the same images on a machine running Ubuntu 6.10. libtiff version 3.8.2-6 was installed, I installed the libtiff-tools package. I used the same source images as in the previous FreeBSD test. The tiff2pdf syntax is slightly different: tiff2pdf -p a4 -n -j -q 75 filename.tiff > filename.pdf. Here are the resulting PDF files: ub_hp-testpage-2.pdf, ub_mmore.pdf, ub_mmore-2.pdf, ub_tiger.pdf, ub_tiger-2.pdf. I used acroread 7.0.8 to view the pdf files.

2007-03-25: FreeBSD test: testing libtiff (ports: graphics/tiff). It seems that libtiff (ports/graphics/tiff) has problems in recent versions. I converted the source images to pdf files using tiff2pdf. In all cases, the command I used was tiff2pdf -p a4 -n -j -q 75 -o filename.pdf filename.tiff, so filenames correspond. I used acroread7 (7.0.9,1) to view the pdf files.

Results with tiff 3.8.2_1: Resulting files with JPEG compression: hp-testpage.pdf, mmore.pdf, tiger.pdf. With LZW compression: hp-testpage-2.pdf, mmore-2.pdf, tiger-2.pdf.

Results with tiff 3.8.0: Resulting files with JPEG compression: 380-hp-testpage.pdf, 380-mmore.pdf, 380-tiger.pdf. With LZW compression: 380-hp-testpage-2.pdf, 380-mmore-2.pdf, 380-tiger-2.pdf.