Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canon EF 27-200mm f/2.8L IS II USM: Lenstype not properly detected by 0.28.3 #3052

Open
MStraeten opened this issue Oct 4, 2024 · 3 comments
Labels
bug help wanted lens Issue related to lens detection

Comments

@MStraeten
Copy link

Describe the bug

while lens model is properly detected, lenstype is not properly set:

exiv2 -pa --grep lens/i 20150718-IMG_7039.CR2
Exif.CanonCs.LensType                        Short       1  Canon EF 70-200mm f/2.8L IS II USM *OR* Canon EF 70-200mm f/2.8L IS III USM
Exif.CanonCs.Lens                            Short       3  70.0 - 200.0 mm
Exif.Canon.LensModel                         Ascii      74  EF70-200mm f/2.8L IS II USM
Exif.CanonLe.LensSerialNumber                Byte        5  000041f4cd
Exif.Photo.LensSpecification                 Rational    4  70-200mm
Exif.Photo.LensModel                         Ascii      28  EF70-200mm f/2.8L IS II USM
exiv2 -pv --grep lens/i 20150718-IMG_7039.CR2
0x0016 CanonCs      LensType                    Short       1  251
0x0017 CanonCs      Lens                        Short       3  200 70 1
0x0095 Canon        LensModel                   Ascii      74  EF70-200mm f/2.8L IS II USM
0x0000 CanonLe      LensSerialNumber            Byte        5  0 0 65 244 205
0xa432 Photo        LensSpecification           Rational    4  70/1 200/1 0/1 0/1
0xa434 Photo        LensModel                   Ascii      28  EF70-200mm f/2.8L IS II USM

To Reproduce

Steps to reproduce the behavior:
file to reproduce: 20150718-IMG_7039.CR2

Expected behavior

exiv 0.27.6 properly identified that lens

Desktop (please complete the following information):

  • OS and version: macOS 15.0.1
  • Exiv2 version and source: 0.28.3 custom build using macports and adapted portfile; source from exiv2.org
  • Compiler and version: xcode 16
@MStraeten MStraeten added the bug label Oct 4, 2024
@kmilos kmilos added the lens Issue related to lens detection label Oct 4, 2024
@kmilos
Copy link
Collaborator

kmilos commented Oct 4, 2024

In exiv2 0.27.x only the first match was printed. In 0.28.x the Canon detection/dealiasing code was improved, but all matches are printed in the rare case it can not narrow it down.

Unfortunately, there doesn't seem to be anything in the metadata the considers today that makes these two lenses distinguishable.

@MStraeten
Copy link
Author

why does it work with LensModel?
If you can’t distinguish LensType but LensModel, why not use the matching attribute to narrow down the matches?

@kmilos
Copy link
Collaborator

kmilos commented Oct 4, 2024

why does it work with LensModel?

LensModel is an actual string (as confirmed by -pv above), there is no ID number lookup necessary.

Not all Canon bodies used to output LensModel, and I think LensType predates it.

Feel free to use LensModel if you prefer and is suitable for your application and use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted lens Issue related to lens detection
Projects
None yet
Development

No branches or pull requests

2 participants