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

2016.02.05 00:22 "Re: [Tiff] Image data layout", by Bob Friesenhahn

On Do, Feb 04, 2016 at 15:42:18, Bob Friesenhahn wrote:

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.

Ok, I already thought that this is more of "by convention" rather than "by definition". The swapping of the 128 bits still confuses me, but I guess I will just use a workaround to handle this.

The format on disk is ultimately what is important. Libtiff swaps certain sizes upon read/write for the API user into the form used natively by the CPU. The swapping for 24 bit float is a bit weird but there may actually be a "standard" for this based on OpenGL, IEEE floating point standards, and what GPUs do.

TIFF does specify the convention for sample packing for some subformats and everything else is by logical extrapolation.

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

Wow, these were great for testing. After I adjusted the code for the 24-bit floats, I was able to display them all correctly. They also reflect what I learned from all the test images I collected, so I would agree that they are correct.

I would say that this signifies considerable confidence in your code. :-)

Only a tiny subset of TIFF readers are able to read most of the files.

Do you plan to implement BigTIFF support?

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