[Magick-bugs] Crash convert tif -> pdf
Holtkamp, Pablo
pablo.holtkamp at materna.de
Wed Jan 12 01:19:38 PST 2005
Hello,
I'm using ImageMagick 6.1.8-1 convert.exe on Win2000. I'm trying to convert
tif to pdf:
C:\x>convert fx12.tif fx12.pdf
C:\x>convert fax.tif fax.pdf
convert: fax.tif: Read error on strip 0; got 84824 bytes, expected 84826..
C:\x>convert fax3.tif fax3.pdf
convert: fax3.tif: Read error at scanline 4294967295; got 14046 bytes,
expected 14048..
In all cases ImageMagick crashes with Stack Overflow. Possibly the tif file
is buggy, although in all viewers it is displayed correctly.
The tif's content are:
C:\x>j:\cygwin\bin\tiffinfo.exe fx12.tif
TIFF Directory at offset 0x8
Subfile Type: (0 = 0x0)
Image Width: 1728 Image Length: 2346
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 2346
Planar Configuration: single image plane
Page Number: 1-2
TIFF Directory at offset 0x42b0
Subfile Type: (0 = 0x0)
Image Width: 1728 Image Length: 2346
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 2346
Planar Configuration: single image plane
Page Number: 2-2
C:\x>j:\cygwin\bin\tiffdump.exe fx12.tif
fx12.tif:
Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 17072 (0x42b0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<1728>
ImageLength (257) SHORT (3) 1<2346>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<3>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<222>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2346>
StripByteCounts (279) LONG (4) 1<16850>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<2 1>
Directory 1: offset 17072 (0x42b0) next 0 (0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<1728>
ImageLength (257) SHORT (3) 1<2346>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<3>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<17286>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2346>
StripByteCounts (279) LONG (4) 1<84870>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<2 2>
and
C:\x>j:\cygwin\bin\tiffinfo.exe fax.tif
TIFF Directory at offset 0x8
Subfile Type: multi-page document (2 = 0x2)
Image Width: 1728 Image Length: 2339
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 2339
Planar Configuration: single image plane
Page Number: 0-2
Group 3 Options: (0 = 0x0)
TIFF Directory at offset 0xea
Subfile Type: multi-page document (2 = 0x2)
Image Width: 1728 Image Length: 2339
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 2339
Planar Configuration: single image plane
Page Number: 1-2
Group 3 Options: (0 = 0x0)
C:\x>j:\cygwin\bin\tiffdump.exe fax.tif
fax.tif:
Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 234 (0xea)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) LONG (4) 1<1728>
ImageLength (257) LONG (4) 1<2339>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<3>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<476>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2339>
StripByteCounts (279) LONG (4) 1<16806>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
Group3Options (292) LONG (4) 1<0>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<2 0>
Directory 1: offset 234 (0xea) next 0 (0)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) LONG (4) 1<1728>
ImageLength (257) LONG (4) 1<2339>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<3>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<17290>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2339>
StripByteCounts (279) LONG (4) 1<84826>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
Group3Options (292) LONG (4) 1<0>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<2 1>
and
C:\x>j:\cygwin\bin\tiffinfo.exe fax3.tif
TIFF Directory at offset 0x8
Subfile Type: (0 = 0x0)
Image Width: 1728 Image Length: 2339
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 2339
Planar Configuration: single image plane
Group 3 Options: (0 = 0x0)
C:\x>j:\cygwin\bin\tiffdump.exe fax3.tif
fax3.tif:
Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) LONG (4) 1<1728>
ImageLength (257) LONG (4) 1<2339>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<3>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<238>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2339>
StripByteCounts (279) LONG (4) 1<14048>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
Group3Options (292) LONG (4) 1<0>
ResolutionUnit (296) SHORT (3) 1<2>
At http://www.asmail.be/msg0054927530.html I found a hint that
StripByteCounts must be SHORT, but this contradicts other web sites as
http://www.compix.com/fileformattif.htm and didn' change anything. It only
leads to
Premature EOL at scanline 630 (got 0, expected 1728)..
before the crash.
At any rate, ImageMagick shouldn't crash on corrupt tif files. Do you know
this item? Is there a fix planned? Can you tell me what bug is in my tif
files?
Thank you in advance,
Pablo
More information about the Magick-bugs
mailing list