<div dir="ltr">I thought that would be problematic, thank you Even for succinctly explaining current state of the art. <br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A cleaner solution, that was discussed some time ago on the libtiff mailing list,<br>
<a href="https://www.asmail.be/msg0054912161.html" rel="noreferrer" target="_blank">https://www.asmail.be/msg0054912161.html</a>, would be to use the TIFF Tree / SubIFD mechanism<br>
that was added per TIFF Tech Note 1:<br>
<a href="https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf" rel="noreferrer" target="_blank">https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf</a><br>
where you can define parent and child IFD<br>
<br>
So the layout would become:<br>
<br>
Image1FullResolution (NewSubFileType = 2 =single page of a multi-page image, SubIFDS = offset of the 2 below overviews, NextIFD = offset of Image2FullResolution)<br>
        Image1OverviewFactor2 (NewSubFileType = 1 =  reduced-resolution, NextIFD = offset of Image1OverviewFactor4)<br>
        Image1OverviewFactor4 (NewSubFileType = 1, NextIFD = 0)<br>
Image2FullResolution  (NewSubFileType = 2, SubIFDS = offset of the 2 below overviews, NextIFD = 0)<br>
        Image2OverviewFactor2 (NewSubFileType = 1, NextIFD = offset of Image2OverviewFactor4)<br>
        Image2OverviewFactor4 (NewSubFileType = 1, NextIFD = 0)<br></blockquote><div><br></div><div> This looks to me like the most reasonable approach, and fits well with the intent of the Tech Note you linked (example they use, thumbnails, is essentially the same as overviews, and potential nesting of SubIFDS fits well with masks for each overview level)</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The libtiff disccussion thread I mentionned also pointed that few TIFF readers (beyond Photoshop)<br>
are able to deal with SubIFDs.<br></blockquote><div><br></div><div>I read through that thread, and it looks like the usual sad story: "optional feature of a spec that fits well the requirements, is not well supported by existing implementations, so people implement domain-specific workarounds with some embedded xml".</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, beyond having a single file, the advantages of putting all those "bands" in the same TIFF files aren't<br>
obvious.<br></blockquote><div><br></div><div>It is a big advantage though, but at some point you have to ask are we re-implementing zip file, or hdf5 or some other filesystem in a file format. The simplicity is gone, and you are probably stuck with just one implementation that understands that exact interpretation of the standard + implementation specific conventions.</div><div><br></div><div>At least for now it looks like the choices are:</div><div><br></div><div>1. Multiple files for related image data, but with overviews and masks in each file</div><div>2. Single file containing all related image data, but without any good story for overviews or masks</div></div></div>