2011.06.15 15:20 "Re: [Tiff] bug in G4 encoder.", by Erik Thiele
this email goes to the debian bug 630042 and to the tiff mailinglist people. the tiff mailinglist people helped to find the problem. thanks for that.
first we use the debian version (which is based on libtiff 3.9.4) to compress the original g3 to g4. it works without errors:
neu$ tiffcp -c g4 gimpcrop.g3.tiff debian_g4.tiff
now lets convert it back with the debian version. this gives a lot of errors and produces a corrupted image:
neu$ tiffcp -c g3 debian_g4.tiff debian_g3.tiff
Fax4Decode: debian_g4.tiff: Bad code word at line 17 of strip 9 (x 0).
Fax4Decode: Warning, debian_g4.tiff: Premature EOL at line 17 of strip 9 (got 0, expected 4519).
Fax4Decode: Warning, debian_g4.tiff: Line length mismatch at line 44 of strip 9 (got 4520, expected 4519).
Fax4Decode: Warning, debian_g4.tiff: Line length mismatch at line 53 of strip 9 (got 4574, expected 4519).
Fax4Decode: Warning, debian_g4.tiff: Premature EOL at line 63 of strip 9 (got 72, expected 4519).
i can try the same steps with my own compiled original 3.9.4 tiff library. they work without errors:
neu$ /home/global/erik/localinst/tiff-3.9.4/bin/tiffcp -c g4 gimpcrop.g3.tiff 3.9.4_g4.tiff
neu$ /home/global/erik/localinst/tiff-3.9.4/bin/tiffcp -c g3 3.9.4_g4.tiff 3.9.4_g3.tiff
as an additional test I try if the debian g4 image is corrupted by converting it to g3 using the own compiled 3.9.4 tiff library. the resulting image is not corrupted:
neu$ /home/global/erik/localinst/tiff-3.9.4/bin/tiffcp -c g3 debian_g4.tiff imm.tiff
if i check for duplicates it all seems to be reasonable:
neu$ md5sum *tiff |sort
5ccf6a9ecffbb1bb786a4d533842ef5c 3.9.4_g3.tiff (original)
5ccf6a9ecffbb1bb786a4d533842ef5c gimpcrop.g3.tiff (original)
5ccf6a9ecffbb1bb786a4d533842ef5c imm.tiff (original)
e9e0c41b94a32bfd620be39c3c2894c7 3.9.4_g4.tiff (good G4)
e9e0c41b94a32bfd620be39c3c2894c7 debian_g4.tiff (good G4)
f2226fb5a0f7a223368789b0bdd88a51 debian_g3.tiff (bad G3)
so to sum it all up:
the debian tiff library is based on the original 3.9.4 (i hope :-) ). the original 3.9.4 is working.
the debian version is not working.
the not working debian version can create correct G4 images.
the not working debian version can not decode some G4 images.
so if my analysis is not wrong, it would now be up to the debian maintainer to fix the problem?
cu & thanks!