TIFF Tag RowsPerStrip

IFDImage
Code278 (hex 0x0116)
NameRowsPerStrip
LibTiff nameTIFFTAG_ROWSPERSTRIP
TypeSHORT or LONG
Count1
Default2**32 - 1

Description

The number of rows per strip.

TIFF image data can be organized into strips for faster random access and efficient I/O buffering.

RowsPerStrip and ImageLength together tell us the number of strips in the entire image. The equation is:

StripsPerImage = floor ((ImageLength + RowsPerStrip - 1) / RowsPerStrip).

StripsPerImage is not a field. It is merely a value that a TIFF reader will want to compute because it specifies the number of StripOffsets and StripByteCounts for the image.

Note that either SHORT or LONG values can be used to specify RowsPerStrip. SHORT values may be used for small TIFF files. It should be noted, however, that earlier TIFF specification revisions required LONG values and that some software may not accept SHORT values.

The default is 2**32 - 1, which is effectively infinity. That is, the entire image is one strip. Use of a single strip is not recommended. Choose RowsPerStrip such that each strip is about 8K bytes, even if the data is not compressed, since it makes buffering simpler for readers. The 8K value is fairly arbitrary, but seems to work well.

Related tags