2017.05.22 11:53 "Re: [Tiff] JPEG compressed RGB tiled TIFF with chroma subsampling", by Yakov Galka
On Thu, May 11, 2017 at 11:48 PM, <firstname.lastname@example.org> wrote:
I don't think I've come across a reader which doesn't handle this case. Almost all jpeg-in-tiff files use this mode, so you really have to.
I take my words back. The only viewers that worked were mspaint and the windows photo viewer. IIPImage seems to have tried to support it but has a bug and fails. OpenCV imread fails. Pretty much every code that does not expect to handle this case *specifically* fails. Which I expect to be the majority of TIFF reading code in the wild.
It's arguably a basic misdesign with tiff: writers are simple (you can describe almost any pixel layout with a tiff header), but readers are hard (you have to be able to read almost any pixel layout),
I expect libTIFF to abstract those differences. It is not the only thing that libTIFF chooses to shift the responsibility onto the user of the library even though it could just as cheaply hide those pesky details. Another example would be the tile/strip discrepancy.