2016.02.04 07:16 "[Tiff] Image data layout", by Maximilian Heinzler

2016.02.04 14:42 "Re: [Tiff] Image data layout", by Bob Friesenhahn

By the way, is there any definition of how the layout of the image data looks like for odd bit depths (like 7)? I can’t find anything in the specification about this and it looks like that in most cases a big endian layout is used regardless of the file’s endianness. For example, if I use ImageMagick to create a TIFF file with 48 bits per sample, the image data is exactly the same for both little and big endian files.

Yes, the convention is to only swap "native" word sizes, as well as 24-bit (because of an Adobe draft tech note about 16/24 bit float) sizes. For other sizes, the data is packed into contiguous natural "big-endian" order.

You can find various image collections that I created with GraphicsMagick (and a few others) available for ftp from

   ftp://ftp.graphicsmagick.org/pub/tiff-samples/

These exercise a great many permutations, most of which are not used in the real world.

There is no assurance that these are correct, but I think that they are.

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