AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.10.01 06:35 "[Tiff] BigTIFF & PDF & tifftools", by Rob van den Tillaart
[...]
2004.10.01 13:49 "Re: [Tiff] quad-tile", by Joris
2004.10.01 09:59 "[Tiff] quad-tile", by Joris
2004.10.01 13:34 "Re: [Tiff] quad-tile", by Frank Warmerdam
2004.10.01 13:57 "Re: [Tiff] quad-tile", by Frank Warmerdam
2004.10.01 15:50 "Re: [Tiff] quad-tile", by Joris
2004.10.02 18:05 "Re: [Tiff] quad-tile", by Joris
[...]

2004.10.01 09:59 "[Tiff] quad-tile", by Joris

People,

I believe quad-tile.tif is a testimage that I got from the 'official' tiff package. I'm having a hard time making sense of it. testimage

This is what the IFD looks like:

ImageWidth (1 Short): 512
ImageLength (1 Short): 384
BitsPerSample (3 Short): 8, 8, 8
Compression (1 Short): LZW
Photometric (1 Short): RGB

StripOffsets (12 Long): 8, 19252, 38898, 59606, 76577, 87844, 98473,... Orientation (1 Short): TopLeft

SamplesPerPixel (1 Short): 3
RowsPerStrip (1 Long): 128

StripByteCounts (12 Long): 19244, 19646, 20708, 16971, 11267, 10629,... MinSampleValue (3 Short): 0, 0, 0

MaxSampleValue (3 Short): 255, 255, 255
PlanarConfig (1 Short): Contig
TileWidth (1 Short): 128
TileLength (1 Short): 128
DataType (3 Short): 0, 0, 0
ImageDepth (1 Short): 1
TileDepth (1 Short): 1

Which is most weird. For starters, it contains strip as well as tile tags. I think this violates the specification, section 15 'Tiled images', second paragraph 'Relationship to existing fields'.

Trying to figure out what is actually contained, I see there are 12 'strip' offsets/bytecounts. This matches the number of tiles I expect from the TileWidth/TileLength tags, it does not match the number of strip I'd expect from the RowsPerStrip tag. So, presumably,

If all of the above is correct, I'm left with one question: what is the rationale with which LibTiff makes sense of this image, because it does, and so I'd like to do the same. Is there a general rule I can apply to at least be able to make sense of what LibTiff makes sense of, even if it violates the spec and is worth same warning generation?

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be

Download your free TIFF tag viewer for windows here: http://www.awaresystems.be/imaging/tiff/astifftagviewer.html