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

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


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

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
Download your free TIFF tag viewer for windows here: