2018.06.29 10:08 "[Tiff] Writing tiles out of order", by Roger Leigh

2018.06.29 10:08 "[Tiff] Writing tiles out of order", by Roger Leigh

Hi folks,

Right now I'm using libtiff to write tiled images completely in order: each tile of each plane in ascending order, adding new IFDs as needed. One of my users has asked if it's possible to stripe writes across directories. That is, for example, to write Tile 0 of IFDs 0-12, then Tile 1 of IFDs 0-12 etc.

Looking at the API, it's possible to visit previously written IFDs, but you have to call TIFFRewriteIFD, which gets expensive to duplicate when you have 10k-100k tiles per image and will be rewriting that many times over. If I reopen an old IFD and then call TIFFWrite*Tile, should I expect this to work, and update the existing IFD tile offsets+sizes in place, or is this strictly forbidden?

Thanks,

Roger