Selectively delete a middle IFD from a TIFF?

Started by fiendish, July 13, 2021, 02:23:27 PM

Previous topic - Next topic

fiendish

Is it possible to delete just specific IFDs? I have a multi page TIFF file with IFDs 0, 1, 2, 3, and I want to delete one of the IFDs from it.

First I tried exiftool -ifd2:all= -m myfile and got "Warning: Not a deletable group: ifd2".

So I said OK, maybe IFD2 just isn't defined for deletion and I'd have to add a configuration for it, let me try at least deleting IFD1 instead to see if that works.

exiftool -ifd1:all= -m myfile gave "Warning: Deleting IFD1 also deletes subsequent IFD's and possibly image data - myfile     1 image files updated" which sure enough removed IFDs 1, 2, and 3. But I only want one IFD removed, not all subsequent ones, including removing IFD2 without removing IFD3. Is that possible?

Phil Harvey

ExifTool doesn't manipulate TIFF image data like this.  There are probably TIFF utilities that will do this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).