1998.05.13 03:45 "TIFFGetField", by Cheung Koon Tung, Kent

Hi all,

From the TIFF6.0 specification, some tags may have two or more possible data types, such as RowsPerStrip, ImageWidth and ImageHeight. Will GetField guarantee that the datatype of the value got from GetField has already been considered? What I am worrying about is, for example, an image with with 100(hex) will have ImageWidth FFFF0100 instead of 00000100 since the value stored in the TIFF file is only a 16-bit unsiged integer but the space reserved is 32 bits. The extra 16 bits spaces can have any values.

Also, how can I distinguish whether an image is a colour image or binary/ gray image? Searching through the documents, I think that when the image has PhotometricInterpretion value of 1 or 2, then it is binary/ grey. Is my guess correct?

Thank you for anyone who helps me sorting out these problems in advance.

Rgds,
Kent Cheung.