I need to get a string that consists of the information from the image's EXIF meta data. For example, I would like:
CameraModel, Focal Length in 35mm Format: 24mm, F11, 1/500, ISO 200
I could see all the information present from
identify -format '%[EXIF:*]' image.jpg
However, I'm having trouble consolidating the output and generate the information.
The first problem, while '%[EXIF:*]' prints all EXIF data, if I replace the star with a specific EXIF tag, it doesn't print out anything. I know I could simply print out all EXIF data a few times and use grep
to get the one I need, then combine them together, but it feels better to retrieve just the value I'm looking for.
The second problem, the aperture value FNumber is in a format like "63/10", but I need it to be 6.3; Annoyingly, the shutter speed ExposureTime is like 10/5000 and I need it to be 1/500. What kind of conversion do I need for each case?
Thanks!
This works fine for me in Imagemagick 6.9.9.29 Q16 Mac OSX.
CameraModel=DMC-FZ30, FocalLengthIn35mmFilm: 35 mm, F2.8, .125 sec, ISO 200
Or alternately,
CameraModel=DMC-FZ30, FocalLengthIn35mmFilm: 35 mm, F2.8, 1/8 sec, ISO 200