2016.02.04 16:34 "Re: [Tiff] Image data layout", by Edward Lam
On 04/02/2016 9:42 AM, Bob Friesenhahn wrote:
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.
Maybe a comment should be added to the source? It certainly looks like a yyp bug for anyone new.