- Timestamp:
- 2021-02-26T19:39:51+13:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cpan/Image/ExifTool/CanonCustom.pm
r24107 r34921 20 20 use Image::ExifTool::Exif; 21 21 22 $VERSION = '1. 40';22 $VERSION = '1.58'; 23 23 24 24 sub ProcessCanonCustom($$$); … … 1274 1274 Name => 'ISOExpansion', 1275 1275 Notes => 'other models', 1276 PrintConv => { 1277 0 => 'Off', 1278 1 => 'On', 1279 }, 1276 PrintConv => \%offOn, 1280 1277 }, 1281 1278 ], … … 1293 1290 }, 1294 1291 }, 1295 0x0106 => {1292 0x0106 => [{ 1296 1293 Name => 'AEBShotCount', 1297 Count => -1, 1298 Notes => '1 value for the 1DmkIII, 2 for the 1DmkIV', 1299 PrintConv => [{ 1300 0 => 3, 1301 1 => 2, 1302 2 => 5, 1303 3 => 7, 1304 }], 1305 }, 1294 Condition => '$count == 1', 1295 Notes => 'one value for some models...', 1296 PrintConv => { 1297 0 => '3 shots', 1298 1 => '2 shots', 1299 2 => '5 shots', 1300 3 => '7 shots', 1301 }, 1302 },{ 1303 Name => 'AEBShotCount', 1304 Count => 2, 1305 Notes => 'two values for others', 1306 PrintConv => { 1307 '3 0' => '3 shots', 1308 '2 1' => '2 shots', 1309 '5 2' => '5 shots', 1310 '7 3' => '7 shots', 1311 }, 1312 }], 1306 1313 0x0107 => { 1307 1314 Name => 'SpotMeterLinkToAFPoint', … … 1313 1320 0x0108 => { 1314 1321 Name => 'SafetyShift', 1315 Notes => 'value of 2 not used by 40D, 50D, 60D, 5DmkII and 7D',1322 Notes => 'value of 2 not used by some models', # eg. 40D, 50D, 60D, 5DmkII, 7D, 250D 1316 1323 PrintConv => { 1317 1324 0 => 'Disable', … … 1320 1327 }, 1321 1328 }, 1322 0x0109 => { 1329 0x0109 => [{ # (1DXmkIII) 1330 Name => 'UsableShootingModes', 1331 Condition => '$count == 1', 1332 Count => 1, 1333 PrintConv => 'sprintf("Flags 0x%x",$val)', 1334 PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 1335 },{ 1323 1336 Name => 'UsableShootingModes', 1324 1337 Count => 2, … … 1331 1344 '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 1332 1345 ], 1333 } ,1334 0x010a => {1346 }], 1347 0x010a => [{ # (1DXmkIII) 1335 1348 Name => 'UsableMeteringModes', 1336 Count => 2, 1349 Condition => '$count == 1', 1350 Count => 1, 1351 PrintConv => 'sprintf("Flags 0x%x",$val)', 1352 PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 1353 },{ 1354 Name => 'UsableMeteringModes', 1355 Count => 2, 1337 1356 PrintConv => [ 1338 1357 \%disableEnable, … … 1343 1362 '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 1344 1363 ], 1345 } ,1364 }], 1346 1365 0x010b => { 1347 1366 Name => 'ExposureModeInManual', … … 1354 1373 }, 1355 1374 }, 1356 0x010c => {1375 0x010c => [{ 1357 1376 Name => 'ShutterSpeedRange', 1377 Condition => '$count == 3', 1358 1378 Count => 3, 1359 1379 ValueConv => [ … … 1377 1397 '$val=~m{([\d./]+)} ? eval $1 : 0', 1378 1398 ], 1379 }, 1380 0x010d => { 1399 },{ # (EOS R) 1400 Name => 'ShutterSpeedRange', 1401 Condition => '$count == 4', 1402 Count => 4, 1403 ValueConv => [ # (NC) 1404 'exp(-$val/(1600*log(2)))', 1405 'exp(-$val/(1600*log(2)))', 1406 'exp(-$val/(1600*log(2)))', 1407 'exp(-$val/(1600*log(2)))', 1408 ], 1409 ValueConvInv => [ 1410 'int(-log($val)*1600*log(2) + 0.5)', 1411 'int(-log($val)*1600*log(2) + 0.5)', 1412 'int(-log($val)*1600*log(2) + 0.5)', 1413 'int(-log($val)*1600*log(2) + 0.5)', 1414 ], 1415 PrintConv => [ # (NC) 1416 '"Manual: Hi " . Image::ExifTool::Exif::PrintExposureTime($val)', 1417 '"Lo " . Image::ExifTool::Exif::PrintExposureTime($val)', 1418 '"Auto: Hi " . Image::ExifTool::Exif::PrintExposureTime($val)', 1419 '"Lo " . Image::ExifTool::Exif::PrintExposureTime($val)', 1420 ], 1421 PrintConvInv => [ 1422 '$val=~m{([\d./]+)} ? eval $1 : 0', 1423 '$val=~m{([\d./]+)} ? eval $1 : 0', 1424 '$val=~m{([\d./]+)} ? eval $1 : 0', 1425 '$val=~m{([\d./]+)} ? eval $1 : 0', 1426 ], 1427 }], 1428 0x010d => [{ 1381 1429 Name => 'ApertureRange', 1430 Condition => '$count == 3', 1382 1431 Count => 3, 1383 1432 ValueConv => [ … … 1401 1450 '$val=~/([\d.]+)/ ? $1 : 0', 1402 1451 ], 1403 }, 1452 },{ # (EOS R) 1453 Name => 'ApertureRange', 1454 Condition => '$count == 4', 1455 Count => 4, 1456 ValueConv => [ # (NC) 1457 'exp($val/2400)', 1458 'exp($val/2400)', 1459 'exp($val/2400)', 1460 'exp($val/2400)', 1461 ], 1462 ValueConvInv => [ 1463 'int(log($val)*2400) + 0.5)', 1464 'int(log($val)*2400) + 0.5)', 1465 'int(log($val)*2400) + 0.5)', 1466 'int(log($val)*2400) + 0.5)', 1467 ], 1468 PrintConv => [ # (NC) 1469 'sprintf("Manual: Closed %.2g",$val)', 1470 'sprintf("Open %.2g",$val)', 1471 'sprintf("Auto: Closed %.2g",$val)', 1472 'sprintf("Open %.2g",$val)', 1473 ], 1474 PrintConvInv => [ 1475 '$val=~/([\d.]+)/ ? $1 : 0', 1476 '$val=~/([\d.]+)/ ? $1 : 0', 1477 '$val=~/([\d.]+)/ ? $1 : 0', 1478 '$val=~/([\d.]+)/ ? $1 : 0', 1479 ], 1480 }], 1404 1481 0x010e => { 1405 1482 Name => 'ApplyShootingMeteringMode', … … 1410 1487 { 1411 1488 Name => 'FlashSyncSpeedAv', 1412 Condition => '$$self{Model} =~ /\b 40D\b/',1413 Notes => '40D ',1489 Condition => '$$self{Model} =~ /\b(40D|1Ds Mark III)\b/', 1490 Notes => '40D and 1Ds Mark III', 1414 1491 PrintConv => { 1415 1492 0 => 'Auto', … … 1438 1515 { 1439 1516 Name => 'FlashSyncSpeedAv', 1440 Condition => '$$self{Model} =~ /\b(5D Mark II|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/', 1441 Notes => '5D Mark II, 500D and 550D', 1517 Condition => '$$self{Model} =~ /\bEOS-1Ds? Mark III\b/', 1518 Notes => '1D Mark III and 1Ds Mark III', 1519 PrintConv => { 1520 0 => 'Auto', 1521 1 => '1/300 Fixed', 1522 }, 1523 }, 1524 { 1525 Name => 'FlashSyncSpeedAv', 1526 Condition => '$$self{Model} =~ /\bEOS-1D Mark IV\b/', 1527 Notes => '1D Mark IV', 1528 PrintConv => { 1529 0 => 'Auto', 1530 1 => '1/300-1/60 Auto', 1531 2 => '1/300 Fixed', 1532 }, 1533 }, 1534 { 1535 Name => 'FlashSyncSpeedAv', 1536 Notes => '5D Mark II, 5D Mark III, 500D, 550D, 600D and 1100D', 1442 1537 PrintConv => { 1443 1538 0 => 'Auto', … … 1446 1541 }, 1447 1542 }, 1448 {1449 Name => 'FlashSyncSpeedAv',1450 Condition => '$$self{Model} =~ /\b(EOS-1D Mark IV)\b/',1451 Notes => '1D Mark IV',1452 PrintConv => {1453 0 => 'Auto',1454 1 => '1/300-1/60 Auto',1455 2 => '1/300 Fixed',1456 },1457 },1458 {1459 Name => 'FlashSyncSpeedAv',1460 Notes => '1D Mark III',1461 PrintConv => {1462 0 => 'Auto',1463 1 => '1/300 Fixed',1464 },1465 },1466 1543 ], 1467 1544 0x0110 => { # new for 1DmkIV 1545 Name => 'AEMicroadjustment', 1546 Count => 3, 1547 PrintConv => [ \%disableEnable ], 1548 }, 1549 0x0111 => { # new for 1DmkIV 1468 1550 Name => 'FEMicroadjustment', 1469 1551 Count => 3, 1470 1552 PrintConv => [ \%disableEnable ], 1471 1553 }, 1472 0x0111 => { # new for 1DmkIV 1473 Name => 'AEMicroadjustment', 1474 Count => 3, 1475 PrintConv => [ \%disableEnable ], 1554 0x0112 => [{ # (5DS) 1555 Name => 'SameExposureForNewAperture', 1556 PrintConv => { 1557 0 => 'Disable', 1558 1 => 'ISO Speed', 1559 2 => 'Shutter Speed', 1560 }, 1561 },{ # (EOS R) 1562 Name => 'SameExposureForNewAperture', 1563 Notes => 'EOS R', 1564 PrintConv => { 1565 0 => 'Disable', 1566 1 => 'ISO Speed', 1567 2 => 'ISO Speed/Shutter Speed', 1568 3 => 'Shutter Speed', 1569 }, 1570 }], 1571 0x0113 => { # (200D) 1572 Name => 'ExposureCompAutoCancel', 1573 PrintConv => \%enableDisable, 1574 }, 1575 0x0114 => { # (R) 1576 Name => 'AELockMeterModeAfterFocus', 1577 # metering modes where AE lock after focus applies: 1578 PrintConv => { BITMASK => { # (NC) 1579 0 => 'Evaluative', 1580 1 => 'Partial', 1581 2 => 'Spot', 1582 3 => 'Center-weighted', 1583 }}, 1476 1584 }, 1477 1585 #### 2a) Image … … 1487 1595 { 1488 1596 Name => 'HighISONoiseReduction', 1489 Condition => '$$self{Model} =~ /\b(50D|60D|5D Mark II|7D|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/', 1490 Notes => '50D, 60D, 500D, 550D, 5DmkII and 7D', 1597 Condition => q{ 1598 $$self{Model} =~ /\b(50D|60D|5D Mark II|7D|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/ or 1599 $$self{Model} =~ /\b(600D|T3i|Kiss X5|1100D|T3|Kiss X50)\b/ 1600 }, 1601 Notes => '50D, 60D, 500D, 550D, 600D, 1100D, 5DmkII and 7D', 1491 1602 PrintConv => { 1492 1603 0 => 'Standard', … … 1524 1635 }, 1525 1636 ], 1637 # 0x0205 - Added in 5DmkII firmware update 1526 1638 #### 2b) Flash exposure 1527 1639 0x0304 => { … … 1576 1688 }, 1577 1689 ], 1690 0x040a => { # new for 5DmkIII 1691 Name => 'ViewfinderWarnings', 1692 PrintConv => { BITMASK => { #(NC) 1693 0 => 'Monochrome', # (have seen for: 5DmkII, 6D, 250D, 90D) 1694 1 => 'WB corrected', # (have seen for: 5DmkII, 6D, 90D) 1695 2 => 'One-touch image quality', # (have seen for: 5DmkII; doesn't exist for 6D) 1696 3 => 'ISO expansion', # (have seen for: 5DmkII) 1697 4 => 'Spot metering', # (have seen for: 5DmkII, 6D) 1698 6 => 'Noise reduction', # (have seen for: 250D, 90D) 1699 7 => 'HDR', # (have seen for: 90D) 1700 }}, 1701 }, 1702 0x040b => { # new for 5DmkIII 1703 Name => 'LVShootingAreaDisplay', 1704 PrintConv => { 1705 0 => 'Masked', 1706 1 => 'Outlined', 1707 }, 1708 }, 1709 0x040c => { # (7DmkII) 1710 Name => 'LVShootingAreaDisplay', 1711 PrintConv => { 1712 0 => 'Masked', 1713 1 => 'Outlined', 1714 }, 1715 }, 1578 1716 #### 3a) Auto focus 1579 1717 0x0501 => { … … 1588 1726 Name => 'AIServoTrackingSensitivity', 1589 1727 PrintConv => { 1590 -2 => 'Slow', 1591 -1 => 'Medium Slow', 1728 -2 => 'Slow', # (Locked on -2 for 6D) 1729 -1 => 'Medium Slow', # (Locked on -1 for 6D) 1592 1730 0 => 'Standard', 1593 1 => 'Medium Fast', 1594 2 => 'Fast', 1731 1 => 'Medium Fast', # (Responsive +1 for 6D) 1732 2 => 'Fast', # (Responsive +2 for 6D) 1595 1733 }, 1596 1734 }, … … 1656 1794 { 1657 1795 Name => 'AFPointAreaExpansion', 1796 Condition => '$$self{Model} =~ /\b1Ds Mark III\b/', 1797 Notes => '1Ds Mark III', 1798 PrintConv => { 1799 0 => 'Disable', 1800 1 => 'Enable (left/right Assist AF points)', 1801 2 => 'Enable (surrounding Assist AF points)', 1802 }, 1803 }, 1804 { 1805 Name => 'AFPointAreaExpansion', 1806 Notes => 'other models', 1658 1807 PrintConv => { 1659 1808 0 => 'Disable', … … 1715 1864 }, 1716 1865 }, 1717 0x050c => { 1718 Name => 'AFPointDisplayDuringFocus', 1719 PrintConv => { 1720 0 => 'On', 1721 1 => 'Off', 1722 2 => 'On (when focus achieved)', 1723 }, 1724 }, 1866 0x050c => [ 1867 { 1868 Name => 'AFPointDisplayDuringFocus', 1869 Condition => '$$self{Model} =~ /\b1D\b/', 1870 Notes => '1D models', 1871 PrintConv => { 1872 0 => 'On', 1873 1 => 'Off', 1874 2 => 'On (when focus achieved)', 1875 }, 1876 }, 1877 { 1878 Name => 'AFPointDisplayDuringFocus', 1879 Notes => 'other models', # (7D, 70D, 750D, 760D) 1880 PrintConv => { 1881 0 => 'Selected (constant)', 1882 1 => 'All (constant)', 1883 2 => 'Selected (pre-AF, focused)', 1884 3 => 'Selected (focused)', 1885 4 => 'Disable display', 1886 }, 1887 }, 1888 ], 1725 1889 0x050d => { 1726 1890 Name => 'AFPointBrightness', … … 1733 1897 { 1734 1898 Name => 'AFAssistBeam', 1735 Condition => '$$self{Model} =~ /\b 1D Mark IV\b/',1736 Notes => '1D Mark IV ',1899 Condition => '$$self{Model} =~ /\b(1D Mark IV|6D)\b/', 1900 Notes => '1D Mark IV and 6D', 1737 1901 PrintConv => { 1738 1902 0 => 'Emits', … … 1771 1935 }, 1772 1936 }, 1937 # (this is 2 values for 90D,M6mkII, seen: "1046 1046") 1773 1938 ], 1774 1939 0x0510 => [ # new for 40D 1775 1940 { 1776 Name => 'VFDisplayIllumination', 1941 Name => 'VFDisplayIllumination', # (7D quirk, or decoded incorrectly?) 1777 1942 Condition => '$$self{Model} =~ /\b7D\b/', 1778 1943 Notes => '7D', … … 1814 1979 2 => 'Register', 1815 1980 3 => 'Select AF-modes', 1816 }, 1817 # must decode 2nd value 1981 # also seen: 87 (90D), 1142 (RP) 1982 }, 1983 'sprintf("Flags 0x%x",$val)', # (70D=Manual 1pt,Manual zone,Auto 19pt) 1984 ], 1985 PrintConvInv => [ 1986 undef, 1987 '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 1818 1988 ], 1819 1989 }, … … 1836 2006 Name => 'OrientationLinkedAFPoint', 1837 2007 PrintConv => { 1838 0 => 'Same for ver ical and horizontal',2008 0 => 'Same for vertical and horizontal', 1839 2009 1 => 'Select different AF points', 1840 2010 }, … … 1845 2015 0 => 'Off', 1846 2016 1 => 'AF point selection', 2017 }, 2018 }, 2019 0x0518 => { # new for 6D 2020 Name => 'AccelerationTracking', 2021 }, 2022 0x0519 => { # new for 6D 2023 Name => 'AIServoFirstImagePriority', 2024 PrintConv => { #(NC) 2025 -1 => 'Release priority', 2026 0 => 'Equal priority', 2027 1 => 'Focus priority', 2028 }, 2029 }, 2030 0x051a => { # new for 6D 2031 Name => 'AIServoSecondImagePriority', 2032 PrintConv => { #(NC) 2033 -1 => 'Shooting speed priority', 2034 0 => 'Equal priority', 2035 1 => 'Focus priority', 2036 }, 2037 }, 2038 0x051b => { # (70D) 2039 Name => 'AFAreaSelectMethod', 2040 PrintConv => { 2041 0 => 'AF area selection button', 2042 1 => 'Main dial', 2043 }, 2044 }, 2045 0x051c => { # (750D) 2046 Name => 'AutoAFPointColorTracking', 2047 PrintConv => { 2048 0 => 'On-Shot AF only', 2049 1 => 'Disable', 2050 }, 2051 }, 2052 0x051d => { # (750D/760D) 2053 Name => 'VFDisplayIllumination', 2054 PrintConv => [{ 2055 0 => 'Auto', 2056 1 => 'Enable', 2057 2 => 'Disable', 2058 },{ 2059 0 => 'Non-illuminated', #(NC) 2060 1 => 'Illuminated', #(NC) 2061 }], 2062 }, 2063 0x051e => { # (80D) 2064 Name => 'InitialAFPointAIServoAF', 2065 PrintConv => { 2066 0 => 'Auto', 2067 1 => 'Initial AF point selected', 2068 2 => 'Manual AF point', 1847 2069 }, 1848 2070 }, … … 1857 2079 }, 1858 2080 }, 1859 0x0610 => { 2081 0x0610 => [{ # (1DXmkIII) 2082 Name => 'ContinuousShootingSpeed', 2083 Condition => '$count == 6', 2084 Count => 6, 2085 PrintConv => [ 2086 \%disableEnable, 2087 '"Hi $val"', 2088 '"Cont $val"', 2089 '"Lo $val"', 2090 '"Soft $val"', 2091 '"Soft LS $val"', 2092 ], 2093 PrintConvInv => [ 2094 undef, 2095 '$val=~/(\d+)/ ? $1 : 0', 2096 '$val=~/(\d+)/ ? $1 : 0', 2097 '$val=~/(\d+)/ ? $1 : 0', 2098 '$val=~/(\d+)/ ? $1 : 0', 2099 '$val=~/(\d+)/ ? $1 : 0', 2100 ], 2101 },{ # (1DXmkIII firmware 1.3) 2102 Name => 'ContinuousShootingSpeed', 2103 Condition => '$count == 5', 2104 Count => 5, 2105 PrintConv => [ 2106 '"Hi $val"', 2107 '"Cont $val"', 2108 '"Lo $val"', 2109 '"Soft $val"', 2110 '"Soft LS $val"', 2111 ], 2112 PrintConvInv => [ 2113 '$val=~/(\d+)/ ? $1 : 0', 2114 '$val=~/(\d+)/ ? $1 : 0', 2115 '$val=~/(\d+)/ ? $1 : 0', 2116 '$val=~/(\d+)/ ? $1 : 0', 2117 '$val=~/(\d+)/ ? $1 : 0', 2118 ], 2119 },{ # others 1860 2120 Name => 'ContinuousShootingSpeed', 1861 2121 Count => 3, … … 1870 2130 '$val=~/(\d+)/ ? $1 : 0', 1871 2131 ], 1872 } ,2132 }], 1873 2133 0x0611 => { 1874 2134 Name => 'ContinuousShotLimit', … … 1883 2143 ], 1884 2144 }, 2145 0x0612 => [{ # (1DXmkIII) 2146 Name => 'RestrictDriveModes', 2147 Condition => '$count == 1', 2148 Count => 1, 2149 PrintConv => 'sprintf("Flags 0x%x",$val)', 2150 PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 2151 },{ # (1DX) 2152 Name => 'RestrictDriveModes', 2153 Count => 2, 2154 PrintConv => [ 2155 \%disableEnable, 2156 'sprintf("Flags 0x%x",$val)', # (Single,Cont Hi,Cont Lo,Timer 10,Timer 2,Silent,Super Hi) 2157 ], 2158 PrintConvInv => [ 2159 undef, 2160 '$val=~/0x([\dA-F]+)/i ? hex($1) : undef', 2161 ], 2162 }], 1885 2163 #### 4a) Operation 1886 2164 0x0701 => [ 1887 2165 { 1888 2166 Name => 'Shutter-AELock', 1889 Condition => '$$self{Model} =~ /\b(1000D|XS|Kiss F|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/', 1890 Notes => '500D, 550D and 1000D', 2167 Condition => q{ 2168 $$self{Model} =~ /\b(1000D|XS|Kiss F|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/ or 2169 $$self{Model} =~ /\b(600D|T3i|Kiss X5|1100D|T3|Kiss X50)\b/ 2170 }, 2171 Notes => '500D, 550D, 600D, 1000D and 1100D', 1891 2172 PrintConv => { 1892 2173 0 => 'AF/AE lock', … … 1894 2175 2 => 'AF/AF lock, No AE lock', 1895 2176 3 => 'AE/AF, No AE lock', 2177 }, 2178 }, 2179 { 2180 Name => 'Shutter-AELock', 2181 Condition => '$count == 2', 2182 Notes => '250D', 2183 PrintConv => { 2184 '0 0' => 'AF/AE lock', 2185 '1 0' => 'AE lock/AF', 2186 '2 0' => 'AF/AF lock, No AE lock', 2187 '3 0' => 'AE/AF, No AE lock', 1896 2188 }, 1897 2189 }, … … 1964 2256 { 1965 2257 Name => 'SetButtonWhenShooting', 1966 Condition => '$$self{Model} =~ /\b(450D|XSi|Kiss X2|550D|T2i|Kiss X4 )\b/',1967 Notes => '450D and 550D; value of 5 is new for 550D',2258 Condition => '$$self{Model} =~ /\b(450D|XSi|Kiss X2|550D|T2i|Kiss X4|600D|T3i|Kiss X5)\b/', 2259 Notes => '450D, 550D and 600D; value of 5 is new for 550D', 1968 2260 PrintConv => { 1969 2261 0 => 'Normal (disabled)', … … 1977 2269 { 1978 2270 Name => 'SetButtonWhenShooting', 2271 Condition => '$$self{Model} =~ /\b(1100D|T3|Kiss X50)\b/', 2272 Notes => '1100D', 2273 PrintConv => { 2274 0 => 'Normal (disabled)', 2275 1 => 'Image quality', 2276 2 => 'Flash exposure compensation', 2277 3 => 'LCD monitor On/Off', 2278 4 => 'Menu display', 2279 5 => 'Depth-of-field preview', 2280 }, 2281 }, 2282 { 2283 Name => 'SetButtonWhenShooting', 1979 2284 Condition => '$$self{Model} =~ /\b(1000D|XS|Kiss F)\b/', 1980 2285 Notes => '1000D', … … 1999 2304 5 => 'Disabled', 2000 2305 }, 2306 }, 2307 { 2308 Name => 'SetButtonWhenShooting', 2309 Notes => '250D', 2310 Condition => '$count == 2', 2311 # (not sure how to decode this. seen: "37 0") 2312 PrintConv => { }, 2001 2313 }, 2002 2314 { … … 2039 2351 0 => 'Rear LCD panel', 2040 2352 1 => 'LCD monitor', 2353 2 => 'Off (disable button)', # (1DX) 2041 2354 }, 2042 2355 }, 2043 2356 0x0709 => { 2044 2357 Name => 'LockMicrophoneButton', 2045 PrintConv => {2358 PrintConv => [{ 2046 2359 # called "sound" in 1DmkIII manual, and "memo" in 1DmkIV manual 2047 2360 0 => 'Protect (hold:record memo)', 2048 2361 1 => 'Record memo (protect:disable)', 2049 2362 2 => 'Play memo (hold:record memo)', # new with 1DmkIV 2050 }, 2363 3 => 'Rating (protect/memo:disable)', # new with 1DX 2364 }], 2365 # (not sure what the 2nd number is -- new for 1DX. Seen a value of 31. 2366 # Memo quality may be set to 48kHz or 8kHz through another option that 2367 # doesn't seem to be stored separately -- is this it?) 2051 2368 }, 2052 2369 0x070a => { … … 2078 2395 }, 2079 2396 }, 2397 0x070e => { # new for 1100D 2398 Name => 'FlashButtonFunction', 2399 PrintConv => { 2400 0 => 'Raise built-in flash', 2401 1 => 'ISO speed', 2402 }, 2403 }, 2404 0x070f => { # new for 5DmkIII 2405 Name => 'MultiFunctionLock', 2406 PrintConv => [ 2407 { #(NC) 2408 0 => 'Off', 2409 1 => 'On', # "On (main dial)" for 750D/760D? 2410 2 => 'On (quick control dial)', #(NC) 2411 3 => 'On (main dial and quick control dial)', #(NC) 2412 }, 2413 { BITMASK => { #(NC) 2414 0 => 'Main dial', 2415 1 => 'Quick control dial', 2416 2 => 'Multi-controller', 2417 }}, 2418 ], 2419 }, 2420 0x0710 => { # (M) 2421 Name => 'TrashButtonFunction', 2422 PrintConv => { 2423 0 => 'Normal (set center AF point)', 2424 1 => 'Depth-of-field preview', 2425 }, 2426 }, 2427 0x0711 => { # (M) 2428 Name => 'ShutterReleaseWithoutLens', 2429 PrintConv => \%disableEnable, 2430 }, 2431 0x0712 => { # (R) 2432 Name => 'ControlRingRotation', 2433 PrintConv => { 2434 0 => 'Normal', 2435 1 => 'Reversed', 2436 }, 2437 }, 2438 0x0713 => { # (R) 2439 Name => 'FocusRingRotation', 2440 PrintConv => { 2441 0 => 'Normal', 2442 1 => 'Reversed', 2443 }, 2444 }, 2445 0x0714 => { # (R) 2446 Name => 'RFLensMFFocusRingSensitivity', 2447 PrintConv => { 2448 0 => 'Varies With Rotation Speed', 2449 1 => 'Linked To Rotation Angle', 2450 }, 2451 }, 2452 0x0715 => { # (R) 2453 Name => 'CustomizeDials', # (NC, may be CustomizeM-FnBar) 2454 # (too much stuff to decode) 2455 }, 2080 2456 #### 4b) Others 2081 2457 0x080b => [ … … 2102 2478 { 2103 2479 Name => 'FocusingScreen', 2104 Notes => '1DmkIII and 1DmkIV', 2480 Condition => '$$self{Model} =~ /\b6D\b/', 2481 Notes => '6D', 2482 PrintConv => { 2483 0 => 'Eg-A II', 2484 1 => 'Eg-D', 2485 2 => 'Eg-S', 2486 }, 2487 }, 2488 { 2489 Name => 'FocusingScreen', 2490 Condition => '$$self{Model} =~ /\b7D Mark II\b/', 2491 Notes => '7D Mark II', 2492 PrintConv => { 2493 0 => 'Eh-A', 2494 1 => 'Eh-S', 2495 }, 2496 }, 2497 { 2498 Name => 'FocusingScreen', 2499 Condition => '$$self{Model} =~ /\b1D X\b/', 2500 Notes => '1DX', 2501 PrintConv => { 2502 0 => 'Ec-CV', 2503 1 => 'Ec-A,B,D,H,I,L', 2504 }, 2505 }, 2506 { 2507 Name => 'FocusingScreen', 2508 Notes => '1DmkIII, 1DSmkIII and 1DmkIV', 2105 2509 PrintConv => { 2106 2510 0 => 'Ec-CIV', … … 2111 2515 }, 2112 2516 ], 2113 0x080c => { 2517 0x080c => [{ # (1DXmkIII) 2518 Name => 'TimerLength', 2519 Condition => '$count == 3', 2520 Count => 3, 2521 PrintConv => [ 2522 '"6 s: $val"', 2523 '"16 s: $val"', 2524 '"After release: $val"', 2525 ], 2526 PrintConvInv => [ 2527 '$val=~/(\d+)$/ ? $1 : 0', 2528 '$val=~/(\d+)$/ ? $1 : 0', 2529 '$val=~/(\d+)$/ ? $1 : 0', 2530 ], 2531 },{ 2114 2532 Name => 'TimerLength', 2115 2533 Count => 4, … … 2126 2544 '$val=~/(\d+)$/ ? $1 : 0', 2127 2545 ], 2128 } ,2546 }], 2129 2547 0x080d => { 2130 2548 Name => 'ShortReleaseTimeLag', … … 2161 2579 }, 2162 2580 }, 2581 0x0812 => { # (1DX) 2582 Name => 'MemoAudioQuality', 2583 PrintConv => { 2584 0 => 'High (48 kHz)', 2585 1 => 'Low (8 kHz)', 2586 }, 2587 }, 2588 0x0813 => { # (5DmkIII) 2589 Name => 'DefaultEraseOption', 2590 PrintConv => { 2591 0 => 'Cancel selected', 2592 1 => 'Erase selected', 2593 2 => 'Erase RAW selected', # (1DXmkIII) 2594 3 => 'Erase non-RAW selected', # (1DXmkIII) 2595 }, 2596 }, 2597 0x0814 => { # (5DS) 2598 Name => 'RetractLensOnPowerOff', 2599 PrintConv => \%enableDisable, 2600 }, 2601 0x0815 => { # (R) 2602 Name => 'AddIPTCInformation', 2603 PrintConv => \%disableEnable, 2604 }, 2605 0x0816 => { # (90D,RP) 2606 Name => 'AudioCompression', 2607 PrintConv => \%enableDisable, 2608 } 2163 2609 ); 2164 2610 … … 2181 2627 2182 2628 #------------------------------------------------------------------------------ 2183 # Read/Write Canon custom 2 directory ( used by1D Mark III)2629 # Read/Write Canon custom 2 directory (new for 1D Mark III) 2184 2630 # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref 2185 2631 # Returns: 1 on success 2186 2632 sub ProcessCanonCustom2($$$) 2187 2633 { 2188 my ($e xifTool, $dirInfo, $tagTablePtr) = @_;2634 my ($et, $dirInfo, $tagTablePtr) = @_; 2189 2635 my $dataPt = $$dirInfo{DataPt}; 2190 2636 my $offset = $$dirInfo{DirStart}; 2191 2637 my $size = $$dirInfo{DirLen}; 2192 2638 my $write = $$dirInfo{Write}; 2193 my $verbose = $e xifTool->Options('Verbose');2639 my $verbose = $et->Options('Verbose'); 2194 2640 my $newTags; 2195 2641 2642 return 0 if $size < 2; 2196 2643 # first entry in array must be the size 2197 2644 my $len = Get16u($dataPt, $offset); 2198 2645 unless ($len == $size and $len >= 8) { 2199 $e xifTool->Warn("Invalid CanonCustom2 data");2646 $et->Warn('Invalid CanonCustom2 data'); 2200 2647 return 0; 2201 2648 } … … 2203 2650 my $count = Get32u($dataPt, $offset + 4); 2204 2651 if ($write) { 2205 $newTags = $e xifTool->GetNewTagInfoHash($tagTablePtr);2206 $e xifTool->VPrint(0, " Rewriting CanonCustom2\n");2652 $newTags = $et->GetNewTagInfoHash($tagTablePtr); 2653 $et->VPrint(0, " Rewriting CanonCustom2\n"); 2207 2654 } elsif ($verbose) { 2208 $e xifTool->VerboseDir('CanonCustom2', $count);2655 $et->VerboseDir('CanonCustom2', $count, $len); 2209 2656 } 2210 2657 my $pos = $offset + 8; … … 2219 2666 $pos += 12; 2220 2667 my $recPos = $pos; 2221 my $recEnd = $pos + $recLen; 2668 my $recEnd = $pos + $recLen - 8; 2669 if ($recEnd > $end) { 2670 $et->Warn("Corrupted CanonCustom2 group $recNum"); 2671 return 0; 2672 } 2222 2673 if ($verbose and not $write) { 2223 $e xifTool->VerboseDir("CanonCustom2 group $recNum", $recCount);2674 $et->VerboseDir("CanonCustom2 group $recNum", $recCount, $recLen); 2224 2675 } 2225 2676 my ($i, $num, $tag); … … 2227 2678 $tag = Get32u($dataPt, $recPos); 2228 2679 $num = Get32u($dataPt, $recPos + 4); 2680 my $nextRec = $recPos + 8 + $num * 4; 2681 last if $nextRec > $recEnd; 2682 # patch for EOS-1DXmkIII firmware 1.0.0 bug: 2683 if ($tag == 0x70c and $num == 0x66 and $nextRec + 8 < $recEnd) { 2684 my $tmp = Get32u($dataPt, $nextRec + 4); 2685 if ($tmp == 0x70f) { 2686 $et->Warn('Fixed incorrect CanonCustom tag 0x70c size', 1); 2687 ++$num; # (count should be one greater) 2688 } 2689 } 2229 2690 $recPos += 8; 2230 last if $recPos + $num * 4 > $recEnd;2231 2691 my $val = ReadValue($dataPt, $recPos, 'int32s', $num, $num * 4); 2232 2692 if ($write) { 2233 2693 # write new value 2234 2694 my $tagInfo = $$newTags{$tag}; 2235 next unless $tagInfo; 2236 my $nvHash = $exifTool->GetNewValueHash($tagInfo); 2237 next unless Image::ExifTool::IsOverwriting($nvHash, $val); 2238 my $newVal = Image::ExifTool::GetNewValues($nvHash); 2695 next unless $$newTags{$tag}; 2696 $tagInfo = $et->GetTagInfo($tagTablePtr, $tag, \$val, undef, $num) or next; 2697 my $nvHash = $et->GetNewValueHash($tagInfo) or next; 2698 next unless $et->IsOverwriting($nvHash, $val); 2699 my $newVal = $et->GetNewValue($nvHash); 2239 2700 next unless defined $newVal; # can't delete from a custom table 2240 2701 WriteValue($newVal, 'int32s', $num, $dataPt, $recPos); 2241 $e xifTool->VerboseValue("- CanonCustom:$$tagInfo{Name}", $val);2242 $e xifTool->VerboseValue("+ CanonCustom:$$tagInfo{Name}", $newVal);2243 ++$ exifTool->{CHANGED};2702 $et->VerboseValue("- CanonCustom:$$tagInfo{Name}", $val); 2703 $et->VerboseValue("+ CanonCustom:$$tagInfo{Name}", $newVal); 2704 ++$$et{CHANGED}; 2244 2705 } else { 2245 2706 # save extracted tag 2246 2707 my $oldInfo = $$tagTablePtr{$tag}; 2247 $e xifTool->HandleTag($tagTablePtr, $tag, $val,2708 $et->HandleTag($tagTablePtr, $tag, $val, 2248 2709 Index => $i, 2249 2710 Format => 'int32u', … … 2259 2720 } 2260 2721 } 2261 $pos += $recLen - 8; 2722 if ($i != $recCount) { 2723 $et->Warn('Missing '.($recCount-$i)." entries in CanonCustom2 group $recNum directory", 1); 2724 } 2725 $pos = $recEnd; 2262 2726 } 2263 2727 if ($pos != $end) { 2264 $exifTool->Warn('Possibly corrupted CanonCustom2 data'); 2728 # Note: a firmware bug in the EOS M5 and M6 stores an incorrect 2729 # size for the 2nd CanonCustom2 record, so this message is expected 2730 # for these models... 2731 $et->Warn('Possibly corrupted CanonCustom2 data'); 2265 2732 return 0; 2266 2733 } … … 2274 2741 sub WriteCanonCustom2($$$) 2275 2742 { 2276 my ($e xifTool, $dirInfo, $tagTablePtr) = @_;2277 $e xifToolor return 1; # allow dummy access to autoload this package2743 my ($et, $dirInfo, $tagTablePtr) = @_; 2744 $et or return 1; # allow dummy access to autoload this package 2278 2745 my $dataPt = $$dirInfo{DataPt}; 2279 2746 # edit a copy of the custom function 2 data … … 2285 2752 Write => 1, 2286 2753 ); 2287 ProcessCanonCustom2($e xifTool, \%dirInfo, $tagTablePtr) or return undef;2754 ProcessCanonCustom2($et, \%dirInfo, $tagTablePtr) or return undef; 2288 2755 return $buff; 2289 2756 } … … 2295 2762 sub ProcessCanonCustom($$$) 2296 2763 { 2297 my ($e xifTool, $dirInfo, $tagTablePtr) = @_;2764 my ($et, $dirInfo, $tagTablePtr) = @_; 2298 2765 my $dataPt = $$dirInfo{DataPt}; 2299 2766 my $offset = $$dirInfo{DirStart}; 2300 2767 my $size = $$dirInfo{DirLen}; 2301 my $verbose = $e xifTool->Options('Verbose');2768 my $verbose = $et->Options('Verbose'); 2302 2769 2303 2770 # first entry in array must be the size 2304 2771 my $len = Get16u($dataPt,$offset); 2305 unless ($len == $size or ($$e xifTool{Model}=~/\bD60\b/ and $len+2 == $size)) {2306 $e xifTool->Warn("Invalid CanonCustom data");2772 unless ($len == $size or ($$et{Model}=~/\bD60\b/ and $len+2 == $size)) { 2773 $et->Warn("Invalid CanonCustom data"); 2307 2774 return 0; 2308 2775 } 2309 $verbose and $e xifTool->VerboseDir('CanonCustom', $size/2-1);2776 $verbose and $et->VerboseDir('CanonCustom', $size/2-1); 2310 2777 my $pos; 2311 2778 for ($pos=2; $pos<$size; $pos+=2) { … … 2314 2781 my $tag = ($val >> 8); 2315 2782 $val = ($val & 0xff); 2316 $e xifTool->HandleTag($tagTablePtr, $tag, $val,2783 $et->HandleTag($tagTablePtr, $tag, $val, 2317 2784 Index => $pos/2-1, 2318 2785 Format => 'int8u', … … 2330 2797 sub CheckCanonCustom($$$) 2331 2798 { 2332 my ($e xifTool, $tagInfo, $valPtr) = @_;2799 my ($et, $tagInfo, $valPtr) = @_; 2333 2800 return Image::ExifTool::CheckValue($valPtr, 'int8u'); 2334 2801 } … … 2340 2807 sub WriteCanonCustom($$$) 2341 2808 { 2342 my ($e xifTool, $dirInfo, $tagTablePtr) = @_;2343 $e xifToolor return 1; # allow dummy access to autoload this package2809 my ($et, $dirInfo, $tagTablePtr) = @_; 2810 $et or return 1; # allow dummy access to autoload this package 2344 2811 my $dataPt = $$dirInfo{DataPt}; 2345 2812 my $dirStart = $$dirInfo{DirStart} || 0; … … 2351 2818 # first entry in array must be the size 2352 2819 my $len = Get16u($dataPt, 0); 2353 unless ($len == $dirLen or ($$e xifTool{Model}=~/\bD60\b/ and $len+2 == $dirLen)) {2354 $e xifTool->Warn("Invalid CanonCustom data");2820 unless ($len == $dirLen or ($$et{Model}=~/\bD60\b/ and $len+2 == $dirLen)) { 2821 $et->Warn("Invalid CanonCustom data"); 2355 2822 return undef; 2356 2823 } 2357 my $newTags = $e xifTool->GetNewTagInfoHash($tagTablePtr);2824 my $newTags = $et->GetNewTagInfoHash($tagTablePtr); 2358 2825 my $pos; 2359 2826 for ($pos=2; $pos<$dirLen; $pos+=2) { … … 2362 2829 my $tagInfo = $$newTags{$tag}; 2363 2830 next unless $tagInfo; 2364 my $nvHash = $e xifTool->GetNewValueHash($tagInfo);2831 my $nvHash = $et->GetNewValueHash($tagInfo); 2365 2832 $val = ($val & 0xff); 2366 next unless Image::ExifTool::IsOverwriting($nvHash, $val);2367 my $newVal = Image::ExifTool::GetNewValues($nvHash);2833 next unless $et->IsOverwriting($nvHash, $val); 2834 my $newVal = $et->GetNewValue($nvHash); 2368 2835 next unless defined $newVal; # can't delete from a custom table 2369 2836 Set16u(($newVal & 0xff) + ($tag << 8), $dataPt, $pos); 2370 $e xifTool->VerboseValue("- $dirName:$$tagInfo{Name}", $val);2371 $e xifTool->VerboseValue("+ $dirName:$$tagInfo{Name}", $newVal);2372 ++$ exifTool->{CHANGED};2837 $et->VerboseValue("- $dirName:$$tagInfo{Name}", $val); 2838 $et->VerboseValue("+ $dirName:$$tagInfo{Name}", $newVal); 2839 ++$$et{CHANGED}; 2373 2840 } 2374 2841 return $newData; … … 2397 2864 =head1 AUTHOR 2398 2865 2399 Copyright 2003-20 11, Phil Harvey (phil at owl.phy.queensu.ca)2866 Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com) 2400 2867 2401 2868 This library is free software; you can redistribute it and/or modify it
Note:
See TracChangeset
for help on using the changeset viewer.