AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2011

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2011.06.14 11:06 "bug in G4 encoder.", by Erik Thiele
2011.06.14 13:11 "Re: bug in G4 encoder.", by Steve Underwood
2011.06.14 13:46 "Re: bug in G4 encoder.", by Erik Thiele
2011.06.15 15:00 "Re: bug in G4 encoder.", by Steve Underwood
2011.06.15 15:49 "Re: bug in G4 encoder.", by Lee Howard
2011.06.15 05:22 "Re: bug in G4 encoder.", by Lee Howard
2011.06.15 09:25 "Re: bug in G4 encoder.", by Erik Thiele
2011.06.15 14:22 "Re: bug in G4 encoder.", by Bob Friesenhahn
2011.06.15 15:20 "Re: bug in G4 encoder.", by Erik Thiele

2011.06.14 13:46 "Re: bug in G4 encoder.", by Erik Thiele

Am 14.06.2011 15:11, schrieb Steve Underwood:
> On 06/14/2011 07:06 PM, Erik Thiele wrote:
>> Hello,
>>
>> there is a bug in the G4 encoder. attached to this email you find a file
>> "gimpcrop.g3.tiff". it is a correct TIFF file encoded with G3. you can
>> open it with the usual viewers.
>>
>> now do this:
>>
>> bughunt$ tiffcp -c g4 gimpcrop.g3.tiff out.tiff
>>
>> the file gets converted from G3 to G4. the following command shows that
>> the output file is corrupted.
>>
>> bughunt$ tiffcp out.tiff lala.tiff
>> Fax4Decode: out.tiff: Bad code word at line 17 of strip 9 (x 0).
>> Fax4Decode: Warning, out.tiff: Premature EOL at line 17 of strip 9 (got
>> 0, expected 4519).
>> Fax4Decode: Warning, out.tiff: Line length mismatch at line 44 of strip
>> 9 (got 4520, expected 4519).
>> Fax4Decode: Warning, out.tiff: Line length mismatch at line 53 of strip
>> 9 (got 4574, expected 4519).
>> Fax4Decode: Warning, out.tiff: Premature EOL at line 63 of strip 9 (got
>> 72, expected 4519).
>> bughunt$
>>
>> you can open lala.tiff in a viewer and get error messages. usually the
>> viewer anyway views the image, but it contains a horizontal black line,
>> which should not be there. in addition it contains more pixel errors.
>>
>> in case you cannot reproduce the problem, i attached lala.tiff to this
>> email.
>>
>> tiffcp sais:
>> LIBTIFF, Version 3.9.4
>> my debian version of the libtiff4 package is 3.9.4-5+squeeze2
>>
>>
>> I have recently reported this bug on the debian bug tracking system and
>> am hereby forwarding it to you.
>>
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630042
>>
>>
>>
>> cu&  thanks
>> Erik
>>
> Its a rather odd looking image, but libtiff 3.9.5 converts the odd 
> looking G3 image into a matching G4 image.
> 
> Steve
> 

i downloaded 3.9.4 (as this is the supposed buggy version that my debian
uses) and 3.9.5 (as you suggest it is not buggy). i unpacked both and
then did:

cd tiff-3.9.5
./configure --prefix=/home/global/erik/localinst/tiff-3.9.5
make install

cd tiff-3.9.4
./configure --prefix=/home/global/erik/localinst/tiff-3.9.4
make install

then i first checked that there is no linker problems by calling ldd:

bughunt$ ldd ~/localinst/tiff-3.9.4/bin/tiffcp
	linux-gate.so.1 =>  (0xb7723000)
	libtiff.so.3 => /home/global/erik/localinst/tiff-3.9.4/lib/libtiff.so.3
(0xb76c6000)
	libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb768f000)
	libz.so.1 => /usr/lib/libz.so.1 (0xb767a000)
	libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7654000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb750e000)
	/lib/ld-linux.so.2 (0xb7724000)

bughunt$ ldd ~/localinst/tiff-3.9.5/bin/tiffcp
	linux-gate.so.1 =>  (0xb778e000)
	libtiff.so.3 => /home/global/erik/localinst/tiff-3.9.5/lib/libtiff.so.3
(0xb7732000)
	libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb76fb000)
	libz.so.1 => /usr/lib/libz.so.1 (0xb76e6000)
	libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb76c0000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb757a000)
	/lib/ld-linux.so.2 (0xb778f000)

now i called tiffcp to produce output pictures:


bughunt$ ~/localinst/tiff-3.9.4/bin/tiffcp -c g4 gimpcrop.g3.tiff
lala.3.9.4.tiff

bughunt$ ~/localinst/tiff-3.9.5/bin/tiffcp -c g4 gimpcrop.g3.tiff
lala.3.9.5.tiff

i compared output pictures to see they are same:

bughunt$ md5sum lala.3.9.4.tiff lala.3.9.5.tiff
e9e0c41b94a32bfd620be39c3c2894c7  lala.3.9.4.tiff
e9e0c41b94a32bfd620be39c3c2894c7  lala.3.9.5.tiff

i verified that the outputs are buggy:

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

the pictures look as corrupted as described in first email.

what kind of additional problem do we have here?

bughunt$ gcc --version
gcc (Debian 4.4.5-8) 4.4.5

how can we debug?



cu
Erik