Patch #1122
Lens Detection with Teleconverter - Sigma 150-500mm f/5-6.3 APO DG OS HSM again
100%
Description
When coupled with the Canon 2x teleconverter the Sigma 150-500mm f/5-6.3 APO DG OS HSM is once again not detected. The numeric ID reported is 173 which is also used by some other lenses. Simply adding a new tag entry for 173 with this lens name is not sufficient as the minimum and maximum focal lengths in the EXIF are scaled to account for the TC, i.e. reported as 300-1000 rather than 150-500. As far as I can see this is the first lens + TC combination to appear in an ID conflict.
For now, I have introduced a hack that deals with this specific combination and I attach a patch. I will see if I can think of something a little more generic and, if I do, will submit that too.
Files
Associated revisions
#1122 Adding regression detector to the test suite. Thank You, Steve, for the test image.
History
Updated by Steve Fosdick about 6 years ago
- File generic.patch generic.patch added
Here is a second patch, this time more generic. This works by repeating the search by focal length with the focal length scaled down.
Updated by Robin Mills about 6 years ago
- Status changed from New to Assigned
- Target version set to 0.26
Thanks, Steve. I'll take a look at that tomorrow.
Updated by Robin Mills about 6 years ago
- Status changed from Assigned to Resolved
- Assignee set to Robin Mills
- % Done changed from 0 to 100
Patch 'generic.patch' submitted r3971. Thank You, Steve for working on this and providing the patch.
Steve:
I've only recently taken on support for Maker Notes, so I'm not familiar with this code. What you've done "smells right" and hasn't broken our test suite. So I've submitted your generic patch.
Do you have any images that we can add to our test suite for any/all of the 173 lensID lenses? These are listed in src/canonmn.cpp:
{ 173, "Canon EF 180mm Macro f/3.5L" }, // 0 { 173, "Sigma 180mm EX HSM Macro f/3.5" }, // 1 { 173, "Sigma APO Macro 150mm f/3.5 EX DG IF HSM" }, // 2 { 173, "Sigma 150-500mm f/5-6.3 APO DG OS HSM + 2x" }, // 3I don't want to burden Niels who has recently retired from Exiv2 to attend college in addition to his very demanding job. If any issue surfaces surrounding this, I might ask him to help. For the moment, I'll set the status to 100% resolved.
Updated by Steve Fosdick about 6 years ago
Of the three lenses I only have the Sigma 150-500 so I attach an image taken with this and the 2x converter. Without the converter this lens uses ID 174.
Updated by Robin Mills about 6 years ago
Thank You, Steve for the image. A very nice photo. I've extracted the metadata to the file test/data/exiv2-bug1122.exv and updated test/bugfixes.sh to read your file. r3972
The reason to extract the metadata is to save space in the test suite. I did this with the following commands:
603 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -ea http://dev.exiv2.org/attachments/download/844/sigma_150-500%202x_test.jpg 604 rmills@rmillsmbp:~/gnu/exiv2/trunk $ mv sigma_150-500%202x_test.exv test/data/exiv2-bug1122.exv
Updated by Robin Mills about 6 years ago
- Status changed from Resolved to Closed
I'm going to set the status of this to closed. It has been 100% resolved for some time without further incident.
#1122 Thank You, Steve for the patch.