AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.04.18 20:08 "removing a page from a multi-page file", by Chris Losinger
2003.04.18 17:49 "RE: removing a page from a multi-page file", by Belshan, James

2003.04.18 17:49 "RE: removing a page from a multi-page file", by Belshan, James

I don't know LibTiff, but I think you can use it to change IFD header info. So you might be able to use it to change the NextIFD offset that points to the objectionable page to point to the subsequent IFD instead (or 0 if there is no subsequent IFD).

The only downside I know of, is that the unwanted information is still hidden within the file, taking up space and available to curious, perceptive people. If you're not concerned about either of these, then this solution seems easiest to me, because none of the offsets in the file change.

The simple thing about this method is that you're not touching the image data at all. Unless, if you're worried about security, you could overwrite that section of the file with 0's or something.

Before
IFD1 --> IFD2
IFD2 --> IFD3
IFD3 --> 0

After
IFD1 --> IFD3
IFD2
IFD3 --> 0

Hope this helps...

James