AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
April 2017

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2017.04.03 17:05 "Reading images with bits per pixel not a multiple of 8", by Dinesh Iyer
2017.04.03 17:50 "Re: Reading images with bits per pixel not a multiple of 8", by Bob Friesenhahn
2017.04.03 18:42 "Re: Reading images with bits per pixel not a multiple of 8", by Roger Leigh
2017.04.03 18:46 "Re: Reading images with bits per pixel not a multiple of 8", by Bob Friesenhahn
2017.04.04 14:00 "Re: Reading images with bits per pixel not a multiple of 8", by Dinesh Iyer
2017.04.04 15:14 "Re: Reading images with bits per pixel not a multiple of 8", by Bob Friesenhahn
2017.04.05 15:50 "Re: Reading images with bits per pixel not a multiple of 8", by Charles Auer

2017.04.03 17:50 "Re: Reading images with bits per pixel not a multiple of 8", by Bob Friesenhahn

On Mon, 3 Apr 2017, Dinesh Iyer 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.

I put sample files (with interesting strange depths) written by 
GraphicsMagick out for ftp under 
ftp://ftp.simplesystems.org/pub/tiff-samples/

In particular

ftp://ftp.simplesystems.org/pub/tiff-samples/tiff-sample-images-be.tar.gz

and

ftp://ftp.simplesystems.org/pub/tiff-samples/tiff-sample-images-le.tar.gz

There are also BigTIFF versions there.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/