Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Bad PreviewIFD directory error with EXIFTool

📅 2014-Dec-05 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ error, exiftool ⬩ 📚 Archive

Problem

I tried to change an EXIF tag on a JPG file using the exiftool command at the shell. I got this warning and error:

$ exiftool -Exif:Copyright="Obama" DSC_0023.JPG
Warning: Truncated PreviewIFD directory. IFD dropped. - DSC_0023.JPG
Error: [minor] Bad PreviewIFD directory - DSC_0023.JPG

Solution

The PreviewIFD is a feature related to the image preview that is stored along with the JPG file captured by a Nikon camera. This warning and error can be safely ignored by using the -m option to exiftool:

$ exiftool -m -Exif:Copyright="Obama" DSC_0023.JPG

Tried with: EXIFTool 9.46-1 and Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧