2009.05.19 12:32 "[Tiff] Heap corruption caused by TIFFRGBAImageGet() + TIFFSetDirectory() + TIFFRewriteDirectory()", by

2009.06.16 21:50 "Re: [Tiff] Tiff 16 bit and 32 bit images + some more questions about tiff file format", by Keshab Neupane

Hi,

Bilevel images only need 1 bit per pixel.

Larger values make no sense for bilevel images – I think you have made a mistake in parsing those files. Here, what I get from tiffinfo...please note that these are not normal tiff images but geotiff images....

TIFF Directory at offset 0x8 (8)

Image Width: 2160 Image Length: 900
Bits/Sample: 16
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Rows/Strip: 1

  Planar Configuration: single image plane

==> bps = 16, but bi-level images??

TIFF Directory at offset 0x8 (8)
Image Width: 2160 Image Length: 900
Bits/Sample: 16

  Sample Format: signed integer

Compression Scheme: None
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Rows/Strip: 1

  Planar Configuration: single image plane

==> bps = 16, but signed integer sample format, and bi-level images??

TIFF Directory at offset 0xac074 (704628) (why the offset isn't at 8)

 Image Width: 719 Image Length: 245

  Bits/Sample: 32

  Sample Format: IEEE floating point

Compression Scheme: None
Photometric Interpretation: min-is-black
Samples/Pixel: 1

  Rows/Strip: 2

  Planar Configuration: single image plane

==> bps = 32, but bi-level-images and floating point sample format

This is what made me confused. Thanks to Chris and Bob for your support.

I just started playing with tiff files, definitely a long way to go. :)

Cheers,

Keshab