Reputation: 437
imfinfo of my image gives the following:
Filename: 'drosophila.tif'
FileModDate: '10-Nov-2009 18:52:42'
FileSize: 264768
Format: 'tif'
FormatVersion: []
Width: 512
Height: 512
BitDepth: 8
ColorType: 'grayscale'
FormatSignature: [73 73 42 0]
ByteOrder: 'little-endian'
NewSubFileType: 0
BitsPerSample: 8
Compression: 'PackBits'
PhotometricInterpretation: 'BlackIsZero'
StripOffsets: [32x1 double]
SamplesPerPixel: 1
RowsPerStrip: 16
StripByteCounts: [32x1 double]
XResolution: 72
YResolution: 72
ResolutionUnit: 'Inch'
Colormap: []
PlanarConfiguration: 'Chunky'
TileWidth: []
TileLength: []
TileOffsets: []
TileByteCounts: []
Orientation: 1
FillOrder: 1
GrayResponseUnit: 0.0100
MaxSampleValue: 255
MinSampleValue: 0
Thresholding: 1
Offset: 264322
how many strips are there?
Upvotes: 0
Views: 218
Reputation: 1331
generic logic:
ceil(Height/RowsPerStrip)
The TIFF specifications states that the last strip need not be full (hence the CEIL call).
Or, the length of the StripOffsets from the info structure. As the name implies, this is a vector of byte offsets to each strip in the file (so there has to be one offset per strip).
Upvotes: 2
Reputation: 16906
32.
Height: 512
RowsPerStrip: 16
512 = 2^9; 16=2^4. Divide to get 2^5 which is 32.
Upvotes: 1