2017.04.03 17:05 "[Tiff] Reading images with bits per pixel not a multiple of 8", by Dinesh Iyer

2017.04.03 18:42 "Re: [Tiff] Reading images with bits per pixel not a multiple of 8", by Roger Leigh

On 03/04/2017 18:50, Bob Friesenhahn wrote:

My understanding is that after calling TIFFReadEncodedStrip/Tile the data I get back is packed i.e. one sample might have all its bits stored across a byte-boundary. Is this true for all cases or does this apply only for PackBits compression?

It applies for all cases.

Except for depths 8, 16, and 24 (which are swapped to "native" endianness by libtiff), the data is always ordered in most-significant-bit order

so you need to start with the top bits.

What about 32, 48 and 64 bit variants which are all multiples of these specially handled sizes?

Just wondering because I am not currently doing any special case handling for 32-bit and higher sizes.

Thanks,

Roger