2017.04.03 17:50 "Re: [Tiff] Reading images with bits per pixel not a multiple of 8", by Bob Friesenhahn
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.
I put sample files (with interesting strange depths) written by GraphicsMagick out for ftp under ftp://ftp.simplesystems.org/pub/tiff-samples/
There are also BigTIFF versions there.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/