Image-ExifTool - Re: How to multiply an EXIF-value?

Posted on Fri May 25 19:00:38 2007 by cocker68 in response to 5228 (See the whole thread of 5)
Re: How to multiply an EXIF-value?

OK - the base of my problem was a fata morgana.
Exiftool does interpret every value of this Pentax-K10D-image correctly:

exiftool Pentax_K10D.jpeg | grep Focal Focal Length : 100.0mm Focal Length In 35mm Format : 150 Focal Length : 100.0mm (35mm equivalent: 150.0mm)

Only the EXIF-module of this Forum shows for whatever reason ten times the value.

But not to appear as a dumbass here, for anyone interested I show a solution in Bash.

F="Pentax_K10D.jpeg"; FL=$(exiftool -FocalLength "$F" | sed -e 's/[^0-9]*\([0-9]*\).*/\1/'); exifto +ol -FocalLength="$((FL/10))" "$F"

This divides the value of FocalLength by 10.

Maybe there is a more elegant solution for that.

- Cocker :wq

Direct Responses: 5230 | Write a response