2016.11.14 20:13 "Re: [Tiff] Right way to make a multi-resolution pyramid", by Kemp Watson
Thanks for all the various opinions. I take it this means there is NO prescribed “right way” to make image pyramids within the TIFF specification; especially since a subresolution subimage of a subresolution subimage is unimplemented in libtiff (which, though not the TIFF spec, appears to be the defacto go-to implementation), and that’s the very definition of an image pyramid :(
W. Kemp Watson
On 2016-11-14, 2:02 PM, "Even Rouault" <firstname.lastname@example.org> wrote:
On lundi 14 novembre 2016 13:16:25 CET Kemp Watson wrote:
What is the ³correct² or canonical way to make a (tiled)
pyramid in TIFF?
Most implementations I¹ve seen simply chain top-level IFDs together,
starting with the base or full-res layer, and going smaller from there
the apex. this seems wrong to me.
This is indeed the accepted practice in the geospatial field for example. I've never seen use of SubIFD mechanism.
Normal chaining + use of NewSubfileType = FILETYPE_REDUCEDIMAGE is sufficient if you have only one full-res layer.
The description of the SubIFD tag indicates it should be used for reduced-resolution images. To make matters more complex, the
tag, which appears to be a different ³sub-file² type than a SubIFD,
can be used for top-level pages/images, also indicates a value for a reduced-resolution image.
And, if a SubIFD is used, should it point to a chain of IFDs at the
level, or to an image with a SubIFD pointing to an image, ongoing recursively (which appears to me most correct, but most complex)?
From what I can see in libtiff code ( https://github.com/vadz/libtiff/blob/master/libtiff/tif_dir.c#L430), attaching a SubIFD to a SubIFD insn't supoprted on the write side.
W. Kemp Watson
Objective Pathology Services Limited
tel. +1 (416) 970-7284