2004.12.28 02:41 "[Tiff] how to insert or replace a image in multi-page tiff file using libtiff", by Kelvin Zhong

2004.12.29 15:15 "[Tiff] Re: how to insert or replace a image in multi-page tiff", by Gary McGath

As an addition, it would be logical for empty IFDs to be created if the requested pagenumbers is greater than the current number of images in the file. For example I want to insert an image at page 8 (start counting at 1) to a TIFF file that has only 6 images. I would end up with a IFD #6 linking to an empty IFD, and this empty IFD would link to the new image at position 8.

Do the commonly used multipage capable decoders deal with empty IFDs? Are they legal by the spec?

Each image type requires certain tags in an IFD. You could make a case that an empty IFD signifies no image, but then I'd expect it would just be skipped over, not that it would generate a blank page. A blank page is an image; with an empty IFD, you can't even say what its dimensions are.