This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== 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.: <code>$ exiftool CIMG*.JPG | grep '^ISO' ISO : 50 ISO : 100 ISO : 200 ISO : 400 </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 ===== Before: <code>$ exiv2 IMAGE.JPG | grep ^ISO ISO speed : </code> Update file, e.g. for ISO 200: <code>$ exiftool -P -overwrite_original -exif:iso=200 IMAGE.JPG</code> ''-P'' preserves photo's modification time \\ ''-overwrite_original'' avoid creating a backup After: Before: <code>$ exiv2 IMAGE.JPG | grep ^ISO ISO speed : 200 </code> ===== Setting a correct value ===== AFAIK this can't be done in a single command, here's a quick script: <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> ===== 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.: <code>$ exiftool -htmlDump -v CIMG5730.JPG > dump.html</code> Open ''dump.html'' in a browser. ISO will should be in some of the MakerNotes tags. They look like: <code> 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 </code> 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__** <nowiki>E..........</nowiki> MakerNotes-29 Tag 0x2045'' \\ ''0464 20 46 00 03 00 00 00 01 **__20 49 00 00__** <nowiki>F...... I..</nowiki> 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: <code> 05a8 30 14 00 03 00 00 00 01 01 90 00 00 0........... MakerNotes-57 ISO </code> ===== References ===== http://exiv2.org/tags.html

photo/fix_iso.1272288475.txt.gz · Last modified: 2010/04/26 13:27 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