Author Topic: LensInfo tag for Canon not updating  (Read 151 times)


  • Newbie
  • *
  • Posts: 1
LensInfo tag for Canon not updating
« on: February 17, 2019, 12:09:03 PM »
Great forum, I've learned alot by reading old posts and was able to put together a script to correct most of the fields in the raw files I'm working on.  I use DXO Photo Lab 2 for reading raw files and applying corrections.  I have a Samyang 24mm f/1.4 lens that doesn't write EXIF data.  I figured that an easy fix is to put lens details for the very similar Canon EF 24mm f/1.4L II USM lens.  I found someone online who posted a raw image with the canon lens and made a script.  Here is the script I used;

#! /bin/bash
# use chmod a+x
# execute as ./ rawimagefilename.CR2

exiftool -LensModel="EF24mm f/1.4L II USM" "$1"
exiftool -n -canon:lenstype=250 "$1"
exiftool -LensInfo="Canon EF24mm f/1.4L II USM" "$1"
exiftool -Lens="24.0 mm" "$1"
exiftool -FocalLength="24.0 mm" -MinFocalLength="24.0 mm" "$1"
exiftool -MaxFocalLength="24.0 mm" "$1"

exiftool reports that 1 image updates for every step, but a check of the resulting file shows the all updates EXCEPT LensInfo are successful.  I tried the exiftool -LensInfo="Canon EF24mm f/1.4L II USM" filename by itself and I get the same result.  Not sure what else to try.


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: LensInfo tag for Canon not updating
« Reply #1 on: February 17, 2019, 12:50:32 PM »
Hi Mike,

Try adding -v3 to the command when writing to see what is happening.

If I knew what model Canon you were using I could try this myself.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).