This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
photo:fix_iso [2010/04/17 17:17] Toni Corvera created |
photo:fix_iso [2010/10/30 18:48] Toni Corvera One-line exiftool fix |
||
---|---|---|---|
Line 5: | Line 5: | ||
**This recipe uses the command-line.** | **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. | + | ''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. | ''exiftool'' appears to have some workarounds to read the correct value. | ||
Line 16: | Line 16: | ||
ISO : 400 | ISO : 400 | ||
</code> | </code> | ||
+ | |||
+ | ===== 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 ===== | ===== Setting a fixed value ===== | ||
Line 32: | Line 38: | ||
After: | After: | ||
- | Before: | ||
<code>$ exiv2 IMAGE.JPG | grep ^ISO | <code>$ exiv2 IMAGE.JPG | grep ^ISO | ||
ISO speed : 200 | ISO speed : 200 | ||
Line 39: | Line 44: | ||
===== Setting a correct value ===== | ===== Setting a correct value ===== | ||
- | AFAIK this can't be done in a single command, here's a quick script: | + | <del>AFAIK this can't be done in a single command, here's a quick script:</del>D'oh, it's in the manpage: |
- | + | ||
- | <code> | + | |
- | #!/bin/sh | + | |
- | # - fixiso - | + | |
- | for arg ; do | + | |
- | ISO=`exiftool -iso "$1" | cut -d':' -f2 | sed 's/ *//g'` | + | |
- | [ "$ISO" ] || continue | + | |
- | [ "$ISO" -gt 0 ] || continue | + | |
- | exiftool -P -overwrite_original "-exif:iso=$ISO" -if 'not $exif:iso' "$1" | + | |
- | shift | + | |
- | done | + | |
- | </code> | + | |
+ | $ exiftool -P -overwrite_original '-exif:iso<iso' -if 'not $exif:iso' "$1" | ||
===== Locating manually (in case exiftool can't) ===== | ===== Locating manually (in case exiftool can't) ===== |