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

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

Hi All,

Thank you everyone for helping me to solve my confusions. I started reading graphics_encyclopedia and also about tiff file format from that book. Thanks for such nice reference.

Still, I have some more confusions/questions. Please help me to clear my confusions. Hope these questions might be of interest to others beginners in tiff image file format :) Please excuse me if some of my questions don't make sense, these are my confusions only...

For bi-level image, we need only 2 bits (1 black, 0 white or vice-versa). But, I have seen tiff images where bps is not only 1 but it varies from 1 to 64. Why do we have so many extra bits, what are they needed for?

And, sometimes, sampleformat is unsigned/signed integer and even float( i have tiff float bi-level sample image), what does this float and negative samples mean for bi-level, also for greyscale, RGB images? If we have palette image, doesnt it mean that pixel value is infact index to color map or color lookup table (dont know the exact term), but what will happen in float, signed case? I am very confused in this question.

For RGB images, bps can be 4,8,16... but spp must be 3. Total no. of colors that can be represented is 2 ^ bps. And if value of R=G=B, does this mean it is grey-scale image?

Colors in RGB images have fixed set of values for R,G,B. Colors for palette images have color map. Bi-level images are only black/white.

How is color determined(not actually color but grey-scale shades) in grey-scale images??

What will happen if our photometric interpretation is 3 i.e. palette image, but there is no color map? Is it possible for such thing to happen? Who saves this color map or is it in tiff image by default??

I need to handle tiff images that are spp = 1,3; bps = 1,8,16,32; signed/unsigned/float sample format; planar configuration contig; RGB with only 3 samples, alpha/extra channels not to be considered; how should I start differentiating all the possible images,a brief hint/guideline just to start....I would really appreciate that. Do I need to worry about photometric interpretation for this??

Thank you very much.

Cheers,

Keshab