ExifTool won't read JPEG ImageDescription after editing metadata — how can I repair the file?
Asked 6/16/2021
1 views
2 answers
0
I added a note to a JPEG using nomacs, which writes to Exif.Image.ImageDescription. The note is visible in nomacs and in the Xfce file manager, but exiftool does not show it when I run:
exiftool my-image.jpg
I also tried:
exiftool -EXIF:ImageDescription my-image.jpg
exiftool -Exif:ImageDescription my-image.jpg
This suggests the JPEG metadata may be corrupted or stored in a way ExifTool can't properly read. Is there a way to repair the JPEG metadata so ExifTool can extract the tags again, ideally while preserving as much existing metadata as possible?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
5y ago
2 Answers
3
(In addition to Romeo Ninov's great answer)
There is an Exiftool FAQ alternative, that tries to repair JPEG file-metadata and preserve existing tags:
exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile my-image.jpg
ExifTool may be used to fix metadata problems in JPEG images by deleting all metadata and rebuilding it from scratch. [...]
This command deletes all metadata then copies all writable tags that can be extracted from the original image to the same locations in the updated image. The
"Unsafe"tag is a shortcut for unsafe EXIF tags in JPEG images which are not normally copied. JPEG images may also contain an ICC color profile which should be preserved. The"ICC_Profile"tag is also marked as unsafe, but is not part of the EXIF so it isn't covered by the"Unsafe"shortcut and must be specified separately.
After repairing an image like this you should be able to write to it without errors, but note that some metadata from the original image may have been lost in the process.
Note: ExifTool will not modify the JPEG image data, so if the image itself is corrupted (eg. if you get a message saying "Not a valid JPEG"), then ExifTool can not be used to repair the image. Also, ExifTool may not be used like this to repair TIFF-based files or RAW files -- the risk of image corruption is too great because the image is stored in the same IFD as the metadata in these files.
Originally by user99611. Source · Licensed CC BY-SA 4.0
user99611
5y ago
0
Generated from our catalog & community — verify before relying on it.
If nomacs and your file manager can see the note but ExifTool cannot, the JPEG’s metadata is likely damaged or inconsistent.
Two ExifTool-based fixes were suggested:
- Rebuild metadata while preserving readable tags
exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile my-image.jpg
This strips metadata, then copies back all writable tags ExifTool can recover, including unsafe EXIF tags and the ICC profile.
- Clean all metadata completely
exiftool -all= my-image.jpg
This is simpler, but it removes all metadata.
If you only want to remove the problematic field, try:
exiftool -EXIF:ImageDescription= my-image.jpg
To inspect duplicate or differently named tags, use:
exiftool -a my-image.jpg
So the issue is probably not your command syntax; it’s that the metadata in the file needs cleanup or rebuilding before ExifTool can read it reliably.
Recommended products
UniqueBot
AI5y ago
Your Answer
Related Questions
How can I read the as-shot white balance/color temperature from a Nikon NEF RAW file?
Can a partially corrupted JPEG be recovered if the original memory card data is gone?
Can corrupted NEF or RW2 raw files be repaired when previews show pink/misaligned data?
Can partially corrupted Canon CR2 files be repaired, or at least have the preview image extracted?
Can you save default Batch Queue Manager settings in digiKam?