Sigma lens identified as Canon lens

Started by koenkooi, November 16, 2019, 05:36:08 AM

Previous topic - Next topic

koenkooi

I was writing a script to sort my photos between Canon lenses and 3rd party lenses, so I can process the Canon ones in DPP4 first and the others go straight into Lightroom:
LENSID="$(exiftool -m -LensID "${1}" | awk -F": " '{print $2}')"

if [ "${LENSID:0:5}" != "Canon" ] ; then


This worked well enough until the new Sigma EF-M lens:

imac:DPP import koen$ exiftool -ver
11.76
imac:DPP import koen$ exiftool /Volumes/EOS_DIGITAL/DCIM/100CANON/IMG_7111.JPG  | grep -i lens
Lens Type                       : Unknown (4208)
Shutter Release Without Lens    : Enable
Retract Lens On Power Off       : Enable
Lens Info                       : 56mm f/0
Lens Model                      : 56mm F1.4 DC DN | Contemporary 018
Lens Serial Number              : 0000000000
Lens                            : 56.0 mm
Lens ID                         : Canon 56mm F1.4 DC DN | Contemporary 018
Lens                            : 56.0 mm (35 mm equivalent: 90.5 mm)


I copied over the entry from Sony.pm into Canon.pm and voila:

imac:exiftool koen$ ./exiftool /Volumes/EOS_DIGITAL/DCIM/100CANON/IMG_7111.JPG build | grep -i lens
Lens Type                       : Sigma 56mm F1.4 DC DN | C
Error: File not found - build
Shutter Release Without Lens    : Enable
Retract Lens On Power Off       : Enable
Lens Info                       : 56mm f/0
Lens Model                      : 56mm F1.4 DC DN | Contemporary 018
Lens Serial Number              : 0000000000
Lens                            : 56.0 mm
Lens ID                         : Sigma 56mm F1.4 DC DN | C
Lens                            : 56.0 mm (35 mm equivalent: 90.5 mm)


Attached to this post are a sample JPEG picture straight from the camera as well as a patch to add the Canon.pm entry. I does shorten the name a lot, but I wanted to keep the same output between camera brands.

Phil Harvey

Thanks.  ExifTool 11.77 will support this new lens.

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