Package: libtiff4
Version: 3.9.4-5+squeeze2

there somehow is a bug in the encoding of COMPRESSION_CCITTFAX4.

it creates corrupted files that can still be partly loaded but contain
image errors.

i trapped into the problem using own coded software but created a
reproduction procedure for using the gimp as an example.

steps to reproduce:

use debian squeeze. gimp version 2.6.10-1, but does probably not matter.
i guess only the libtiff4 version matters.

load the file gimpcrop.g3.tiff (attached to this bugreport) with the
gimp. just do file save as and choose the name "mytest.tiff". then
choose G4 compression and save!

you should get a file with the exactly same content than in
"gimpcrop.g4.tiff"

if you try to load this new file with imagemagick (type "display
gimpcrop.g4.tiff" or your own mytest.tiff picture...), you will get:

display: gimpcrop.g4.tiff: Bad code word at line 17 of strip 9 (x 0).
`Fax4Decode' @ warning/tiff.c/TIFFErrors/493.
display: gimpcrop.g4.tiff: Premature EOL at line 17 of strip 9 (got 0,
expected 4519). `Fax4Decode' @ warning/tiff.c/TIFFWarnings/703.
display: gimpcrop.g4.tiff: Line length mismatch at line 44 of strip 9
(got 4520, expected 4519). `Fax4Decode' @ warning/tiff.c/TIFFWarnings/703.
display: gimpcrop.g4.tiff: Line length mismatch at line 53 of strip 9
(got 4574, expected 4519). `Fax4Decode' @ warning/tiff.c/TIFFWarnings/703.
display: gimpcrop.g4.tiff: Premature EOL at line 63 of strip 9 (got 72,
expected 4519). `Fax4Decode' @ warning/tiff.c/TIFFWarnings/703.

also you can load the picture with the gimp. same errors. the image will
have a black strip from left to right which should not be there also it
has other errors.


the bug should be easy to reproduce.

thanks
Erik

<<attachment: gimpcrop.g3.tiff>>

<<attachment: gimpcrop.g4.tiff>>

Reply via email to