Author Topic: Fixing corrupt files beyond FAQ #20  (Read 1644 times)

jcharmon

  • Jr. Member
  • **
  • Posts: 27
Fixing corrupt files beyond FAQ #20
« on: July 03, 2012, 08:36:31 PM »
I have a number of old images that ExifTool gives errors for when I try to update their metadata (e.g., Error: Can't read InteropIFD data, Warning: Bad InteropOffset SubDirectory start, etc.).

I tried using the fix outlined in FAQ #20, 'exiftool -all= -tagsfromfile @ -all:all -unsafe bad.jpg', but it didn't fix the errors. I'm able to read (almost?) all the metadata.

Although the FAQ #20 fix didn't work, I was able to use a workaround of 1) copying the image, 2) deleting the metadata from the copy with ExifTool and 3) copying the metadata from the original to the copy. Afterwards, I could update the metadata in the copy without problems.

I would have thought that the FAQ @20 method was doing the same thing, but apparently not...

As a newbie, I'm not sure how to craft a script to update several hundred images in a number of different folders. I'm assuming I need to use some kind of piping of commands to reproduce my workaround. Any suggestions would be appreciated.  :)


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14554
    • ExifTool Home Page
Re: Fixing corrupt files beyond FAQ #20
« Reply #1 on: July 04, 2012, 07:45:11 AM »
What version of ExifTool are you using?  The command should work for any recent version.

If it doesn't, please mail me the image (phil at owl.phy.queensu.ca), and the exact command line you used and I'll take a look.

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

jcharmon

  • Jr. Member
  • **
  • Posts: 27
Re: Fixing corrupt files beyond FAQ #20
« Reply #2 on: July 04, 2012, 01:36:26 PM »
Thanks. User error! It seems I misconstrued the ExifTool warnings I was getting, thinking I was getting errors; warnings were reported, but the metadata in the files was fixed.

Problem solved. It's great to have such a powerful tool as ExifTool available. Too bad it's necessary to cope with the mess that camera vendors and other software makers create with metadata today...