News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

can not change LensType with decimal part

Started by pjlm, February 20, 2021, 04:57:24 PM

Previous topic - Next topic

pjlm

Hi,
I'm quite newbie in exiftool.
I read some pages around my problem, but I think I will turn crazy soon.
I have a Canon EOS 70D DSLR with a "Tamron SP 17-50mm f/2.8 XR Di II VC" lens.
I've read that the LensType number associated is 137.11
Unfortunately when I try to change it I can not:

> exiftool -lenstype#=137.11 a.CR2
    1 image files updated
> exiftool -a -G1 "-lens*" a.CR2
[Canon]         Lens Type                       : Canon EF 85mm f/1.2L USM or Sigma or Tamron Lens
[Canon]         Lens Type                       : Canon EF 85mm f/1.2L USM or Sigma or Tamron Lens
[Canon]         Lens Model                      : 17-50mm
[CanonCustom]   Lens Drive No AF                : Focus search on
[ExifIFD]       Lens Info                       : 17-50mm f/0
[ExifIFD]       Lens Model                      : 17-50mm
[ExifIFD]       Lens Serial Number              : 0000000000
[Composite]     Lens                            : 17.0 - 50.0 mm
[Composite]     Lens ID                         : Sigma 17-50mm f/2.8 OS HSM or Tamron SP 17-50mm f/2.8 XR Di II VC
[Composite]     Lens                            : 17.0 - 50.0 mm (35 mm equivalent: 26.8 - 78.8 mm)
> exiftool -a -G1 -LensType# a.CR2
[Canon]         Lens Type                       : 137
[Canon]         Lens Type                       : 137

I know that the decimal part of the lens type number is used for internal purpose only, but it seems that nothing changes after setting it.
How can I solve that?
Thanks a lot.
--
Pascal

Phil Harvey

The ".11" is not actually stored in the file.  It is an index used by ExifTool to differentiate between all the lenses which use the same LensType number of 137.

Unfortunately, the Sigma and Tamron 17-50mm f/2.8 can't be distinguished based on the lens parameters.  Your best bet is to also write -LensModel="Tamron SP 17-50mm f/2.8 XR Di II VC"

- 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 ($).

pjlm

#2
Thanks a lot Phil.
I add the -LensModel keyword, but unfortunately it does not help Lightroom to recognize properly my lens. I have to do this manually.
--
Pascal

pjlm

Hi,
I've discovered that lightroom use the xmp-aux and xmp-crs tags to store it's own stuff on lenses. So I wrote a small script that I run before importing my photos and if the LensType# is 137 I add the following tags

-XMP-aux:Lens=17-50mm
-XMP-aux:LensID=137
-XMP-aux:LensInfo='17-50mm f/2.8'
-XMP-crs:LensProfileEnable=1
-XMP-crs:LensProfileFilename='Canon (TAMRON SP 17-50mm F2.8 DiII VC B005E) - RAW.lcp'
-XMP-crs:LensProfileName='Adobe (TAMRON SP 17-50mm F/2.8 DiII VC B005E, Canon)'
-XMP-crs:LensProfileSetup=Custom

Not very elegant but it works.
--
Pascal