Detect Sigma 18-35mm f/1.8 DC HSM (firmware 2.x)
On Canon bodies and lens firmware 1.x, this lens identifies itself using model number 150. Starting with firmware 2.x, this lens now identifies itself using model number 368. Exiv2 was correctly identifying the former but not the latter. This commit also fixes a pre-existing bug in which exiv2 was not correctly disambiguating lenses using model number 368.
This commit is contained in:
@@ -1147,6 +1147,7 @@ namespace Exiv2 {
|
||||
{ 368, "Sigma 105mm f/1.4 DG HSM" }, // 8
|
||||
{ 368, "Sigma 14-24mm f/2.8 DG HSM" }, // 9
|
||||
{ 368, "Sigma 70mm f/2.8 DG Macro" }, // 10
|
||||
{ 368, "Sigma 18-35mm f/1.8 DC HSM | A" }, // 11
|
||||
{ 488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM" },
|
||||
{ 489, "Canon EF 70-300mm f/4-5.6L IS USM" },
|
||||
{ 490, "Canon EF 8-15mm f/4L Fisheye USM" },
|
||||
@@ -1281,6 +1282,7 @@ namespace Exiv2 {
|
||||
{ 250, printCsLensByFocalLength }, // not tested
|
||||
{ 254, printCsLensByFocalLength },
|
||||
{ 255, printCsLensByFocalLength }, // not tested
|
||||
{ 368, printCsLensByFocalLength },
|
||||
{ 491, printCsLensByFocalLength },
|
||||
{ 493, printCsLensByFocalLength }, // not tested
|
||||
{ 624, printCsLensByFocalLengthTC },
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
class Canon_Sigma_18_35_F18_DC_HSM(metaclass=system_tests.CaseMeta):
|
||||
url = "https://github.com/Exiv2/exiv2/issues/1368"
|
||||
|
||||
filename1 = "$data_path/Canon_Sigma_18_35_F18_DC_HSM_firmware_1xx.exv"
|
||||
filename2 = "$data_path/Canon_Sigma_18_35_F18_DC_HSM_firmware_2xx.exv"
|
||||
commands = ["$exiv2 -pa -K Exif.CanonCs.LensType $filename1",
|
||||
"$exiv2 -pa -K Exif.CanonCs.LensType $filename2"]
|
||||
stderr = ["", ""]
|
||||
stdout = [
|
||||
"""Exif.CanonCs.LensType Short 1 Sigma 18-35mm f/1.8 DC HSM | A
|
||||
""",
|
||||
"""Exif.CanonCs.LensType Short 1 Sigma 18-35mm f/1.8 DC HSM | A
|
||||
"""
|
||||
]
|
||||
retval = [0, 0]
|
||||
Reference in New Issue
Block a user