Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
photo:fix_iso [2010/04/17 17:20]
Toni Corvera +metadata reload
photo:fix_iso [2010/10/30 18:48] (current)
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 38: Line 38:
  
 After: After:
-Before: 
 <​code>​$ exiv2 IMAGE.JPG | grep ^ISO <​code>​$ exiv2 IMAGE.JPG | grep ^ISO
 ISO speed       : 200 ISO speed       : 200
Line 45: 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) =====
photo/fix_iso.1271524814.txt.gz · Last modified: 2010/04/17 17:20 by Toni Corvera
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki