AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1997.05.02 07:04 "BIG TIFF file problems", by Hans Christiansen
1997.05.02 09:17 "Re: BIG TIFF file problems", by Bjorn Brox
1997.05.02 09:47 "RE: BIG TIFF file problems", by Caspar Evans
1997.05.02 14:32 "RE: BIG TIFF file problems", by Ed Grissom
1997.05.02 12:45 "RE: BIG TIFF file problems", by Niles Ritter
1997.05.02 21:24 "RE: BIG TIFF file problems", by Ed Grissom
1997.05.02 16:41 "RE: BIG TIFF file problems", by Brian McDougle
1997.05.05 10:04 "RE: BIG TIFF file problems", by Gerben Vos

1997.05.02 09:17 "Re: BIG TIFF file problems", by Bjorn Brox

I am having problems with very large tiff files created by our RIP software.

The tiff file created is a bilevel tiff comprising of uncompressed data in a single strip!! The size of the file is 707,953,939 bytes.

WOW!

  # tiffcp -s -c lzw a1.tif a1c.tif
  a1.tif: Warning, incorrect count for field "StripOffsets" (1, expecting
  111); tag ignored.

This error message is correct, see below:

I have a theory as to why this is happening:

Looking at a tiffdump of the file:

  # tiffdump a1.tif

  ImageWidth (256) LONG (4) 1<85640>
  ImageLength (257) LONG (4) 1<66133>

  StripOffsets (273) LONG (4) 1<174>
  RowsPerStrip (278) SHORT (3) 1<597>
  StripByteCounts (279) LONG (4) 1<707953765>

I noticed that the width (85640) multiplied by the height (66133) (=5,663,630,120) exceeds the maximum possible value of the type uint32 which is 4,294,967,295. It is this 'overflow' that causes tiffcp to fail!

The file tells: RowsPerStrip 597.

This means that there have to be (ImageLength + ImageLength - 1)/RowsPerStrip StripOffset and StripByteCounts values too, i.e. 111.

I am wondering if anyone agrees with my theory.

Well, you migth also get these kinds of errors, but by dividing the file into strips this error can be avoided.

--
Bjorn Brox, mailto:brox@corena.no, CORENA A/S, http://www.corena.no/
P.O.Box 1024, Kongsberg Naeringspark, N-3601 Kongsberg, NORWAY
Phone: +47 32 73 74 35, Fax: +47 32 73 68 77, Mobile: +47 92 63 85 90