Error "Warning: Duplicate IPTC-NAA tag in IFD0"

Started by Gnarlodious, September 21, 2012, 09:19:52 PM

Previous topic - Next topic

Gnarlodious

I have about 50 scanned images out of 1500 that send error "Warning: Duplicate IPTC-NAA tag in IFD0". Is there a way to repair these files? Searched Google but nothing on this error.

Phil Harvey

I'd need a sample for testing to be sure, but you could try this:

exiftool -iptc:all= -tagsfromfile @ -iptc:all DIR

I'm not sure if this will work.  If not, doing it in 2 steps should work:

exiftool -iptc:all= -o temp DIR
exiftool -tagsfromfile DIR/%f.%e -iptc:all temp


After this, the files in the "temp" directory should be OK.

- 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 ($).

Gnarlodious

Thanks, the first one worked. I added  -overwrite_original and lost no data. What an incredibly utilitarian peice of software you have written!

Gnarlodious

One more question. Is there a way to test the integrity of metadata without writing to the file?

Phil Harvey

ExifTool is not designed as a validation tool.  It reports a number of errors when reading, and more when writing, but it doesn't report everything.

- 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 ($).