Table of Contents

Fix ISO value in EXIF

Some cameras don't store ISO in the standard EXIF field. Some tools, like Lightroom, won't be able to display the ISO setting for a photo in (some of) these cases.

This recipe uses the command-line.

exiv2 has a mode (fi) to fix this but is only meant to work with Canon and Nikon cameras. Beware though it might disagree with exiftool when using ISO auto (at least it did for me with an older Canon). Can't say right now which one is right but on my tests exiftool appeared more correct.

exiftool appears to have some workarounds to read the correct value.

This was tested with a Casio Exilim EX-Z850. To test it for other cameras I'd suggest first making a series of photos at each supported ISO and then testing the results, e.g.:

$ exiftool CIMG*.JPG | grep '^ISO'
ISO                             : 50
ISO                             : 100
ISO                             : 200
ISO                             : 400

Photo-manager notes

Metadata-based managers will require a reload of meta-data to read the fixed ISO.

With Lightroom in particular, remember to “Sync” metadata to the files before fixing the ISO value or stuff like keywords and copyright will be lost.

Setting a fixed value

Before:

$ exiv2 IMAGE.JPG | grep ^ISO
ISO speed       :

Update file, e.g. for ISO 200:

$ exiftool -P -overwrite_original -exif:iso=200 IMAGE.JPG

-P preserves photo's modification time
-overwrite_original avoid creating a backup

After:

$ exiv2 IMAGE.JPG | grep ^ISO
ISO speed       : 200

Setting a correct value

AFAIK this can't be done in a single command, here's a quick script:D'oh, it's in the manpage:

$ exiftool -P -overwrite_original '-exif:iso<iso' -if 'not $exif:iso' "$1"

Locating manually (in case exiftool can't)

FIXME This is incomplete since none of my cameras actually need it and I can't test in an actual case

This part is a bit involved. Hopefully it won't be needed, but I'm writing it anyway for future reference, just in case.

If exiftool doesn't know where to look for the ISO information, its -htmlDump option can be used to try and locate a known value on different files, e.g.:

$ exiftool -htmlDump -v CIMG5730.JPG > dump.html

Open dump.html in a browser. ISO will should be in some of the MakerNotes tags. They look like:

0458   20 45 00 03 00 00 00 01   00 0d 00 00     E..........    MakerNotes-29 Tag 0x2045
0464   20 46 00 03 00 00 00 01   20 49 00 00     F...... I..    MakerNotes-30 Tag 0x2046

The value is the second block of hex digits, i.e. (bold and underlined):

0458 20 45 00 03 00 00 00 01 00 0d 00 00 E.......... MakerNotes-29 Tag 0x2045
0464 20 46 00 03 00 00 00 01 20 49 00 00 F...... I.. MakerNotes-30 Tag 0x2046

So ISO 400 should (most probably) have a value of 01 90 00 00 (0190 is hex for 400).

E.g. with my example Exilim, the only such value is MakerNotes-57, which exiftool (as noted above) correctly interprets as ISO:

05a8    30 14 00 03 00 00 00 01   01 90 00 00     0...........    MakerNotes-57 ISO

References

http://exiv2.org/tags.html