Author Topic: Old Sigma lens info not being displayed  (Read 1117 times)

Offline swagen

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Old Sigma lens info not being displayed
« on: February 14, 2023, 12:21:25 PM »
Hello,

I am browsing some old Canon CR2 raw files from Canon EOS 400D taken with a Sigma 20mm EX f/1.8 lens. Unfortunately, Photo Mechanic shows empty field for the {lenstype} variable. It correctly identifies the focal length in the {lens} variable as 20mm though.

Looking at the output from exiftool -a -G1 -s, and filtering for lens, it does show the correct lens:



[Canon]         LensType                        : Canon EF 14mm f/2.8L USM or Sigma Lens
[Canon]         LensModel                       :
[Composite]     Lens                            : 20.0 mm
[Composite]     LensID                          : Sigma 20mm EX f/1.8
[Composite]     Lens35efl                       : 20.0 mm (35 mm equivalent: 32.4 mm)


I realise that since this is marked as a [Composite] tag source, the LensID is computed by Exiftool by using heuristics that it can glean from looking at other fields. Is there a possibility for Photo Mechanic to also do something similar, so the correct lens is being displayed?

I am running Photo Mechanic Plus Version 6.0, build 6738 (5753775) on macOS Ventura 13.2.1 on M1 CPU.

I have attached a sample image.

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Old Sigma lens info not being displayed
« Reply #1 on: February 14, 2023, 04:43:57 PM »
I discussed this with the developers and it looks like we are not able to support Sigma lenses on Canon cameras. We aren't sure what they are using to determine what lens was used to take the photo. However, I am wondering if there's some way to workaround this to help you achieve what you are looking for. Is it just that you want to see this information when you come across an image shot with that lens, or do you want to do some task that depends on identifying all of the images shot with that lens?

Offline swagen

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Old Sigma lens info not being displayed
« Reply #2 on: February 14, 2023, 11:03:43 PM »
Hello. I mostly want to:

- filter and search for photos using this lens in Photo Mechanic Plus catalogs
- see the lens info when browsing individual pictures

According to https://exiftool.org/TagNames/Composite.html, Exiftool is using few sets of fields to determine lenses, depending on brand of camera.

Unfortunately the LensID field that Exiftool shows is not writable, or I would've just written the correct info there. Can you tell me from which exact EXIF tag does Photo Mechanic fill in the {lenstype} variable? Perhaps I could fill it in there.

I do have a workaround because I only ever used that lens with one particular body, but it is a bit kludgy, because I've also used other lenses at that focal length, so the filter gets a bit unwieldy, and also I can't see the info when browsing individual photos in a larger catalog.

Offline Dub

  • Full Member
  • ***
  • Posts: 164
    • View Profile
    • instantsphotos
Re: Old Sigma lens info not being displayed
« Reply #3 on: February 15, 2023, 12:02:59 AM »
Hello,

I got around this problem, recurrent with Sigma lenses and bodies, by creating a "Code replacements" file.

For example with the 150-600 Sports:
Sigma 150-600mm f/6.3-3.4   Sigma 150-600 mm f/5-6,3 DG OS HSM Sports
Sigma 150-600mm f/5.6-3.4   Sigma 150-600 mm f/5-6,3 DG OS HSM Sports
Sigma 150-600mm f/5-22   Sigma 150-600 mm f/5-6,3 DG OS HSM Sports
Sigma 150-600mm f/5.6-25   Sigma 150-600 mm f/5-6,3 DG OS HSM Sports

I use <{lenstype}< (< being my delimiter) in the unused "Sources" field.

 ;)
French and "English" with DeepL ¯\_(ツ)_/¯
MPB 13" M1 / Monterey
https://instantsphotos.fr/

Offline swagen

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Old Sigma lens info not being displayed
« Reply #4 on: February 16, 2023, 11:21:27 AM »
Unfortunately code replacements won't work for me in that case, since there's nothing to replace from - the lenstype field is empty.

Offline Mick O (Camera Bits)

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 524
    • View Profile
    • Camera Bits
Re: Old Sigma lens info not being displayed
« Reply #5 on: February 16, 2023, 03:58:19 PM »
Well, since you are good with ExifTool, I will say that while LensID might not be writable, you can use ExifTool to write to LensModel and Photo Mechanic will pick that up and display it.

Edit to add:  I ran this on your file:

Code: [Select]
exiftool "-LensModel<LensID" sigma-20mm-400d.cr2

And after that {lenstype} returned "Sigma 20mm EX f/1.8"

-Mick
« Last Edit: February 16, 2023, 04:27:20 PM by Mick O (Camera Bits) »
Mick O
Camera Bits

Offline swagen

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Old Sigma lens info not being displayed
« Reply #6 on: February 23, 2023, 03:05:55 PM »
Yeah, I guess that's a solution, given that it's a one-off at least for me - I no longer have neither Sigma nor Canon :)

Thanks. I wasn't sure what EXIF field was being read by Photo Mechanic for this, your post answered that.

Cheers.

Offline swagen

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Old Sigma lens info not being displayed
« Reply #7 on: February 24, 2023, 11:04:53 PM »
For future reference, this is how I ended up adding that info:

exiftool "-LensModel<LensID" -r -ext cr2 -if '$LensID eq "Sigma 20mm EX f/1.8"' -progress /path/to/my/photo/folder

This command recurively scanned all of my CR2 files and if the LensID matched - updated the LensModel field. I did this to a copy of my pictures first, then verified that everything is fine and deleted the _original files that ExifTool creates. I could've just told it to not create them, but I felt that it's safer that way.

After a full catalog sync - as the quick one doesn't read updated metadata - Photo Mechanic Plus now shows the correct metadata, which is great!

Thanks again Mick, and everybody else who helped. Much appreciated.