AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.10.20 18:40 "[Tiff] the BitsPerSymbol tag", by Sachin Garg
[...]
2004.10.28 15:18 "Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes BYTES_per_sample as parameter?", by Sachin Garg
2004.10.28 15:43 "Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takesBYTES_per_sample as parameter?", by Gerben Vos
2004.10.28 16:29 "Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes BYTES_per_sample as parameter?", by Bob Friesenhahn
2004.10.28 17:58 "Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes BYTES_per_sample as parameter?", by Sachin Garg
2004.10.28 18:39 "Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes BYTES_per_sample as parameter?", by Andrey Kiselev
[...]

2004.10.28 18:39 "Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes BYTES_per_sample as parameter?", by Andrey Kiselev

On Thu, Oct 28, 2004 at 08:48:41PM +0530, Sachin Garg wrote:

Also, is it that in a tiff, bits_per_sample can take only some valid values, or can any value be assigned/expected for this tag? (4, 8, 16, 24, 32 seem to be popular ones but are these the only valid values, or can I expect other values like 3, 6, 19 etc... too)

The bits_per_sample value can be almost any value. I have used libtiff with values ranging from 1 to 32 without problem. For example, 7 is a legitimate value. Most software only reads and writes 1 and powers of two, but TIFF files with bits_per_sample of 10 or 12 are in common use for some trades (e.g. to support medical/scientific CCD cameras).

Thanks Bob, this means that I should be expecting any bit-depth in a tiff image.

But I am confused (as mentioned in my original post) how tiffcp routines (cpSeparateBufToContigBuf and cpContigBufToSeparateBuf) handle all bit-depths, they seem to be byte oriented.

The answer is simple: tiffcp doesn't support such images (howewer, as it was noted, channel interleaved images with unusual bit depths may be processed correctly).

Andrey

--
Andrey V. Kiselev

Home phone: +7 812 5274898 ICQ# 26871517