Skip to content

Commit

Permalink
Merge pull request #1456 from czgnp/0.27-maintenance
Browse files Browse the repository at this point in the history
Update canonmn_int.cpp
  • Loading branch information
clanmills authored Jan 18, 2021
2 parents 57bdd27 + 5ca778b commit aa43be4
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/canonmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,7 @@ namespace Exiv2 {
{ 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
{ 368, "Sigma 35mm f/1.4 DG HSM | A" }, // 12
{ 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" },
Expand Down Expand Up @@ -2132,7 +2133,7 @@ namespace Exiv2 {
{ 250, printCsLensByFocalLength }, // not tested
{ 254, printCsLensByFocalLength },
{ 255, printCsLensByFocalLength }, // not tested
{ 368, printCsLensByFocalLength },
{ 368, printCsLensByFocalLengthAndMaxAperture },
{ 491, printCsLensByFocalLength },
{ 493, printCsLensByFocalLength }, // not tested
{ 624, printCsLensByFocalLengthTC },
Expand Down Expand Up @@ -3217,6 +3218,9 @@ namespace Exiv2 {
else if (frac == 0x14) {
frac = 64.0f / 3;
}
else if ((val == 160) && (frac == 0x08)) { // for Sigma f/6.3 lenses that report f/6.2 to camera
frac = 30.0F / 3;
}
return sign * (val + frac) / 32.0f;
}

Expand Down
Binary file added test/data/Sigma_14-24mm_F2.8_DG_HSM_A_for_EOS.exv
Binary file not shown.
Binary file added test/data/Sigma_28mm_F1.4_DG_HSM_A_for_EOS.exv
Binary file not shown.
Binary file added test/data/Sigma_35mm_F1.4_DG_HSM_A_for_EOS.exv
Binary file not shown.
Binary file added test/data/Sigma_40mm_F1.4_DG_HSM_A_for_EOS.exv
Binary file not shown.
Binary file added test/data/Sigma_50mm_F1.4_DG_HSM_A_for_EOS.exv
Binary file not shown.
Binary file not shown.
77 changes: 77 additions & 0 deletions tests/bugfixes/github/test_pr_1456.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-

import system_tests

class CanonSigmaLens_28mm_F14_DG_HSM_A(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/pull/1455"

filename = "$data_path/Sigma_28mm_F1.4_DG_HSM_A_for_EOS.exv"
commands = ["$exiv2 -pa --grep lensType/i $filename"]
stderr = [""]
stdout = [""
"""Exif.CanonCs.LensType Short 1 Sigma 28mm f/1.4 DG HSM | A
"""
]
retval = [0]


class CanonSigmaLens_35mm_F14_DG_HSM_A(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/pull/1455"

filename = "$data_path/Sigma_35mm_F1.4_DG_HSM_A_for_EOS.exv"
commands = ["$exiv2 -pa --grep lensType/i $filename"]
stderr = [""]
stdout = [""
"""Exif.CanonCs.LensType Short 1 Sigma 35mm f/1.4 DG HSM | A
"""
]
retval = [0]

class CanonSigmaLens_40mm_F14_DG_HSM_A(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/pull/1455"

filename = "$data_path/Sigma_40mm_F1.4_DG_HSM_A_for_EOS.exv"
commands = ["$exiv2 -pa --grep lensType/i $filename"]
stderr = [""]
stdout = [""
"""Exif.CanonCs.LensType Short 1 Sigma 40mm f/1.4 DG HSM | A
"""
]
retval = [0]

class CanonSigmaLens_50mm_F14_DG_HSM_A(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/pull/1455"

filename = "$data_path/Sigma_50mm_F1.4_DG_HSM_A_for_EOS.exv"
commands = ["$exiv2 -pa --grep lensType/i $filename"]
stderr = [""]
stdout = [""
"""Exif.CanonCs.LensType Short 1 Sigma 50mm f/1.4 DG HSM | A
"""
]
retval = [0]

class CanonSigmaLens_14_24mm_F28_DG_HSM_A(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/pull/1455"

filename = "$data_path/Sigma_14-24mm_F2.8_DG_HSM_A_for_EOS.exv"
commands = ["$exiv2 -pa --grep lensType/i $filename"]
stderr = [""]
stdout = [""
"""Exif.CanonCs.LensType Short 1 Sigma 14-24mm f/2.8 DG HSM | A
"""
]
retval = [0]

class CanonSigmaLens_60_600mm_F45_63_DG_OS_HSM_S(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/pull/1455"

filename = "$data_path/Sigma_60-600mm_F4.5-6.3_DG_OS_HSM_S_for_EOS.exv"
commands = ["$exiv2 -pa --grep lensType/i $filename"]
stderr = [""]
stdout = [""
"""Exif.CanonCs.LensType Short 1 Sigma 60-600mm f/4.5-6.3 DG OS HSM | S
"""
]
retval = [0]

0 comments on commit aa43be4

Please sign in to comment.