2016.11.14 19:02 "Re: [Tiff] Right way to make a multi-resolution pyramid", by Even Rouault
On lundi 14 novembre 2016 13:16:25 CET Kemp Watson wrote:
What is the ³correct² or canonical way to make a (tiled) multi-resolution 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 to
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 NewSubfileType tag, which appears to be a different ³sub-file² type than a SubIFD, since it 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 second 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
Spatialys - Geospatial professional services