Feature #1252
Detect Sigma 120-300 EX on Canon
100%
Description
The list of Sigma lenses for Canon EOS is missing the Sigma 120-300mm f/2.8 EX APO DG OS HSM. It shares the same value 174 with the Sigma 150-500mm f/5-6.3 APO DG OS HSM and some other lenses.
I cannot provide a manufacturer link, as the lens is discontinued by Sigma and replaced by the new Art series 120-300.
Attached are sample images of the two 174 lenses I own. They are both correctly detected with the provided patch. For the lens name, I used the same name scheme as in the Sigma 70-200mm f/2.8 EX DG APO OS HSM, which also shares the 174 value in canonmn.cpp
.
Files
Associated revisions
History
Updated by Markus Durzinsky about 5 years ago
Patched exiv2 results with the images.
> exiv2 -pv *sample1.jpg | grep LensType sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg 0x0016 CanonCs LensType Short 1 174 sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg 0x0016 CanonCs LensType Short 1 174 > exiv2 -pt *sample1.jpg | grep LensType sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.LensType Short 1 Sigma 120-300mm f/2.8 EX APO DG OS HSM sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.LensType Short 1 Sigma 150-500mm f/5-6.3 APO DG OS HSM
Updated by Robin Mills about 5 years ago
- Category set to lens
- Status changed from New to Closed
- Assignee set to Robin Mills
- Target version set to 0.26
- % Done changed from 0 to 100
- Estimated time set to 1.00 h
Markus
Thanks for the patch. I have reviewed and submitted your patch as it passes the test suite. r4684.
Please read #1251 for a discussion about lens recognition in v0.26.
Thanks for the test image. Here's the behaviour before/after your patch:
645 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa --grep lens/i sigma_*.jpg sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.LensType Short 1 174 sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.Lens Short 3 120.0 - 300.0 mm sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Canon.LensModel Ascii 74 120-300mm sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSpecification Rational 4 120/1 300/1 0/1 0/1 sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensModel Ascii 10 120-300mm sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSerialNumber Ascii 11 0000000000 sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.LensType Short 1 Sigma 150-500mm f/5-6.3 APO DG OS HSM sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.Lens Short 3 150.0 - 500.0 mm sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Canon.LensModel Ascii 74 150-500mm sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSpecification Rational 4 150/1 500/1 0/1 0/1 sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensModel Ascii 10 150-500mm sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSerialNumber Ascii 11 0000000000 646 rmills@rmillsmbp:~/gnu/exiv2/trunk $ makes make warning: no debug symbols in executable (-arch x86_64) 20 423 6304 sudo make install 108 602 8275 647 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa --grep lens/i sigma_*.jpg sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.LensType Short 1 Sigma 120-300mm f/2.8 EX APO DG OS HSM sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.Lens Short 3 120.0 - 300.0 mm sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Canon.LensModel Ascii 74 120-300mm sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSpecification Rational 4 120/1 300/1 0/1 0/1 sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensModel Ascii 10 120-300mm sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSerialNumber Ascii 11 0000000000 sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.LensType Short 1 Sigma 150-500mm f/5-6.3 APO DG OS HSM sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.CanonCs.Lens Short 3 150.0 - 500.0 mm sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Canon.LensModel Ascii 74 150-500mm sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSpecification Rational 4 150/1 500/1 0/1 0/1 sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensModel Ascii 10 150-500mm sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Exif.Photo.LensSerialNumber Ascii 11 0000000000 648 rmills@rmillsmbp:~/gnu/exiv2/trunk $
I've extracted the metadata from your test images and added them to our test suite as test/data/exiv2-bug1252a.exv and test/data/exiv2-bug1252b.exv :
648 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -ea --verbose --force sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg File 1/1: sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg Writing Exif data from sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg to ./sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.exv Writing XMP data from sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.jpg to ./sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.exv 649 rmills@rmillsmbp:~/gnu/exiv2/trunk $ mv sigma_120_300_2.8_EX_APO_DG_OS_HSM_sample1.exv test/data/exiv2-bug1252a.exv 650 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -ea --verbose --force sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg File 1/1: sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg Writing Exif data from sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg to ./sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.exv Writing XMP data from sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.jpg to ./sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.exv 651 rmills@rmillsmbp:~/gnu/exiv2/trunk $ mv sigma_150_500_5_6.3_APO_DG_OS_HSM_sample1.exv test/data/exiv2-bug1252b.exv
I've update the test suite appropriately as a "regression detector" should your patch be broken by a future change in canonmn.cpp.
Thank you for using Exiv2 and contributing to its development.
Robin
#1252 Patch submitted. Thank You to Markus for the patch and test files. Test suite updated appropriately.