/usr/share/perl5/Image/ExifTool/Sony.pm is in libimage-exiftool-perl 10.80-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 | #------------------------------------------------------------------------------
# File: Sony.pm
#
# Description: Sony EXIF Maker Notes tags
#
# Revisions: 04/06/2004 - P. Harvey Created
#
# References: 1) http://www.cybercom.net/~dcoffin/dcraw/
# 2) http://homepage3.nifty.com/kamisaka/makernote/makernote_sony.htm (2006/08/06)
# 3) Thomas Bodenmann private communication
# 4) Philippe Devaux private communication (A700)
# 5) Marcus Holland-Moritz private communication (A700)
# 6) Andrey Tverdokhleb private communication
# 7) Rudiger Lange private communication (A700)
# 8) Igal Milchtaich private communication
# 9) Michael Reitinger private communication (DSC-TX7,RX100)
# 10) http://www.klingebiel.com/tempest/hd/pmp.html
# 11) Mike Battilana private communication
# 13) http://www.mi-fo.de/forum/index.php?showtopic=33239
# http://www.dyxum.com/dforum/the-alpha-shutter-count-tool_topic97489_page4.html
# IB) Iliah Borg private communication (LibRaw)
# JD) Jens Duttke private communication
# JR) Jos Roost private communication
#------------------------------------------------------------------------------
package Image::ExifTool::Sony;
use strict;
use vars qw($VERSION %sonyLensTypes);
use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::Exif;
use Image::ExifTool::Minolta;
$VERSION = '2.73';
sub ProcessSRF($$$);
sub ProcessSR2($$$);
sub ProcessSonyPIC($$$);
sub ProcessMoreInfo($$$);
sub Decipher($;$);
sub ProcessEnciphered($$$);
sub WriteEnciphered($$$);
sub WriteSR2($$$);
sub ConvLensSpec($);
sub ConvInvLensSpec($);
sub PrintLensSpec($);
sub PrintInvLensSpec($;$$);
# (%sonyLensTypes is filled in based on Minolta LensType's)
# Sony E-mount lenses
# (NOTE: these should be kept in sync with the 65535 entries in %minoltaLensTypes)
my %sonyLensTypes2 = (
Notes => 'Lens type numbers for Sony E-mount lenses used by NEX models.',
0 => 'Unknown E-mount lens or other lens',
1 => 'Sony LA-EA1 or Sigma MC-11 Adapter', # MC-11 with not-supported lenses
2 => 'Sony LA-EA2 Adapter',
3 => 'Sony LA-EA3 Adapter', #(NC) ILCE-7 image with A-mount lens, but also has 0x940e 2nd byte=2
6 => 'Sony LA-EA4 Adapter', #(NC) ILCE-7R image with A-mount lens and having phase-detect info blocks in 0x940e AFInfo
# 27 => Venus Optics Laowa 12mm f2.8 Zero-D or 105mm f2 (T3.2) Smooth Trans Focus (ref IB)
44 => 'Metabones Canon EF Smart Adapter', #JR
78 => 'Metabones Canon EF Smart Adapter Mark III or Other Adapter', #PH/JR (also Mark IV, Fotodiox and Viltrox)
234 => 'Metabones Canon EF Smart Adapter Mark IV', #JR (LensMount reported as A-mount)
239 => 'Metabones Canon EF Speed Booster', #JR
# Sony VX product code: (http://www.mi-fo.de/forum/index.php?s=7df1c8d3b1cd675f2abf4f4442e19cf2&showtopic=35035&view=findpost&p=303746)
32784 => 'Sony E 16mm F2.8', # VX9100
32785 => 'Sony E 18-55mm F3.5-5.6 OSS', # VX9101
32786 => 'Sony E 55-210mm F4.5-6.3 OSS', # VX9102
32787 => 'Sony E 18-200mm F3.5-6.3 OSS', # VX9103
32788 => 'Sony E 30mm F3.5 Macro', # VX9104
32789 => 'Sony E 24mm F1.8 ZA or Samyang AF 50mm F1.4 FE', # VX9105
32789.1 => 'Samyang AF 50mm F1.4 FE',
32790 => 'Sony E 50mm F1.8 OSS or Samyang AF 14mm F2.8 FE', # VX9106
32790.1 => 'Samyang AF 14mm F2.8 FE',
32791 => 'Sony E 16-70mm F4 ZA OSS', # VX9107
32792 => 'Sony E 10-18mm F4 OSS', # VX9108
32793 => 'Sony E PZ 16-50mm F3.5-5.6 OSS', # VX9109
32794 => 'Sony FE 35mm F2.8 ZA', # VX9110
32795 => 'Sony FE 24-70mm F4 ZA OSS', # VX9111
32796 => 'Sony FE 85mm F1.8', #JR
32797 => 'Sony E 18-200mm F3.5-6.3 OSS LE', # VX9113
32798 => 'Sony E 20mm F2.8', # VX9114
32799 => 'Sony E 35mm F1.8 OSS', # VX9115
32800 => 'Sony E PZ 18-105mm F4 G OSS', #JR # VX9116
32801 => 'Sony FE 12-24mm F4 G', #JR
32802 => 'Sony FE 90mm F2.8 Macro G OSS', # VX?
32803 => 'Sony E 18-50mm F4-5.6',
32805 => 'Sony FE 24-105mm F4 G OSS', #IB # VX9121
32807 => 'Sony E PZ 18-200mm F3.5-6.3 OSS', # VX9123
32808 => 'Sony FE 55mm F1.8 ZA', # VX9124
32810 => 'Sony FE 70-200mm F4 G OSS', #JR # VX9126
32811 => 'Sony FE 16-35mm F4 ZA OSS', #JR # VX9127
32812 => 'Sony FE 50mm F2.8 Macro', #JR
32813 => 'Sony FE 28-70mm F3.5-5.6 OSS', # VX9129
32814 => 'Sony FE 35mm F1.4 ZA', # VX?
32815 => 'Sony FE 24-240mm F3.5-6.3 OSS', # VX?
32816 => 'Sony FE 28mm F2', #JR # VX?
32817 => 'Sony FE PZ 28-135mm F4 G OSS',#JR # VX?
32819 => 'Sony FE 100mm F2.8 STF GM OSS', #JR (appears to use 33076 when switched to macro mode)
32820 => 'Sony E PZ 18-110mm F4 G OSS', #JR
32821 => 'Sony FE 24-70mm F2.8 GM', #JR/IB
32822 => 'Sony FE 50mm F1.4 ZA', #JR
32823 => 'Sony FE 85mm F1.4 GM', #JR/IB
32824 => 'Sony FE 50mm F1.8', #JR (Sony code 'SEL50F18F' with trailing "F" as compared to 'SEL50F18' for 32790)
32826 => 'Sony FE 21mm F2.8 (SEL28F20 + SEL075UWC)', #JR # (+ Ultra-wide converter)
32827 => 'Sony FE 16mm F3.5 Fisheye (SEL28F20 + SEL057FEC)', #JR # (+ Fisheye converter)
32828 => 'Sony FE 70-300mm F4.5-5.6 G OSS', #JR
32829 => 'Sony FE 100-400mm F4.5-5.6 GM OSS', #JR
32830 => 'Sony FE 70-200mm F2.8 GM OSS', #JR
32831 => 'Sony FE 16-35mm F2.8 GM', #JR
32849 => 'Sony E 18-135mm F3.5-5.6 OSS', #JR
# (comment this out so LensID will report the LensModel, which is more useful)
# 33002 => 'Metabones Canon EF Smart Adapter with Ver.5x', #PH/JR (corresponds to 234, but LensMount reported as E-mount)
33072 => 'Sony FE 70-200mm F2.8 GM OSS + 1.4X Teleconverter', #JR
33073 => 'Sony FE 70-200mm F2.8 GM OSS + 2X Teleconverter', #JR
33076 => 'Sony FE 100mm F2.8 STF GM OSS (macro mode)', #JR (with macro switching ring set to "0.57m - 1.0m")
33077 => 'Sony FE 100-400mm F4.5-5.6 GM OSS + 1.4X Teleconverter', #JR
33078 => 'Sony FE 100-400mm F4.5-5.6 GM OSS + 2X Teleconverter', #JR
49201 => 'Zeiss Touit 12mm F2.8', #JR (lens firmware Ver.02)
49202 => 'Zeiss Touit 32mm F1.8', #JR (lens firmware Ver.02)
49203 => 'Zeiss Touit 50mm F2.8 Macro', #JR (lens firmware Ver.02)
49216 => 'Zeiss Batis 25mm F2', #JR
49217 => 'Zeiss Batis 85mm F1.8', #JR
49218 => 'Zeiss Batis 18mm F2.8', #IB
49219 => 'Zeiss Batis 135mm F2.8', #IB
49232 => 'Zeiss Loxia 50mm F2', #JR (lens firmware Ver.02)
49233 => 'Zeiss Loxia 35mm F2', #JR (lens firmware Ver.02)
49234 => 'Zeiss Loxia 21mm F2.8', #PH
49235 => 'Zeiss Loxia 85mm F2.4', #JR
49236 => 'Zeiss Loxia 25mm F2.4', #JR
50480 => 'Sigma 30mm F1.4 DC DN | C', #IB/JR (016)
50481 => 'Sigma 50mm F1.4 DG HSM | A + MC-11', #JR (014)
50482 => 'Sigma 18-300mm F3.5-6.3 DC MACRO OS HSM | C + MC-11', #JR (014)
50483 => 'Sigma 18-35mm F1.8 DC HSM | A + MC-11', #JR (013)
50484 => 'Sigma 24-35mm F2 DG HSM | A + MC-11', #JR (015)
50486 => 'Sigma 150-600mm F5-6.3 DG OS HSM | C + MC-11', #JR (015)
50487 => 'Sigma 20mm F1.4 DG HSM | A + MC-11', #JR (015)
50488 => 'Sigma 35mm F1.4 DG HSM | A + MC-11', #JR (012)
50489 => 'Sigma 150-600mm F5-6.3 DG OS HSM | S + MC-11', #JR (014)
50490 => 'Sigma 120-300mm F2.8 DG OS HSM | S + MC-11', #JR (013)
50492 => 'Sigma 24-105mm F4 DG OS HSM | A + MC-11', #JR (013)
50493 => 'Sigma 17-70mm F2.8-4 DC MACRO OS HSM | C + MC-11', #JR (013)
50495 => 'Sigma 50-100mm F1.8 DC HSM | A + MC-11', #JR (016)
50503 => 'Sigma 16mm F1.4 DC DN | C', #JR (017)
50992 => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR
50993 => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB
50994 => 'Voigtlander ULTRA WIDE-HELIAR 12mm F5.6 III', #IB
50995 => 'Voigtlander MACRO APO-LANTHAR 65mm F2 Aspherical', #JR
50996 => 'Voigtlander NOKTON 40mm F1.2 Aspherical', #JR
# lenses listed in the Sigma MC-11 list, but not yet seen:
# 504xx => 'Sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | C + MC-11', # (014)
# 504xx => 'Sigma 24mm F1.4 DG HSM | A + MC-11', # (015)
# 504xx => 'Sigma 30mm F1.4 DC HSM | A + MC-11', # (013)
51505 => 'Samyang AF 14mm F2.8 FE or Samyang AF 35mm F2.8 FE', #forum3833
51505.1 => 'Samyang AF 35mm F2.8 FE', #PH
);
# ExposureProgram values (ref PH, mainly decoded from A200)
my %sonyExposureProgram = (
0 => 'Auto', # (same as 'Program AE'?)
1 => 'Manual',
2 => 'Program AE',
3 => 'Aperture-priority AE',
4 => 'Shutter speed priority AE',
8 => 'Program Shift A', #7
9 => 'Program Shift S', #7
16 => 'Portrait', # (A330)
17 => 'Sports', # (A330)
18 => 'Sunset', # (A330)
19 => 'Night Portrait', # (A330)
20 => 'Landscape', # (A330)
21 => 'Macro', # (A330)
35 => 'Auto No Flash', # (A330)
);
# ExposureProgram values in CameraSettings3 (ref JR)
my %sonyExposureProgram2 = ( # A580 Mode Dial setting:
1 => 'Program AE', # P
2 => 'Aperture-priority AE', # A
3 => 'Shutter speed priority AE', # S
4 => 'Manual', # M
5 => 'Cont. Priority AE', # (A35)
16 => 'Auto', # AUTO
17 => 'Auto (no flash)', # "flash strike-out" symbol
18 => 'Auto+', #PH (A33)
49 => 'Portrait', # SCN
50 => 'Landscape', # SCN
51 => 'Macro', # SCN
52 => 'Sports', # SCN
53 => 'Sunset', # SCN
54 => 'Night view', # SCN
55 => 'Night view/portrait', # SCN
56 => 'Handheld Night Shot', # SCN (also called "Hand-held Twilight")
57 => '3D Sweep Panorama', # "Panorama" symbol
64 => 'Auto 2', #PH (A33 AUTO)
65 => 'Auto 2 (no flash)', #JR (NC, A35)
80 => 'Sweep Panorama', # "Panorama" symbol
96 => 'Anti Motion Blur', #PH (NEX-5)
# 128-138 are A35 picture effects (combined SCN/Picture effect mode dial position)
128 => 'Toy Camera',
129 => 'Pop Color',
130 => 'Posterization',
131 => 'Posterization B/W',
132 => 'Retro Photo',
133 => 'High-key',
134 => 'Partial Color Red',
135 => 'Partial Color Green',
136 => 'Partial Color Blue',
137 => 'Partial Color Yellow',
138 => 'High Contrast Monochrome',
);
# ExposureProgram values in Tags 2010 and 94xx (ref JR)
my %sonyExposureProgram3 = (
0 => 'Program AE',
1 => 'Aperture-priority AE',
2 => 'Shutter speed priority AE',
3 => 'Manual',
4 => 'Auto',
5 => 'iAuto',
6 => 'Superior Auto',
7 => 'iAuto+',
8 => 'Portrait',
9 => 'Landscape',
10 => 'Twilight',
11 => 'Twilight Portrait',
12 => 'Sunset',
14 => 'Action (High speed)', #PH (RX100)
16 => 'Sports',
17 => 'Handheld Night Shot',
18 => 'Anti Motion Blur',
19 => 'High Sensitivity',
21 => 'Beach',
22 => 'Snow',
23 => 'Fireworks',
26 => 'Underwater',
27 => 'Gourmet',
28 => 'Pet',
29 => 'Macro',
30 => 'Backlight Correction HDR',
# 32 => 'Night ... ???', # seen for HDR-CX360E
33 => 'Sweep Panorama',
36 => 'Background Defocus',
37 => 'Soft Skin',
42 => '3D Image',
43 => 'Cont. Priority AE',
45 => 'Document',
46 => 'Party',
);
# WhiteBalanceSetting values (ref JR)
my %whiteBalanceSetting = (
0x10 => 'Auto (-3)', #(NC)
0x11 => 'Auto (-2)', #(NC)
0x12 => 'Auto (-1)', #(NC)
0x13 => 'Auto (0)',
0x14 => 'Auto (+1)', #(NC)
0x15 => 'Auto (+2)', #(NC)
0x16 => 'Auto (+3)', #(NC)
0x20 => 'Daylight (-3)',
0x21 => 'Daylight (-2)', #(NC)
0x22 => 'Daylight (-1)', #(NC)
0x23 => 'Daylight (0)',
0x24 => 'Daylight (+1)',
0x25 => 'Daylight (+2)',
0x26 => 'Daylight (+3)',
0x30 => 'Shade (-3)', #(NC)
0x31 => 'Shade (-2)', #(NC)
0x32 => 'Shade (-1)', #(NC)
0x33 => 'Shade (0)',
0x34 => 'Shade (+1)', #(NC)
0x35 => 'Shade (+2)', #(NC)
0x36 => 'Shade (+3)',
0x40 => 'Cloudy (-3)', #(NC)
0x41 => 'Cloudy (-2)', #(NC)
0x42 => 'Cloudy (-1)', #(NC)
0x43 => 'Cloudy (0)',
0x44 => 'Cloudy (+1)', #(NC)
0x45 => 'Cloudy (+2)', #(NC)
0x46 => 'Cloudy (+3)', #(NC)
0x50 => 'Tungsten (-3)', #(NC)
0x51 => 'Tungsten (-2)', #(NC)
0x52 => 'Tungsten (-1)', #(NC)
0x53 => 'Tungsten (0)',
0x54 => 'Tungsten (+1)', #(NC)
0x55 => 'Tungsten (+2)', #(NC)
0x56 => 'Tungsten (+3)', #(NC)
0x60 => 'Fluorescent (-3)', #(NC)
0x61 => 'Fluorescent (-2)', #(NC)
0x62 => 'Fluorescent (-1)', #(NC)
0x63 => 'Fluorescent (0)',
0x64 => 'Fluorescent (+1)', #(NC)
0x65 => 'Fluorescent (+2)', #(NC)
0x66 => 'Fluorescent (+3)', #(NC)
0x70 => 'Flash (-3)', #(NC)
0x71 => 'Flash (-2)', #(NC)
0x72 => 'Flash (-1)', #(NC)
0x73 => 'Flash (0)',
0x74 => 'Flash (+1)', #(NC)
0x75 => 'Flash (+2)', #(NC)
0x76 => 'Flash (+3)', #(NC)
0xa3 => 'Custom',
0xf3 => 'Color Temperature/Color Filter',
);
# AF points for cameras with 15-point AF (ref JR)
my %afPoint15 = (
0 => 'Upper-left',
1 => 'Left',
2 => 'Lower-left',
3 => 'Far Left',
4 => 'Top (horizontal)',
5 => 'Near Right',
6 => 'Center (horizontal)',
7 => 'Near Left',
8 => 'Bottom (horizontal)',
9 => 'Top (vertical)',
10 => 'Center (vertical)',
11 => 'Bottom (vertical)',
12 => 'Far Right',
13 => 'Upper-right',
14 => 'Right',
15 => 'Lower-right',
16 => 'Upper-middle',
17 => 'Lower-middle',
);
# AF points for cameras with 19-point AF (ref PH)
# (verified for A77 firmware 1.07)
my %afPoint19 = (
0 => 'Upper Far Left',
1 => 'Upper-left (horizontal)',
2 => 'Far Left (horizontal)',
3 => 'Left (horizontal)',
4 => 'Lower Far Left',
5 => 'Lower-left (horizontal)',
6 => 'Upper-left (vertical)',
7 => 'Left (vertical)',
8 => 'Lower-left (vertical)',
9 => 'Far Left (vertical)',
10 => 'Top (horizontal)',
11 => 'Near Right',
12 => 'Center (horizontal)',
13 => 'Near Left',
14 => 'Bottom (horizontal)',
15 => 'Top (vertical)',
16 => 'Upper-middle',
17 => 'Center (vertical)',
18 => 'Lower-middle',
19 => 'Bottom (vertical)',
20 => 'Upper Far Right',
21 => 'Upper-right (horizontal)',
22 => 'Far Right (horizontal)',
23 => 'Right (horizontal)',
24 => 'Lower Far Right',
25 => 'Lower-right (horizontal)',
26 => 'Far Right (vertical)',
27 => 'Upper-right (vertical)',
28 => 'Right (vertical)',
29 => 'Lower-right (vertical)',
);
# 79 AF point layout and indices for ILCA-68/77M2, numbered 0-78 for direct look-up from BITMASK in 0x2020,
# E6 = Center (ref JR)
my %afPoints79 = (
0=>'A5', 1=>'A6', 2=>'A7',
3=>'B2', 4=>'B3', 5=>'B4', 6=>'B5', 7=>'B6', 8=>'B7', 9=>'B8', 10=>'B9', 11=>'B10',
12=>'C1', 13=>'C2', 14=>'C3', 15=>'C4', 16=>'C5', 17=>'C6', 18=>'C7', 19=>'C8', 20=>'C9', 21=>'C10', 22=>'C11',
23=>'D1', 24=>'D2', 25=>'D3', 26=>'D4', 27=>'D5', 28=>'D6', 29=>'D7', 30=>'D8', 31=>'D9', 32=>'D10', 33=>'D11',
34=>'E1', 35=>'E2', 36=>'E3', 37=>'E4', 38=>'E5', 39=>'E6', 40=>'E7', 41=>'E8', 42=>'E9', 43=>'E10', 44=>'E11',
45=>'F1', 46=>'F2', 47=>'F3', 48=>'F4', 49=>'F5', 50=>'F6', 51=>'F7', 52=>'F8', 53=>'F9', 54=>'F10', 55=>'F11',
56=>'G1', 57=>'G2', 58=>'G3', 59=>'G4', 60=>'G5', 61=>'G6', 62=>'G7', 63=>'G8', 64=>'G9', 65=>'G10', 66=>'G11',
67=>'H2', 68=>'H3', 69=>'H4', 70=>'H5', 71=>'H6', 72=>'H7', 73=>'H8', 74=>'H9', 75=>'H10',
76=>'I5', 77=>'I6', 78=>'I7',
);
# AFPoint and AFStatus tags in AFInfo(Tag940e) use numbers 0 to 94 for the 79 positions + 15 cross + 1 F2.8
my %afPoints79_940e = (
59=>'A5', 50=>'A6', 41=>'A7',
14=>'B2', 7=>'B3', 0=>'B4', 60=>'B5', 51=>'B6', 42=>'B7', 87=>'B8', 80=>'B9', 73=>'B10',
21=>'C1', 15=>'C2', 8=>'C3', 1=>'C4', 61=>'C5', 52=>'C6', 43=>'C7', 88=>'C8', 81=>'C9', 74=>'C10', 68=>'C11',
22=>'D1', 16=>'D2', 9=>'D3', 2=>'D4', 62=>'D5', 53=>'D6', 44=>'D7', 89=>'D8', 82=>'D9', 75=>'D10', 69=>'D11',
23=>'E1', 17=>'E2', 10=>'E3', 3=>'E4', 63=>'E5', 54=>'E6 Center', 45=>'E7', 90=>'E8', 83=>'E9', 76=>'E10', 70=>'E11',
24=>'F1', 18=>'F2', 11=>'F3', 4=>'F4', 64=>'F5', 55=>'F6', 46=>'F7', 91=>'F8', 84=>'F9', 77=>'F10', 71=>'F11',
25=>'G1', 19=>'G2', 12=>'G3', 5=>'G4', 65=>'G5', 56=>'G6', 47=>'G7', 92=>'G8', 85=>'G9', 78=>'G10', 72=>'G11',
20=>'H2', 13=>'H3', 6=>'H4', 66=>'H5', 57=>'H6', 48=>'H7', 93=>'H8', 86=>'H9', 79=>'H10',
67=>'I5', 58=>'I6', 49=>'I7',
28=>'A5 Vertical', 27=>'A6 Vertical', 26=>'A7 Vertical',
31=>'C5 Vertical', 30=>'C6 Vertical', 29=>'C7 Vertical',
34=>'E5 Vertical', 33=>'E6 Center Vertical', 32=>'E7 Vertical',
37=>'G5 Vertical', 36=>'G6 Vertical', 35=>'G7 Vertical',
40=>'I5 Vertical', 39=>'I6 Vertical', 38=>'I7 Vertical',
94=>'E6 Center F2.8',
);
# ILCA-99M2 has dedicated 79 point Phase Detection AF sensor with similar layout as ILCA-68 and ILCA-77M2.
# ILCA-99M2 has also 399 Focal Plane Phase-Detection AF Points in 19 rows of 21 points, same as ILCE-7RM2.
# Of these 399 points, 323 points are selectable: 19 rows of 17 points (2 left-most and right-most columns not selectable).
# The 79 Focal Plane points that overlap with the 79 points of the dedicated sensor provide for Hybrid Phase AF Points.
# Tag 0x201e gives value 162 for the Center AF point, and 162 is exactly the center of 323 points...
# The below table lists the selectable AF points that correspond to the 79 points of the dedicated sensor. (ref JR)
my %afPoints99M2 = (
93=>'A5 (93)', 94=>'A6 (94)', 95=>'A7 (95)',
106=>'B2 (106)', 107=>'B3 (107)', 108=>'B4 (108)', 110=>'B5 (110)', 111=>'B6 (111)', 112=>'B7 (112)', 114=>'B8 (114)', 115=>'B9 (115)', 116=>'B10 (116)',
122=>'C1 (122)', 123=>'C2 (123)', 124=>'C3 (124)', 125=>'C4 (125)', 127=>'C5 (127)', 128=>'C6 (128)', 129=>'C7 (129)', 131=>'C8 (131)', 132=>'C9 (132)', 133=>'C10 (133)', 134=>'C11 (134)',
139=>'D1 (139)', 140=>'D2 (140)', 141=>'D3 (141)', 142=>'D4 (142)', 144=>'D5 (144)', 145=>'D6 (145)', 146=>'D7 (146)', 148=>'D8 (148)', 149=>'D9 (149)', 150=>'D10 (150)', 151=>'D11 (151)',
156=>'E1 (156)', 157=>'E2 (157)', 158=>'E3 (158)', 159=>'E4 (159)', 161=>'E5 (161)', 162=>'E6 (162)', 163=>'E7 (163)', 165=>'E8 (165)', 166=>'E9 (166)', 167=>'E10 (167)', 168=>'E11 (168)',
173=>'F1 (173)', 174=>'F2 (174)', 175=>'F3 (175)', 176=>'F4 (176)', 178=>'F5 (178)', 179=>'F6 (179)', 180=>'F7 (180)', 182=>'F8 (182)', 183=>'F9 (183)', 184=>'F10 (184)', 185=>'F11 (185)',
190=>'G1 (190)', 191=>'G2 (191)', 192=>'G3 (192)', 193=>'G4 (193)', 195=>'G5 (195)', 196=>'G6 (196)', 197=>'G7 (197)', 199=>'G8 (199)', 200=>'G9 (200)', 201=>'G10 (201)', 202=>'G11 (202)',
208=>'H2 (208)', 209=>'H3 (209)', 210=>'H4 (210)', 212=>'H5 (212)', 213=>'H6 (213)', 214=>'H7 (214)', 216=>'H8 (216)', 217=>'H9 (217)', 218=>'H10 (218)',
229=>'I5 (229)', 230=>'I6 (230)', 231=>'I7 (231)',
);
my %binaryDataAttrs = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
WRITABLE => 1,
FIRST_ENTRY => 0,
);
# tagInfo attributes for unknown cipher block tags
my %unknownCipherData = (
Unknown => 1, # require Unknown option
Hidden => 1, # doesn't appear in Tag Name documentation
RawConv => sub { Decipher(\$_[0]); return $_[0] },
ValueConv => 'PrintHex($val)', # print as hex
PrintConv => 'length($val) > 65 ? substr($val,0,60) . "[...]" : $val', # limit length
);
my %meterInfo1 = (
Format => 'int32u[27]',
PrintConv => 'sprintf("%19d %4d %6d" . " %3d %4d %6d" x 8, split(" ",$val))',
PrintConvInv => '$val',
);
my %meterInfo2 = (
Format => 'int32u[33]',
PrintConv => 'sprintf("%3d %4d %6d" . " %3d %4d %6d" x 10, split(" ",$val))',
PrintConvInv => '$val',
);
my %meterInfo1b = (
Format => 'undef[90]',
ValueConv => \&ConvMeter1,
PrintConv => 'sprintf("%19d %4d %6d" . " %3d %4d %6d" x 8, split(" ",$val))',
);
my %meterInfo2b = (
Format => 'undef[110]',
ValueConv => \&ConvMeter2,
PrintConv => 'sprintf("%3d %4d %6d" . " %3d %4d %6d" x 10, split(" ",$val))',
);
# Sony maker notes tags (some elements in common with %Image::ExifTool::Minolta::Main)
%Image::ExifTool::Sony::Main = (
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => q{
The following information has been decoded from the MakerNotes of Sony
cameras. Some of these tags have been inherited from the Minolta
MakerNotes.
},
0x0010 => [ #PH
# appears to contain mostly AF related information;
# for SLT-A77V and newer, similar info is found in 0x940e AFInfo" (ref JR)
{
Name => 'CameraInfo',
# count: A700=368, A850/A900=5478
Condition => '$count == 368 or $count == 5478',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraInfo',
ByteOrder => 'BigEndian',
},
},{
Name => 'CameraInfo2',
# count: A200/A300/A350=5506, A230/A290/A330/A380/A390=6118
Condition => '$count == 5506 or $count == 6118',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraInfo2',
ByteOrder => 'LittleEndian',
},
},{
Name => 'CameraInfo3',
# count: A33/A35/A55V/A450/A500/A550/A560/A580/NEX3/5/5C/C3/VG10E=15360
Condition => '$count == 15360',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraInfo3',
ByteOrder => 'LittleEndian',
},
},{
Name => 'CameraInfoUnknown',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::CameraInfoUnknown' },
},
],
# 0x0018 - starts with "GYRO" for sweep panorama images (ref JR)
# - contains ImageStabilization information for Minolta
0x0020 => [
# similar to WBInfoA100 in Minolta.pm.
# appears to contain various types of information, as in MoreInfo. (ref JR)
{
Name => 'FocusInfo', #PH
# count: A200/A230/A290/A300/A330/A350/A380/A390==19154, A700/A850/A900=19148
Condition => '$count == 19154 or $count == 19148',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::FocusInfo',
ByteOrder => 'LittleEndian',
},
},{
Name => 'MoreInfo', #JR
# count: A450/A500/A550/A560/A580/A33/A35/A55/NEX-3/5/C3/VG10E==20480
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::MoreInfo',
ByteOrder => 'LittleEndian',
},
},
],
0x0102 => { #5/JD
Name => 'Quality',
Writable => 'int32u',
PrintConv => {
0 => 'RAW',
1 => 'Super Fine',
2 => 'Fine',
3 => 'Standard',
4 => 'Economy',
5 => 'Extra Fine',
6 => 'RAW + JPEG',
7 => 'Compressed RAW',
8 => 'Compressed RAW + JPEG',
0xffffffff => 'n/a', #PH (SLT-A57 panorama)
},
},
0x0104 => { #5/JD
Name => 'FlashExposureComp',
Description => 'Flash Exposure Compensation',
Writable => 'rational64s',
},
0x0105 => { #5/JD (models since mid-2014, ILCA-77M2, ILCE-7M2/7RM2/7SM2, do not report this tag anymore, ref JR)
Name => 'Teleconverter',
Writable => 'int32u',
PrintHex => 1,
PrintConv => \%Image::ExifTool::Minolta::minoltaTeleconverters,
},
0x0112 => { #JD
Name => 'WhiteBalanceFineTune',
Format => 'int32s',
Writable => 'int32u',
},
0x0114 => [ #PH
{
Name => 'CameraSettings',
# count: A200/A300/A350/A700=280, A850/A900=364
Condition => '$count == 280 or $count == 364',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraSettings',
ByteOrder => 'BigEndian',
},
},{
Name => 'CameraSettings2',
# count: A230/A290/A330/A380/A390=332
Condition => '$count == 332',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraSettings2',
ByteOrder => 'BigEndian',
},
},{
Name => 'CameraSettings3',
# count: A560/A580/A33/A35/A55/NEX3/5/5C/C3/VG10E=1536, A450/A500/A550=2048
Condition => '$count == 1536 || $count == 2048',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraSettings3',
ByteOrder => 'LittleEndian',
},
},{
Name => 'CameraSettingsUnknown',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::CameraSettingsUnknown',
ByteOrder => 'BigEndian',
},
},
],
0x0115 => { #JD
Name => 'WhiteBalance',
Writable => 'int32u',
Priority => 2, # (more reliable for the RX100)
PrintHex => 1,
PrintConv => {
0x00 => 'Auto',
0x01 => 'Color Temperature/Color Filter',
0x10 => 'Daylight',
0x20 => 'Cloudy',
0x30 => 'Shade',
0x40 => 'Tungsten',
0x50 => 'Flash',
0x60 => 'Fluorescent',
0x70 => 'Custom',
0x80 => 'Underwater',
},
},
# Tag 0x0116: extra hardware info (ref JR)
# (tag not present for A100, A200, A300, A350, A700, nor for A37, A57, A65, A77)
0x0116 => [ #JR
{
Name => 'ExtraInfo',
Condition => '$$self{Model} =~ /^DSLR-A(850|900)\b/',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::ExtraInfo',
ByteOrder => 'BigEndian',
},
},{
Name => 'ExtraInfo2',
Condition => '$$self{Model} =~ /^DSLR-A(230|290|330|380|390)\b/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::ExtraInfo2' },
},{
Name => 'ExtraInfo3',
# for DSLR-A450/500/550/560/580, SLT-A33/35/55 and NEX-3/5/5C.
SubDirectory => { TagTable => 'Image::ExifTool::Sony::ExtraInfo3' },
}
],
0x0e00 => {
Name => 'PrintIM',
Description => 'Print Image Matching',
SubDirectory => { TagTable => 'Image::ExifTool::PrintIM::Main' },
},
# the next 3 tags have a different meaning for some models (with format int32u)
0x1000 => { #9 (F88, multi burst mode only)
Name => 'MultiBurstMode',
Condition => '$format eq "undef"',
Notes => 'MultiBurst tags valid only for models with this feature, like the F88',
Writable => 'undef',
Format => 'int8u',
PrintConv => { 0 => 'Off', 1 => 'On' },
},
0x1001 => { #9 (F88, multi burst mode only)
Name => 'MultiBurstImageWidth',
Condition => '$format eq "int16u"',
Writable => 'int16u',
},
0x1002 => { #9 (F88, multi burst mode only)
Name => 'MultiBurstImageHeight',
Condition => '$format eq "int16u"',
Writable => 'int16u',
},
0x1003 => { #9 (64 bytes, contains Panorama info for various DSC, NEX, SLT and DSLR models)
Name => 'Panorama',
# panorama: first 4 bytes '1 1 0 0' (little-endian) or '0 0 1 1' (big-endian)
# non-panorama: all bytes are '0' (ref JR)
Condition => '$$self{Panorama} = ($$valPt =~ /^(\0\0)?\x01\x01/)', # (little- or big-endian int32u = 257)
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Panorama' },
},
# 0x2000 - undef[1]
0x2001 => { #PH (JPEG images from all DSLR's except the A100)
Name => 'PreviewImage',
Groups => { 2 => 'Preview' },
Writable => 'undef',
DataTag => 'PreviewImage',
Notes => 'HD-size preview in JPEG images from almost all DSLR/SLT/ILCA/NEX/ILCE.',
# Note: the preview data starts with a 32-byte proprietary Sony header
# first 8 bytes after 32-byte header:
# \x00\xd8\xff\xe1\x00\x27\xff\xff for JPEG files from A33/35/55V/450/500/550/560/580, NEX-3/5/5C/C3/VG10
# \x00\xd8\xff\xdb\x00\x84\x00\x01 for JPEG files from all other models
# ( \xff\xd8\xff\xdb\x00\x84\x00\x01 corresponding bytes for all ARW files )
#
# DSLR-A700/A850/A900 and DSLR-A200/A300/A350:
# - no MPImage2
# DSLR-A230/A290/A330/A380/A390:
# - PreviewImage start-offset is at 110 bytes inside MPImage2
# DSLR-A450/A500/A550/A560/A580, SLT-A33/A35/A55V, NEX-3/5/5C/C3/VG10/VG10E:
# - PreviewImage start-offset is at 106 bytes inside MPImage2
# - different first bytes after 32-byte header
# SLT-A37/A57/A58/A65V/A77V/A99V, ILCA-77M2, NEX-3N/5N/5R/5T/6/7/F3, ILCE-3000/3500/5000/6000/7/7R/7S:
# - PreviewImage start-offset is at 130 bytes inside MPImage2
# NEX-VG20E/VG30E/VG900, ILCE-QX1: 0x2001 not present
# ILCE-5100/ILCE-7M2/7RM2/7SM2 : 0x2001 present but Size 0 and Offset 0
#
WriteCheck => 'return $val=~/^(none|.{32}\xff\xd8\xff)/s ? undef : "Not a valid image"',
RawConv => q{
return \$val if $val =~ /^Binary/;
$val = substr($val,0x20) if length($val) > 0x20;
# return \$val if $val =~ s/^.(\xd8\xff\xdb)/\xff$1/s;
return \$val if $val =~ s/^.(\xd8\xff[\xdb\xe1])/\xff$1/s;
$$self{PreviewError} = 1 unless $val eq 'none' or $val eq '';
return undef;
},
# must construct 0x20-byte header which contains length, width and height
ValueConvInv => q{
return 'none' unless $val;
my $e = new Image::ExifTool;
my $info = $e->ImageInfo(\$val,'ImageWidth','ImageHeight');
return undef unless $$info{ImageWidth} and $$info{ImageHeight};
my $size = Set32u($$info{ImageWidth}) . Set32u($$info{ImageHeight});
return Set32u(length $val) . $size . ("\0" x 8) . $size . ("\0" x 4) . $val;
},
},
0x2002 => { #JR (written by Sony IDC)
Name => 'Rating',
Writable => 'int32u', # (0-5 stars) (4294967295 for an HX9V iSweep Panorama, ref JR)
},
# 0x2003 - string[256]: all 0 for DSLR, SLT, NEX; data for DSC-HX9V
0x2004 => { #PH (NEX-5)
Name => 'Contrast',
Writable => 'int32s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x2005 => { #PH (NEX-5)
Name => 'Saturation',
Writable => 'int32s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x2006 => { #PH
Name => 'Sharpness',
Writable => 'int32s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x2007 => { #PH
Name => 'Brightness',
Writable => 'int32s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x2008 => { #PH
Name => 'LongExposureNoiseReduction',
Writable => 'int32u',
PrintHex => 1,
PrintConv => {
0 => 'Off',
1 => 'On (unused)',
0x10001 => 'On (dark subtracted)', # (NEX-C3)
0xffff0000 => 'Off (65535)',
0xffff0001 => 'On (65535)',
0xffffffff => 'n/a',
},
},
0x2009 => { #PH
Name => 'HighISONoiseReduction',
Writable => 'int16u',
PrintConv => {
0 => 'Off',
1 => 'Low',
2 => 'Normal',
3 => 'High',
256 => 'Auto',
# it seems that all DSC models except DSC-RX models give n/a here (ref JR)
65535 => 'n/a',
},
},
0x200a => { #PH (A550)
Name => 'HDR',
Writable => 'int32u',
Format => 'int16u',
Count => 2,
Notes => 'stored as a 32-bit integer, but read as two 16-bit integers',
PrintHex => 1,
PrintConv => [{
0x0 => 'Off',
0x01 => 'Auto',
0x10 => '1.0 EV',
0x11 => '1.5 EV',
0x12 => '2.0 EV',
0x13 => '2.5 EV',
0x14 => '3.0 EV',
0x15 => '3.5 EV',
0x16 => '4.0 EV',
0x17 => '4.5 EV',
0x18 => '5.0 EV',
0x19 => '5.5 EV',
0x1a => '6.0 EV',
},{ #JR (A580)
0 => 'Uncorrected image', # A580 stores 2 images: uncorrected and HDR
1 => 'HDR image (good)',
2 => 'HDR image (fail 1)', # alignment problem?
3 => 'HDR image (fail 2)', # contrast problem?
}],
},
0x200b => { #PH
Name => 'MultiFrameNoiseReduction',
Writable => 'int32u',
Notes => 'may not be valid for RS100', # (RS100 sample was 0 when this feature was turned on)
PrintConv => {
0 => 'Off',
1 => 'On',
255 => 'n/a',
},
},
# 0x200c - int32u[3]: '0 0 0'; seen '2 1 0' for HX9V 3D-Image (in both JPG and MPO image)
# 0x200d - rational64u: 10/10, seen 2.5 for DSC-TX300V, 8 for DSC-HX100V/RX10
0x200e => { #PH (HX20V)
Name => 'PictureEffect',
Writable => 'int16u',
PrintConv => {
0 => 'Off',
1 => 'Toy Camera', #JR (A35)
2 => 'Pop Color', # (also A35/NEX-C3, ref JR)
3 => 'Posterization', #JR (A35)
4 => 'Posterization B/W', #JR (A35)
5 => 'Retro Photo', #JR (A35, NEX-5)
6 => 'Soft High Key', # (also A65V, A35/NEX-C3 call this "High-key", ref JR)
7 => 'Partial Color (red)', #JR (A35)
8 => 'Partial Color (green)', #JR (A35, NEX-5)
9 => 'Partial Color (blue)', #JR (A35)
10 => 'Partial Color (yellow)', #JR (A35, NEX-5)
13 => 'High Contrast Monochrome', #JR (A35)
16 => 'Toy Camera (normal)', # (also A65, ref JR)
17 => 'Toy Camera (cool)', # (RX100)
18 => 'Toy Camera (warm)', # (RX100)
19 => 'Toy Camera (green)', # (RX100)
20 => 'Toy Camera (magenta)', # (RX100)
32 => 'Soft Focus (low)', #JR (RX100)
33 => 'Soft Focus', #JR (A65V)
34 => 'Soft Focus (high)', # (RX100)
48 => 'Miniature (auto)', #JR (A65V/NEX-7, horizontal)
49 => 'Miniature (top)', # (RX100)
50 => 'Miniature (middle horizontal)', # (WX100/HX20V, horizontal)
51 => 'Miniature (bottom)', # (WX100, rotate 90 CW)
52 => 'Miniature (left)', # (RX100)
53 => 'Miniature (middle vertical)', # (RX100)
54 => 'Miniature (right)', # (RX100)
64 => 'HDR Painting (low)', # (RX100)
65 => 'HDR Painting', # (also A65V, ref JR)
66 => 'HDR Painting (high)', # (RX100)
80 => 'Rich-tone Monochrome', # (also A65V, ref JR)
97 => 'Water Color', # (HX200V)
98 => 'Water Color 2',
112 => 'Illustration (low)', # (RX100)
113 => 'Illustration', # (RX100)
114 => 'Illustration (high)', # (RX100)
},
},
0x200f => { #PH (RX100)
Name => 'SoftSkinEffect',
Writable => 'int32u',
PrintConv => {
0 => 'Off',
1 => 'Low',
2 => 'Mid',
3 => 'High',
# 0x10001 - seen (ref JR)
# 0x10002 - seen for landscape and portrait flash (ref JR)
# 0x10003 - seen (ref JR)
0xffffffff => 'n/a', # (A35)
},
},
0x2010 => [ #JR
# different camera models have similar content but at different offsets, appears to correlate with:
# 0x1206 - 0x1207 deciphered (0x1205 changes with firmware version):
# ad c3 - NEX-5N
# 0x0192 - 0x0193 deciphered (0x0191 changes with firmware version):
# 91 c3 - NEX-VG20E
# 93 c3 - NEX-7, SLT-A65V/A77V
# 94 c3 - Hasselblad Lunar
# 0x0012 - 0x0013 deciphered (0x0011 changes with firmware version):
# 94 c3 - SLT-A37/A57, NEX-F3
# 95 d3 - DSC-WX50, WX70
# 98 c3 - DSC-HX200V, HX20V, HX30V, TX200V, TX300V
# 98 d3 - DSC-HX10V, TX66, WX100, WX150
# 9a c3 - DSC-RX1, RX1R
# 9b c3 - SLT-A99V, Hasselblad HV
# 9c c3 - NEX-VG30E
# 9d c3 - DSC-RX100, Hasselblad Stellar
# 9e c3 - NEX-VG900, SLT-A58
# a1 d3 - DSC-TX30
# a2 d3 - DSC-WX60, WX80, WX200, WX300
# a3 c3 - NEX-6, DSC-HX300, HX50V
# a4 c3 - NEX-3N/5R/5T, ILCE-3000/3500
# unknown offsets or values for DSC-TX20/TX55/WX30
# unknown offsets or values for DSC-HX60V/HX350/HX400V/QX10/QX30/QX100/RX10/RX100M2/RX100M3/WX220/WX350,
# ILCA-68/77M2, ILCE-5000/5100/6000/7/7M2/7R/7S/QX1
# unknown offsets or values for DSC-HX90V/RX0/RX1RM2/RX10M2/RX10M3/RX100M4/RX100M5/WX500, ILCE-6300/6500/7RM2/7SM2, ILCA-99M2
# unknown offsets or values for ILCE-7RM3/9, DSC-RX10M4
{
Name => 'Tag2010a', # ad
Condition => '$$self{Model} =~ /^NEX-5N$/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010a' },
},{
Name => 'Tag2010b', # 91, 93
Condition => '$$self{Model} =~ /^(SLT-A(65|77)V?|NEX-(7|VG20E)|Lunar)$/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010b' },
},{
Name => 'Tag2010c', # 94
Condition => '$$self{Model} =~ /^(SLT-A(37|57)|NEX-F3)$/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010c' },
},{
Name => 'Tag2010d', # 95, 98
Condition => q{
$$self{Model} =~ /^(DSC-(HX10V|HX20V|HX30V|HX200V|TX66|TX200V|TX300V|WX50|WX70|WX100|WX150))$/ and
not $$self{Panorama}
},
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010d' },
},{
Name => 'Tag2010e', # 9a, 9b, 9c, 9d, 9e, a1, a2, a3, a4
Condition => q{
$$self{Model} =~ /^(SLT-A99V?|HV|SLT-A58|ILCE-(3000|3500)|NEX-(3N|5R|5T|6|VG900|VG30E)|DSC-(RX100|RX1|RX1R)|Stellar)$/ or
($$self{Model} =~ /^(DSC-(HX300|HX50V|TX30|WX60|WX80|WX200|WX300))$/ and not $$self{Panorama})
},
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010e' },
},{
Name => 'Tag2010f', # ?
Condition => '$$self{Model} =~ /^(DSC-(RX100M2|QX10|QX100))$/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010f' },
},{
Name => 'Tag2010g', # ?
Condition => '$$self{Model} =~ /^(DSC-(QX30|RX10|RX100M3|HX60V|HX350|HX400V|WX220|WX350)|ILCE-(7(R|S|M2)?|[56]000|5100|QX1)|ILCA-(68|77M2))\b/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010g' },
},{
Name => 'Tag2010h', # ?
Condition => '$$self{Model} =~ /^(DSC-(RX0|RX1RM2|RX10M2|RX10M3|RX100M4|RX100M5|HX90V?|WX500)|ILCE-(6300|6500|7RM2|7SM2)|ILCA-99M2)\b/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010h' },
},{
Name => 'Tag2010i', # ?
Condition => '$$self{Model} =~ /^(ILCE-(7RM3|9)|DSC-RX10M4)\b/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010i' },
},{
Name => 'Tag_0x2010',
%unknownCipherData,
}],
0x2011 => { #PH (A77, NEX-5N)
Name => 'VignettingCorrection',
Writable => 'int32u',
PrintConv => {
0 => 'Off',
2 => 'Auto',
0xffffffff => 'n/a', # (RX100)
},
},
0x2012 => { #PH (A77, NEX-5N)
Name => 'LateralChromaticAberration',
Writable => 'int32u',
PrintConv => {
0 => 'Off',
2 => 'Auto',
0xffffffff => 'n/a', # (RX100)
},
},
0x2013 => { #PH (A77, NEX-5N) ("Setting"; application of such correction is indicated in Tag9405 - ref JR)
Name => 'DistortionCorrectionSetting',
Writable => 'int32u',
PrintConv => {
0 => 'Off',
2 => 'Auto',
0xffffffff => 'n/a', # (RX100)
},
},
0x2014 => { #JR/9
Name => 'WBShiftAB_GM',
Writable => 'int32s',
Count => 2,
Notes => q{
2 numbers: 1. positive is a shift toward amber, 2. positive is a shift
toward magenta
},
},
# 0x2015 - int16u: 65535, also for 'normal' HDR images; 0 for HDR-paint and Rich-tone Monochrome effect images
0x2016 => { #PH (RX100)
Name => 'AutoPortraitFramed',
Writable => 'int16u',
Notes => '"Yes" if this image was created by the Auto Portrait Framing feature',
PrintConv => { 0 => 'No', 1 => 'Yes' },
},
# 0x2017 - int32u: flash mode. 0=off, 1=fired, 2=red-eye (PH, NEX-6) (also in A99, RX1, NEX-5R)
0x2017 => { #JR
Name => 'FlashAction',
Writable => 'int32u',
PrintConv => {
0 => 'Did not fire',
1 => 'Flash Fired',
2 => 'External Flash Fired',
},
},
# 0x2018 - something with external flash: seen 1 only when 0x2017 = 2
# 0x2019 - 0 or 1 (seen 1 for ILCA-77M2, ILCE-7M2/7RM2)
# 0x201a - 0 or 1
0x201a => { #JR
Name => 'ElectronicFrontCurtainShutter',
Writable => 'int32u',
PrintConv => {
0 => 'Off',
1 => 'On',
},
},
0x201b => { #PH
# FocusMode for SLT/HV/ILCA and NEX/ILCE; doesn't seem to apply to DSC models (always 0)
Name => 'FocusMode',
Condition => '$$self{Model} !~ /^DSC-/',
Writable => 'int8u',
Priority => 0,
PrintConv => {
0 => 'Manual',
2 => 'AF-S',
3 => 'AF-C',
4 => 'AF-A',
6 => 'DMF', # "Direct Manual Focus"
7 => 'AF-D', # "Depth Map Assist Continuous AF"
},
},
0x201c => [ #JR
# AFAreaModeSetting for SLT/HV/ILCA and NEX/ILCE; doesn't seem to apply to DSC models (always 0)
# all DSLR/SLT/HV Wide Zone Spot Local
# all NEX and ILCE-3000 Multi Center FlexibleSpot
# all ILCE and ILCA Wide Zone Center FlexibleSpot ExpandedFlexibleSpot
# (actual AFAreaMode used may be different as camera can override this under certain conditions)
{
Name => 'AFAreaModeSetting',
Condition => '$$self{Model} =~ /^(SLT-|HV)/',
Notes => 'SLT models',
Writable => 'int8u',
PrintConv => {
0 => 'Wide',
4 => 'Local',
8 => 'Zone', #PH
9 => 'Spot',
},
},{
Name => 'AFAreaModeSetting',
Condition => '$$self{Model} =~ /^(NEX-|ILCE-)/',
Notes => 'NEX and ILCE models',
RawConv => '$$self{AFAreaILCE} = $val',
DataMember => 'AFAreaILCE',
Writable => 'int8u',
PrintConv => {
0 => 'Wide', # all NEX and ILCE-3000/3500 use the name 'Multi'
1 => 'Center',
3 => 'Flexible Spot',
4 => 'Flexible Spot (LA-EA4)', # seen for ILCE-7RM2 with LA-EA4
9 => 'Center (LA-EA4)', # seen for ILCE-7RM2 with LA-EA4
11 => 'Zone',
12 => 'Expanded Flexible Spot',
},
},{
Name => 'AFAreaModeSetting',
Condition => '$$self{Model} =~ /^ILCA-/',
Notes => 'ILCA models',
RawConv => '$$self{AFAreaILCA} = $val',
DataMember => 'AFAreaILCA',
Writable => 'int8u',
PrintConv => {
0 => 'Wide',
4 => 'Flexible Spot',
8 => 'Zone',
9 => 'Center',
12 => 'Expanded Flexible Spot',
},
},
],
0x201d => { #JR
# Flexible Spot position for NEX/ILCE, non-zero only when AFAreaMode='Flexible Spot'
# observed values in range (0 0) to (640 480), with center (320 240) often seen
# for NEX-5R/6, positions appear to be in an 11x9 grid
Name => 'FlexibleSpotPosition',
Condition => '$$self{Model} =~ /^(NEX-|ILCE-)/',
Writable => 'int16u',
Count => 2,
Notes => q{
X and Y coordinates of the AF point, valid only when AFAreaMode is Flexible
Spot
},
},
0x201e => [{ #PH (A99)
# Selected AF Point for SLT/HV/ILCA or ILCE with LA-EA2/EA4
# Selected AF Zone for NEX/ILCE/ILCA when AFAreaMode = 'Zone',
# but also with Expanded Flexible Spot for ILCE-7RM2/7SM2/9 ...
# doesn't seem to apply to DSC models (always 0)
Name => 'AFPointSelected',
Condition => q{
($$self{Model} =~ /^(SLT-|HV)/) or ($$self{Model} =~ /^ILCE-/ and
defined $$self{AFAreaILCE} and $$self{AFAreaILCE} == 4)
},
Notes => 'SLT models or ILCE with LA-EA2/EA4',
Writable => 'int8u',
PrintConvColumns => 2,
PrintConv => {
0 => 'Auto', #(NC)
1 => 'Center',
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
10 => 'Far Right',
11 => 'Far Left',
12 => 'Upper-middle',
13 => 'Near Right',
14 => 'Lower-middle',
15 => 'Near Left',
16 => 'Upper Far Right',
17 => 'Lower Far Right',
18 => 'Lower Far Left',
19 => 'Upper Far Left',
},
},{
Name => 'AFPointSelected',
Condition => '$$self{Model} =~ /^ILCA-(68|77M2)/ and defined $$self{AFAreaILCA} and $$self{AFAreaILCA} != 8',
Notes => 'ILCA-68 and ILCA-77M2',
Writable => 'int8u',
ValueConv => '$val - 1', # to get the same numbers as from the BITMASK in 0x2020
ValueConvInv => '$val + 1',
PrintConvColumns => 5,
PrintConv => {
-1 => 'Auto',
%afPoints79,
39 => 'E6 (Center)', # (add " (Center)" to central point)
},
},{
Name => 'AFPointSelected',
Condition => '($$self{Model} =~ /^ILCA-99M2/ and defined $$self{AFAreaILCA} and $$self{AFAreaILCA} != 8)',
Notes => 'ILCA-99M2 when AFAreaModeSetting is not Zone',
# (appears to indicate the number of the selectable Focal Plane AF Point)
Writable => 'int8u',
PrintConvColumns => 4,
PrintConv => {
0 => 'Auto', # seen for AFAreaModeSetting = Center, Wide
%afPoints99M2, # for selected AFPoints corresponding to the 79 dedicated AF points
162 => 'E6 (162, Center)', # add " (Center)" to central point
OTHER => sub { shift }, # pass other values straight through
},
},{
Name => 'AFPointSelected',
Condition => '($$self{Model} =~ /^ILCA-/ and defined $$self{AFAreaILCA} and $$self{AFAreaILCA} == 8)',
Notes => 'ICLA models when AFAreaModeSetting is set to Zone',
# ILCA-68 and 77M2 have 9 Zones: numbers/locations verified for ILCA-77M2
# ILCA-99M2 has 15 Zones in Hybrid-AF and 9 Zones in dedicated Phase AF Area, so may not be valid for ILCA-99M2...
Writable => 'int8u',
PrintConv => {
0 => 'n/a',
1 => 'Top Left Zone',
2 => 'Top Zone',
3 => 'Top Right Zone',
4 => 'Left Zone',
5 => 'Center Zone',
6 => 'Right Zone',
7 => 'Bottom Left Zone',
8 => 'Bottom Zone',
9 => 'Bottom Right Zone',
#14 => ' ??? ', # seen for ILCA-99M2
},
},{
Name => 'AFPointSelected',
# non-zero only when AFAreaMode is 'Zone', and 'Expanded-Flexible-Spot' for ILCE-6300/7RM2/7SM2
# each Zone has 3x3 AF Areas --> 9 positions within 5x5 total Contrast AF Areas
Condition => '$$self{Model} =~ /^(NEX-|ILCE-)/',
Notes => 'NEX and ILCE models',
Writable => 'int8u',
PrintConv => {
0 => 'n/a',
1 => 'Center Zone',
2 => 'Top Zone',
3 => 'Right Zone',
4 => 'Left Zone',
5 => 'Bottom Zone',
6 => 'Bottom Right Zone',
7 => 'Bottom Left Zone',
8 => 'Top Left Zone',
9 => 'Top Right Zone',
},
}],
# 0x201f - 0 0 0 0 for SLT and DSC; 4 values for NEX/ILCE with 4th value always 0:
# possibly bits relating to the 25 AF-Contrast-areas ???
# 0x2020 - 10 values; for SLT/ILCA and NEX/ILCE with A-mount lens: relates to (phase-detect) AFPoints
# but not used by ILCA-99M2 anymore ... ?
0x2020 => [{
Name => 'AFPointsUsed',
Condition => '$$self{Model} !~ /^(ILCA-|DSC-)/', # (doesn't seem to apply to DSC-models)
Notes => 'SLT models, or NEX/ILCE with A-mount lenses',
BitsPerWord => 8,
BitsTotal => 80,
PrintConvColumns => 2,
PrintConv => {
0 => '(none)',
BITMASK => {
0 => 'Center',
1 => 'Top',
2 => 'Upper-right',
3 => 'Right',
4 => 'Lower-right',
5 => 'Bottom',
6 => 'Lower-left',
7 => 'Left',
8 => 'Upper-left',
9 => 'Far Right',
10 => 'Far Left',
11 => 'Upper-middle',
12 => 'Near Right',
13 => 'Lower-middle',
14 => 'Near Left',
15 => 'Upper Far Right',
16 => 'Lower Far Right',
17 => 'Lower Far Left',
18 => 'Upper Far Left',
},
},
},{
Name => 'AFPointsUsed',
Condition => '$$self{Model} =~ /^ILCA-(68|77M2)/',
Notes => 'ILCA models',
BitsPerWord => 8,
BitsTotal => 80,
PrintConvColumns => 4,
PrintConv => {
0 => '(none)',
BITMASK => { %afPoints79 },
},
}],
# 0x2021 - 0 for DSC; 0, 1 or 2 for SLT/ILCA and NEX/ILCE: 1=Face, 2=object-tracking ?
0x2021 => { #JR
Name => 'AFTracking',
Condition => '$$self{Model} !~ /^DSC-/', # (doesn't seem to apply to DSC-models)
Writable => 'int8u',
PrintConv => {
0 => 'Off',
1 => 'Face tracking',
2 => 'Lock On AF',
},
},
# 0x2022 - 13 bytes (104 bits) for SLT-A58/A99V, NEX-3N/5R/5T/6/VG30E/VG900, ILCE-3000/3500/5000/7/7R
# 26 bytes (208 bits) for ILCA-77M2, ILCE-5100/6000/7M2/7S/QX1 (7M2 has 117, 5100/6000 have 179 PhaseAFPoints)
# 52 bytes (416 bits) for ILCE-7RM2 (which has 399 PhaseAFPoints) and ILCE-7SM2
# Only seen non-zero values for ILCE-5100/6000/7M2/7RM2 in AF-C mode: maybe FocalPlaneAFPointsUsed ???
# (Similar number of bytes for contemporary DSC models, but mostly all non-zero values.)
# ILCE-6300 does not write this tag anymore, but writes 0x202a ...
0x2022 => [{
Name => 'FocalPlaneAFPointsUsed',
Condition => '$$self{Model} =~ /^(ILCE-(5100|6000|7M2))/',
Notes => 'On-sensor/focal-plane phase AF points for ILCE with hybrid AF',
BitsPerWord => 8,
BitsTotal => 208, # 26 words
PrintConv => {
0 => '(none)',
BITMASK => { },
},
},{
Name => 'FocalPlaneAFPointsUsed',
Condition => '$$self{Model} =~ /^ILCE-7RM2/',
# ILCE-7RM2 has 399 points in 19 rows of 21 points, numbered [0] to [398], [199] is Center
BitsPerWord => 8,
BitsTotal => 416, # 52 words
PrintConv => {
0 => '(none)',
BITMASK => { },
},
}],
0x2023 => { #JR
Name => 'MultiFrameNREffect',
Writable => 'int32u',
PrintConv => {
0 => 'Normal',
1 => 'High', # seen this only for ILCA-77M2 MFNR-12 images
},
},
# 0x2024 - 96 byte data block, very similar to 0x3000 ShotInfo, seen in Xperia Z5
# 0x2025 - n1 n2 0 0 DSC-RX100M3/RX100M4/RX10M2/HX90V/WX500, ILCA-77M2, ILCE-5100/7M2/7RM2/7S/QX1
# seen n1=0,2,4,5,7 and n2=0,1,3, very often: 7 3 0 0
# 0x2026 - 2 values: more precise WB Shift: AB in steps of 0.50, GM in steps of 0.25 (ILCE-7RM2 onwards)
0x2026 => { #JR
Name => 'WBShiftAB_GM_Precise',
Writable => 'int32s',
Count => 2,
Notes => q{
2 numbers: 1. positive is a shift toward amber, 2. positive is a shift
toward magenta
},
PrintConv => 'my @v=split(" ",$val); $_/=1000 foreach @v; sprintf("%.2f %.2f",$v[0],$v[1])',
},
# 0x2027 - W H W/2 H/2 or W H val1 val2 (0 0 0 0 for Panorama images)
# Probably location of focus for Playback Zoom.
# Origin appears to be top-left, i.e. 1st coord to the right, 2nd coord. pointing down.
0x2027 => { #JR
Name => 'FocusLocation', #(NC)
Writable => 'int16u',
Count => 4,
NOTES => q{
Location in the image where the camera focused, used for Playback Zoom.
If the focus location information cannot be obtained, the centre of the
image will be used.
},
},
# 0x2028 - 0 0 for DSC-RX100M4/RX10M2, ILCE-7RM2/7SM2; seen non-zero values only for DSC-RX1RM2
0x2028 => { #JR
Name => 'VariableLowPassFilter',
Writable => 'int16u',
Count => 2,
PrintConv => {
'0 0' => 'n/a',
'1 0' => 'Off',
'1 1' => 'Standard',
'1 2' => 'High',
},
},
0x2029 => { # uncompressed 14-bit RAW file type setting introduced 2015
Name => 'RAWFileType',
Writable => 'int16u',
PrintConv => {
0 => 'Compressed RAW',
1 => 'Uncompressed RAW',
},
},
# 0x202a - first seen for ILCE-6300: 66 bytes
# possibly a 'replacement' for Tag2022 FocalPlaneAFPointsUsed,
# but now indicating locations in a 640x428 grid (3:2 part of LCD ?)
# first byte value 1 for ILCE-6300/6500/9, ILCA-99M2
# values 110,137, ... for DSC-RX10M3, therefore limit to first byte = 1 for now
0x202a => {
Name => 'Tag202a',
Condition => '$$valPt =~ /^\x01/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag202a' },
},
# 0x202b - int8u - 0, 1, 2 seen for ILCA-99M2, ILCE-6500/9, DSC-RX100M5
0x202c => { #JR
Name => 'MeteringMode2',
Writable => 'int16u',
PrintHex => 1,
PrintConv => {
0x100 => 'Multi-segment',
0x200 => 'Center-weighted average',
# 0x300 => 'Spot', # not yet seen
# (there is one other setting that might also be encoded here:
# the Spot Metering Point can be set to "Center", to meter in the
# center of the image, or to "Focus Point Link", to meter at the focus point.
# This could also be the meaning of 0x301 and 0x302 - JR)
0x301 => 'Spot (Standard)', # (NC) seen for ILCA-99M2 with Exif indicating "Spot"
0x302 => 'Spot (Large)', # (NC) seen for ILCE-9 with Exif indicating "Spot"
0x400 => 'Average', # (NC) seen for ILCA-99M2 with Exif indicating "Average"
0x500 => 'Highlight', # (NC) seen for ILCA-99M2 with Exif indicating "Other"
},
},
0x202d => { #JR first seen for ILCA-99M2, ILCE-6500, DSC-RX100M5
Name => 'ExposureStandardAdjustment', # (NC)
Writable => 'rational64s',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
},
# 0x2031 - new for ILCE-9 v2.00 (possible serial number?)
0x3000 => {
Name => 'ShotInfo',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::ShotInfo' },
},
# 0x3000: data block that includes DateTimeOriginal string
# 0x5001 - 0
# 0x5002 - 128
#
# at least some data for tags 0x2010, 0x9050 and 0x94xx is encrypted - PH
# (This is certainly true for at least parts of 0x2010, 0x9050, 0x9400, 0x9402 and 0x9403,
# but hasn't been verified for other tags -- just to be thorough, decipher all of them)
# Note: "(e)" in a comment indicates an enciphered value, all other values are deciphered
#
# 0x900b - 1st byte 0xae: face detection info for A450/500/550/560/580, A33/35/55, NEX-3/5/5C/C3/VG10
# - other 1st byte values for some DSC-models
# - seen many 1,8,27,64... values: assume encrypted like other 9xxx tags
0x900b => {
Name => 'Tag900b',
Condition => '$$valPt =~ /^\xae/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag900b' },
},
0x9050 => [
# 944 bytes for A37, A57, A99, NEX-F3, NEX-5R, NEX-6, DSC-RX1, DSC-RX100
# 3072 bytes for A65, A77, NEX-5N, NEX-7, NEX-VG20 (ref JR)
# not valid for DSC/Stellar models
# from mid-2015: ILCE-7RM2/7SM2/6300 and newer models use different offsets
{
Name => 'Tag9050a',
Condition => '$$self{Model} !~ /^(DSC-|Stellar|ILCE-(6300|6500|7RM2|7RM3|7SM2|9)|ILCA-99M2)/',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::Tag9050a',
ByteOrder => 'LittleEndian',
},
},{
Name => 'Tag9050b',
Condition => '$$self{Model} =~ /^(ILCE-(6300|6500|7RM2|7RM3|7SM2|9)|ILCA-99M2)/',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::Tag9050b',
ByteOrder => 'LittleEndian',
},
},{
Name => 'Sony_0x9050',
%unknownCipherData,
}],
0x9400 => [
# first byte:
# 0x07 (e) for DSC-HX7V/HX9V/HX100V/TX10/TX100/TX100V/WX7/WX9/WX10, HDR-CX../PJ..
# 0x09 (e) for DSC-TX20/TX55/WX30
# 0x0a (e) for SLT-A37/A57/A65V/A77V/A99V, NEX-F3/5N/5R/5T/6/7/VG20E, DSC-RX100/RX1/RX1R/HX10V/HX20V/HX30V/HX200V/TX200V/TX300V/TX66/WX50/WX100/WX150, Lunar/Stellar/HV
# 0x0c (e) for ILCE-3000/3500, NEX-3N, SLT-A58, DSC-HX50V/HX300/RX100M2/TX30/WX60/WX80/WX200/WX300, DSC-QX10/QX100
# 0xd0 (e) H90, W650, W690: tag9400 decoding appears not valid/different
# 0x23 (e) for DSC-RX10/HX60V/HX350/HX400V/WX220/WX350, ILCE-7/7R/5000/6000, ILCA-68/77M2
# 0x24 (e) for ILCA-99M2,ILCE-5100/6300/6500/7M2/7RM2/7S/7SM2/QX1, DSC-HX90V/QX30/RX0/RX100M3/RX100M4/RX100M5/RX10M2/RX10M3/RX1RM2/WX500
# 0x26 (e) for ILCE-7RM3/9, DSC-RX10M4
# first byte decoded: 40, 204, 202, 27, 58, 62, 48, 215 respectively
{
Name => 'Tag9400a',
Condition => q{
$$valPt =~ /^[\x07\x09\x0a]/ or
($$valPt =~ /^[\x5e\xe7\x04]/ and $$self{DoubleCipher} = 1)
},
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9400a' },
},{
Name => 'Tag9400b',
Condition => '$$valPt =~ /^\x0c/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9400b' },
},{
Name => 'Tag9400c',
Condition => '$$valPt =~ /^[\x23\x24\x26]/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9400c' },
},{
Name => 'Sony_0x9400',
%unknownCipherData,
}],
0x9401 => {
Name => 'Sony_0x9401',
%unknownCipherData,
# notes for data in this block (ref PH/JR):
# 0x02-0x03 appear to have some relation to start-offset of data...
# 0x00 - 0x03 Metering
# Mode
# f4 00 00 03 - - DSC-H90/W650/W690
# cf 0b 9f 0f 0x09bc (a) DSC-WX9
# 1c 00 ac 0f 0x09c9 (b) HDR-CX130E/CX160E/CX360E/CX560E/CX700E/PJ10E/PJ30E
# b7 0f f7 0f 0x09dd (c) DSC-HX7V/TX10/WX7/WX10
# b7 0f fa 0f 0x09e0 (d) DSC-HX9V/HX100V/TX100/TX100V
# 27 00 fd 0f 0x09e7 (e) DSC-TX20/TX55/WX30
# 69 1f ff 0f 0x09e9 (f) NEX-5N
# 21 2b cf 0f 0x09e9 (f) NEX-7/VG20E, SLT-A65V/A77V, Lunar
# 2d 00 d5 0d 0x09a2 (g) DSC-HX10V/HX20V/HX30V/HX200V/TX66/TX200V/TX300V/WX50/WX70/WX100/WX150
# 2f 00 d6 0d 0x09a3 (h) NEX-F3, SLT-A37/A57
# 30 00 d8 0d 0x09a5 (i) HDR-AS15
# 32 00 e2 0d 0x09ac (j) DSC-RX100, Stellar
# 33 00 e2 0d 0x09ac (j) NEX-5R/5T/6, NEX-VG900/VG30E
# 33 50 e2 0d 0x09ac (j) SLT-A99V, HV
# 33 40 0d 0e 0x09d7 (k) DSC-RX1 v0.01
# 33 41 0d 0e 0x09d7 (k) DSC-RX1, DSC-RX1R
# 38 00 32 0e 0x09fc (l) SLT-A58, ILCE-3000/3500, NEX-3N, DSC-HX300/HX50V/WX200/WX300/WX60/WX80/TX30
# 3a 10 3a 0e 0x0a01 (m) DSC-QX10/QX100
# 3a 20 47 0e 0x0a01 (m) DSC-RX100M2
# 43 00 66 0e 0x0a1b (n) ILCE-7/7R v0.xx/v1.00/v1.01, ILCE-5000, DSC-RX10
# 43 10 66 0e 0x0a1b (n) ILCE-7/7R v1.02/v1.10
# 43 30 6c 0e 0x0a1b (n) ILCE-7/7R v1.20-v3.20
# 44 00 9c 0e 0x0a39 (o) ILCE-6000 v1.00/v1.10, DSC-HX60V/HX350/HX400V/WX220/WX350 (also DSC-QX30 samples from sony.net)
# 44 10 a2 0e 0x0a39 (o) ILCE-6000 v1.20/v1.21
# 44 20 a2 0e 0x0a39 (o) ILCE-6000 v2.00-v3.20
# 49 00 b0 0e 0x0a3b (p) ILCA-68 v1.00, ILCA-77M2 V1.00/v1.01/v2.00 (also DSC-RX100M3 samples from sony.net)
# 4a 00 b3 0e 0x0a3d (q) ILCE-7S v1.00, ILCE-5100 v1.00/v1.10, ILCE-QX1, DSC-QX30/RX100M3
# 4a 20 b9 0e 0x0a3d (q) ILCE-7S v1.20-v3.10
# 4e 10 d0 0e 0x0a5a (r) ILCE-7M2 v1.00/v1.10
# 4e 30 d6 0e 0x0a5a (r) ILCE-7M2 v1.20-v4.00
# 5a 00 14 0f 0x0a85 (s) DSC-HX90V/WX500
# 5d 00 56 0f 0x0ac7 (t) DSC-RX10M2/RX100M4, ILCE-7RM2/7SM2 v1.00-v2.20 (also DSC-RX1RM2 samples from Sony)
# 5d 1d 58 0f 0x0ac7 (t) ILCE-7RM2 v3.00-v4.00
# 5d 1e 57 0f 0x0ac7 (t) DSC-RX1RM2 v1.00
# 5d 10 56 0f 0x0ac7 (t) ILCE-6300 v1.00 (samples from Sony)
# 5d 20 58 0f 0x0ac7 (t) ILCE-6300 v1.00/v1.10
# 5e 00 56 0f 0x0ac7 (t) DSC-RX10M3 v1.00
# 64 00 a8 0f 0x0b15 (u) DSC-RX100M5 v1.00
# 67 00 f9 0f 0x0b66 (v) ILCA-99M2 v1.00, ILCE-6500 v1.00/v1.03, DSC-RX0 v1.00
# 7c 00 fe 0f 0x0adb (w) ILCE-9 v0.01/v1.00/v1.01/v1.10
# 7f 00 fa 0f 0x0add (x) DSC-RX10M4 v1.00
# 80 00 fa 0f ILCE-7RM3 v0.01
#
# 0x0004 - (RX100: 0 or 1. subsequent data valid only if 1 - PH)
# 0x0007 => {
# Name => 'DynamicRangeOptimizer_9401',
# PrintConv => {
# 0 => 'Disabled', # seen for Panorama images
# 1 => 'Auto',
# 3 => 'Lv1', #(NC)
# 4 => 'Lv2', #(NC)
# 5 => 'Lv3',
# 6 => 'Lv4',
# 7 => 'Lv5',
# # 8 - seen for VG20E and some other models - PH
# 255 => 'Off',
# },
# },
},
0x9402 => [{
Name => 'Tag9402',
# first 2 bytes deciphered:
# 0x00 0x00 SLT-A37/A57/A65/A77
# 0x0e 0x00 DSC-H90/HX7V/HX9V/HX100V/TX10/TX100/TX100V/TX20/TX55/W650/W690/W730/WX10/WX30/WX7/WX9, but also seen:
# 0x0e 0x01 for a few DSC-W650/W690 samples ...
# 0x0f 0x01 NEX-5N/7/VG20, Lunar
# 0x10 0x01 DSC-HX10V/HX200V/HX20V/HX300/HX30V/HX50V/TX200V/TX30/TX300V/TX66/RX100/RX1/RX1R/WX100/WX150/WX200/WX300/WX50/WX60/WX70/WX80, Stellar,
# ILCE-3000/3500, NEX-F3/3N/5R/5T/6/VG30/VG900
# 0x11 0x01 DSC-RX100M2/QX10/QX100
# 0x13 0x01 ILCE-5000/7/7R, DSC-RX10, but also seen:
# 0x12 0x01 for ILCE-7/7R and DSC-RX10 samples from Sony.net ...
# 0x15 0x01 for a few ILCE-7/7R ...
# 0x14 0x01 ILCE-6000, DSC-HX60V/HX350/HX400V/WX220/WX350
# 0x17 0x01 ILCE-7S/7M2/5100/QX1, DSC-QX30/RX100M3
# 0x19 0x01 DSC-HX90V/RX1RM2/RX10M2/RX100M4/WX500, ILCE-6300/7RM2/7SM2
# 0x1a 0x01 DSC-RX0/RX10M3/RX100M5, ILCE-6500
# 0x1c 0x01 ILCE-9
# 0x1d 0x01 DSC-RX10M4
# 0x1e 0x01 ILCE-7RM3
# var var SLT-A58/A99V, HV, ILCA-68/77M2/99M2
# only valid when first byte 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x17, 0x19, 0x1a, 0x1c (enciphered 0x8a, 0x70, 0xb6, 0x69, 0x88, 0x20, 0x30, 0xd7, 0xbb, 0x92, 0x28)
# Condition => '$$self{DoubleCipher} ? $$valPt =~ /^[\x7e\x46\x1d\x18\x3a\x95\x24\x26\xd6]\x01/ : $$valPt =~ /^[\x8a\x70\xb6\x69\x88\x20\x30\xd7\xbb\x92\x28]\x01/',
# alternative simpler Condition:
# not valid for SLT/HV/ILCA models, and not valid for first byte 0x0e or 0xff (enciphered 0x05 or 0xff)
Condition => '$$self{Model} !~ /^(SLT-|HV|ILCA-)/ and $$valPt !~ /^[\x05\xff]/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9402' },
},{
Name => 'Sony_0x9402',
%unknownCipherData,
}],
0x9403 => {
Name => 'Tag9403',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9403' },
},
# 0x9404 first 5 bytes (deciphered):
# 4 0 163 1 2 SLT-A65V/A77V, NEX-5N/7, Lunar, DSC-HX7V/HX9V/HX100V/TX10/TX20/TX55/TX100/TX100V/WX9/WX10/WX30...
# 5 0 172 1 2 DSC-HX10V/HX200V/HX20V/HX30V/TX66/TX200V/TX300V/WX50/WX70/WX100/WX150...
# 9 0 38 2 2 SLT-A37/A57/A99V, NEX-5R/5T/6/F3/VG30E/VG900, DSC-RX1/RX1R/RX100, Stellar
# 12 0 8 2 2 SLT-A58, NEX-3N, ILCE-3000/3500, DSC-HX300/HX50V/WX60/WX80/WX300/TX30...
# 13 0 9 2 2 DSC-QX10/QX100/RX100M2
# 15 0 35 2 2 ILCA-68/77M2, ILCE-5000/5100/6000/7/7R/7S/7M2/QX1, DSC-HX60V/HX350/HX400V/QX30/RX10/RX100M3/WX220/WX350
# 16 0 85 2 2 DSC-HX90V/WX500
# 17 0 232 1 2 DSC-RX0/RX1RM2/RX10M2/RX10M3/RX10M4/RX100M4/RX100M5, ILCE-6300/6500/7RM2/7RM3/7SM2/9, ILCA-99M2
# other values for Panorama images and several other models
0x9404 => [{
Name => 'Tag9404a',
# first byte must be 4 or 5 and 4th byte must be 1 (deciphered)
Condition => '$$valPt =~ /^[\x40\x7d]..\x01/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9404a' },
},{
Name => 'Tag9404b',
# first byte must be 9 or 12 or 13 or 15 or 16 and 4th byte must be 2 (deciphered)
Condition => '$$valPt =~ /^[\xe7\xea\xcd\x8a\x70]..\x08/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9404b' },
},{
Name => 'Tag9404c',
# first byte must be 17 and 4th byte must be 1 (deciphered)
Condition => '$$valPt =~ /^\xb6..\x01/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9404c' },
},{
Name => 'Sony_0x9404',
%unknownCipherData,
}],
# 0x9405 first 2 bytes:
# 0 0 (0x00 = 0 0 enc.) DSC-H90
# 2 0 (0x08 = 8 0 enc.) DSC and HDR of HX9V generation
# 3 0 (0x1b = 27 0 enc.) SLT, NEX, ILCE-3000/3500, DSC-RX100/RX1 + other DSC of same generation, also QX10 and QX100
# 4 0 (0x40 = 64 0 enc.) DSC-RX1R
# 5 0 (0x7d = 125 0 enc.) DSC-RX100M2
# 136 var (0x3a = 58 var enc.) ILCE-7/7R/5000/6000, DSC-HX60V/HX350/HX400V/RX10/WX220/WX350
# 137 var (0xb3 = 179 var enc.) ILCA-68/77M2, DSC-RX100M3 - appears to go with 136
# 138 var (0x7e = 126 var enc.) ILCE-7S/5100/QX1, DSC-QX30 - appears to go with 136
# 139 var (0x9a = 154 var enc.) ILCE-7M2
# 142 var (0x25 = 37 var enc.) DSC-HX90V/RX1RM2/RX10M2/RX10M3/RX100M4/WX500, ILCE-6300/7RM2/7SM2
# 144 var (0xe1 = 225 var enc.) DSC-RX100M5
# 145 var (0x76 = 118 var enc.) ILCA-99M2, ILCE-6500, DSC-RX0
# 163 var (0x8b = 139 var enc.) ILCE-7RM3/9, DSC-RX10M4
0x9405 => [{
Name => 'Tag9405a',
# first byte must be 0x1b or 0x40 or 0x7d
Condition => '$$valPt =~ /^[\x1b\x40\x7d]/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9405a' },
},{
Name => 'Tag9405b',
# first byte must be 0x3a, 0xb3, 0x7e, 0x9a, 0x25, 0xe1, 0x76 or 0x8b
Condition => '$$valPt =~ /^[\x3a\xb3\x7e\x9a\x25\xe1\x76\x8b]/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9405b' },
},{
Name => 'Sony_0x9405',
%unknownCipherData,
}],
0x9406 => [{
Name => 'Tag9406',
# - first byte must be 0x01 or 0x02 (enciphered 0x01 or 0x08), or 0x03 (enc. 0x1b) for ILCE-6300/7RM2/7SM2, and
# third byte must be 0x02 or 0x03 (enciphered 0x08 or 0x1b) - ref JR
# (applies to most SLT and NEX models, but no DSC models)
Condition => '$$valPt =~ /^[\x01\x08\x1b].[\x08\x1b]/s',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9406' },
},{
Name => 'Sony_0x9406',
%unknownCipherData,
}],
0x9407 => {
Name => 'Sony_0x9407',
%unknownCipherData,
},
0x9408 => {
Name => 'Sony_0x9408',
%unknownCipherData,
},
0x9409 => {
Name => 'Sony_0x9409',
%unknownCipherData,
},
0x940a => [{
Name => 'Tag940a',
Condition => '$$self{Model} =~ /^(SLT-|HV)/', # but appears not valid for ILCA models ...
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag940a' },
},{
Name => 'Sony_0x940a',
%unknownCipherData,
}],
0x940b => {
Name => 'Sony_0x940b',
%unknownCipherData,
},
0x940c => [{
Name => 'Tag940c',
Condition => '$$self{Model} =~ /^(NEX-|ILCE-|Lunar)\b/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag940c' },
},{
Name => 'Sony_0x940c',
%unknownCipherData,
}],
0x940d => {
Name => 'Sony_0x940d',
%unknownCipherData,
},
# 0x940e: 2nd byte = 0: no AFInfo, default for NEX/ILCE
# 2nd byte = 1: AFInfo for SLT/ILCA models (but also seen 1 for DSC-HX20W/HX300/WX70 ...)
# 2nd byte = 2: AFInfo for NEX/ILCE with LA-EA2/EA4 Phase-detect AF Adapter
0x940e => [{
Name => 'AFInfo',
Condition => '$$self{Model} =~ /^(SLT-|HV|ILCA-)/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::AFInfo' },
},{
Name => 'Tag940e',
Condition => '$$self{Model} =~ /^(NEX-|ILCE-|Lunar)/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag940e' },
},{
Name => 'Sony_0x940e',
%unknownCipherData,
}],
0x940f => {
Name => 'Sony_0x940f',
%unknownCipherData,
},
0x9411 => {
Name => 'Sony_0x9411',
%unknownCipherData,
# 0x02 - int32u?: 1,3,5,7,9 (A77)
},
0xb000 => { #8
Name => 'FileFormat',
Writable => 'int8u',
Count => 4,
# dynamically set the file type to SR2 because we could have assumed ARW up till now
RawConv => q{
$self->OverrideFileType($$self{TIFF_TYPE} = 'SR2') if $val eq '1 0 0 0';
return $val;
},
PrintConvColumns => 2,
PrintConv => {
'0 0 0 2' => 'JPEG',
'1 0 0 0' => 'SR2',
'2 0 0 0' => 'ARW 1.0',
'3 0 0 0' => 'ARW 2.0',
'3 1 0 0' => 'ARW 2.1',
'3 2 0 0' => 'ARW 2.2', #PH (NEX-5)
'3 3 0 0' => 'ARW 2.3', #PH (SLT-A65,SLT-A77)
'3 3 1 0' => 'ARW 2.3.1', #PH/JR (DSC-RX1R/RX100M2)
'3 3 2 0' => 'ARW 2.3.2', #JR (DSC-RX1RM2,ILCE-7SM2 - support for uncompressed 14-bit RAW)
'3 3 3 0' => 'ARW 2.3.3', #JR (ILCE-9)
# what about cRAW images?
},
},
0xb001 => { # ref http://forums.dpreview.com/forums/read.asp?forum=1037&message=33609644
# (ARW and SR2 images only until the SLT-A65V started writing them to JPEG too)
Name => 'SonyModelID',
Writable => 'int16u',
PrintConvColumns => 2,
PrintConv => {
2 => 'DSC-R1',
256 => 'DSLR-A100',
257 => 'DSLR-A900',
258 => 'DSLR-A700',
259 => 'DSLR-A200',
260 => 'DSLR-A350',
261 => 'DSLR-A300',
262 => 'DSLR-A900 (APS-C mode)', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3994.0.html
263 => 'DSLR-A380/A390', #PH (A390)
264 => 'DSLR-A330',
265 => 'DSLR-A230',
266 => 'DSLR-A290', #PH
269 => 'DSLR-A850',
270 => 'DSLR-A850 (APS-C mode)', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3994.0.html
273 => 'DSLR-A550',
274 => 'DSLR-A500', #PH
275 => 'DSLR-A450', #http://dev.exiv2.org/issues/show/0000611
278 => 'NEX-5', #PH
279 => 'NEX-3', #PH
280 => 'SLT-A33', #PH
281 => 'SLT-A55 / SLT-A55V', #PH (A55 NC)
282 => 'DSLR-A560', #PH
283 => 'DSLR-A580', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2881.0.html
284 => 'NEX-C3', #PH
285 => 'SLT-A35', #JR
286 => 'SLT-A65 / SLT-A65V', #PH
287 => 'SLT-A77 / SLT-A77V', #PH
288 => 'NEX-5N', #PH
289 => 'NEX-7', #PH (also Hasselblad Lunar, ref JR)
290 => 'NEX-VG20E', #JR
291 => 'SLT-A37', #JR
292 => 'SLT-A57', #JR
293 => 'NEX-F3', #PH
294 => 'SLT-A99 / SLT-A99V', #JR (also Hasselblad HV)
295 => 'NEX-6', #JR
296 => 'NEX-5R', #JR
297 => 'DSC-RX100', #PH (also Hasselblad Stellar, ref JR)
298 => 'DSC-RX1', #JR
299 => 'NEX-VG900', #JR
300 => 'NEX-VG30E', #JR
302 => 'ILCE-3000 / ILCE-3500', #JR
303 => 'SLT-A58', #JR
305 => 'NEX-3N', #PH
306 => 'ILCE-7', #JR
307 => 'NEX-5T', #JR
308 => 'DSC-RX100M2', #JR
309 => 'DSC-RX10', #JR
310 => 'DSC-RX1R', #JR
311 => 'ILCE-7R', #JR
312 => 'ILCE-6000', #JR
313 => 'ILCE-5000', #JR
317 => 'DSC-RX100M3', #JR
318 => 'ILCE-7S', #JR
319 => 'ILCA-77M2', #IB
339 => 'ILCE-5100', #JR
340 => 'ILCE-7M2', #JR
341 => 'DSC-RX100M4', #PH
342 => 'DSC-RX10M2', #JR
344 => 'DSC-RX1RM2', #JR
346 => 'ILCE-QX1', #IB
347 => 'ILCE-7RM2', #JR
350 => 'ILCE-7SM2', #JR
353 => 'ILCA-68', #IB
354 => 'ILCA-99M2', #JR
355 => 'DSC-RX10M3', #PH
356 => 'DSC-RX100M5', #IB/JR
357 => 'ILCE-6300', #IB
358 => 'ILCE-9', #JR
360 => 'ILCE-6500', #JR
362 => 'ILCE-7RM3', #IB
364 => 'DSC-RX0', #PH
365 => 'DSC-RX10M4', #JR
},
},
0xb020 => { #2
Name => 'CreativeStyle',
Writable => 'string',
# (all of these values have been observed, ref JR and PH)
# - this PrintConv is included to make these strings consistent with
# other CreativeStyle tags, and to facilitate the language translations
# - these values are always English, regardless of the camera language settings
PrintConv => {
OTHER => sub { shift }, # pass other values straight through
None => 'None',
AdobeRGB => 'Adobe RGB',
Real => 'Real',
Standard => 'Standard',
Vivid => 'Vivid',
Portrait => 'Portrait',
Landscape => 'Landscape',
Sunset => 'Sunset',
Nightview => 'Night View/Portrait',
BW => 'B&W',
Neutral => 'Neutral',
Clear => 'Clear',
Deep => 'Deep',
Light => 'Light',
Autumnleaves=> 'Autumn Leaves',
Sepia => 'Sepia',
},
},
0xb021 => { #2
Name => 'ColorTemperature',
Writable => 'int32u',
PrintConv => '$val ? ($val==0xffffffff ? "n/a" : $val) : "Auto"',
PrintConvInv => '$val=~/Auto/i ? 0 : ($val eq "n/a" ? 0xffffffff : $val)',
},
0xb022 => { #7
Name => 'ColorCompensationFilter',
Format => 'int32s',
Writable => 'int32u', # (written incorrectly as unsigned by Sony)
Notes => 'negative is green, positive is magenta',
},
0xb023 => { #PH (A100) - (set by mode dial)
Name => 'SceneMode',
Writable => 'int32u',
PrintConvColumns => 2,
PrintConv => \%Image::ExifTool::Minolta::minoltaSceneMode,
},
0xb024 => { #PH (A100)
Name => 'ZoneMatching',
Writable => 'int32u',
PrintConv => {
0 => 'ISO Setting Used',
1 => 'High Key',
2 => 'Low Key',
},
},
0xb025 => { #PH (A100)
Name => 'DynamicRangeOptimizer',
Writable => 'int32u',
PrintConvColumns => 2,
PrintConv => {
0 => 'Off',
1 => 'Standard',
2 => 'Advanced Auto',
3 => 'Auto', # (A550)
8 => 'Advanced Lv1', #JD
9 => 'Advanced Lv2', #JD
10 => 'Advanced Lv3', #JD
11 => 'Advanced Lv4', #JD
12 => 'Advanced Lv5', #JD
16 => 'Lv1', # (NEX-5)
17 => 'Lv2',
18 => 'Lv3',
19 => 'Lv4',
20 => 'Lv5',
},
},
0xb026 => { #PH (A100)
Name => 'ImageStabilization',
Writable => 'int32u',
PrintConv => {
0 => 'Off',
1 => 'On',
0xffffffff => 'n/a', # (HX9V sweep panorama, ref JR)
},
},
0xb027 => { #2
Name => 'LensType',
Writable => 'int32u',
SeparateTable => 1,
# set to 65535 for E-mount lenses (values 0x80xx)
ValueConvInv => '($val & 0xff00) == 0x8000 ? 65535 : int($val)',
PrintConv => \%sonyLensTypes,
},
0xb028 => { #2
# (used by the DSLR-A100)
Name => 'MinoltaMakerNote',
# must check for zero since apparently a value of zero indicates the IFD doesn't exist
# (dumb Sony -- they shouldn't write this tag if the IFD is missing!)
Condition => '$$valPt ne "\0\0\0\0"',
Flags => 'SubIFD',
SubDirectory => {
TagTable => 'Image::ExifTool::Minolta::Main',
Start => '$val',
},
},
0xb029 => { #2 (set by creative style menu)
Name => 'ColorMode',
Writable => 'int32u',
PrintConvColumns => 2,
PrintConv => \%Image::ExifTool::Minolta::sonyColorMode,
},
0xb02a => {
Name => 'LensSpec',
Format => 'undef',
Writable => 'int8u',
Count => 8,
Notes => q{
like LensInfo, but also specifies lens features: DT, E, ZA, G, SSM, SAM,
OSS, STF, Reflex, Macro and Fisheye
},
ValueConv => \&ConvLensSpec,
ValueConvInv => \&ConvInvLensSpec,
PrintConv => \&PrintLensSpec,
PrintConvInv => \&PrintInvLensSpec,
},
0xb02b => { #PH (A550 JPEG and A200, A230, A300, A350, A380, A700 and A900 ARW)
Name => 'FullImageSize',
Writable => 'int32u',
Count => 2,
# values stored height first, so swap to get "width height"
ValueConv => 'join(" ", reverse split(" ", $val))',
ValueConvInv => 'join(" ", reverse split(" ", $val))',
PrintConv => '$val =~ tr/ /x/; $val',
PrintConvInv => '$val =~ tr/x/ /; $val',
},
0xb02c => { #PH (A550 JPEG and A200, A230, A300, A350, A380, A700 and A900 ARW)
Name => 'PreviewImageSize',
Writable => 'int32u',
Count => 2,
ValueConv => 'join(" ", reverse split(" ", $val))',
ValueConvInv => 'join(" ", reverse split(" ", $val))',
PrintConv => '$val =~ tr/ /x/; $val',
PrintConvInv => '$val =~ tr/x/ /; $val',
},
0xb040 => { #2
Name => 'Macro',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
0 => 'Off',
1 => 'On',
2 => 'Close Focus', #9
65535 => 'n/a', #PH (A100)
},
},
0xb041 => { #2
Name => 'ExposureMode',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConvColumns => 2,
PrintConv => {
0 => 'Program AE', # (RX100 'Program','Sunset' - PH)
1 => 'Portrait', #PH (HX1)
2 => 'Beach', #9
3 => 'Sports', #9
4 => 'Snow', #9
5 => 'Landscape',
6 => 'Auto', # (RX100 'Intelligent Auto' - PH)
7 => 'Aperture-priority AE',
8 => 'Shutter speed priority AE',
9 => 'Night Scene / Twilight',#2/9
10 => 'Hi-Speed Shutter', #9
11 => 'Twilight Portrait', #9 (RX100 'Night Portrait' - PH)
12 => 'Soft Snap/Portrait', #9 (TX7 'Soft Snap'; RX100/A37 'Portrait' but manuals say "reproduces soft skin tone" - PH)
13 => 'Fireworks', #9
14 => 'Smile Shutter', #9 (T200)
15 => 'Manual',
18 => 'High Sensitivity', #9
19 => 'Macro', #JR
20 => 'Advanced Sports Shooting', #9
29 => 'Underwater', #9
# 30 seen for DSC-W110 and W390, maybe something with Face or Portrait ??
33 => 'Food', #9
34 => 'Sweep Panorama', #PH (HX1)
35 => 'Handheld Night Shot', #PH (HX1/TX1, also called "Hand-held Twilight")
36 => 'Anti Motion Blur', #PH (TX1)
37 => 'Pet', #9
38 => 'Backlight Correction HDR', #9
39 => 'Superior Auto', #9
40 => 'Background Defocus', #PH (HX20V)
41 => 'Soft Skin', #JR (HX9V) (HX200V Portrait - PH)
42 => '3D Image', #JR (HX9V)
# 50 seen for DSC-W530
65535 => 'n/a', #PH (A100)
},
},
0xb042 => { #9
Name => 'FocusMode',
# Only FocusMode for older DSC models;
# Newest DSC models give only 0, many models of 'HX9V generation' give only 4 -
# these models give FocusMode in tag 0xb04e, and are excluded here.
Condition => q{
($$self{TagB042} = Get16u($valPt, 0)) and
(not $$self{MetaVersion} or $$self{MetaVersion} ne 'DC7303320222000')
},
Notes => 'not valid for all models',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
# 0 - seen this for panorama shot
1 => 'AF-S', # (called Single-AF by Sony)
2 => 'AF-C', # (called Monitor-AF by Sony)
4 => 'Permanent-AF', # (TX7,HX9V?)
65535 => 'n/a', #PH (A100), also for DSC-W690 panorama shots
},
},
0xb043 => [{ #9
Name => 'AFAreaMode',
# AFAreaMode only for older models;
# exclude newest DSC models, which give AFAreaMode in Tag9402 0x0017 (eg. RX100 - PH)
Writable => 'int16u',
Condition => 'not $$self{MetaVersion} or $$self{MetaVersion} ne "DC7303320222000"', #JR
RawConv => '$val == 65535 ? undef : $val',
Notes => 'older models',
PrintConv => {
# 0 - (takes this value after camera reset, but can't be set back once changed)
0 => 'Default',
1 => 'Multi',
2 => 'Center',
3 => 'Spot',
4 => 'Flexible Spot', # (T200)
6 => 'Touch',
14 => 'Tracking', #JR (HX9V) ("Manual" for the T200?, ref 9)
15 => 'Face Tracking', # (not set when in face detect mode and no faces detected)
65535 => 'n/a', #PH (A100)
},
},{ #JR
Name => 'AFAreaMode',
# AFAreaMode for DSC-HX9V generation, having values that appear to be different from older models.
Writable => 'int16u',
Condition => '$$self{TagB042} and $$self{TagB042} != 0',
Notes => 'DSC-HX9V generation cameras',
PrintConv => {
0 => 'Multi',
1 => 'Center',
2 => 'Spot', #(NC) seen for DSC-WX9
3 => 'Flexible Spot',
10 => 'Selective (for Miniature effect)', # seen for Miniature effect of DSC-WX30
14 => 'Tracking',
15 => 'Face Tracking',
255 => 'Manual',
},
}],
0xb044 => { #9
Name => 'AFIlluminator',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
0 => 'Off',
1 => 'Auto',
65535 => 'n/a', #PH (A100)
},
},
# 0xb045 - int16u: 0
# 0xb046 - int16u: 0
0xb047 => { #2
Name => 'JPEGQuality',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
0 => 'Standard',
1 => 'Fine',
2 => 'Extra Fine', #JR
65535 => 'n/a', #PH (A100)
},
},
0xb048 => { #9
Name => 'FlashLevel', #JR other name, but values -9 to 9 match FlashExposureCompensation
Writable => 'int16s',
RawConv => '($val == -1 and $$self{Model} =~ /DSLR-A100\b/) ? undef : $val',
PrintConv => {
-32768 => 'Low',
-9 => '-9/3', #JR
-6 => '-6/3', #JR
-5 => '-5/3', #JR
-4 => '-4/3', #JR
-3 => '-3/3',
-2 => '-2/3',
-1 => '-1/3', # (for the A100, -1 is effectively 'n/a' - PH)
0 => 'Normal',
1 => '+1/3',
2 => '+2/3',
3 => '+3/3',
4 => '+4/3', #JR (NC)
5 => '+5/3', #JR (NC)
6 => '+6/3', #JR
128 => 'n/a', #JR (HX9V)
32767 => 'High',
},
},
0xb049 => { #9
Name => 'ReleaseMode',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
0 => 'Normal', # (ie. shutter button)
2 => 'Continuous',
5 => 'Exposure Bracketing',
6 => 'White Balance Bracketing', # (HX5)
8 => 'DRO Bracketing', #JR (ILCE-7RM2)
65535 => 'n/a', #PH (A100)
},
},
0xb04a => { #9
Name => 'SequenceNumber',
Notes => 'shot number in continuous burst',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
0 => 'Single',
65535 => 'n/a', #PH (A100)
OTHER => sub { shift }, # pass all other numbers straight through
},
},
0xb04b => { #2/PH
Name => 'Anti-Blur',
Writable => 'int16u',
RawConv => '$val == 65535 ? undef : $val',
PrintConv => {
0 => 'Off',
1 => 'On (Continuous)', #PH (NC)
2 => 'On (Shooting)', #PH (NC)
65535 => 'n/a',
},
},
# 0xb04c - rational64u: 10/10 (seen 5 for HX9V Manual-exposure images, ref JR)
# 0xb04d - int16u: 0
# (the Kamisaka decoding of 0xb04e seems wrong - ref JR)
# 0xb04e => { #2
# Name => 'LongExposureNoiseReduction',
# Notes => 'LongExposureNoiseReduction for other models',
# Writable => 'int16u',
# RawConv => '$val == 65535 ? undef : $val',
# PrintConv => {
# 0 => 'Off',
# 1 => 'On',
# 2 => 'On 2', #PH (TX10, TX100, WX9, WX10, etc)
# # 4 - seen this (CX360E, CX700E)
# 65535 => 'n/a', #PH (A100)
# },
# },
0xb04e => { #PH (RX100) - but not in RX100M3 anymore (ref JR)
Name => 'FocusMode',
Condition => '$$self{MetaVersion} and $$self{MetaVersion} eq "DC7303320222000"', #JR
Notes => 'valid for DSC-HX9V generation and newer',
Writable => 'int16u',
PrintConv => {
0 => 'Manual',
# 1 - seen for DSC-WX7 burst, HDR-CX130E/CX560E
2 => 'AF-S',
3 => 'AF-C',
# 4 - seen for HDR-CX360E/CX700E
5 => 'Semi-manual', #JR (HX9V)
6 => 'DMF', # "Direct Manual Focus"
},
},
0xb04f => { #PH (TX1)
Name => 'DynamicRangeOptimizer',
Writable => 'int16u',
Priority => 0, # (unreliable for the A77)
PrintConv => {
0 => 'Off',
1 => 'Standard',
2 => 'Plus',
# 8 for HDR models - what does this mean?
},
},
0xb050 => { #PH (RX100)
Name => 'HighISONoiseReduction2',
Condition => '$$self{Model} =~ /^(DSC-|Stellar)/',
Notes => 'DSC models only',
Writable => 'int16u',
PrintConv => {
0 => 'Normal',
1 => 'High',
2 => 'Low',
3 => 'Off', #JR
# it seems that all SLT and NEX models give n/a here (ref JR)
65535 => 'n/a',
},
},
# 0xb051 - int16u: 0
0xb052 => { #PH (TX1)
Name => 'IntelligentAuto',
Writable => 'int16u',
PrintConv => {
0 => 'Off',
1 => 'On',
2 => 'Advanced', #9
},
},
# 0xb053 - int16u: normally 0, but got 1 for a superior auto backlight picture (RX100)
0xb054 => { #PH/9/JR (TX1,TX7,RX100,HX9V)
Name => 'WhiteBalance',
Writable => 'int16u',
Notes => q{
decoding of the Fluorescent settings matches the EXIF standard, which is
different than the names used by Sony for some models
},
PrintConv => {
0 => 'Auto',
4 => 'Custom', # (manual)
5 => 'Daylight',
6 => 'Cloudy',
# PrintConv names matching Exif Fluorescent LightSource names (ref JR)
# (Sony uses conflicting names for some models)
7 => 'Cool White Fluorescent', # (RX100) (TX7/HX9V "Fluorescent 1 (White)", ref 9/JR)
8 => 'Day White Fluorescent', # (RX100) (TX7/HX9V "Fluorescent 2 (Natural White)", ref 9/JR)
9 => 'Daylight Fluorescent', # (RX100) (TX7/HX9V "Fluorescent 3 (Day White)", ref 9/JR)
10 => 'Incandescent2', #JR (HX9V)
11 => 'Warm White Fluorescent',
14 => 'Incandescent',
15 => 'Flash',
17 => 'Underwater 1 (Blue Water)', #9
18 => 'Underwater 2 (Green Water)', #9
19 => 'Underwater Auto', #JR
},
},
);
# "SEMC MS" maker notes
%Image::ExifTool::Sony::Ericsson = (
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => 'Maker notes found in images from some Sony Ericsson phones.',
0x2000 => {
Name => 'MakerNoteVersion',
Writable => 'undef',
Count => 4,
},
0x201 => {
Name => 'PreviewImageStart',
IsOffset => 1,
MakerPreview => 1, # force preview inside maker notes
OffsetPair => 0x202,
DataTag => 'PreviewImage',
Writable => 'int32u',
WriteGroup => 'MakerNotes',
Protected => 2,
Notes => 'a small 320x200 preview image',
},
0x202 => {
Name => 'PreviewImageLength',
OffsetPair => 0x201,
DataTag => 'PreviewImage',
Writable => 'int32u',
WriteGroup => 'MakerNotes',
Protected => 2,
},
);
# camera information for the A700/A850/A900 (ref JR)
%Image::ExifTool::Sony::CameraInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'Camera information for the A700, A850 and A900.',
0x00 => {
Name => 'LensSpec',
# the A700/A850/A900 use a different int16 byte ordering! - PH
Format => 'undef[8]',
ValueConv => sub {
my $val = shift;;
return ConvLensSpec(pack('v*', unpack('n*', $val)));
},
ValueConvInv => sub {
my $val = shift;
return pack('v*', unpack('n*', ConvInvLensSpec($val)));
},
PrintConv => \&PrintLensSpec,
PrintConvInv => \&PrintInvLensSpec,
},
0x0014 => {
Name => 'FocusModeSetting',
Notes => 'FocusModeSetting for the A700, A850 and A900',
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
4 => 'DMF',
},
},
0x0015 => { # the AF Point selected in AFAreaMode=Local or Spot; always '0' for AFAreaMode=Wide
Name => 'AFPointSelected',
PrintConvColumns => 2,
PrintConv => {
0 => 'Auto',
1 => 'Center',
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
10 => 'Far Right', # only given by A700
11 => 'Far Left', # only given by A700
},
},
# 0x0019 - AF sensor used for focusing for A700/A850/A900:
#
# A700 AF sensor layout: A850/A900 AF sensor layout:
#
# - *-* - = AF sensor
# | | | | * = assist sensor
# - *-* o = F2.8 sensor
# | | |o| | | | * |o| * | A700 center: double-cross + F2.8
# - *-* A850 center: double-cross + F2.8 + 4 assist
# | | | |
# - *-*
#
# Following values seen for A700/A850 in AFAreaMode=Local or Spot: (other values only seen in "Wide")
#
# 16
# 0 19
# 13
# 3 1 22 20 18
# 8
# 2 21
# 5
#
# Note 1: A850/A900 AFPoint Selected 'Left'/'Right' (in 0x0015) corresponds in position (see diagram)
# to A700 Local AFPoint 'Far Left'/'Far Right', and gives 'Far Left'/'Far Right' in 0x0019.
# Note 2: A700 in "Wide" also gives all 23 values in 0x0019, although it doesn't have assist-points ...
0x0019 => { # the AF sensor used for focusing
Name => 'AFPoint',
PrintConv => {
0 => 'Upper-left',
1 => 'Left',
2 => 'Lower-left',
3 => 'Far Left',
4 => 'Bottom Assist-left', #(NC)
5 => 'Bottom',
6 => 'Bottom Assist-right', #(NC)
# values 7-14: 8 center points: 4 from double-cross + 4 assist; 7-10 appear horizontal, 11-14 vertical
7 => 'Center (7)', #(NC)
8 => 'Center (horizontal)',
9 => 'Center (9)', #(NC)
10 => 'Center (10)', #(NC)
11 => 'Center (11)', #(NC)
12 => 'Center (12)', #(NC)
13 => 'Center (vertical)',
14 => 'Center (14)', #(NC)
15 => 'Top Assist-left', #(NC)
16 => 'Top',
17 => 'Top Assist-right', #(NC)
18 => 'Far Right',
19 => 'Upper-right',
20 => 'Right',
21 => 'Lower-right',
22 => 'Center F2.8',
},
},
# AF Status for A700/A850/A900, which have different sensor layout
# and different int16 byte ordering
0x001e => { Name => 'AFStatusActiveSensor', %Image::ExifTool::Minolta::afStatusInfo },
0x0020 => { Name => 'AFStatusUpper-left', %Image::ExifTool::Minolta::afStatusInfo },
0x0022 => { Name => 'AFStatusLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x0024 => { Name => 'AFStatusLower-left', %Image::ExifTool::Minolta::afStatusInfo },
0x0026 => { Name => 'AFStatusFarLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x0028 => { Name => 'AFStatusBottomAssist-left', %Image::ExifTool::Minolta::afStatusInfo },
0x002a => { Name => 'AFStatusBottom', %Image::ExifTool::Minolta::afStatusInfo },
0x002c => { Name => 'AFStatusBottomAssist-right', %Image::ExifTool::Minolta::afStatusInfo },
0x002e => { Name => 'AFStatusCenter-7', %Image::ExifTool::Minolta::afStatusInfo },
0x0030 => { Name => 'AFStatusCenter-horizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x0032 => { Name => 'AFStatusCenter-9', %Image::ExifTool::Minolta::afStatusInfo },
0x0034 => { Name => 'AFStatusCenter-10', %Image::ExifTool::Minolta::afStatusInfo },
0x0036 => { Name => 'AFStatusCenter-11', %Image::ExifTool::Minolta::afStatusInfo },
0x0038 => { Name => 'AFStatusCenter-12', %Image::ExifTool::Minolta::afStatusInfo },
0x003a => { Name => 'AFStatusCenter-vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x003c => { Name => 'AFStatusCenter-14', %Image::ExifTool::Minolta::afStatusInfo },
0x003e => { Name => 'AFStatusTopAssist-left', %Image::ExifTool::Minolta::afStatusInfo },
0x0040 => { Name => 'AFStatusTop', %Image::ExifTool::Minolta::afStatusInfo },
0x0042 => { Name => 'AFStatusTopAssist-right', %Image::ExifTool::Minolta::afStatusInfo },
0x0044 => { Name => 'AFStatusFarRight', %Image::ExifTool::Minolta::afStatusInfo },
0x0046 => { Name => 'AFStatusUpper-right', %Image::ExifTool::Minolta::afStatusInfo },
0x0048 => { Name => 'AFStatusRight', %Image::ExifTool::Minolta::afStatusInfo },
0x004a => { Name => 'AFStatusLower-right', %Image::ExifTool::Minolta::afStatusInfo },
0x004c => { Name => 'AFStatusCenterF2-8', %Image::ExifTool::Minolta::afStatusInfo },
0x0130 => {
Name => 'AFMicroAdjValue',
Condition => '$$self{Model} =~ /^DSLR-A(850|900)\b/',
ValueConv => '$val - 20',
ValueConvInv => '$val + 20',
},
0x0131 => {
Name => 'AFMicroAdjMode',
Condition => '$$self{Model} =~ /^DSLR-A(850|900)\b/',
Mask => 0x80,
PrintConv => {
0x00 => 'Off',
0x80 => 'On',
},
},
305.1 => { # (0x131)
Name => 'AFMicroAdjRegisteredLenses',
Notes => 'number of registered lenses with a non-zero AFMicroAdjValue',
Condition => '$$self{Model} =~ /^DSLR-A(850|900)\b/',
Mask => 0x7f,
},
# 0x0166 - 40 x 128 int8u values: AF Info Blocks for A850 and A900, not for A700
);
# camera information for other DSLR models (ref JR)
%Image::ExifTool::Sony::CameraInfo2 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => q{
Camera information for the DSLR-A200, A230, A290, A300, A330, A350, A380 and
A390.
},
0x00 => {
Name => 'LensSpec',
Format => 'undef[8]',
ValueConv => \&ConvLensSpec,
ValueConvInv => \&ConvInvLensSpec,
PrintConv => \&PrintLensSpec,
PrintConvInv => \&PrintInvLensSpec,
},
# 0x0010 - maybe to do with AFStatus: 0 na./Manual, 4 Failed, 16 Tracking, 64 Focused
0x0014 => {
Name => 'AFPointSelected',
PrintConvColumns => 2,
PrintConv => { #JR (NC) same list as A100, A700/A900, as all have 9 point AF
0 => 'Auto',
1 => 'Center',
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
},
},
0x0015 => {
Name => 'FocusModeSetting',
Notes => 'FocusModeSetting for other models',
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
4 => 'DMF',
},
},
# 0x0018 - AF sensor used for focusing for A200/A230/A290/A300/A330/A350/A380/A390; AF sensor layout:
#
# - - = AF sensor
# | | + = cross sensor
#
# - + -
#
# | |
# -
#
0x0018 => { # used A100 list which appears to match
Name => 'AFPoint',
PrintConv => {
0 => 'Top-right',
1 => 'Bottom-right',
2 => 'Bottom',
3 => 'Middle Horizontal',
4 => 'Center Vertical',
5 => 'Top',
6 => 'Top-left',
7 => 'Bottom-left',
},
},
# AF Status for A200/A230/A290/A300/A330/A350/A380/A390: analogous to A100 in Minolta.pm
0x001b => { Name => 'AFStatusActiveSensor', %Image::ExifTool::Minolta::afStatusInfo },
0x001d => { Name => 'AFStatusTop-right', %Image::ExifTool::Minolta::afStatusInfo },
0x001f => { Name => 'AFStatusBottom-right', %Image::ExifTool::Minolta::afStatusInfo },
0x0021 => { Name => 'AFStatusBottom', %Image::ExifTool::Minolta::afStatusInfo },
# MiddleHorizontal is any of the 3 central horizontal sensors
0x0023 => { Name => 'AFStatusMiddleHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x0025 => { Name => 'AFStatusCenterVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x0027 => { Name => 'AFStatusTop', %Image::ExifTool::Minolta::afStatusInfo },
0x0029 => { Name => 'AFStatusTop-left', %Image::ExifTool::Minolta::afStatusInfo },
0x002b => { Name => 'AFStatusBottom-left', %Image::ExifTool::Minolta::afStatusInfo },
# the 3 MiddleHorizontal sensors
0x002d => { Name => 'AFStatusLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x002f => { Name => 'AFStatusCenterHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x0031 => { Name => 'AFStatusRight', %Image::ExifTool::Minolta::afStatusInfo },
# 0x0166 - 59 x 96 int8u values: AF Info Blocks for A230/A290/A330/A380/A390
# 0x0182 - 58 x 88 int8u values: AF Info Blocks for A200/A300/A350
);
# Camera information for the A55 (ref PH)
# (also valid for A33, A35, A560, A580 - ref JR)
%Image::ExifTool::Sony::CameraInfo3 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
IS_SUBDIR => [ 0x23 ],
NOTES => q{
Camera information stored by the A33, A35, A55, A450, A500, A550, A560,
A580, NEX-3/5/5C/C3 and VG10E. Some tags are valid only for some of these
models.
},
0x00 => { #JR
Name => 'LensSpec',
Condition => '$$self{Model} !~ /^NEX-5C/',
Format => 'undef[8]',
ValueConv => \&ConvLensSpec,
ValueConvInv => \&ConvInvLensSpec,
PrintConv => \&PrintLensSpec,
PrintConvInv => \&PrintInvLensSpec,
},
0x0e => { #JR
Name => 'FocalLength',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
Format => 'int16u',
Priority => 0,
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ mm//; $val',
},
0x10 => { #JR
Name => 'FocalLengthTeleZoom',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
Format => 'int16u',
ValueConv => '$val * 2 / 3',
ValueConvInv => 'int($val * 3 / 2 + 0.5)',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ mm//; $val',
},
#
# Note:
# The below AF decoding covers cameras with 2 different AF systems, with overlapping offsets !
# 1) DSLR-A450/A500/A550 with 9 point AF system: decoding/offsets identical to A200 - A390 in CameraInfo
# 2) SLT-A33/A35/A55 and DSLR-A560/A580 with 15 point AF system: similar/more info but at different offsets
#
0x14 => { #JR
Name => 'AFPointSelected',
Condition => '$$self{Model} =~ /^(DSLR-A(450|500|550))\b/',
# (these cameras have a 9-point AF system, ref JR)
PrintConvColumns => 2,
PrintConv => {
0 => 'Auto', # (seen in Wide mode and for Manual Focus)
1 => 'Center', # seen for AFArea=Spot
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
},
},
0x15 => { #JR
Name => 'FocusMode',
Condition => '$$self{Model} =~ /^(DSLR-A(450|500|550))\b/',
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
},
},
0x18 => { #JR
Name => 'AFPoint',
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/',
PrintConv => {
0 => 'Top-right',
1 => 'Bottom-right',
2 => 'Bottom',
3 => 'Middle Horizontal',
4 => 'Center Vertical',
5 => 'Top',
6 => 'Top-left',
7 => 'Bottom-left',
},
},
0x19 => { #JR
Name => 'FocusStatus',
Condition => '$$self{Model} =~ /^(SLT-|DSLR-A(560|580))\b/',
Notes => 'not valid with Contrast AF or for NEX models',
# seen the following values:
# 0 with MF (A35, A55V-HDR, A560, A580), non-AF lens (A35), and A580 Contrast-AF
# 4 with MF (A33, A55V), and A580 Contrast-AF
# 16 with AF-C (or AF-A) and focus OK
# 24 with AF-C (or AF-A) and unsharp or fast moving subject e.g. bird in flight
# 64 with AF-S (or AF-A) and focus OK
PrintConv => {
0 => 'Manual - Not confirmed (0)',
4 => 'Manual - Not confirmed (4)',
16 => 'AF-C - Confirmed',
24 => 'AF-C - Not Confirmed',
64 => 'AF-S - Confirmed',
},
},
0x1b => { #JR
Name => 'AFStatusActiveSensor',
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/',
%Image::ExifTool::Minolta::afStatusInfo,
},
0x1c => {
Name => 'AFPointSelected', # (v8.88: renamed from LocalAFAreaPointSelected)
Condition => '$$self{Model} =~ /^(SLT-|DSLR-A(560|580))\b/',
Notes => 'not valid for Contrast AF', #JR
# (all of these cameras have an 15-point three-cross AF system, ref JR)
PrintConvColumns => 2,
PrintConv => {
0 => 'Auto', # (seen in Wide mode)
1 => 'Center',
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
10 => 'Far Right',
11 => 'Far Left',
12 => 'Upper-middle',
13 => 'Near Right',
14 => 'Lower-middle',
15 => 'Near Left',
},
},
0x1d => [
{
Name => 'FocusMode',
Condition => '$$self{Model} =~ /^(SLT-|DSLR-A(560|580))\b/',
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
},
},{ #JR
Name => 'AFStatusTop-right',
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/',
%Image::ExifTool::Minolta::afStatusInfo,
},
],
0x1f => { #JR
Name => 'AFStatusBottom-right',
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/',
%Image::ExifTool::Minolta::afStatusInfo,
},
0x20 => { #JR
Name => 'AFPoint', # (v8.88: renamed from LocalAFAreaPointUsed)
Condition => '$$self{Model} =~ /^(SLT-|DSLR-A(560|580))\b/',
Notes => 'the AF sensor used for focusing. Not valid for Contrast AF',
PrintConvColumns => 2,
PrintConv => {
%afPoint15,
255 => '(none)', #PH (A55, guess; also A35 with non-AF lens, ref JR)
},
},
0x21 => [ #JR
{
Name => 'AFStatusActiveSensor',
Condition => '$$self{Model} =~ /^(SLT-|DSLR-A(560|580))\b/',
%Image::ExifTool::Minolta::afStatusInfo,
},{
Name => 'AFStatusBottom',
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/',
%Image::ExifTool::Minolta::afStatusInfo,
},
],
0x23 => [ #JR
{
Name => 'AFStatus15',
Condition => '$$self{Model} =~ /^(SLT-|DSLR-A(560|580))\b/',
Format => 'int16s[18]',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::AFStatus15' },
},{
Name => 'AFStatusMiddleHorizontal', # MiddleHorizontal is any of the 3 central horizontal sensors
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/',
%Image::ExifTool::Minolta::afStatusInfo,
},
],
0x25 => { Name => 'AFStatusCenterVertical', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
0x27 => { Name => 'AFStatusTop', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
0x29 => { Name => 'AFStatusTop-left', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
0x2b => { Name => 'AFStatusBottom-left', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
# the 3 MiddleHorizontal sensors:
0x2d => { Name => 'AFStatusLeft', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
0x2f => { Name => 'AFStatusCenterHorizontal', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
0x31 => { Name => 'AFStatusRight', Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)\b/', %Image::ExifTool::Minolta::afStatusInfo },
# 0x0166 - starting here there are 96 AF Info blocks of 155 bytes each for the SLT-A33/A35/A55 and DSLR-A560/A580,
# starting here there are 86 AF Info blocks of 174 bytes each for the DSLR-A450/A500/A550,
# but NOT for NEX, and not for the A580 in Contrast-AF mode (ref JR)
# The 43rd byte of each block for A580 appears to be the AFPoint as in offset 0x20,
# possibly also 73rd and 74th byte
);
# Camera information for other models (ref PH)
%Image::ExifTool::Sony::CameraInfoUnknown = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
);
# white balance and other camera information (ref PH)
%Image::ExifTool::Sony::FocusInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PRIORITY => 0,
NOTES => q{
More camera settings and focus information decoded for models such as the
A200, A230, A290, A300, A330, A350, A380, A390, A700, A850 and A900.
},
0x0e => [{ #7/JR
Name => 'DriveMode2',
Condition => '$$self{Model} =~ /^DSLR-A(230|290|330|380|390)$/',
Notes => 'A230, A290, A330, A380 and A390',
ValueConvInv => '$val',
PrintHex => 1,
PrintConv => { # (values confirmed for specified models - PH)
0x01 => 'Single Frame', # (A230,A330,A380)
0x02 => 'Continuous High', #PH (A230,A330)
0x04 => 'Self-timer 10 sec', # (A230)
0x05 => 'Self-timer 2 sec, Mirror Lock-up', # (A230,A290,A330,A380,390)
0x07 => 'Continuous Bracketing', # (A230,A330)
0x0a => 'Remote Commander', # (A230)
0x0b => 'Continuous Self-timer', # (A230,A330)
},
},{
Name => 'DriveMode2',
Notes => 'A200, A300, A350, A700, A850 and A900',
ValueConvInv => '$val',
PrintHex => 1,
PrintConv => {
0x01 => 'Single Frame',
0x02 => 'Continuous High', # A700/A900; not on A850
0x12 => 'Continuous Low', #JR
0x04 => 'Self-timer 10 sec',
0x05 => 'Self-timer 2 sec, Mirror Lock-up',
0x06 => 'Single-frame Bracketing',
0x07 => 'Continuous Bracketing',
0x18 => 'White Balance Bracketing Low', #JR
0x28 => 'White Balance Bracketing High', #JR
0x19 => 'D-Range Optimizer Bracketing Low', #JR
0x29 => 'D-Range Optimizer Bracketing High', #JR
0x0a => 'Remote Commander', #JR
0x0b => 'Mirror Lock-up', #JR (A850/A900; not on A700)
},
}],
0x10 => { #JR (1 and 2 inverted!)
Name => 'Rotation',
PrintConv => {
0 => 'Horizontal (normal)',
1 => 'Rotate 270 CW',
2 => 'Rotate 90 CW',
},
},
0x14 => {
Name => 'ImageStabilizationSetting',
PrintConv => { 0 => 'Off', 1 => 'On' },
},
0x15 => { #7
Name => 'DynamicRangeOptimizerMode',
PrintConv => {
0 => 'Off',
1 => 'Standard',
2 => 'Advanced Auto',
3 => 'Advanced Level',
},
},
0x2b => { #JR seen 2,1,3 for both WB and DRO bracketing
Name => 'BracketShotNumber',
Notes => 'WB and DRO bracketing',
},
0x2c => { #JR
Name => 'WhiteBalanceBracketing',
PrintConv => {
0 => 'Off',
1 => 'Low',
2 => 'High',
},
},
0x2d => { #JR seen 2,1,3 for both WB and DRO bracketing
Name => 'BracketShotNumber2',
},
0x2e => { #JR
Name => 'DynamicRangeOptimizerBracket',
PrintConv => {
0 => 'Off',
1 => 'Low',
2 => 'High',
},
},
0x2f => { #JR seen 0,1,2 and 0,1,2,3,4 for 3 and 5 image bracketing sequences
Name => 'ExposureBracketShotNumber',
},
0x3f => { #JR
Name => 'ExposureProgram',
SeparateTable => 'ExposureProgram',
PrintConv => \%sonyExposureProgram,
},
0x41 => { #JR style actually used (combination of mode dial + creative style menu)
Name => 'CreativeStyle',
PrintConvColumns => 2,
PrintConv => {
1 => 'Standard',
2 => 'Vivid',
3 => 'Portrait',
4 => 'Landscape',
5 => 'Sunset',
6 => 'Night View/Portrait',
8 => 'B&W',
9 => 'Adobe RGB', # A700
11 => 'Neutral',
12 => 'Clear', #7
13 => 'Deep', #7
14 => 'Light', #7
15 => 'Autumn Leaves', #7
16 => 'Sepia', #7
},
},
0x6d => {
Name => 'ISOSetting',
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
},
0x6f => {
Name => 'ISO',
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
},
0x77 => { #JR
Name => 'DynamicRangeOptimizerMode',
PrintConv => {
0 => 'Off',
1 => 'Standard',
2 => 'Advanced Auto',
3 => 'Advanced Level',
},
},
0x79 => 'DynamicRangeOptimizerLevel',
# 0x06f1 - int16u LensType, Condition => '$$self{Model} =~ /^DSLR-A(700|850|900)$/',
# 0x4a81 - int16u LensType, Condition => '$$self{Model} !~ /^DSLR-A(700|850|900)$/',
# 0x4a84 - int16uRev LensType, Condition => '$$self{Model} =~ /^DSLR-A(700|850|900)$/',
0x0846 => { #13
Name => 'ShutterCount', # (=ImageCount for these models)
Condition => '$$self{Model} =~ /^DSLR-A(230|290|330|380|390|850|900)$/',
Format => 'int32u',
Notes => 'only valid for some DSLR models',
RawConv => '$val & 0x00ffffff', #PH
},
0x09bb => { #PH (validated only for DSLR-A850)
Name => 'FocusPosition',
Condition => '$$self{Model} =~ /^DSLR-A(200|230|290|300|330|350|380|390|700|850|900)$/',
Notes => 'only valid for some DSLR models',
# 128 = infinity -- see Composite:FocusDistance below
},
0x1110 => { # (9600 bytes: 4 sets of 40x30 int16u values in the range 0-8191)
Name => 'TiffMeteringImage',
Format => 'undef[9600]',
Notes => q{
13-bit RBGG (?) 40x30 pixels, presumably metering info, extracted as a
16-bit TIFF image;
},
ValueConv => sub {
my ($val, $et) = @_;
return undef unless length $val >= 9600;
return \ "Binary data 7404 bytes" unless $et->Options('Binary');
my @dat = unpack('n*', $val);
# TIFF header for a 16-bit RGB 10dpi 40x30 image
$val = Image::ExifTool::MakeTiffHeader(40,30,3,16,10);
# re-order data to RGB pixels
my ($i, @val);
for ($i=0; $i<40*30; ++$i) {
# data is 13-bit (max 8191), shift left to fill 16 bits
# (typically, this gives a very dark image since the data should
# really be anti-logged to convert from EV to perceived brightness)
# push @val, $dat[$i]<<3, $dat[$i+2400]<<3, $dat[$i+1200]<<3;
push @val, int(5041.1*log($dat[$i]+1)/log(2)), int(5041.1*log($dat[$i+2400]+1)/log(2)), int(5041.1*log($dat[$i+1200]+1)/log(2));
}
$val .= pack('v*', @val); # add TIFF strip data
return \$val;
},
},
);
# more camera setting information (ref JR)
# - many of these tags are the same as in CameraSettings3
%Image::ExifTool::Sony::MoreInfo = (
PROCESS_PROC => \&ProcessMoreInfo,
WRITE_PROC => \&ProcessMoreInfo,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => q{
More camera settings information decoded for the A450, A500, A550, A560,
A580, A33, A35, A55, NEX-3/5/C3 and VG10E.
},
0x0001 => { # (256 bytes)
Name => 'MoreSettings',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MoreSettings' },
},
# (byte sizes for a single A580 image -- not checked for other images)
0x0002 => [ # (256 bytes)
{
Name => 'FaceInfo',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::FaceInfo' },
},{
Name => 'FaceInfoA',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::FaceInfoA' },
},
],
# 0x0101: 512 bytes
# 0x0102: 1804 bytes
# 0x0103: 176 bytes
# 0x0104: 1088 bytes
# 0x0105: 160 bytes (all zero unless flash is used, ref JR)
# 0x0106: 256 bytes (faces detected if first byte is non-zero? ref JR)
0x0107 => { # (7200 bytes: 3 sets of 40x30 int16u values in the range 0-1023)
Name => 'TiffMeteringImage',
Notes => q{
10-bit RGB data from the 1200 AE metering segments, extracted as a 16-bit
TIFF image
},
ValueConv => sub {
my ($val, $et) = @_;
return undef unless length $val >= 7200;
return \ "Binary data 7404 bytes" unless $et->Options('Binary');
my @dat = unpack('v*', $val);
# TIFF header for a 16-bit RGB 10dpi 40x30 image
$val = Image::ExifTool::MakeTiffHeader(40,30,3,16,10);
# re-order data to RGB pixels
my ($i, @val);
for ($i=0; $i<40*30; ++$i) {
# data is 10-bit (max 1023), shift left to fill 16 bits
# (typically, this gives a very dark image since the data should
# really be anti-logged to convert from EV to perceived brightness)
push @val, $dat[$i]<<6, $dat[$i+1200]<<6, $dat[$i+2400]<<6;
}
$val .= pack('v*', @val); # add TIFF strip data
return \$val;
},
},
# 0x0108: 140 bytes
# 0x0109: 256 bytes
# 0x010a: 256 bytes
# 0x0306: 276 bytes
# 0x0307: 256 bytes
# 0x0308: 96 bytes
# 0x0309: 112 bytes
# 0xffff: 788 bytes
0x0201 => { # (368 bytes)
Name => 'MoreInfo0201',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MoreInfo0201' },
},
# 0x0202: 144 bytes
# 0x0401: 4608 bytes
0x0401 => {
Name => 'MoreInfo0401',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MoreInfo0401' },
},
);
%Image::ExifTool::Sony::MoreInfo0201 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PRIORITY => 0,
# 0x005d - also from 0 - 255, in sync with but lower than 0x005e, depending on FocalLength
# 0x005e => {
# # FocusPosition for A560/A580/A33/A35/A55V
# # seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
# Name => 'FocusPosition2_0201',
# Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
# },
# 0x0093 - also from 0 - 255, in sync with but lower than 0x0094, depending on FocalLength
# 0x0094 => {
# # FocusPosition for A450/A500/A550
# # seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
# Name => 'FocusPosition2_0201',
# Condition => '$$self{Model} =~ /^(DSLR-(A450|A500|A550)$)/',
# },
0x011b => { #13
Name => 'ImageCount',
Condition => '$$self{Model} !~ /^DSLR-A(450|500|550)$/', #JR
Format => 'int32u',
Notes => 'not valid for the A450, A500 or A550',
RawConv => '$val & 0x00ffffff',
},
0x0125 => { #13
Name => 'ShutterCount',
Condition => '$$self{Model} !~ /^DSLR-A(450|500|550)$/', #JR
Format => 'int32u',
Notes => 'not valid for the A450, A500 or A550',
RawConv => '$val & 0x00ffffff',
},
0x014a => { #13
Name => 'ShutterCount', # (=ImageCount for these models)
Condition => '$$self{Model} =~ /^DSLR-A(450|500|550)$/', #JR
Format => 'int32u',
Notes => 'A450, A500 and A550 only',
RawConv => '$val & 0x00ffffff',
},
);
%Image::ExifTool::Sony::MoreInfo0401 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PRIORITY => 0,
0x044e => { #JR
Name => 'ShotNumberSincePowerUp',
Condition => '$$self{Model} !~ /^NEX-(3|5)$/',
Format => 'int32u',
Notes => 'Not valid for the NEX-3 or NEX-5',
RawConv => '$val & 0x00ffffff',
},
# 0x101e - int16u LensType Condition => '$$self{Model} =~ /^SLT-A(33|55V)/',
# 0x1022 - int16u LensType Condition => '$$self{Model} =~ /^DSLR-A(560|580)/',
# 0x102a - int16u LensType Condition => '$$self{Model} =~ /^(SLT-A35|NEX-C3)/',
# 0x10a8 - int16u LensType Condition => '$$self{Model} =~ /^SLT-A(33|55V)/',
# 0x10ac - int16u LensType Condition => '$$self{Model} =~ /^DSLR-A(560|580)/',
# 0x10b4 - int16u LensType Condition => '$$self{Model} =~ /^(SLT-A35|NEX-C3)/',
#
# 0x10f7 - int16u LensType Condition => '$$self{Model} =~ /^SLT-A(33|55V)/',
# 0x10fb - int16u LensType Condition => '$$self{Model} =~ /^DSLR-A(560|580)/',
# 0x1103 - int16u LensType Condition => '$$self{Model} =~ /^(SLT-A35|NEX-C3)/',
#
# 0x1181 - int16u LensType Condition => '$$self{Model} =~ /^SLT-A(33|55V)/',
# 0x1185 - int16u LensType Condition => '$$self{Model} =~ /^DSLR-A(560|580)/',
# 0x118d - int16u LensType Condition => '$$self{Model} =~ /^(SLT-A35|NEX-C3)/',
);
# more camera setting information (ref JR)
# - many of these tags are the same as in CameraSettings3
%Image::ExifTool::Sony::MoreSettings = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PRIORITY => 0,
0x01 => { # interesting: somewhere between CameraSettings3 0x04 and 0x34
Name => 'DriveMode2',
PrintHex => 1,
PrintConv => {
0x10 => 'Single Frame',
0x21 => 'Continuous High', # also automatically selected for Scene mode Sports-action (0x05=52)
0x22 => 'Continuous Low',
0x30 => 'Speed Priority Continuous',
0x51 => 'Self-timer 10 sec',
0x52 => 'Self-timer 2 sec, Mirror Lock-up',
0x71 => 'Continuous Bracketing 0.3 EV',
0x75 => 'Continuous Bracketing 0.7 EV',
0x91 => 'White Balance Bracketing Low',
0x92 => 'White Balance Bracketing High',
0xc0 => 'Remote Commander',
},
},
0x02 => {
Name => 'ExposureProgram',
SeparateTable => 'ExposureProgram2',
PrintConv => \%sonyExposureProgram2,
},
0x03 => {
Name => 'MeteringMode',
PrintConv => {
1 => 'Multi-segment',
2 => 'Center-weighted average',
3 => 'Spot',
},
},
0x04 => {
Name => 'DynamicRangeOptimizerSetting',
PrintConv => {
1 => 'Off',
16 => 'On (Auto)',
17 => 'On (Manual)',
},
},
0x05 => 'DynamicRangeOptimizerLevel',
0x06 => {
Name => 'ColorSpace',
PrintConv => {
1 => 'sRGB',
2 => 'Adobe RGB',
},
},
0x07 => {
Name => 'CreativeStyleSetting',
PrintConvColumns => 2,
PrintConv => {
16 => 'Standard',
32 => 'Vivid',
64 => 'Portrait',
80 => 'Landscape',
96 => 'B&W',
160 => 'Sunset',
},
},
0x08 => { #JR
Name => 'ContrastSetting',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x09 => {
Name => 'SaturationSetting',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x0a => {
Name => 'SharpnessSetting',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x0d => {
Name => 'WhiteBalanceSetting',
# many guessed, based on "logical system" as observed for Daylight and Shade and steps of 16 between the modes
PrintHex => 1,
PrintConvColumns => 2,
PrintConv => \%whiteBalanceSetting,
SeparateTable => 1,
},
0x0e => {
Name => 'ColorTemperatureSetting',
# matches "0xb021 ColorTemperature" when WB set to "Custom" or "Color Temperature/Color Filter"
ValueConv => '$val * 100',
ValueConvInv => '$val / 100',
PrintConv => '"$val K"',
PrintConvInv => '$val =~ s/ ?K$//i; $val',
},
0x0f => {
Name => 'ColorCompensationFilterSet',
# seen 0, 1-9 and 245-255, corresponding to 0, M1-M9 and G9-G1 on camera display
# matches "0xb022 ColorCompensationFilter" when WB set to "Custom" or "Color Temperature/Color Filter"
Format => 'int8s',
Notes => 'negative is green, positive is magenta',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x10 => {
Name => 'FlashMode',
PrintConvColumns => 2,
PrintConv => {
1 => 'Flash Off',
16 => 'Autoflash',
17 => 'Fill-flash',
18 => 'Slow Sync',
19 => 'Rear Sync',
20 => 'Wireless',
},
},
0x11 => {
Name => 'LongExposureNoiseReduction',
PrintConv => {
1 => 'Off',
16 => 'On', # (unused or dark subject)
},
},
0x12 => {
Name => 'HighISONoiseReduction',
PrintConv => {
16 => 'Low',
17 => 'High',
19 => 'Auto',
},
},
0x13 => { # why is this not valid for A450/A500/A550 ?
Name => 'FocusMode',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
17 => 'AF-S',
18 => 'AF-C',
19 => 'AF-A',
32 => 'Manual',
48 => 'DMF', #(NC) (seen for NEX-5)
},
},
0x15 => {
Name => 'MultiFrameNoiseReduction',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
0 => 'n/a', # seen for A450/A500/A550
1 => 'Off',
16 => 'On',
255 => 'None', # seen for NEX-3/5/C3
},
},
0x16 => {
Name => 'HDRSetting',
PrintConv => {
1 => 'Off',
16 => 'On (Auto)',
17 => 'On (Manual)',
},
},
0x17 => {
Name => 'HDRLevel',
PrintConvColumns => 3,
PrintConv => {
33 => '1 EV',
34 => '1.5 EV', #JR (NC)
35 => '2 EV',
36 => '2.5 EV', #JR (NC)
37 => '3 EV',
38 => '3.5 EV', #PH (NC)
39 => '4 EV',
40 => '5 EV',
41 => '6 EV',
},
},
0x18 => {
Name => 'ViewingMode',
PrintConv => {
16 => 'ViewFinder',
33 => 'Focus Check Live View',
34 => 'Quick AF Live View',
},
},
0x19 => {
Name => 'FaceDetection',
PrintConv => {
1 => 'Off',
16 => 'On',
},
},
0x1a => {
Name => 'CustomWB_RBLevels',
# matches "0x7313 WB_RGGBLevels" when WB set to "Custom", except factor of 4
Format => 'int16uRev[2]',
},
# From here different and overlapping offsets for 3 groups of cameras:
# 1) DSLR-A450/A500/A550
# 2) NEX-3/5/5C
# 3) DSLR-A560/A580, NEX-C3/VG10/VG10E, SLT-A33/A35/A55V
0x1e => [{
Name => 'BrightnessValue',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
ValueConv => '($val-106)/8',
ValueConvInv => '$val * 8 + 106',
},{
Name => 'ExposureCompensationSet',
Notes => 'other models',
ValueConv => '($val - 128) / 24', #PH
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
}],
0x1f => [{
Name => 'ISO',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
},{
Name => 'FlashExposureCompSet',
Notes => 'other models',
Description => 'Flash Exposure Comp. Setting',
ValueConv => '($val - 128) / 24', #PH
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
}],
0x20 => [{
Name => 'FNumber',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},{
Name => 'LiveViewAFMethod',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)/',
Notes => 'other models except the NEX-3/5/5C',
PrintConv => {
0 => 'n/a',
1 => 'Phase-detect AF',
2 => 'Contrast AF',
# Contrast AF is only available with SSM/SAM lenses and in Focus Check LV,
# NOT in Quick AF LV, and is automatically set when mounting SSM/SAM lens
# - changes into Phase-AF when switching to Quick AF LV.
},
}],
0x21 => [{
Name => 'ExposureTime',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},{
Name => 'ISO',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C',
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
}],
0x22 => {
Name => 'FNumber',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C only',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},
0x23 => [{
Name => 'FocalLength2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
ValueConv => '10 * 2 ** (($val-28)/16)',
ValueConvInv => '$val>0 ? log($val/10)/log(2) * 16 + 28 : 0',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val=~s/\s*mm$//; $val',
},{
Name => 'ExposureTime',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
}],
0x24 => {
Name => 'ExposureCompensation2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
Format => 'int16s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
},
0x25 => [{
Name => 'FocalLength2',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C',
ValueConv => '10 * 2 ** (($val-28)/16)',
ValueConvInv => '$val>0 ? log($val/10)/log(2) * 16 + 28 : 0',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val=~s/\s*mm$//; $val',
},{
Name => 'ISO',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)/',
Notes => 'other models except the A450, A500 and A550',
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
}],
0x26 => [{
Name => 'FlashExposureCompSet2',
Description => 'Flash Exposure Comp. Setting 2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
Format => 'int16s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
},{
Name => 'ExposureCompensation2',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C',
Format => 'int16s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
},{
Name => 'FNumber',
Notes => 'other models',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
}],
0x27 => {
Name => 'ExposureTime',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)|DSLR-(A450|A500|A550)/',
Notes => 'models other than the A450, A500, A550 and NEX-3/5/5C',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x28 => {
Name => 'Orientation2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
PrintConv => {
1 => 'Horizontal (normal)',
2 => 'Rotate 180',
6 => 'Rotate 90 CW',
8 => 'Rotate 270 CW',
},
},
0x29 => [{
# FocusPosition for A450/A500/A550
# seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
Name => 'FocusPosition2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
},{
# value increase of 16 corresponds to doubling of FocalLength
Name => 'FocalLength2',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)/',
Notes => 'other models except the NEX-3/5/5C',
ValueConv => '10 * 2 ** (($val-28)/16)',
ValueConvInv => '$val>0 ? log($val/10)/log(2) * 16 + 28 : 0',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val=~s/\s*mm$//; $val',
}],
0x2a => [{
Name => 'FlashAction',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
PrintConv => {
0 => 'Did not fire',
1 => 'Fired',
},
},{
Name => 'ExposureCompensation2',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)/',
Notes => 'other models except the NEX-3/5/5C',
Format => 'int16s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
}],
0x2b => {
# FocusPosition for NEX-3/5/5C
# seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
Name => 'FocusPosition2',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C only',
},
0x2c => [{
Name => 'FocusMode2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
Notes => 'A450, A500 and A550',
PrintConv => {
0 => 'AF',
1 => 'MF',
},
},{
Name => 'FlashAction',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C FlashAction2',
PrintConv => {
0 => 'Did not fire',
1 => 'Fired',
},
},{
Name => 'FlashExposureCompSet2',
Description => 'Flash Exposure Comp. Setting 2',
Notes => 'other models FlashExposureCompSet2',
Format => 'int16s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
}],
0x2e => [{
Name => 'FocusMode2',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
Notes => 'NEX-3/5/5C',
PrintConv => {
0 => 'AF',
1 => 'MF',
},
},{
Name => 'Orientation2', # seen some A55 images where this does not match the other Orientation tags
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)/',
Notes => 'other models except the A450, A500 and A550',
PrintConv => {
1 => 'Horizontal (normal)',
2 => 'Rotate 180',
6 => 'Rotate 90 CW',
8 => 'Rotate 270 CW',
},
}],
0x2f => {
# FocusPosition for A560/A580/A33/A35/A55V and NEX-C3/VG10/VG10E
# seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
Name => 'FocusPosition2',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)|DSLR-(A450|A500|A550)/',
Notes => 'models other than the A450, A500, A550 and NEX-3/5/5C',
},
0x30 => {
Name => 'FlashAction',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)|DSLR-(A450|A500|A550)/',
Notes => 'models other than the A450, A500, A550 and NEX-3/5/5C',
PrintConv => {
0 => 'Did not fire',
1 => 'Fired',
},
},
0x32 => {
Name => 'FocusMode2',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)|DSLR-(A450|A500|A550)/',
Notes => 'models other than the A450, A500, A550 and NEX-3/5/5C',
PrintConv => {
0 => 'AF',
1 => 'MF',
},
},
0x0077 => {
Name => 'FlashAction2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)/',
PrintConv => {
0 => 'Did not fire',
2 => 'External Flash fired (2)',
3 => 'Built-in Flash fired',
4 => 'External Flash fired (4)', # what is difference with 2 ?
},
},
0x0078 => {
Name => 'FlashActionExternal',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
PrintConv => {
136 => 'Did not fire',
121 => 'Fired', # what is difference with 122 ?
122 => 'Fired',
},
},
0x007c => {
Name => 'FlashActionExternal',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)|DSLR-(A450|A500|A550)/',
PrintConv => {
136 => 'Did not fire',
167 => 'Fired',
182 => 'Fired, HSS',
},
},
0x0082 => {
Name => 'FlashStatus',
Condition => '$$self{Model} =~ /^NEX-(3|5|5C)/',
PrintConv => {
0 => 'None',
2 => 'External',
},
},
0x0086 => {
Name => 'FlashStatus',
Condition => '$$self{Model} !~ /^NEX-(3|5|5C)|DSLR-(A450|A500|A550)/',
PrintConv => {
0 => 'None',
1 => 'Built-in',
2 => 'External',
},
},
);
# Face detection information (ref JR)
my %faceInfo = (
Format => 'int16u[4]',
# re-order to top,left,height,width and scale to full-sized image like other Sony models
ValueConv => 'my @v=split(" ",$val); $_*=15 foreach @v; "$v[1] $v[0] $v[3] $v[2]"',
ValueConvInv => 'my @v=split(" ",$val); $_=int($_/15+0.5) foreach @v; "$v[1] $v[0] $v[3] $v[2]"',
);
%Image::ExifTool::Sony::FaceInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int16u',
DATAMEMBER => [ 0x00 ],
0x00 => {
Name => 'FacesDetected',
DataMember => 'FacesDetected',
Format => 'int16s',
RawConv => '$$self{FacesDetected} = ($val == -1 ? 0 : $val); $val',
PrintConv => {
OTHER => sub { shift }, # pass other values straight through
-1 => 'n/a',
},
},
0x01 => {
Name => 'Face1Position',
Condition => '$$self{FacesDetected} >= 1',
%faceInfo,
Notes => q{
re-ordered and scaled to return the top, left, height and width of detected
face, with coordinates relative to the full-sized unrotated image and
increasing Y downwards
},
},
0x06 => {
Name => 'Face2Position',
Condition => '$$self{FacesDetected} >= 2',
%faceInfo,
},
0x0b => {
Name => 'Face3Position',
Condition => '$$self{FacesDetected} >= 3',
%faceInfo,
},
0x10 => {
Name => 'Face4Position',
Condition => '$$self{FacesDetected} >= 4',
%faceInfo,
},
0x15 => {
Name => 'Face5Position',
Condition => '$$self{FacesDetected} >= 5',
%faceInfo,
},
0x1a => {
Name => 'Face6Position',
Condition => '$$self{FacesDetected} >= 6',
%faceInfo,
},
0x1f => {
Name => 'Face7Position',
Condition => '$$self{FacesDetected} >= 7',
%faceInfo,
},
0x24 => {
Name => 'Face8Position',
Condition => '$$self{FacesDetected} >= 8',
%faceInfo,
},
);
%Image::ExifTool::Sony::FaceInfoA = ( # different offsets for A450/A500/A550
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int16u',
DATAMEMBER => [ 0x02, 0x03, 0x08 ],
#
# The FacesDetected number at 0x03 below is often 1 lower than the one at Tag900b 0x02.
# The number of Face Positions starting at 0x5b (max. 4) corresponds to the number at 0x03.
# The number of Face Positions starting at 0x0b usually corresponds to the FacesDetected number of Tag900b...
# Therefore created the extra condition at 0x0b (11.1) to output an available FacePosition, even when 0x03=0...
#
0x02 => {
Name => 'FaceTest2',
DataMember => 'FaceTest2',
Hidden => 1,
RawConv => '$$self{FaceTest2} = $val; $$self{OPTIONS}{Unknown}<2 ? undef : $val',
},
0x03 => {
Name => 'FacesDetected',
DataMember => 'FacesDetected',
RawConv => '$$self{FacesDetected} = ($val > 8 ? 0 : $val); $val',
ValueConv => '$val > 8 ? 0 : $val',
},
0x08 => {
Name => 'FaceTest8',
DataMember => 'FaceTest8',
Hidden => 1,
RawConv => '$$self{FaceTest8} = $val; $$self{OPTIONS}{Unknown}<2 ? undef : $val',
},
# 0x0b - start of 8 Face Positions of 10 int16u values each
0x0b => {
Name => 'PotentialFace1Position',
Condition => q{
$$self{FacesDetected} >= 1 or
($$self{FaceTest8} > 0 and ($$self{FaceTest2} == 1 or $$self{FaceTest2} == 257))
},
%faceInfo,
},
0x15 => {
Name => 'PotentialFace2Position',
Condition => '$$self{FacesDetected} >= 2 or ($$self{FacesDetected} == 1 and $$self{FaceTest8} > 0)',
%faceInfo,
},
0x1f => {
Name => 'PotentialFace3Position',
Condition => '$$self{FacesDetected} >= 3 or ($$self{FacesDetected} == 2 and $$self{FaceTest8} > 0)',
%faceInfo,
},
0x29 => {
Name => 'PotentialFace4Position',
Condition => '$$self{FacesDetected} >= 4 or ($$self{FacesDetected} == 3 and $$self{FaceTest8} > 0)',
%faceInfo,
},
0x33 => {
Name => 'PotentialFace5Position',
Condition => '$$self{FacesDetected} >= 5 or ($$self{FacesDetected} == 4 and $$self{FaceTest8} > 0)',
%faceInfo,
},
0x3d => {
Name => 'PotentialFace6Position',
Condition => '$$self{FacesDetected} >= 6 or ($$self{FacesDetected} == 5 and $$self{FaceTest8} > 0)',
%faceInfo,
},
0x47 => {
Name => 'PotentialFace7Position',
Condition => '$$self{FacesDetected} >= 7 or ($$self{FacesDetected} == 6 and $$self{FaceTest8} > 0)',
%faceInfo,
},
0x51 => {
Name => 'PotentialFace8Position',
Condition => '$$self{FacesDetected} >= 8 or ($$self{FacesDetected} == 7 and $$self{FaceTest8} > 0)',
%faceInfo,
},
# 0x5b - start of max. 4 further Face Positions here
0x5b => {
Name => 'Face1Position',
Condition => '$$self{FacesDetected} >= 1',
%faceInfo,
},
0x65 => {
Name => 'Face2Position',
Condition => '$$self{FacesDetected} >= 2',
%faceInfo,
},
0x6f => {
Name => 'Face3Position',
Condition => '$$self{FacesDetected} >= 3',
%faceInfo,
},
0x79 => {
Name => 'Face4Position',
Condition => '$$self{FacesDetected} >= 4',
%faceInfo,
},
);
# Camera settings (ref PH) (decoded mainly from A200)
%Image::ExifTool::Sony::CameraSettings = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int16u',
PRIORITY => 0,
NOTES => 'Camera settings for the A200, A300, A350, A700, A850 and A900.',
0x00 => { #JR
Name => 'ExposureTime',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x01 => { #JR
Name => 'FNumber',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},
0x02 => { #JR (requires external flash)
Name => 'HighSpeedSync',
PrintConv => {
0 => 'Off',
1 => 'On',
},
},
0x03 => { #JR
Name => 'ExposureCompensationSet',
ValueConv => '($val - 128) / 24',
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x04 => { #7/JR
Name => 'DriveMode',
Mask => 0xff, # (not sure what upper byte is for)
PrintConv => {
0x01 => 'Single Frame',
0x02 => 'Continuous High', # A700/A900; not on A850
0x12 => 'Continuous Low', #JR
0x04 => 'Self-timer 10 sec',
0x05 => 'Self-timer 2 sec, Mirror Lock-up',
0x06 => 'Single-frame Bracketing',
0x07 => 'Continuous Bracketing', # (A200 val=0x1107)
0x18 => 'White Balance Bracketing Low', #JR
0x28 => 'White Balance Bracketing High', #JR
0x19 => 'D-Range Optimizer Bracketing Low', #JR
0x29 => 'D-Range Optimizer Bracketing High', #JR
0x0a => 'Remote Commander', #JR
0x0b => 'Mirror Lock-up', #JR (A850/A900; not on A700)
},
},
0x05 => { #JR
Name => 'WhiteBalanceSetting',
PrintConv => {
2 => 'Auto',
4 => 'Daylight',
5 => 'Fluorescent',
6 => 'Tungsten',
7 => 'Flash',
16 => 'Cloudy',
17 => 'Shade',
18 => 'Color Temperature/Color Filter',
32 => 'Custom 1',
33 => 'Custom 2',
34 => 'Custom 3',
},
},
0x06 => { #7 (A700) (ref JR: at least also valid for A200, ValueConv as for ColorCompensationFilterSet)
Name => 'WhiteBalanceFineTune',
ValueConv => '$val > 128 ? $val - 256 : $val',
ValueConvInv => '$val < 0 ? $val + 256 : $val',
},
0x07 => { #JR as set in WB "Color Temperature/Color Filter" and in White Balance Bracketing
Name => 'ColorTemperatureSet',
ValueConv => '$val * 100',
ValueConvInv => '$val / 100',
PrintConv => '"$val K"',
PrintConvInv => '$val =~ s/ ?K$//i; $val',
},
0x08 => { #JR as set in WB "Color Temperature/Color Filter"
Name => 'ColorCompensationFilterSet',
Notes => 'negative is green, positive is magenta',
ValueConv => '$val > 128 ? $val - 256 : $val',
ValueConvInv => '$val < 0 ? $val + 256 : $val',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x0c => { #JR as set in WB "Custom" and in White Balance Bracketing
Name => 'ColorTemperatureCustom',
ValueConv => '$val * 100',
ValueConvInv => '$val / 100',
PrintConv => '"$val K"',
PrintConvInv => '$val =~ s/ ?K$//i; $val',
},
0x0d => { #JR as set in WB "Custom"
Name => 'ColorCompensationFilterCustom',
Notes => 'negative is green, positive is magenta',
ValueConv => '$val > 128 ? $val - 256 : $val',
ValueConvInv => '$val < 0 ? $val + 256 : $val',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x0f => { #JR
Name => 'WhiteBalance',
PrintConv => {
2 => 'Auto',
4 => 'Daylight',
5 => 'Fluorescent',
6 => 'Tungsten',
7 => 'Flash',
12 => 'Color Temperature',
13 => 'Color Filter',
14 => 'Custom',
16 => 'Cloudy',
17 => 'Shade',
},
},
0x10 => { #7 (A700)
Name => 'FocusModeSetting',
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
4 => 'DMF', #JR
},
},
0x11 => { #JD (A700)
Name => 'AFAreaMode',
PrintConv => {
0 => 'Wide',
1 => 'Local',
2 => 'Spot',
},
},
0x12 => { #7 (A700)
Name => 'AFPointSetting',
Format => 'int16u',
# The AF point as selected by the user in AFAreaMode=Local or Spot;
# Reported value remains at the last-set position in AFAreaModes=Wide.
# A200, A300, A350: 9-point centre-cross (ref JR)
# A700: 11-point centre-dual-cross (ref JR)
# A850, A900: 9-point centre-dual-cross with 10 assist-points (ref JR)
PrintConvColumns => 2,
PrintConv => {
1 => 'Center',
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
10 => 'Far Right', # (presumably A700 only)
11 => 'Far Left', # (presumably A700 only)
},
},
0x13 => { #JR
Name => 'FlashMode',
PrintConv => {
0 => 'Autoflash',
2 => 'Rear Sync',
3 => 'Wireless',
4 => 'Fill-flash',
5 => 'Flash Off',
6 => 'Slow Sync',
},
},
0x14 => { #JR
Name => 'FlashExposureCompSet',
Description => 'Flash Exposure Comp. Setting',
# (as pre-selected by the user, not zero if flash didn't fire)
ValueConv => '($val - 128) / 24', #PH
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x15 => { #7
Name => 'MeteringMode',
PrintConv => {
1 => 'Multi-segment',
2 => 'Center-weighted average',
4 => 'Spot',
},
},
0x16 => {
Name => 'ISOSetting',
# 0 indicates 'Auto' (I think)
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
},
0x18 => { #7
Name => 'DynamicRangeOptimizerMode',
PrintConv => {
0 => 'Off',
1 => 'Standard',
2 => 'Advanced Auto',
3 => 'Advanced Level',
},
},
0x19 => { #7
Name => 'DynamicRangeOptimizerLevel',
},
0x1a => { # style actually used (combination of mode dial + creative style menu)
Name => 'CreativeStyle',
PrintConvColumns => 2,
PrintConv => {
1 => 'Standard',
2 => 'Vivid',
3 => 'Portrait',
4 => 'Landscape',
5 => 'Sunset',
6 => 'Night View/Portrait',
8 => 'B&W',
9 => 'Adobe RGB', # A700
11 => 'Neutral',
12 => 'Clear', #7
13 => 'Deep', #7
14 => 'Light', #7
15 => 'Autumn Leaves', #7
16 => 'Sepia', #7
},
},
0x1b => { #JR
Name => 'ColorSpace',
PrintConv => {
0 => 'sRGB',
1 => 'Adobe RGB', # (A850, selected via Colorspace menu item)
5 => 'Adobe RGB (A700)', # (A700, selected via CreativeStyle menu)
},
},
0x1c => {
Name => 'Sharpness',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x1d => {
Name => 'Contrast',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x1e => {
Name => 'Saturation',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x1f => { #7
Name => 'ZoneMatchingValue',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x22 => { #7
Name => 'Brightness',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x23 => {
Name => 'FlashControl',
PrintConv => {
0 => 'ADI',
1 => 'Pre-flash TTL',
2 => 'Manual',
},
},
0x28 => { #7
Name => 'PrioritySetupShutterRelease',
PrintConv => {
0 => 'AF',
1 => 'Release',
},
},
0x29 => { #7
Name => 'AFIlluminator',
PrintConv => {
0 => 'Auto',
1 => 'Off',
},
},
0x2a => { #7
Name => 'AFWithShutter',
PrintConv => { 0 => 'On', 1 => 'Off' },
},
0x2b => { #7
Name => 'LongExposureNoiseReduction',
PrintConv => { 0 => 'Off', 1 => 'On' },
},
0x2c => { #7
Name => 'HighISONoiseReduction',
PrintConv => {
0 => 'Normal',
1 => 'Low',
2 => 'High',
3 => 'Off',
},
},
0x2d => { #7
Name => 'ImageStyle',
PrintConvColumns => 2,
PrintConv => {
1 => 'Standard',
2 => 'Vivid',
3 => 'Portrait', #PH
4 => 'Landscape', #PH
5 => 'Sunset', #PH
7 => 'Night View/Portrait', #PH (A200/A350 when CreativeStyle was 6!)
8 => 'B&W', #PH (guess)
9 => 'Adobe RGB',
11 => 'Neutral',
129 => 'StyleBox1',
130 => 'StyleBox2',
131 => 'StyleBox3',
132 => 'StyleBox4', #JR (A850)
133 => 'StyleBox5', #JR (A850)
134 => 'StyleBox6', #JR (A850)
},
},
0x2e => { #JR (may not apply to A200/A300/A350 -- they don't have the AF/MF button)
Name => 'FocusModeSwitch',
PrintConv => {
0 => 'AF',
1 => 'Manual',
},
},
0x2f => { #JR
Name => 'ShutterSpeedSetting',
Notes => 'used in M, S and Program Shift S modes',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x30 => { #JR
Name => 'ApertureSetting',
Notes => 'used in M, A and Program Shift A modes',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},
0x3c => {
Name => 'ExposureProgram',
SeparateTable => 'ExposureProgram',
PrintConv => \%sonyExposureProgram,
},
0x3d => {
Name => 'ImageStabilizationSetting',
PrintConv => { 0 => 'Off', 1 => 'On' },
},
0x3e => { #JR
Name => 'FlashAction',
PrintConv => {
0 => 'Did not fire',
1 => 'Fired',
2 => 'External Flash, Did not fire',
3 => 'External Flash, Fired',
},
},
0x3f => { # (verified for A330/A380)
Name => 'Rotation',
PrintConv => {
0 => 'Horizontal (normal)',
1 => 'Rotate 90 CW', #(NC)
2 => 'Rotate 270 CW',
},
},
0x40 => { #JR
Name => 'AELock',
PrintConv => {
1 => 'Off',
2 => 'On',
},
},
0x4c => { #JR
Name => 'FlashAction2',
PrintConv => {
1 => 'Fired, Autoflash',
2 => 'Fired, Fill-flash',
3 => 'Fired, Rear Sync',
4 => 'Fired, Wireless',
5 => 'Did not fire',
6 => 'Fired, Slow Sync',
17 => 'Fired, Autoflash, Red-eye reduction',
18 => 'Fired, Fill-flash, Red-eye reduction',
34 => 'Fired, Fill-flash, HSS',
},
},
0x4d => { #JR
Name => 'FocusMode', # (focus mode actually used)
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
4 => 'DMF', #JR
},
},
0x50 => { #JR
Name => 'BatteryState',
PrintConv => {
2 => 'Empty', # 0%
3 => 'Very Low', # 1 - 20%
4 => 'Low', # 21 - 50%
5 => 'Sufficient', # 51 - 80%
6 => 'Full', # > 80%
},
},
0x51 => { #JR
Name => 'BatteryLevel',
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
0x53 => { #JR
Name => 'FocusStatus',
PrintConv => {
0 => 'Not confirmed',
4 => 'Not confirmed, Tracking',
BITMASK => {
0 => 'Confirmed',
1 => 'Failed',
2 => 'Tracking',
},
},
},
0x54 => {
Name => 'SonyImageSize',
PrintConv => {
1 => 'Large',
2 => 'Medium',
3 => 'Small',
},
},
0x55 => { #7
Name => 'AspectRatio',
PrintConv => {
1 => '3:2',
2 => '16:9',
},
},
0x56 => { #PH/7
Name => 'Quality',
PrintConv => {
0 => 'RAW',
2 => 'CRAW',
34 => 'RAW + JPEG',
35 => 'CRAW + JPEG',
16 => 'Extra Fine',
32 => 'Fine',
48 => 'Standard',
},
},
0x58 => { #7
Name => 'ExposureLevelIncrements',
PrintConv => {
33 => '1/3 EV',
50 => '1/2 EV',
},
},
0x6a => { #JR
Name => 'RedEyeReduction',
PrintConv => {
0 => 'Off',
1 => 'On',
},
},
0x9a => { #JR
Name => 'FolderNumber',
Mask => 0x03ff, # (not sure what the upper 6 bits are for)
PrintConv => 'sprintf("%.3d",$val)',
PrintConvInv => '$val',
},
0x9b => { #JR
Name => 'ImageNumber',
Mask => 0x3fff, # (not sure what the upper 2 bits are for)
PrintConv => 'sprintf("%.4d",$val)',
PrintConvInv => '$val',
},
);
# Camera settings (ref PH) (A230, A290, A330, A380 and A390)
%Image::ExifTool::Sony::CameraSettings2 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int16u',
PRIORITY => 0,
NOTES => 'Camera settings for the A230, A290, A330, A380 and A390.',
### 0x00-0x03: same TagID as CameraSettings
0x00 => { #JR
Name => 'ExposureTime',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x01 => { #JR
Name => 'FNumber',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},
0x02 => { #JR (requires external flash)
Name => 'HighSpeedSync',
PrintConv => {
0 => 'Off',
1 => 'On',
},
},
0x03 => { #JR
Name => 'ExposureCompensationSet',
ValueConv => '($val - 128) / 24',
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
### 0x04-0x11: subtract 1 from CameraSettings TagID
0x04 => { #JR
Name => 'WhiteBalanceSetting',
PrintConv => {
2 => 'Auto',
4 => 'Daylight',
5 => 'Fluorescent',
6 => 'Tungsten',
7 => 'Flash',
16 => 'Cloudy',
17 => 'Shade',
18 => 'Color Temperature/Color Filter',
32 => 'Custom 1',
33 => 'Custom 2',
34 => 'Custom 3',
},
},
0x05 => { #JR
Name => 'WhiteBalanceFineTune',
ValueConv => '$val > 128 ? $val - 256 : $val',
ValueConvInv => '$val < 0 ? $val + 256 : $val',
},
0x06 => { #JR as set in WB "Color Temperature/Color Filter" and in White Balance Bracketing
Name => 'ColorTemperatureSet',
ValueConv => '$val * 100',
ValueConvInv => '$val / 100',
PrintConv => '"$val K"',
PrintConvInv => '$val =~ s/ ?K$//i; $val',
},
0x07 => { #JR as set in WB "Color Temperature/Color Filter"
Name => 'ColorCompensationFilterSet',
Notes => 'negative is green, positive is magenta',
ValueConv => '$val > 128 ? $val - 256 : $val',
ValueConvInv => '$val < 0 ? $val + 256 : $val',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x08 => { #JR
Name => 'CustomWB_RGBLevels',
Format => 'int16u[3]',
},
0x0b => { #JR as set in WB "Custom" and in White Balance Bracketing
Name => 'ColorTemperatureCustom',
ValueConv => '$val * 100',
ValueConvInv => '$val / 100',
PrintConv => '"$val K"',
PrintConvInv => '$val =~ s/ ?K$//i; $val',
},
0x0c => { #JR as set in WB "Custom"
Name => 'ColorCompensationFilterCustom',
Notes => 'negative is green, positive is magenta',
ValueConv => '$val > 128 ? $val - 256 : $val',
ValueConvInv => '$val < 0 ? $val + 256 : $val',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x0e => { #JR
Name => 'WhiteBalance',
PrintConv => {
2 => 'Auto',
4 => 'Daylight',
5 => 'Fluorescent',
6 => 'Tungsten',
7 => 'Flash',
12 => 'Color Temperature',
13 => 'Color Filter',
14 => 'Custom',
16 => 'Cloudy',
17 => 'Shade',
},
},
0x0f => { #JR/PH (educated guess)
Name => 'FocusModeSetting',
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
# seen 5 for A380 (FocusMode was Manual and FocusStatus was Confirmed)
},
},
0x10 => { #JR/PH (educated guess)
Name => 'AFAreaMode',
PrintConv => {
0 => 'Wide',
1 => 'Local',
2 => 'Spot',
},
},
0x11 => { #JR/PH (educated guess)
Name => 'AFPointSetting',
Format => 'int16u',
# The AF point as selected by the user in AFAreaMode=Local or Spot;
# Reported value remains at the last-set position in AFAreaModes=Wide.
# (all of these cameras have a 9-point centre-cross AF system, ref JR)
PrintConvColumns => 2,
PrintConv => {
1 => 'Center',
2 => 'Top',
3 => 'Upper-right',
4 => 'Right',
5 => 'Lower-right',
6 => 'Bottom',
7 => 'Lower-left',
8 => 'Left',
9 => 'Upper-left',
},
},
### 0x12-0x18: subtract 2 from CameraSettings TagID
0x12 => { #JR
Name => 'FlashExposureCompSet',
Description => 'Flash Exposure Comp. Setting',
# (as pre-selected by the user, not zero if flash didn't fire)
ValueConv => '($val - 128) / 24', #PH
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x13 => {
Name => 'MeteringMode',
PrintConv => {
1 => 'Multi-segment',
2 => 'Center-weighted average',
4 => 'Spot',
},
},
0x14 => { # A330/A380
Name => 'ISOSetting',
# 0 indicates 'Auto' (?)
ValueConv => '$val ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '$val ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => '$val ? sprintf("%.0f",$val) : "Auto"',
PrintConvInv => '$val =~ /auto/i ? 0 : $val',
},
0x16 => {
Name => 'DynamicRangeOptimizerMode',
PrintConv => {
0 => 'Off',
1 => 'Standard',
2 => 'Advanced Auto',
3 => 'Advanced Level',
},
},
0x17 => 'DynamicRangeOptimizerLevel',
0x18 => { # A380
Name => 'CreativeStyle',
PrintConvColumns => 2,
PrintConv => {
1 => 'Standard',
2 => 'Vivid',
3 => 'Portrait',
4 => 'Landscape',
5 => 'Sunset',
6 => 'Night View/Portrait',
8 => 'B&W',
# (these models don't have Neutral - PH)
},
},
### 0x19-0x1b: subtract 3 from CameraSettings TagID
0x19 => {
Name => 'Sharpness',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x1a => {
Name => 'Contrast',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x1b => {
Name => 'Saturation',
ValueConv => '$val - 10',
ValueConvInv => '$val + 10',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
### 0x1c-0x24: subtract 4 from CameraSettings TagID (not sure about 0x1c)
0x1f => { #PH (educated guess)
Name => 'FlashControl',
PrintConv => {
0 => 'ADI',
1 => 'Pre-flash TTL',
2 => 'Manual',
},
},
### 0x25-0x27: subtract 6 from CameraSettings TagID
0x25 => { #PH
Name => 'LongExposureNoiseReduction',
PrintConv => { 0 => 'Off', 1 => 'On' },
},
0x26 => { #PH
Name => 'HighISONoiseReduction',
# (Note: the order is different from that in CameraSettings)
PrintConv => {
0 => 'Off',
1 => 'Low',
2 => 'Normal',
3 => 'High',
},
},
0x27 => { #PH
Name => 'ImageStyle',
PrintConvColumns => 2,
PrintConv => {
1 => 'Standard',
2 => 'Vivid',
3 => 'Portrait', #PH
4 => 'Landscape', #PH
5 => 'Sunset', #PH
7 => 'Night View/Portrait', #PH (A200 when CreativeStyle was 6!)
8 => 'B&W', #PH (A380)
# (these models don't have Neutral - PH)
},
},
### 0x28-0x3b: subtract 7 from CameraSettings TagID
0x28 => { #PH
Name => 'ShutterSpeedSetting',
Notes => 'used in M, S and Program Shift S modes',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x29 => { #PH
Name => 'ApertureSetting',
Notes => 'used in M, A and Program Shift A modes',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},
### 0x3c-0x59: same TagID as CameraSettings
0x3c => {
Name => 'ExposureProgram',
SeparateTable => 'ExposureProgram',
PrintConv => \%sonyExposureProgram,
},
0x3d => { # (copied from CameraSettings, ref JR)
Name => 'ImageStabilizationSetting',
PrintConv => { 0 => 'Off', 1 => 'On' },
},
0x3e => { #JR
Name => 'FlashAction',
PrintConv => {
0 => 'Did not fire',
1 => 'Fired',
2 => 'External Flash, Did not fire',
3 => 'External Flash, Fired',
},
},
0x3f => { # (verified for A330/A380)
Name => 'Rotation',
PrintConv => {
0 => 'Horizontal (normal)',
1 => 'Rotate 90 CW', #(NC)
2 => 'Rotate 270 CW',
},
},
0x40 => { #JR
Name => 'AELock',
PrintConv => {
1 => 'Off',
2 => 'On',
},
},
0x4c => { #JR
Name => 'FlashAction2',
PrintConv => {
1 => 'Fired, Autoflash',
2 => 'Fired, Fill-flash',
3 => 'Fired, Rear Sync',
4 => 'Fired, Wireless',
5 => 'Did not fire',
6 => 'Fired, Slow Sync',
17 => 'Fired, Autoflash, Red-eye reduction',
18 => 'Fired, Fill-flash, Red-eye reduction',
34 => 'Fired, Fill-flash, HSS',
},
},
0x4d => { #JR
Name => 'FocusMode', # (focus mode actually used)
PrintConv => {
0 => 'Manual',
1 => 'AF-S',
2 => 'AF-C',
3 => 'AF-A',
},
},
0x53 => { #JR (copied from CameraSettings, but all bits may not be applicable for these models)
Name => 'FocusStatus',
PrintConv => {
0 => 'Not confirmed',
4 => 'Not confirmed, Tracking',
BITMASK => {
0 => 'Confirmed',
1 => 'Failed',
2 => 'Tracking',
},
},
},
0x54 => {
Name => 'SonyImageSize',
PrintConv => {
1 => 'Large',
2 => 'Medium',
3 => 'Small',
},
},
0x55 => { # (copied from CameraSettings, ref JR)
Name => 'AspectRatio',
PrintConv => {
1 => '3:2',
2 => '16:9',
},
},
0x56 => { # (copied from CameraSettings, ref JR)
Name => 'Quality',
PrintConv => {
0 => 'RAW',
2 => 'CRAW',
34 => 'RAW + JPEG',
35 => 'CRAW + JPEG',
16 => 'Extra Fine',
32 => 'Fine',
48 => 'Standard',
},
},
0x58 => { # (copied from CameraSettings, ref JR)
Name => 'ExposureLevelIncrements',
PrintConv => {
33 => '1/3 EV',
50 => '1/2 EV',
},
},
### 0x5a onwards: subtract 1 from CameraSettings TagID
# (0x69 not confirmed)
#0x69 => { #JR
# Name => 'RedEyeReduction',
# PrintConv => {
# 0 => 'Off',
# 1 => 'On',
# },
#},
0x7e => { #JR
Name => 'DriveMode',
Mask => 0xff, # (not sure what upper byte is for)
PrintConv => { # (values confirmed for specified models - PH)
0x01 => 'Single Frame', # (A230,A330,A380)
0x02 => 'Continuous High', #PH (A230,A330)
0x04 => 'Self-timer 10 sec', # (A230)
0x05 => 'Self-timer 2 sec, Mirror Lock-up', # (A230,A290,A330,A380,390)
0x07 => 'Continuous Bracketing', # (A230 val=0x1107, A330 val=0x1307 [0.7 EV])
0x0a => 'Remote Commander', # (A230)
0x0b => 'Continuous Self-timer', # (A230 val=0x800b [5 shots], A330 val=0x400b [3 shots])
},
},
0x7f => { #JR
Name => 'FlashMode',
PrintConv => {
0 => 'Autoflash',
2 => 'Rear Sync',
3 => 'Wireless',
4 => 'Fill-flash',
5 => 'Flash Off',
6 => 'Slow Sync',
},
},
0x83 => { #PH
Name => 'ColorSpace',
PrintConv => {
5 => 'Adobe RGB',
6 => 'sRGB',
},
},
);
# more Camera settings (ref PH)
# This was decoded for the A55, but it seems to apply to the following models:
# A33, A35, A55, A450, A500, A550, A560, A580, NEX-3, NEX-5, NEX-C3 and NEX-VG10E
%Image::ExifTool::Sony::CameraSettings3 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int8u',
PRIORITY => 0,
DATAMEMBER => [ 0x99 ],
NOTES => q{
Camera settings for models such as the A33, A35, A55, A450, A500, A550,
A560, A580, NEX-3, NEX-5, NEX-C3 and NEX-VG10E.
},
0x00 => { #JR
Name => 'ShutterSpeedSetting',
Notes => 'used only in M and S exposure modes',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x01 => { #JR
Name => 'ApertureSetting',
Notes => 'used only in M and A exposure modes',
ValueConv => '2 ** (($val/8 - 1) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
PrintConvInv => '$val',
},
0x02 => {
Name => 'ISOSetting',
ValueConv => '($val and $val < 254) ? exp(($val/8-6)*log(2))*100 : $val',
ValueConvInv => '($val and $val != 254) ? 8*(log($val/100)/log(2)+6) : $val',
PrintConv => {
OTHER => sub {
my ($val, $inv) = @_;
return int($val + 0.5) unless $inv;
return Image::ExifTool::IsFloat($val) ? $val : undef;
},
0 => 'Auto',
254 => 'n/a', # get this for multi-shot noise reduction
},
},
0x03 => { #JR
Name => 'ExposureCompensationSet',
ValueConv => '($val - 128) / 24', #PH
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x04 => { #JR
Name => 'DriveModeSetting',
# Same drivemode info is repeated in 0x0034, but with at least the following exceptions:
# - 0x0034 not for A550 ? - seen "0"
# - hand-held night (0x05=56): 0x0004=0x10 and 0x0034=0xd3
# - 3D sweep panorama (0x05=57): 0x0004=0x10 and 0x0034=0xd6
# - sweep panorama (0x05=80): 0x0004=0x10 and 0x0034=0xd5
# preliminary conclusion: 0x0004 is Drivemode as pre-set, but may be overruled by Scene/Panorama mode selections
# 0x0034 is Divemode as actually used
PrintHex => 1,
PrintConv => {
0x10 => 'Single Frame',
0x21 => 'Continuous High', # also automatically selected for Scene mode Sports-action (0x05=52)
0x22 => 'Continuous Low',
0x30 => 'Speed Priority Continuous',
0x51 => 'Self-timer 10 sec',
0x52 => 'Self-timer 2 sec, Mirror Lock-up',
0x71 => 'Continuous Bracketing 0.3 EV',
0x75 => 'Continuous Bracketing 0.7 EV',
0x91 => 'White Balance Bracketing Low',
0x92 => 'White Balance Bracketing High',
0xc0 => 'Remote Commander',
},
},
0x05 => { #JR
Name => 'ExposureProgram',
# Camera exposure program/mode as selected with the Mode dial.
# For SCN a further selection is done via the menu
# Matches OK with 0xb023
SeparateTable => 'ExposureProgram2',
PrintConv => \%sonyExposureProgram2,
},
0x06 => { #JR
Name => 'FocusModeSetting',
PrintConv => {
17 => 'AF-S',
18 => 'AF-C',
19 => 'AF-A',
32 => 'Manual',
48 => 'DMF', #(NC) (seen for NEX-5)
},
},
0x07 => { #JR
Name => 'MeteringMode',
PrintConv => {
1 => 'Multi-segment',
2 => 'Center-weighted average',
3 => 'Spot',
},
},
0x09 => { #JR
Name => 'SonyImageSize',
PrintConv => { # values confirmed as noted for the A580 and A33
21 => 'Large (3:2)', # A580: 16M (4912x3264), A33: 14M (4592x3056)
22 => 'Medium (3:2)', # A580: 8.4M (3568x2368), A33: 7.4M (3344x2224)
23 => 'Small (3:2)', # A580: 4.0M (2448x1624), A33: 3.5M (2288x1520)
25 => 'Large (16:9)', # A580: 14M (4912x2760)
26 => 'Medium (16:9)', # A580: 7.1M (3568x2000)
27 => 'Small (16:9)', # A580: 3.4M (2448x1376)
},
},
0x0a => { #JR
Name => 'AspectRatio',
# normally 4 for A580 3:2 ratio images
# seen 8 when selecting 16:9 via menu, and when selecting Panorama mode
PrintConv => {
4 => '3:2',
8 => '16:9',
},
},
0x0b => { #JR
Name => 'Quality',
PrintConv => {
2 => 'RAW',
4 => 'RAW + JPEG',
6 => 'Fine',
7 => 'Standard',
},
},
0x0c => {
Name => 'DynamicRangeOptimizerSetting',
PrintConv => {
1 => 'Off',
16 => 'On (Auto)',
17 => 'On (Manual)',
},
},
0x0d => 'DynamicRangeOptimizerLevel',
0x0e => { #JR
Name => 'ColorSpace',
PrintConv => {
1 => 'sRGB',
2 => 'Adobe RGB',
},
},
0x0f => { #JR
Name => 'CreativeStyleSetting',
PrintConvColumns => 2,
PrintConv => {
16 => 'Standard',
32 => 'Vivid',
64 => 'Portrait',
80 => 'Landscape',
96 => 'B&W',
160 => 'Sunset',
},
},
0x10 => { #JR (seen values 253, 254, 255, 0, 1, 2, 3)
Name => 'ContrastSetting',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x11 => { #JR
Name => 'SaturationSetting',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x12 => { #JR
Name => 'SharpnessSetting',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x16 => { #JR
Name => 'WhiteBalanceSetting',
# many guessed, based on "logical system" as observed for Daylight and Shade and steps of 16 between the modes
PrintHex => 1,
PrintConvColumns => 2,
PrintConv => \%whiteBalanceSetting,
SeparateTable => 1,
},
0x17 => { #JR
Name => 'ColorTemperatureSetting',
# matches "0xb021 ColorTemperature" when WB set to "Custom" or "Color Temperature/Color Filter"
ValueConv => '$val * 100',
ValueConvInv => '$val / 100',
PrintConv => '"$val K"',
PrintConvInv => '$val =~ s/ ?K$//i; $val',
},
0x18 => { #JR
Name => 'ColorCompensationFilterSet',
# seen 0, 1-9 and 245-255, corresponding to 0, M1-M9 and G9-G1 on camera display
# matches "0xb022 ColorCompensationFilter" when WB set to "Custom" or "Color Temperature/Color Filter"
Format => 'int8s',
Notes => 'negative is green, positive is magenta',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x19 => { #JR
Name => 'CustomWB_RGBLevels',
Format => 'int16uRev[3]',
# 0x19 - 0x1e are related to Custom WB measurements performed by the camera.
# The values change only each time when measuring and setting a new Custom WB.
# (0x19,0x1a) and (0x1d,0x1e) are same as MoreSettings (0x1a,0x1b) and (0x1c,0x1d)
},
# 0x1f - always 2 (ref JR)
0x20 => { #JR
Name => 'FlashMode',
PrintConvColumns => 2,
PrintConv => {
1 => 'Flash Off',
16 => 'Autoflash',
17 => 'Fill-flash',
18 => 'Slow Sync',
19 => 'Rear Sync',
20 => 'Wireless',
},
},
0x21 => { #JR
Name => 'FlashControl',
PrintConv => {
1 => 'ADI Flash',
2 => 'Pre-flash TTL',
},
},
0x23 => { #JR
Name => 'FlashExposureCompSet',
Description => 'Flash Exposure Comp. Setting',
# (as pre-selected by the user, not zero if flash didn't fire)
ValueConv => '($val - 128) / 24', #PH
ValueConvInv => 'int($val * 24 + 128.5)',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x24 => {
Name => 'AFAreaMode',
PrintConv => {
1 => 'Wide',
2 => 'Spot',
3 => 'Local',
4 => 'Flexible', #JR
# (Flexible Spot is a grid of 17x11 points for the NEX-5)
},
},
0x25 => { #JR
Name => 'LongExposureNoiseReduction',
PrintConv => {
1 => 'Off',
16 => 'On', # (unused or dark subject)
},
},
0x26 => { #JR
Name => 'HighISONoiseReduction',
PrintConv => {
16 => 'Low',
17 => 'High',
19 => 'Auto',
},
},
0x27 => { #JR
Name => 'SmileShutterMode',
PrintConv => {
17 => 'Slight Smile',
18 => 'Normal Smile',
19 => 'Big Smile',
},
},
0x28 => { #JR
Name => 'RedEyeReduction',
PrintConv => {
1 => 'Off',
16 => 'On',
},
},
0x2d => {
Name => 'HDRSetting',
PrintConv => {
1 => 'Off',
16 => 'On (Auto)',
17 => 'On (Manual)',
},
},
0x2e => {
Name => 'HDRLevel',
PrintConvColumns => 3,
PrintConv => {
33 => '1 EV',
34 => '1.5 EV', #JR (NC)
35 => '2 EV',
36 => '2.5 EV', #JR (NC)
37 => '3 EV',
38 => '3.5 EV', #PH (NC)
39 => '4 EV',
40 => '5 EV',
41 => '6 EV',
},
},
0x2f => { #JR (not sure what is difference with 0x85)
Name => 'ViewingMode',
PrintConv => {
16 => 'ViewFinder',
33 => 'Focus Check Live View',
34 => 'Quick AF Live View',
},
},
0x30 => { #JR
Name => 'FaceDetection',
PrintConv => {
1 => 'Off',
16 => 'On',
},
},
0x31 => { #JR
Name => 'SmileShutter',
PrintConv => {
1 => 'Off',
16 => 'On',
},
},
0x32 => { #JR
Name => 'SweepPanoramaSize',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
1 => 'Standard',
2 => 'Wide',
},
},
0x33 => { #JR
Name => 'SweepPanoramaDirection',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
1 => 'Right',
2 => 'Left',
3 => 'Up',
4 => 'Down',
},
},
0x34 => { #JR
Name => 'DriveMode', # (drive mode actually used)
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintHex => 1,
PrintConv => {
0x10 => 'Single Frame',
0x21 => 'Continuous High', # also automatically selected for Scene mode Sports-action (0x05=52)
0x22 => 'Continuous Low',
0x30 => 'Speed Priority Continuous',
0x51 => 'Self-timer 10 sec',
0x52 => 'Self-timer 2 sec, Mirror Lock-up',
0x71 => 'Continuous Bracketing 0.3 EV',
0x75 => 'Continuous Bracketing 0.7 EV',
0x91 => 'White Balance Bracketing Low',
0x92 => 'White Balance Bracketing High',
0xc0 => 'Remote Commander',
0xd1 => 'Continuous - HDR',
0xd2 => 'Continuous - Multi Frame NR',
0xd3 => 'Continuous - Handheld Night Shot', # (also called "Hand-held Twilight")
0xd4 => 'Continuous - Anti Motion Blur', #PH (NEX-5)
0xd5 => 'Continuous - Sweep Panorama',
0xd6 => 'Continuous - 3D Sweep Panorama',
},
},
0x35 => {
Name => 'MultiFrameNoiseReduction',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
0 => 'n/a', # seen for A450/A500/A550
1 => 'Off',
16 => 'On',
255 => 'None', # seen for NEX-3/5/C3
},
},
0x36 => { #JR (not 100% sure about this one)
Name => 'LiveViewAFSetting',
Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
PrintConv => {
0 => 'n/a',
1 => 'Phase-detect AF',
2 => 'Contrast AF',
# Contrast AF is only available with SSM/SAM lenses and in Focus Check LV,
# NOT in Quick AF LV, and is automatically set when mounting SSM/SAM lens
# - changes into Phase-AF when switching to Quick AF LV.
},
},
0x38 => { #JR
Name => 'PanoramaSize3D',
Description => '3D Panorama Size',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
0 => 'n/a',
1 => 'Standard',
2 => 'Wide',
3 => '16:9',
},
},
0x83 => { #JR
Name => 'AFButtonPressed',
# only indicates pressing and holding the "AF" button (centre-controller),
# not pressing the shutter release button halfway down
Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
PrintConv => {
1 => 'No',
16 => 'Yes',
},
},
0x84 => { #JR (not 100% sure about this one)
Name => 'LiveViewMetering',
Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
PrintConv => {
0 => 'n/a',
16 => '40 Segment', # DSLR with LiveView/OVF switch in OVF position
32 => '1200-zone Evaluative', # SLT, or DSLR with LiveView/OVF switch in LiveView position
},
},
0x85 => { #JR (not sure what is difference with 0x2f)
Name => 'ViewingMode2',
Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
PrintConv => {
0 => 'n/a',
16 => 'Viewfinder',
33 => 'Focus Check Live View',
34 => 'Quick AF Live View',
},
},
0x86 => { #JR
Name => 'AELock',
Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
PrintConv => {
1 => 'On',
2 => 'Off',
},
},
0x87 => { #JR
Name => 'FlashStatusBuilt-in',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)/',
PrintConv => {
1 => 'Off',
2 => 'On',
},
},
0x88 => { #JR
Name => 'FlashStatusExternal',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)/',
PrintConv => {
1 => 'None',
2 => 'Off',
3 => 'On',
},
},
# 0x8a => { #JR
# Name => 'LensAF',
# Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
# PrintConv => {
# 1 => 'No',
# 16 => 'AF Lens',
# },
# },
0x8b => { #JR
Name => 'LiveViewFocusMode',
Condition => '$$self{Model} !~ /^(NEX-|DSLR-(A450|A500|A550)$)/',
PrintConv => {
0 => 'n/a',
1 => 'AF',
16 => 'Manual',
},
},
# 0x8e => { #JR
# Name => 'LensSAM',
# Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
# PrintConv => {
# 1 => 'No',
# 16 => 'SAM Lens',
# },
# },
0x99 => { #JR
Name => 'LensMount',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val',
PrintConv => {
1 => 'Unknown',
16 => 'A-mount',
17 => 'E-mount',
},
},
# 0x9b => { #JR
# Name => 'LensOSS',
# Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
# PrintConv => {
# 1 => 'No',
# 16 => 'OSS Lens',
# 17 => 'OSS Lens (NEX-VG)', # active ?
# },
# },
# 0x9c - 1; 2 for multi-shot modes
0x10c => { #JR
Name => 'SequenceNumber',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/', # seen 18 for A550, so better exclude ?
# normally 0; seen 1,2,3 for bracketing, 6 for Handheld Night Shot, 3 for HDR, 6 for MFNR
PrintConv => {
0 => 'Single',
255 => 'n/a',
OTHER => sub { shift }, # pass all other numbers straight through
},
},
# when reading 0x0114 - 0x0117 as int32u:
# - upper 8 bits (0x0117): always value 4, meaning unknown
# - next 10 bits: FolderNumber (max. 999 according to manual)
# - last 14 bits: ImageNumber (max 9999)
0x0114 => { #JR
Name => 'FolderNumber',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
Format => 'int32u',
Mask => 0x00ffc000,
ValueConv => '$val >> 14',
ValueConvInv => '$val << 14',
PrintConv => 'sprintf("%.3d",$val)',
PrintConvInv => '$val',
},
276.1 => { #JR (0x0114.1)
Name => 'ImageNumber',
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
Format => 'int32u',
Mask => 0x00003fff,
PrintConv => 'sprintf("%.4d",$val)',
PrintConvInv => '$val',
},
0x200 => { #JR
Name => 'ShotNumberSincePowerUp2',
Notes => q{
same as ShotNumberSincePowerUp for single-shot images, but includes all
shots of the current image in multi-shot modes like HDR, panorama, and
multi-frame noise reduction
},
# (includes all shutter actuations of the current shot)
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/',
Format => 'int32u',
},
0x283 => { #JR
Name => 'AFButtonPressed',
# only indicates pressing and holding the "AF" button (centre-controller),
# not pressing the shutter release button halfway down
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
1 => 'No',
16 => 'Yes',
},
},
0x284 => { #JR (not 100% sure about this one)
Name => 'LiveViewMetering',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
0 => 'n/a',
16 => '40 Segment', # DSLR with LiveView/OVF switch in OVF position
32 => '1200-zone Evaluative', # DSLR with LiveView/OVF switch in LiveView position
},
},
0x285 => { #JR (not sure what is difference with 0x2f)
Name => 'ViewingMode2',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
0 => 'n/a',
16 => 'Viewfinder',
33 => 'Focus Check Live View',
34 => 'Quick AF Live View',
},
},
0x286 => { #JR
Name => 'AELock',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
1 => 'On',
2 => 'Off',
},
},
0x287 => { #JR
Name => 'FlashStatusBuilt-in',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Notes => 'A450, A500 and A550',
PrintConv => {
1 => 'Off',
2 => 'On',
},
},
0x288 => { #JR
Name => 'FlashStatusExternal',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Notes => 'A450, A500 and A550',
PrintConv => {
1 => 'None',
2 => 'Off',
3 => 'On',
},
},
0x28b => { #JR
Name => 'LiveViewFocusMode',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
PrintConv => {
0 => 'n/a',
1 => 'AF',
16 => 'Manual',
},
},
0x30c => { #JR
Name => 'SequenceNumber',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Notes => 'A450, A500 and A550',
# normally 0; seen 2 for HDR
PrintConv => {
0 => 'Single',
255 => 'n/a',
OTHER => sub { shift }, # pass all other numbers straight through
},
},
0x314 => { #JR
Name => 'ImageNumber',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Format => 'int16u',
Notes => 'A450, A500 and A550',
Mask => 0x3fff, #PH (not sure what the upper 2 bits are for)
PrintConv => 'sprintf("%.4d",$val)',
PrintConvInv => '$val',
},
0x316 => { #JR
Name => 'FolderNumber',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Notes => 'A450, A500 and A550',
Format => 'int16u',
Mask => 0x03ff, #(NC)
PrintConv => 'sprintf("%.3d",$val)',
PrintConvInv => '$val',
},
0x03f0 => {
Name => 'LensE-mountVersion',
Format => 'int16u',
Condition => '($$self{Model} =~ /^NEX-/)',
PrintConv => 'sprintf("%x.%.2x",$val>>8,$val&0xff)',
PrintConvInv => 'my @a=split(/\./,$val);(hex($a[0])<<8)|hex($a[1])',
},
# 0x03f3 - this is probably LensFirmwareVersion and not CameraE-MountVersion (ref JR, Sept.2015)
# 0x03f3 and 0x03f4 change together and behave similarly to Tag940c 0x0014 and 0x0015 - see comments there.
0x03f3 => {
Name => 'LensFirmwareVersion',
Format => 'int16u',
Condition => '($$self{Model} =~ /^NEX-/)',
PrintConv => 'sprintf("Ver.%.2x.%.3d",$val>>8,$val&0xff)',
},
0x3f7 => { #JR
Name => 'LensType2',
Condition => '($$self{Model} =~ /^NEX-/) and ($$self{LensMount} != 1)',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x400 => { #JR
Name => 'ImageNumber',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Format => 'int16u',
Notes => 'A450, A500 and A550',
Mask => 0x3fff, #PH (not sure what the upper 2 bits are for)
PrintConv => 'sprintf("%.4d",$val)',
PrintConvInv => '$val',
},
0x402 => { #JR
Name => 'FolderNumber',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)$/',
Format => 'int16u',
Mask => 0x03ff, #(NC)
Notes => 'A450, A500 and A550',
PrintConv => 'sprintf("%.3d",$val)',
PrintConvInv => '$val',
},
);
# Camera settings for other models
%Image::ExifTool::Sony::CameraSettingsUnknown = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int16u',
);
# extra hardware information (ref JR)
%Image::ExifTool::Sony::ExtraInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'Extra hardware information for the A850 and A900.',
# 0x0000: seen values 5 or 6
0x0001 => {
Name => 'BatteryTemperature',
# seen values of appr. 55 - 115: looks like temperature Fahrenheit
# changing battery in cold weather: new battery starts with value 53
ValueConv => '($val - 32) / 1.8', # convert to Celsius
ValueConvInv => '$val * 1.8 + 32',
PrintConv => 'sprintf("%.1f C",$val)',
PrintConvInv => '$val=~ s/\s*C//; $val',
# (may be invalid for non-OEM batteries)
},
0x0002 => {
Name => 'BatteryUnknown',
# appears to be an int16u value together with 0x0005 (values similar to ExtraInfo3 0x0000)
# seen values of appr. 800 at 23 deg C to 630 at 40 deg C for A850 with NP-FM500H battery (7.2 V nominal)
# i.e. inversely proportional to BatteryTemperature: can not be BatteryVoltage, must be something else ?
Unknown => 1,
Format => 'undef[4]',
ValueConv => sub {
my $val = shift;;
my @a = unpack("CvC",pack('v*', unpack('n*', $val)));
return $a[1];
},
},
# 0x0003: seen 0 or 16
# 0x0004: always 255
# 0x0006: int16u value together with 0x0009: same behaviour and almost same values as 0x0002
# 0x0007: always 3
0x0008 => {
Name => 'BatteryVoltage',
# 0x0008: int16u value together with 0x000b:
# values follow BatteryLevel: from appr.900 when battery full, to appr. 775 when empty.
# with factor 118 they range from appr. 7.6 to 6.6 - looks like battery voltage (nominal 7.2 V)
Unknown => 1,
Format => 'undef[4]',
ValueConv => sub {
my $val = shift;;
my @a = unpack("CvC",pack('v*', unpack('n*', $val)));
return $a[1]/118;
},
PrintConv => 'sprintf("%.2f V",$val)',
},
0x000a => {
# seen mostly 213 and 246, corresponding with other ImageStabilization On/Off tags.
Name => 'ImageStabilization2',
Unknown => 1, # (because the decoding is funny and possibly incomplete - PH)
PrintConv => {
191 => 'On (191)', # seen a few times with moving subject, continuous drive, bracketing
207 => 'On (207)', # seen once with RemoteCommander
210 => 'On (210)', # seen a few times with continous drive
213 => 'On',
246 => 'Off',
},
},
# 0x000c: seen always decreasing values, from max. 107 to min. 0,
# then jump back to high value: correlates with battery change/recharging
# Seen once 255 immediately after inserting new battery, next frame OK at 106.
# Validation: matches exactly with batterylevel display on camera (all 100+ values displayed as 100%)
0x000c => {
Name => 'BatteryLevel',
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
# 0x000d: always 2
# 0x000e: always 204
# 0x000f: always 0
# 0x0010-0x0019: always 204
0x001a => {
Name => 'ExtraInfoVersion',
Format => 'int8u[4]',
PrintConv => '$val=~tr/ /./; $val',
PrintConvInv => '$val=~tr/./ /; $val',
# always 0 1 0 1 for 0x0131 Software = DSLR-A850 v1.00
# always 0 2 0 4 for 0x0131 Software = DSLR-A850 v2.00
# seen 0 2 0 0 for 0x0131 Software = DSLR-A900 v1.00
# seen 0 4 0 0 for 0x0131 Software = DSLR-A900 v1.00
# seen 0 5 0 4 for 0x0131 Software = DSLR-A900 v2.00
# A850: correlates exactly with Firmware versions.
# A900: have there been different FW 1.0 versions ?
},
);
# extra hardware information (ref JR)
%Image::ExifTool::Sony::ExtraInfo2 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'Extra hardware information for the A230/290/330/380/390.',
0x0004 => {
Name => 'BatteryLevel',
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
0x0012 => {
Name => 'ImageStabilization',
PrintConv => {
0 => 'Off',
64 => 'On',
},
},
);
# extra hardware information (ref JR)
%Image::ExifTool::Sony::ExtraInfo3 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => q{
Extra hardware information for the A33, A35, A55, A450, A500, A550, A560,
A580 and NEX-3/5/C3/VG10.
},
0x0000 => {
Name => 'BatteryUnknown',
# seen values of appr. 870 at 10 deg C to 650 at 39 deg C for A580 with NP-FM500H battery (7.2 V nominal)
# i.e. inversely proportional to BatteryTemperature: can not be BatteryVoltage, must be something else ?
Unknown => 1,
Format => 'int16u',
},
0x0002 => {
Name => 'BatteryTemperature',
ValueConv => '($val - 32) / 1.8', # convert to Celsius
ValueConvInv => '$val * 1.8 + 32',
PrintConv => 'sprintf("%.1f C",$val)',
PrintConvInv => '$val=~ s/\s*C//; $val',
},
0x0004 => {
Name => 'BatteryLevel',
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
# 0x0005: always 255
# from here on the differences between DSLR, SLT and NEX
# 0x0006 and 0x0008:
# values follow BatteryLevel: start high (970, 940) when battery full,
# and decrease with decreasing battery level to (850, 815)
# with factor 128 they range from (7.6, 7.3) to (6.6, 6.4) - looks like battery voltage (nominal 7.2 V)
0x0006 => {
Name => 'BatteryVoltage1',
Format => 'int16u',
Condition => '$$self{Model} !~ /^(NEX-(3|5|5C|C3|VG10|VG10E))\b/',
ValueConv => '$val / 128',
ValueConvInv => '$val * 128',
PrintConv => 'sprintf("%.2f V",$val)',
PrintConvInv => '$val=~s/\s*V//; $val',
},
0x0008 => {
Name => 'BatteryVoltage2',
Format => 'int16u',
Condition => '$$self{Model} !~ /^(NEX-(3|5|5C|C3|VG10|VG10E))\b/',
ValueConv => '$val / 128',
ValueConvInv => '$val * 128',
PrintConv => 'sprintf("%.2f V",$val)',
PrintConvInv => '$val=~s/\s*V//; $val',
},
# 0x000a - 0x000f: 3 int16u values: probably some mode or status info:
# seen various 3-number-sequences for SLT and DSLR, but meaning unknown
# 0x000a => {
# Name => 'ExtraInfo_000a',
# Format => 'int16u[3]',
# Condition => '$$self{Model} !~ /^(NEX-(3|5|5C|C3|VG10|VG10E))\b/',
# },
# 0x0010 seen:
# 176 for SLT
# 204 for NEX
# 240 for DSLR
0x0011 => {
Name => 'ImageStabilization',
Condition => '$$self{Model} !~ /^(NEX-(3|5|5C|C3|VG10|VG10E))\b/',
# usually matches 0xb026 ImageStabilization, except some images with SelfTimer and on tripod
PrintConv => {
0 => 'Off',
64 => 'On',
},
},
0x0014 => [
{
Name => 'BatteryState',
Condition => '$$self{Model} =~ /^SLT-/',
# possibly relates to "simple" batterylevel indication with battery-icon, but not completely sure
Notes => 'BatteryState for SLT models',
PrintConv => {
1 => 'Empty',
2 => 'Low',
3 => 'Half full',
4 => 'Almost full',
5 => 'Full',
},
},{
Name => 'ExposureProgram',
Condition => '$$self{Model} =~ /^DSLR-(A450|A500|A550)\b/',
Notes => 'ExposureProgram for the A450, A500 and A550',
Priority => 0, # (some unknown values)
PrintConv => {
241 => 'Landscape',
243 => 'Aperture-priority AE',
245 => 'Portrait',
246 => 'Auto',
247 => 'Program AE',
249 => 'Macro',
252 => 'Sunset',
253 => 'Sports', #PH (A550)
255 => 'Manual',
# missing: Shutter speed priority AE, No Flash, Night View
},
},{
Name => 'ModeDialPosition',
Condition => '$$self{Model} =~ /^DSLR-/',
Notes => 'ModeDialPosition for other DSLR models',
# (decoded from A560/A580)
PrintConv => {
248 => 'No Flash',
249 => 'Aperture-priority AE',
250 => 'SCN', # <-- the reason we don't call it ExposureProgram for these models
251 => 'Shutter speed priority AE',
252 => 'Auto',
253 => 'Program AE',
254 => 'Panorama',
255 => 'Manual',
},
},
],
# 0x0015: DSLR: appears to be a bitmask relating to "switch" positions:
# bit 0 ( 1) only seen OFF for A580
# bit 1 ( 2) ON = Flash down, OFF = Flash raised
# bit 2 ( 4) only seen ON for A580
# bit 3 ( 8) only seen ON for A580
# bit 4 ( 16) ON = AF, OFF = MF
# bit 5 ( 32) ON = OVF, OFF = LiveView
# bit 6 ( 64) seen ON and OFF, meaning unknown
# bit 7 (128) seen ON and OFF, meaning unknown
# 0x0016: DSLR: seen 244,245,252,254, decoded for A580 with 32GB SD and 16GB MS cards
# 0x0016: NEX: seen 61,62, 125,126, 190: bits '64' and '128' appear to relate to CameraOrientation
# 0x0016: SLT: seen 64 - 78, meaning unknown
0x0016 => [{
Name => 'MemoryCardConfiguration',
Condition => '$$self{Model} =~ /^DSLR-/',
PrintConv => {
244 => 'MemoryStick in use, SD card present',
245 => 'MemoryStick in use, SD slot empty',
252 => 'SD card in use, MemoryStick present',
254 => 'SD card in use, MemoryStick slot empty',
},
},{
Name => 'CameraOrientation',
Condition => '$$self{Model} =~ /^(NEX-(3|5|5C|C3|VG10|VG10E))\b/',
Mask => 0xc0, # (don't know what other bits mean)
PrintConv => {
0x00 => 'Horizontal (normal)',
0x40 => 'Rotate 90 CW',
0x80 => 'Rotate 270 CW',
0xc0 => 'Rotate 180', #(NC)
},
}],
# 0x0017: seen 0 for SLT, 255 for DSLR, variable for NEX
0x0018 => {
Name => 'CameraOrientation',
Condition => '$$self{Model} !~ /^(NEX-(3|5|5C|C3|VG10|VG10E))\b/',
Mask => 0x30, # (don't know what other bits mean)
PrintConv => {
0x00 => 'Horizontal (normal)',
0x10 => 'Rotate 90 CW',
0x20 => 'Rotate 270 CW',
0x30 => 'Rotate 180',
},
},
# 0x0019:
# A450/500/550: 0 - 12 and 233 - 255
# A560/580: 1 or 64, seen a few 0 and 8
# A33/35/55: seen 0, 1, 64
# NEX: 204
# 0x001a, 0x001c appear to be 2 int16u values, meaning unknown
);
# shot information (ref PH)
%Image::ExifTool::Sony::ShotInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
DATAMEMBER => [ 0x02, 0x30, 0x32, 0x34 ],
IS_SUBDIR => [ 0x48, 0x5e ],
# 0x00 - byte order 'II'
0x02 => {
Name => 'FaceInfoOffset',
Format => 'int16u',
DataMember => 'FaceInfoOffset',
Writable => 0,
RawConv => '$$self{FaceInfoOffset} = $val',
},
0x06 => {
Name => 'SonyDateTime',
Format => 'string[20]',
Groups => { 2 => 'Time' },
Shift => 'Time',
PrintConv => '$self->ConvertDateTime($val)',
PrintConvInv => '$self->InverseDateTime($val,0)',
},
0x1a => { Name => 'SonyImageHeight', Format => 'int16u' }, #JR
0x1c => { Name => 'SonyImageWidth', Format => 'int16u' }, #JR
0x30 => { #Jeffrey Friedl
Name => 'FacesDetected',
DataMember => 'FacesDetected',
Format => 'int16u',
RawConv => '$$self{FacesDetected} = $val',
},
0x32 => {
Name => 'FaceInfoLength', # length of a single FaceInfo entry
DataMember => 'FaceInfoLength',
Format => 'int16u',
Writable => 0,
RawConv => '$$self{FaceInfoLength} = $val',
},
0x34 => {
# oldest/other DSC/other -
# older DSC models "DC5303320222000" or "DC6303320222000"
# DSC-W650/W690/W730 "THm101000000000" or "THm211000000000"
# DSC-HX9V generation and newer "DC7303320222000"
Name => 'MetaVersion', # (tentative)
Format => 'string[16]',
DataMember => 'MetaVersion',
RawConv => '$$self{MetaVersion} = $val',
},
0x48 => { # (most models: DC5303320222000 and DC6303320222000)
Name => 'FaceInfo1',
Condition => q{
$$self{FacesDetected} and
$$self{FaceInfoOffset} == 0x48 and
$$self{FaceInfoLength} == 0x20
},
SubDirectory => { TagTable => 'Image::ExifTool::Sony::FaceInfo1' },
},
0x5e => { # (HX7V: DC7303320222000)
Name => 'FaceInfo2',
Condition => q{
$$self{FacesDetected} and
$$self{FaceInfoOffset} == 0x5e and
$$self{FaceInfoLength} == 0x25
},
SubDirectory => { TagTable => 'Image::ExifTool::Sony::FaceInfo2' },
},
);
# tags used in Tag2010 and Tag9400 tables
my %sequenceImageNumber = ( #PH
Name => 'SequenceImageNumber',
Notes => 'number of images captured in burst sequence',
# (not shutter count because it increments for auto portrait framing)
Format => 'int32u',
ValueConv => '$val + 1',
ValueConvInv => '$val - 1',
);
my %sequenceFileNumber = ( #PH
Name => 'SequenceFileNumber',
Notes => 'file number in burst sequence',
Format => 'int32u',
ValueConv => '$val + 1', #JR
ValueConvInv => '$val - 1',
);
my %releaseMode2 = ( #JR
Name => 'ReleaseMode2',
SeparateTable => 'ReleaseMode2',
PrintConv => {
0 => 'Normal',
1 => 'Continuous', # (RX100 "Continuous - Self-timer")
2 => 'Continuous - Exposure Bracketing', # (RX100)
# 3 - also DRO Bracketing (ILCE-7RM2), not "Continuous" because only single exposure from which camera makes 3 versions
3 => 'DRO or White Balance Bracketing', # (HX9V) (RX100) (ILCE-7RM2)
5 => 'Continuous - Burst', # (HX9V)
6 => 'Single Frame - Capture During Movie', #PH (RX100)
7 => 'Continuous - Sweep Panorama',
8 => 'Continuous - Anti-Motion Blur, Hand-held Twilight', # (HX9V)
9 => 'Continuous - HDR',
10 => 'Continuous - Background defocus', # (HX9V)
13 => 'Continuous - 3D Sweep Panorama', #PH/JR
15 => 'Continuous - High Resolution Sweep Panorama', #JR (HX50V)
16 => 'Continuous - 3D Image', # (HX9V)
17 => 'Continuous - Burst 2', # (WX7 - PH) (#JR 9400-SequenceLength=10 shots)
# 18 - seen for several ILCE-7S v2.00 iAuto+ single-shot images ...
19 => 'Continuous - Speed/Advance Priority', #PH/JR (RX100)
20 => 'Continuous - Multi Frame NR',
23 => 'Single-frame - Exposure Bracketing', # (seen for ILCE-7 series)
26 => 'Continuous Low', #PH (A77)
27 => 'Continuous - High Sensitivity', # seen for DSC-WX60 and WX300
28 => 'Smile Shutter', #PH (RX100)
29 => 'Continuous - Tele-zoom Advance Priority',
# 30 - seen quite often for single-shot images ... SLT-A58, ILCE-5100/6000
# 33 - Continuous - seen for DSC-RX100M5, RX10M4, maybe 24 fps mode ???
146 => 'Single Frame - Movie Capture', #PH (seen in Tag2010 ReleaseMode2 values)
},
);
# tag definitions for Tag2010 tables (ref JR)
my %sonyDateTime2010 = (
Name => 'SonyDateTime',
Format => 'undef[7]',
Shift => 'Time',
ValueConv => q{
my @v = unpack('vC*', $val);
return sprintf("%.4d:%.2d:%.2d %.2d:%.2d:%.2d", @v)
},
ValueConvInv => q{
my @v = ($val =~ /\d+/g);
return undef unless @v == 6;
return pack('vC*', @v);
},
PrintConv => '$self->ConvertDateTime($val)',
PrintConvInv => '$self->InverseDateTime($val,0)',
);
my %releaseMode2010 = (
Name => 'ReleaseMode3',
PrintConv => {
0 => 'Normal',
1 => 'Continuous',
2 => 'Bracketing', # (all types: Continuous and Single-Frame Exposure, White Balance and DRO bracketing - PH/JR)
# 3 => 'Remote Commander', (NC) (seen this when other ReleaseMode and ReleaseMode2 are 'Normal' - PH, A77)
4 => 'Continuous - Burst', # seen for DSC-WX500 with burst of 10 shots
5 => 'Continuous - Speed/Advance Priority',
6 => 'Normal - Self-timer', # seen for ILCE-6300/6500/9, ILCA-99M2
},
);
my %selfTimer2010 = (
Name => 'SelfTimer',
PrintConv => {
0 => 'Off',
1 => 'Self-timer 10 s',
2 => 'Self-timer 2 s',
},
);
my %selfTimerB2010 = ( # also value 1 for new 5 s mode of DSC-HX90V/RX10M2/RX100M4/WX500, ILCE-7RM2/7SM2
Name => 'SelfTimer',
PrintConv => {
0 => 'Off',
1 => 'Self-timer 5 or 10 s',
2 => 'Self-timer 2 s',
},
);
my %gain2010 = (
Name => 'StopsAboveBaseISO',
# BaseISO is 100 for SLT, ILCE-3000, NEX-5N/5R/5T/6/7/VG20/VG30/VG900, DSC-RX1/RX1R
# BaseISO is 200 for NEX-F3/3N
# BaseISO is 160 for DSC-RX100M2
# BaseISO is 125 for DSC-RX100
# Also several other DSC models have BaseISO different from 100.
Format => 'int16u',
ValueConv => '16 - $val/256',
ValueConvInv => '(16 - $val) * 256',
PrintConv => '$val ? sprintf("%.1f",$val) : $val',
PrintConvInv => '$val',
);
my %brightnessValue2010 = (
Name => 'BrightnessValue',
Format => 'int16u',
ValueConv => '$val/256 - 56.6',
ValueConvInv => '($val + 56.6) * 256',
);
my %dynamicRangeOptimizer2010 = (
Name => 'DynamicRangeOptimizer',
PrintConv => {
0 => 'Off',
1 => 'Auto',
3 => 'Lv1',
4 => 'Lv2',
5 => 'Lv3',
6 => 'Lv4',
7 => 'Lv5',
8 => 'n/a',
},
);
my %hdr2010 = (
Name => 'HDRSetting', # (Off when HDR tag is On for RX100 superior auto backlight - PH)
PrintConv => {
0 => 'Off',
1 => 'HDR Auto',
3 => 'HDR 1 EV',
5 => 'HDR 2 EV',
7 => 'HDR 3 EV',
9 => 'HDR 4 EV',
11 => 'HDR 5 EV',
13 => 'HDR 6 EV',
},
);
my %exposureComp2010 = ( # only as set manually, remains 0 in exposure-bracketing modes
Name => 'ExposureCompensation',
Format=>'int16s',
ValueConv => '-$val/256',
ValueConvInv => '-$val*256',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => '$val',
);
my %pictureEffect2010 = (
Name => 'PictureEffect2',
SeparateTable => 'PictureEffect2',
PrintConv => {
0 => 'Off',
1 => 'Toy Camera',
2 => 'Pop Color',
3 => 'Posterization',
4 => 'Retro Photo',
5 => 'Soft High Key',
6 => 'Partial Color',
7 => 'High Contrast Monochrome',
8 => 'Soft Focus',
9 => 'HDR Painting',
10 => 'Rich-tone Monochrome',
11 => 'Miniature',
12 => 'Water Color',
13 => 'Illustration',
},
);
my %quality2010 = (
Name => 'Quality2',
PrintConv => {
0 => 'JPEG',
1 => 'RAW',
2 => 'RAW + JPEG',
},
);
my %meteringMode2010 = (
Name => 'MeteringMode',
PrintConv => {
0 => 'Multi-segment',
2 => 'Center-weighted average',
3 => 'Spot',
4 => 'Average', # (NC) seen for ILCA-99M2 with Exif indicating "Average"
5 => 'Highlight', # (NC) seen for ILCA-99M2 with Exif indicating "Other"
},
);
my %flashMode2010 = (
Name => 'FlashMode',
PrintConv => {
0 => 'Autoflash',
1 => 'Fill-flash',
2 => 'Flash Off',
3 => 'Slow Sync',
4 => 'Rear Sync',
6 => 'Wireless',
},
);
my %exposureProgram2010 = (
Name => 'ExposureProgram',
SeparateTable => 'ExposureProgram3',
PrintConv => \%sonyExposureProgram3,
);
my %pictureProfile2010 = (
Name => 'PictureProfile',
# values 0-9: Seen for all cameras writing this tag: matches CreativeStyle and/or SceneMode settings.
# 10 and higher: Seen for ILCE-7S/7M2 and newer, having a PictureProfile setting, also some DSC/HDR models.
# Although intended for video, when set these profiles are also applied to (JPG) still images.
PrintConv => {
0 => 'Standard/Neutral - Gamma Still (PP2)', # CreativeStyle = Standard or Neutral
1 => 'Portrait',
3 => 'Night View/Portrait',
4 => 'B&W/Sepia',
5 => 'Clear',
6 => 'Deep',
7 => 'Light',
8 => 'Vivid', # SceneMode or CreativeStyle = Vivid, Autumn, Sunset or Landscape
9 => 'Real',
10 => 'Gamma Movie (PP1)',
22 => 'Gamma ITU709 (PP3)',
23 => 'ColorTone ITU709 (PP4)', # seen for HDR-CX130E
24 => 'Gamma Cine1 (PP5)',
25 => 'Gamma Cine2 (PP6)',
26 => 'Gamma Cine3',
27 => 'Gamma Cine4',
28 => 'Gamma S-Log2 (PP7)',
29 => 'Gamma ITU709(800%)',
},
);
%Image::ExifTool::Sony::Tag2010a = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => 'Valid for NEX-5N.',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x04b0 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x1128 => { %releaseMode2010 },
0x112c => { %releaseMode2 },
0x1134 => { %selfTimer2010 },
0x1138 => { %flashMode2010 },
0x113e => { %gain2010 },
0x1140 => { %brightnessValue2010 },
0x1144 => { %dynamicRangeOptimizer2010 },
0x1148 => { %hdr2010 },
0x114c => { %exposureComp2010 },
0x115e => { %pictureProfile2010 },
0x115f => { %pictureProfile2010 },
0x1163 => { %pictureEffect2010 },
0x1170 => { %quality2010 },
0x1174 => { %meteringMode2010 },
0x1175 => { %exposureProgram2010 },
0x117c => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
#0x1a08 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1a0c => { Name => 'SonyImageHeight', Format => 'int16u' },
);
%Image::ExifTool::Sony::Tag2010b = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => 'Valid for SLT-A65/A77, NEX-7/VG20E.',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0000 => { %sequenceImageNumber }, #PH
0x0004 => { %sequenceFileNumber }, #PH
0x0008 => { %releaseMode2, Format => 'int32u' },
#0x0044 => { Name => 'SonyImageWidth3', Format => 'int16u' },
#0x0048 => { Name => 'SonyImageHeight3', Format => 'int16u' },
#0x0054 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x0058 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x0064 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x0068 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x00a8 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00ac => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00b8 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00bc => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00c8 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x00cc => { Name => 'SonyImageHeight', Format => 'int16u' },
0x01b6 => { %sonyDateTime2010, Groups => { 2 => 'Time' } },
#0x0204 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x0206 => { Name => 'SonyImageHeight', Format => 'int16u' },
0x0324 => { %dynamicRangeOptimizer2010 },
0x04b4 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x1128 => { %releaseMode2010 },
0x112c => { %releaseMode2 },
0x1134 => { %selfTimer2010 },
0x1138 => { %flashMode2010 },
0x113e => { %gain2010 },
0x1140 => { %brightnessValue2010 },
0x1144 => { %dynamicRangeOptimizer2010 },
0x1148 => { %hdr2010 },
0x114c => { %exposureComp2010 },
0x1162 => { %pictureProfile2010 },
0x1163 => { %pictureProfile2010 },
0x1167 => { %pictureEffect2010 },
0x1174 => { %quality2010 },
0x1178 => { %meteringMode2010 }, #1154
0x1179 => { %exposureProgram2010 },
0x1180 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x1218 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
#0x1a08 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1a0c => { Name => 'SonyImageHeight', Format => 'int16u' },
0x1a23 => { # only for NEX-7 with Firmware v1.02 and higher, but slightly different from Tag9405 ...
Name => 'DistortionCorrParams',
Format => 'int16s[16]',
},
);
%Image::ExifTool::Sony::Tag2010c = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => 'Valid for SLT-A37/A57 and NEX-F3.',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0000 => { %sequenceImageNumber }, #PH
0x0004 => { %sequenceFileNumber }, #PH
0x0008 => { %releaseMode2, Format => 'int32u' },
#0x0048 => { Name => 'SonyImageWidth3', Format => 'int16u' },
#0x004c => { Name => 'SonyImageHeight3', Format => 'int16u' },
#0x0058 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x005c => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x0068 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x006c => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x00c0 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00c4 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00d0 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00d4 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00e0 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x00e4 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x0134 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x0144 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x0154 => { Name => 'SonyImageHeight', Format => 'int16u' },
0x0200 => { Name => 'DigitalZoomRatio', ValueConv => '$val/16', ValueConvInv => '$val*16', Priority => 0 },
0x0210 => { %sonyDateTime2010, Groups => { 2 => 'Time' } },
0x0300 => { %dynamicRangeOptimizer2010 },
0x0490 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x1104 => { %releaseMode2010 },
0x1108 => { %releaseMode2 },
0x1110 => { %selfTimer2010 },
0x1114 => { %flashMode2010 },
0x111a => { %gain2010 },
0x111c => { %brightnessValue2010 },
0x1120 => { %dynamicRangeOptimizer2010 },
0x1124 => { %hdr2010 },
0x1128 => { %exposureComp2010 },
0x113e => { %pictureProfile2010 },
0x113f => { %pictureProfile2010 },
0x1143 => { %pictureEffect2010 },
0x1150 => { %quality2010 },
0x1154 => { %meteringMode2010 },
0x1155 => { %exposureProgram2010 },
0x115c => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x11f4 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
#0x1a08 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1a0c => { Name => 'SonyImageHeight', Format => 'int16u' },
);
%Image::ExifTool::Sony::Tag2010d = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for DSC-HX10V/HX20V/HX200V/TX66/TX200V/TX300V/WX50/WX100/WX150, but
not valid for panorama images.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0000 => { %sequenceImageNumber }, #PH
0x0004 => { %sequenceFileNumber }, #PH
0x0008 => { %releaseMode2, Format => 'int32u' },
#0x0048 => { Name => 'SonyImageWidth3', Format => 'int16u' },
#0x004c => { Name => 'SonyImageHeight3', Format => 'int16u' },
#0x0058 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x005c => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x0068 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x006c => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x00c0 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00c4 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00d0 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00d4 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00e0 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x00e4 => { Name => 'SonyImageHeight', Format => 'int16u' },
0x01fe => { %sonyDateTime2010, Groups => { 2 => 'Time' } },
0x037c => { %dynamicRangeOptimizer2010 },
0x050c => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x1180 => { %releaseMode2010 },
0x1184 => { %releaseMode2 },
0x118c => { %selfTimer2010 },
0x1190 => { %flashMode2010 },
0x1196 => { %gain2010 },
0x1198 => { %brightnessValue2010 },
0x119c => { %dynamicRangeOptimizer2010 },
0x11a0 => { %hdr2010 },
0x11ba => { %pictureProfile2010 },
0x11bb => { %pictureProfile2010 },
0x11bf => { %pictureEffect2010 },
0x11d0 => { %meteringMode2010 },
# 0x11d1 - not valid for HX20V panorama images - PH
0x11d1 => { %exposureProgram2010 },
0x11d8 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x1270 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
);
%Image::ExifTool::Sony::Tag2010e = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for SLT-A58/A99, ILCE-3000/3500, NEX-3N/5R/5T/6/VG30E/VG900, DSC-RX100,
DSC-RX1/RX1R. Also valid for DSC-HX300/HX50V/TX30/WX60/WX200/WX300, but not
for panorama images.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0000 => { %sequenceImageNumber }, #PH
0x0004 => { %sequenceFileNumber }, #PH
0x0008 => { %releaseMode2, Format => 'int32u' },
#0x0048 => { Name => 'SonyImageWidth3', Format => 'int16u' },
#0x004c => { Name => 'SonyImageHeight3', Format => 'int16u' },
#0x0058 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x005c => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x0068 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x006c => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x00c0 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00c4 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00d0 => { Name => 'SonyImageWidth2', Format => 'int16u' },
#0x00d4 => { Name => 'SonyImageHeight2', Format => 'int16u' },
#0x00e0 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x00e4 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x01fa => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x0200 => { Name => 'SonyImageWidth', Format => 'int16u' },
0x021c => { Name => 'DigitalZoomRatio', ValueConv => '$val/16', ValueConvInv => '$val*16', Priority => 0 },
0x022c => { %sonyDateTime2010, Groups => { 2 => 'Time' } },
0x0328 => { %dynamicRangeOptimizer2010 },
0x04b8 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x115c => { %releaseMode2010 },
0x1160 => { %releaseMode2 },
0x1168 => { %selfTimer2010 },
0x116c => { %flashMode2010 },
0x1172 => { %gain2010 },
0x1174 => { %brightnessValue2010 },
0x1178 => { %dynamicRangeOptimizer2010 },
0x117c => { %hdr2010 },
0x1180 => { %exposureComp2010 },
0x1196 => { %pictureProfile2010 },
0x1197 => { %pictureProfile2010 },
0x119b => { %pictureEffect2010 },
0x11a8 => { %quality2010 },
0x11ac => { %meteringMode2010 },
0x11ad => { %exposureProgram2010 },
0x11b4 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x1254 => {
Condition => '$$self{Model} =~ /^(SLT-(A99|A99V)|NEX-(5R|5T|6|VG900|VG30E)|DSC-RX100|Stellar|HV)\b/',
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x1258 => {
Condition => '$$self{Model} =~ /^(DSC-(RX1|RX1R))\b/',
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x1278 => {
Condition => '$$self{Model} =~ /^(SLT-A58|ILCE-(3000|3500)|NEX-3N|DSC-(HX300|HX50V|WX60|WX80|WX200|WX300|TX30))\b/',
Name => 'FocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x127a => {
Condition => '$$self{Model} =~ /^(SLT-A58|ILCE-(3000|3500)|NEX-3N|DSC-(HX300|HX50V|WX60|WX80|WX200|WX300|TX30))\b/',
Name => 'MinFocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x127c => { # may give 0 for fixed focal length lenses
Condition => '$$self{Model} =~ /^(SLT-A58|ILCE-(3000|3500)|NEX-3N|DSC-(HX300|HX50V|WX60|WX80|WX200|WX300|TX30))\b/',
Name => 'MaxFocalLength',
Format => 'int16u',
RawConv => '$val || undef',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x1280 => {
Condition => '$$self{Model} =~ /^(SLT-A58|ILCE-(3000|3500)|NEX-3N|DSC-(HX300|HX50V|WX60|WX80|WX200|WX300|TX30))\b/',
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x1870 => {
Name => 'DistortionCorrParams',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
Format => 'int16s[16]',
},
# 0x1890 - same as 0x1892, but has value 3 for 50mm F1.4 ZA, DT 18-135mm and for 70-400mm G II: meaning ??
0x1891 => {
Name => 'LensFormat',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x1892 => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^(DSC-|Stellar)/ ? undef : $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x1893 => { #JR
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x1896 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Priority => 0, #PH (just to be safe)
Format => 'int16u', #PH
SeparateTable => 1,
ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
PrintConv => \%sonyLensTypes,
},
0x1898 => {
Name => 'DistortionCorrParamsPresent',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
0x1899 => {
Name => 'DistortionCorrParamsNumber',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 11 => '11 (APS-C)', 16 => '16 (Full-frame)'},
},
#0x1914 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1918 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x192e => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1930 => { Name => 'SonyImageHeight', Format => 'int16u' },
);
%Image::ExifTool::Sony::Tag2010f = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => 'Valid for DSC-RX100M2, DSC-QX10/QX100.',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0004 => { %releaseMode2, Format => 'int32u' }, # NOT at offset 0x08 !
#0x002e => { Name => 'SonyImageWidth3', Format => 'int16u' },
#0x0042 => { Name => 'SonyImageWidth3', Format => 'int16u' },
0x0050 => { %dynamicRangeOptimizer2010 },
0x01e0 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x1014 => { %releaseMode2010 },
0x1018 => { %releaseMode2 },
0x1020 => { %selfTimer2010 },
0x1024 => { %flashMode2010 },
0x102a => { %gain2010 },
0x102c => { %brightnessValue2010 },
0x1030 => { %dynamicRangeOptimizer2010 },
0x1034 => { %hdr2010 },
0x1038 => { %exposureComp2010 },
0x104e => { %pictureProfile2010 },
0x104f => { %pictureProfile2010 },
0x1053 => { %pictureEffect2010 },
0x1060 => { %quality2010 },
0x1064 => { %meteringMode2010 },
0x1065 => { %exposureProgram2010 },
0x106c => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
#0x1096 => { Name => 'SonyImageWidth3', Format => 'int16u' },
#0x10aa => { Name => 'SonyImageWidth3', Format => 'int16u' },
0x1134 => {
Name => 'FocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x1136 => {
Name => 'MinFocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x1138 => {
Name => 'MaxFocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x113c => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
#0x1914 => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1918 => { Name => 'SonyImageHeight', Format => 'int16u' },
#0x192e => { Name => 'SonyImageWidth', Format => 'int16u' },
#0x1930 => { Name => 'SonyImageHeight', Format => 'int16u' },
);
%Image::ExifTool::Sony::Tag2010g = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for DSC-HX60V/HX350/HX400V/QX30/RX10/RX100M3/WX220/WX350,
ILCE-7/7R/7S/7M2/5000/5100/6000/QX1, ILCA-68/77M2.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0004 => { %releaseMode2, Format => 'int32u' }, # NOT at offset 0x08 !
0x0050 => { %dynamicRangeOptimizer2010 },
0x020c => { %releaseMode2010 },
0x0210 => { %releaseMode2 },
0x0218 => { %selfTimer2010 },
0x021c => { %flashMode2010 },
0x0222 => { %gain2010 },
0x0224 => { %brightnessValue2010 },
0x0228 => { %dynamicRangeOptimizer2010 },
0x022c => { %hdr2010 },
0x0230 => { %exposureComp2010 },
0x0246 => { %pictureProfile2010 },
0x0247 => { %pictureProfile2010 },
0x024b => { %pictureEffect2010 },
0x0258 => { %quality2010 },
0x025c => { %meteringMode2010 },
0x025d => { %exposureProgram2010 },
0x0264 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x032c => {
Name => 'FocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x032e => {
Name => 'MinFocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x0330 => { # may give 0 for fixed focal length lenses
Name => 'MaxFocalLength',
Format => 'int16u',
RawConv => '$val || undef',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x0344 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x0388 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x189c => {
Name => 'DistortionCorrParams',
Condition => '$$self{Model} !~ /^DSC-/',
Format => 'int16s[16]',
},
# 0x18bc - same as 0x18be, but has value 3 for 50mm F1.4 ZA, DT 18-135mm and for 70-400mm G II: meaning ??
0x18bd => {
Name => 'LensFormat',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x18be => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^DSC-/ ? undef : $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x18bf => { #JR
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x18c2 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Priority => 0, #PH (just to be safe)
Format => 'int16u', #PH
SeparateTable => 1,
ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
PrintConv => \%sonyLensTypes,
},
0x18c4 => {
Name => 'DistortionCorrParamsPresent',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
0x18c5 => {
Name => 'DistortionCorrParamsNumber',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 11 => '11 (APS-C)', 16 => '16 (Full-frame)'},
},
# 0x1940 => { Name => 'SonyImageWidth', Format => 'int16u' },
# 0x1944 => { Name => 'SonyImageHeight', Format => 'int16u' },
# 0x195a => { Name => 'SonyImageWidth', Format => 'int16u' },
# 0x195c => { Name => 'SonyImageHeight', Format => 'int16u' },
);
%Image::ExifTool::Sony::Tag2010h = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for DSC-HX90V/RX0/RX1RM2/RX10M2/RX10M3/RX100M4/RX100M5/WX500,
ILCE-6300/6500/7RM2/7SM2, ILCA-99M2.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0004 => { %releaseMode2, Format => 'int32u' },
0x0050 => { %dynamicRangeOptimizer2010 },
0x020c => { %releaseMode2010 },
0x0210 => { %releaseMode2 },
0x0218 => { %selfTimerB2010 },
0x021c => { %flashMode2010 },
0x0222 => { %gain2010 },
0x0224 => { %brightnessValue2010 },
0x0228 => { %dynamicRangeOptimizer2010 },
0x022c => { %hdr2010 },
0x0230 => { %exposureComp2010 },
0x0246 => { %pictureProfile2010 },
0x0247 => { %pictureProfile2010 },
0x024b => { %pictureEffect2010 },
0x0258 => { %quality2010 },
0x025c => { %meteringMode2010 },
0x025d => { %exposureProgram2010 },
0x0264 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x032c => {
Name => 'FocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x032e => {
Name => 'MinFocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x0330 => { # may give 0 for fixed focal length lenses
Name => 'MaxFocalLength',
Format => 'int16u',
RawConv => '$val || undef',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x0346 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x0388 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Condition => '$$self{Model} !~ /^(ILCA-99M2|ILCE-6500|DSC-(RX0|RX100M5))/',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x0398 => {
Name => 'MeterInfo',
Format => 'int32u[486]',
Condition => '$$self{Model} =~ /^(ILCA-99M2|ILCE-6500|DSC-(RX0|RX100M5))/',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo' },
},
0x18cc => {
Name => 'DistortionCorrParams',
Condition => '$$self{Model} !~ /^DSC-/',
Format => 'int16s[16]',
},
# 0x18ec - same as 0x18ee, but has value 3 for LensType>=65, except SAL300F28G2
0x18ed => {
Name => 'LensFormat',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x18ee => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^DSC-/ ? undef : $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x18ef => { #JR
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x18f2 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Priority => 0, #PH (just to be safe)
Format => 'int16u', #PH
SeparateTable => 1,
ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
PrintConv => \%sonyLensTypes,
},
0x18f4 => {
Name => 'DistortionCorrParamsPresent',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
0x18f5 => {
Name => 'DistortionCorrParamsNumber',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 11 => '11 (APS-C)', 16 => '16 (Full-frame)'},
},
# 0x1970 => { Name => 'SonyImageWidth', Format => 'int16u' },
# 0x1974 => { Name => 'SonyImageHeight', Format => 'int16u' },
# 0x198a => { Name => 'SonyImageWidth', Format => 'int16u' },
# 0x198c => { Name => 'SonyImageHeight', Format => 'int16u' },
);
%Image::ExifTool::Sony::Tag2010i = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for ILCE-7RM3/9, DSC-RX10M4.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0004 => { %releaseMode2, Format => 'int32u' },
0x004e => { %dynamicRangeOptimizer2010 },
0x0204 => { %releaseMode2010 },
0x0208 => { %releaseMode2 },
0x0210 => { %selfTimerB2010 },
# 0x0211 => { %flashMode2010 }, #nc
0x0217 => { %gain2010 },
0x0219 => { %brightnessValue2010 },
0x021b => { %dynamicRangeOptimizer2010 },
0x021f => { %hdr2010 },
0x0223 => { %exposureComp2010 },
0x0237 => { %pictureProfile2010 },
0x0238 => { %pictureProfile2010 },
0x023c => { %pictureEffect2010 },
0x0247 => { %quality2010 },
0x024b => { %meteringMode2010 },
0x024c => { %exposureProgram2010 },
0x0252 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
0x030a => {
Name => 'FocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x030c => {
Name => 'MinFocalLength',
Format => 'int16u',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x030e => { # may give 0 for fixed focal length lenses
Name => 'MaxFocalLength',
Format => 'int16u',
RawConv => '$val || undef',
ValueConv => '$val / 10',
ValueConvInv => '$val * 10',
PrintConv => 'sprintf("%.1f mm",$val)',
PrintConvInv => '$val =~ s/ ?mm//; $val',
},
0x0320 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x036d => { # different format from all previous cameras: now each triple is int16u-int32u-int32u
Name => 'MeterInfo',
Format => 'undef[1620]',
Unknown => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Sony::MeterInfo9' },
},
0x17d0 => {
Name => 'DistortionCorrParams',
Condition => '$$self{Model} !~ /^DSC-/',
Format => 'int16s[16]',
},
# 0x17f0 - same as 0x17f2, but has value 3 for LensType>=65, except SAL300F28G2
0x17f1 => {
Name => 'LensFormat',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x17f2 => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^DSC-/ ? undef : $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x17f3 => { #JR
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x17f6 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Priority => 0, #PH (just to be safe)
Format => 'int16u', #PH
SeparateTable => 1,
ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
PrintConv => \%sonyLensTypes,
},
0x17f8 => {
Name => 'DistortionCorrParamsPresent',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
0x17f9 => {
Name => 'DistortionCorrParamsNumber',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 11 => '11 (APS-C)', 16 => '16 (Full-frame)'},
},
);
%Image::ExifTool::Sony::Tag202a = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FORMAT => 'int8u',
DATAMEMBER => [ 0x01 ],
#
# first seen for ILCE-6300
# Possibly the Locations of the FocalPlaneAFPointsUsed are indicated here.
# 66 bytes, structure appears to be as follows:
# 0x00 - 1 for ILCE-6300/6500, ILCA-99M2
# 0x01 - int8u: 0 to 15 - nr of locations to follow
# 0x02 and 0x03 - (128 2) or 640 - (max.) width (X) of (LCD screen) area of following locations
# 0x04 and 0x05 - (172 1) or 428 - (max.) height (Y) of (LCD screen) area of following locations
# origin of X-Y coordinates appears to be top-left, i.e. X to the right, Y pointing down.
# 0x06 0x07 0x08 0x09 - 2x int16u : X and Y coordinates of Location 1
# etc.
#
0x01 => {
Name => 'FocalPlaneAFPointsUsed',
DataMember => 'Locations',
Format => 'int8u',
RawConv => '$$self{Locations} = $val',
},
0x02 => {
Name => 'FocalPlaneAFPointArea',
Condition => '$$self{Locations} >= 1', # only output this if at least 1 Location follows ?
Format => 'int16u[2]',
},
0x06 => { Name => 'FocalPlaneAFPointLocation1', Condition => '$$self{Locations} >= 1', Format => 'int16u[2]' },
0x0a => { Name => 'FocalPlaneAFPointLocation2', Condition => '$$self{Locations} >= 2', Format => 'int16u[2]' },
0x0e => { Name => 'FocalPlaneAFPointLocation3', Condition => '$$self{Locations} >= 3', Format => 'int16u[2]' },
0x12 => { Name => 'FocalPlaneAFPointLocation4', Condition => '$$self{Locations} >= 4', Format => 'int16u[2]' },
0x16 => { Name => 'FocalPlaneAFPointLocation5', Condition => '$$self{Locations} >= 5', Format => 'int16u[2]' },
0x1a => { Name => 'FocalPlaneAFPointLocation6', Condition => '$$self{Locations} >= 6', Format => 'int16u[2]' },
0x1e => { Name => 'FocalPlaneAFPointLocation7', Condition => '$$self{Locations} >= 7', Format => 'int16u[2]' },
0x22 => { Name => 'FocalPlaneAFPointLocation8', Condition => '$$self{Locations} >= 8', Format => 'int16u[2]' },
0x26 => { Name => 'FocalPlaneAFPointLocation9', Condition => '$$self{Locations} >= 9', Format => 'int16u[2]' },
0x2a => { Name => 'FocalPlaneAFPointLocation10', Condition => '$$self{Locations} >= 10', Format => 'int16u[2]' },
0x2e => { Name => 'FocalPlaneAFPointLocation11', Condition => '$$self{Locations} >= 11', Format => 'int16u[2]' },
0x32 => { Name => 'FocalPlaneAFPointLocation12', Condition => '$$self{Locations} >= 12', Format => 'int16u[2]' },
0x36 => { Name => 'FocalPlaneAFPointLocation13', Condition => '$$self{Locations} >= 13', Format => 'int16u[2]' },
0x3a => { Name => 'FocalPlaneAFPointLocation14', Condition => '$$self{Locations} >= 14', Format => 'int16u[2]' },
0x3e => { Name => 'FocalPlaneAFPointLocation15', Condition => '$$self{Locations} >= 15', Format => 'int16u[2]' },
);
# possible metering information (ref JR)
%Image::ExifTool::Sony::MeterInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => q{
Information possibly related to metering. Extracted only if the Unknown
option is used.
},
#
# 162 'triplets' of 3 int32u numbers: (k,n1,n2)
# These appear to relate to two sets of brightness distribution over the image area:
# Set 1: 7 rows of 9
# Set 2: 9 rows of 11
#
# Exact meaning presently unknown, however:
# n1 ranges from 0 (black) - appr. 1300 (bright white)
# n2 ranges from 0 (black) - appr. 142000 (bright white), i.e. roughly factor 100 higher
# Many panorama images: all 0
# Flash images: n2 = n1
# k maybe some kind of 'gain' or multiplication factor ?
# k distribution over the image as function of Aspect-Ratio is as follows:
#
# 3:2 image 16:9 image 4:3 image
# set 1:
#
# 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 9 12 12 12 12 12 12 12 9
# 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 9 12 12 12 12 12 12 12 9
# 16 16 16 16 16 16 16 16 16 12 12 12 15 18 15 12 12 12 12 16 16 16 16 16 16 16 12
# 16 16 16 16 16 16 16 16 16 12 12 12 15 18 15 12 12 12 12 16 16 16 16 16 16 16 12
# 16 16 16 16 16 16 16 16 16 12 12 12 15 18 15 12 12 12 12 16 16 16 16 16 16 16 12
# 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 9 12 12 12 12 12 12 12 9
# 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 9 12 12 12 12 12 12 12 9
#
# set 2:
#
# 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 12 9 9 12 12 12 12 12 12 12 9 9
# 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 12 9 9 12 12 12 12 12 12 12 9 9
# 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 12 9 9 12 12 12 12 12 12 12 9 9
# 16 16 16 16 16 16 16 16 16 16 16 12 12 12 12 15 18 15 12 12 12 12 12 12 16 16 16 16 16 16 16 12 12
# 16 16 16 16 16 16 16 16 16 16 16 12 12 12 12 15 18 15 12 12 12 12 12 12 16 16 16 16 16 16 16 12 12
# 16 16 16 16 16 16 16 16 16 16 16 12 12 12 12 15 18 15 12 12 12 12 12 12 16 16 16 16 16 16 16 12 12
# 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 12 9 9 12 12 12 12 12 12 12 9 9
# 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 15 18 15 12 12 12 12 9 9 12 12 12 12 12 12 12 9 9
# 12 12 12 12 12 12 12 12 12 12 12 8 8 8 8 10 12 10 8 8 8 8 9 9 12 12 12 12 12 12 12 9 9
#
# Usually, in the center, the numbers of set 1 row 2-6 match with set 2 row 3-7, except for first and last 2 columns.
#
0x0000 => { Name => 'MeterInfo1Row1', %meterInfo1 },
0x006c => { Name => 'MeterInfo1Row2', %meterInfo1 },
0x00d8 => { Name => 'MeterInfo1Row3', %meterInfo1 },
0x0144 => { Name => 'MeterInfo1Row4', %meterInfo1 },
0x01b0 => { Name => 'MeterInfo1Row5', %meterInfo1 },
0x021c => { Name => 'MeterInfo1Row6', %meterInfo1 },
0x0288 => { Name => 'MeterInfo1Row7', %meterInfo1 },
0x02f4 => { Name => 'MeterInfo2Row1', %meterInfo2 },
0x0378 => { Name => 'MeterInfo2Row2', %meterInfo2 },
0x03fc => { Name => 'MeterInfo2Row3', %meterInfo2 },
0x0480 => { Name => 'MeterInfo2Row4', %meterInfo2 },
0x0504 => { Name => 'MeterInfo2Row5', %meterInfo2 },
0x0588 => { Name => 'MeterInfo2Row6', %meterInfo2 },
0x060c => { Name => 'MeterInfo2Row7', %meterInfo2 },
0x0690 => { Name => 'MeterInfo2Row8', %meterInfo2 },
0x0714 => { Name => 'MeterInfo2Row9', %meterInfo2 },
);
# possible metering information (ref JR)
%Image::ExifTool::Sony::MeterInfo9 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => q{
Information possibly related to metering. Extracted only if the Unknown
option is used.
},
# new format for ILCE-9:
# 162 'triplets' of (int16u int32u int32u) numbers: (k,n1,n2)
# Set 1: 7 rows of 9
# Set 2: 9 rows of 11
0x0000 => { Name => 'MeterInfo1Row1', %meterInfo1b },
0x005a => { Name => 'MeterInfo1Row2', %meterInfo1b },
0x00b4 => { Name => 'MeterInfo1Row3', %meterInfo1b },
0x010e => { Name => 'MeterInfo1Row4', %meterInfo1b },
0x0168 => { Name => 'MeterInfo1Row5', %meterInfo1b },
0x01c2 => { Name => 'MeterInfo1Row6', %meterInfo1b },
0x021c => { Name => 'MeterInfo1Row7', %meterInfo1b },
0x0276 => { Name => 'MeterInfo2Row1', %meterInfo2b },
0x02e4 => { Name => 'MeterInfo2Row2', %meterInfo2b },
0x0352 => { Name => 'MeterInfo2Row3', %meterInfo2b },
0x03c0 => { Name => 'MeterInfo2Row4', %meterInfo2b },
0x042e => { Name => 'MeterInfo2Row5', %meterInfo2b },
0x049c => { Name => 'MeterInfo2Row6', %meterInfo2b },
0x050a => { Name => 'MeterInfo2Row7', %meterInfo2b },
0x0578 => { Name => 'MeterInfo2Row8', %meterInfo2b },
0x05e6 => { Name => 'MeterInfo2Row9', %meterInfo2b },
);
%Image::ExifTool::Sony::Tag900b = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
# 0x0000 - always 174 (e)
0x0002 => {
Name => 'FacesDetected',
PrintConv => {
0 => '0',
98 => '1',
57 => '2',
93 => '3',
77 => '4',
33 => '5',
168 => '6',
241 => '7',
115 => '8',
},
},
# 0x00bc - always 98 (221 (e))
0x00bd => {
Condition => '$$self{Model} !~ /^DSLR-(A450|A500|A550)$/', # always 98 for A450/A500/A550: exclude
Name => 'FaceDetection',
PrintConv => {
0 => 'Off',
98 => 'On',
},
},
);
%Image::ExifTool::Sony::Tag9050a = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for SLT, ILCA, NEX and ILCE models, except ILCE-6300/6500/7RM2/7SM2,
ILCA-99M2.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
DATAMEMBER => [ 0x0105 ],
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => q{
Data for tags 0x9050, 0x94xx and 0x2010 is encrypted by a simple
substitution cipher, but the deciphered values are listed below.
},
0x0000 => {
Condition => '$$self{Model} !~ /^(NEX-|Lunar|ILCE-)/',
Name => 'SonyMaxAperture', # (at current focal length)
# seen values from 17 - 48
ValueConv => '2 ** (($val/8 - 1.06) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x0001 => {
Condition => '$$self{Model} !~ /^(NEX-|Lunar|ILCE-)/',
Name => 'SonyMinAperture', # (at current focal length)
# seen values from 80 - 95
ValueConv => '2 ** (($val/8 - 1.06) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
# 0x0002 and 0x0004 (int16u) for SLT:
# appears to be difference between used FNumber and MaxAperture, 256 being +1 APEX or stop
# however, not always valid e.g. bracketing, Shutter-prio e.a.
# difference between 0x0002 and 0x0004 mostly 0.0, 0.1 or 0.2 stops.
0x0031 => { #JR
Name => 'FlashStatus',
RawConv => '$$self{FlashFired} = $val',
PrintConv => {
0 => 'No Flash present',
2 => 'Flash Inhibited', # seen for ILCE-7/7R continuous, panorama, HDR mode
64 => 'Built-in Flash present',
65 => 'Built-in Flash Fired',
66 => 'Built-in Flash Inhibited', # seen for panorama, HDR, burst mode
128 => 'External Flash present', # seen for NEX-5N/5T
129 => 'External Flash Fired', # seen for SLT-A99V, ILCE-7R, NEX-5N/5R
},
},
0x0032 => { #13
Name => 'ImageCount',
# this seems to be valid for the A7R,A37,A57,A65,A77,A99,A99V and possibly the
# NEX-5N/7. For the A99V it is definitely more than 16 bits, but it wraps at
# 65536 for the A7R.
Format => 'int32u',
Notes => q{
total number of image exposures made by the camera, modulo 65536 for some
models
},
RawConv => '$val & 0x00ffffff',
},
0x003a => { # appr. same value as Exif ExposureTime, but longer in HDR-modes
Name => 'SonyExposureTime',
Format => 'int16u',
ValueConv => '$val ? 2 ** (16 - $val/256) : 0',
ValueConvInv => '$val ? int((16 - log($val) / log(2)) * 256 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x003c => {
Name => 'SonyFNumber',
Format => 'int16u',
ValueConv => '2 ** (($val/256 - 16) / 2)',
ValueConvInv => '(log($val)*2/log(2)+16)*256',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x003f => {
Name => 'ReleaseMode2',
%releaseMode2,
},
# 0x004c - 0x005b: A-Mount: 16 values, only non-zero data for lenses giving "A-mount (3)" in 0x0104 below.
# e.g for SAL70400G2: 9 5 5 64 69 74 79 84 89 94 98 104 255 105 89 80
# where 9 means 9 focal lengths: 64 ... 104,
# corresponding to 70-400mm via FocalLength = 4.375*2**($val/16)
# 0x004c, 0x0051: E-Mount: ImageCount and dateTime
0x004c => { # only ILCE-7/7R/7S/7M2/5000/5100/6000/QX1 - but appears not valid when flash is used ...
Name => 'ImageCount2',
Condition => '($$self{Model} =~ /^(ILCE-(7(R|S|M2)?|[56]000|5100|QX1))\b/) and (($$self{FlashFired} & 0x01) != 1)',
Format => 'int32u',
RawConv => '$val & 0x00ffffff',
},
0x0051 => { # only ILCE-7/7R/7S/7M2/5000/5100/6000/QX1, but hours usually different from SonyDateTime - UTC?
# appears not valid (all '0') when flash is used, panorama, hdr modes ...
Name => 'SonyDateTime2',
Condition => '$$self{Model} =~ /^(ILCE-(7(R|S|M2)?|[56]000|5100|QX1))\b/',
Groups => { 2 => 'Time' },
Shift => 'Time',
Format => 'undef[6]',
ValueConv => q{
my @v = unpack('C*', $val);
return undef unless $v[0] > 0;
return sprintf("20%.2d:%.2d:%.2d %.2d:%.2d:%.2d", @v)
},
ValueConvInv => q{
my @v = ($val =~ /\d+/g);
return undef unless @v == 6 and ($v[0]-=2000) >= 0;
return pack('C*', @v);
},
PrintConv => '$self->ConvertDateTime($val)',
PrintConvInv => '$self->InverseDateTime($val,0)',
},
0x0067 => {
Name => 'ReleaseMode2',
Condition => '$$self{Model} !~ /^(SLT-A(65|77)V?|Lunar|NEX-(5N|7|VG20E))/',
%releaseMode2,
},
0x007c => { #JR valid for ILCE and most NEX
Name => 'InternalSerialNumber', #(NC)
Condition => '$$self{Model} !~ /^(Lunar|NEX-(5N|7|VG20E)|SLT-|HV|ILCA-)/',
Format => 'int8u[4]',
PrintConv => 'unpack "H*", pack "C*", split " ", $val',
},
0x00f0 => { #JR valid for SLT/ILCA models
Name => 'InternalSerialNumber', #(NC)
Condition => '$$self{Model} =~ /^(SLT-|HV|ILCA-)/',
Format => 'int8u[5]',
PrintConv => 'unpack "H*", pack "C*", split " ", $val',
PrintConvInv => 'join " ", unpack "C*", pack "H*", $val',
},
# 0x0104 - same as 0x0105, but has value 3 for 50mm F1.4 ZA, DT 18-135mm and for 70-400mm G II: meaning ??
0x0105 => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x0106 => {
Name => 'LensFormat',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x0107 => {
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x0109 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Priority => 0, #PH (just to be safe)
Format => 'int16u', #PH
Notes => 'SLT models, and NEX with A-mount lenses',
SeparateTable => 1,
# has a value of 0 for E-mount lenses (values 0x80xx)
ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
PrintConv => \%sonyLensTypes,
},
0x010b => {
Name => 'DistortionCorrParamsPresent',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
# 0x0115 and 0x0116, or 0x0116 and 0x0117:
# give the same info as the first and last bytes of LensSpec,
# but also for older Sony and Minolta lenses where all LensSpec bytes are 0.
0x0115 => {
Name => 'LensSpecFeatures',
Condition => '$$self{Model} =~ /^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/',
Format => 'undef[2]',
ValueConv => 'join " ", unpack "H2H2", $val',
ValueConvInv => sub {
my @a = split(" ", shift);
return @a == 2 ? pack 'CC', hex($a[0]), hex($a[1]) : undef;
},
PrintConv => \&PrintLensSpec,
PrintConvInv => 'Image::ExifTool::Sony::PrintInvLensSpec($val, $self, 1)',
},
0x0116 => {
Name => 'LensSpecFeatures',
Condition => '$$self{Model} !~ /^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/',
Format => 'undef[2]',
ValueConv => 'join " ", unpack "H2H2", $val',
ValueConvInv => sub {
my @a = split(" ", shift);
return @a == 2 ? pack 'CC', hex($a[0]), hex($a[1]) : undef;
},
PrintConv => \&PrintLensSpec,
PrintConvInv => 'Image::ExifTool::Sony::PrintInvLensSpec($val, $self, 1)',
},
# 0x0122 => {Name=>'LensType',Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/'},
# 0x0123 => {Name=>'LensType',Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(58|99V?)|HV|ILCA-(68|77M2)|NEX-(3N|5R|5T|6|VG30E|VG900)|ILCE-(3000|3500|5000|5100|6000|7|7R|7S|7M2|QX1))/'},
# 0x012d => {Name=>'LensType',Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/'},
# 0x012e => {Name=>'LensType',Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(58|99V?)|HV|ILCA-(68|77M2)|NEX-(3N|5R|5T|6|VG30E|VG900)|ILCE-(3000|3500|5000|5100|6000|7|7R|7S|7M2|QX1))/'},
# ImageCount3 = ImageCount for SLT-A58, ILCE, ILCA, NEX-3N
# ImageCount-1 for SLT-A37,A57,A65,A77,A99, NEX-F3,5N,5R,5T,6,7, sometimes 0
# ImageCount-2 for NEX-VG, and often 0; "ImageCount-2" also seen on a few A99V images
# The offset for ImageCount3 changes with firmware version for the ILCE-7/7R/7S/7M2, so don't decode it for now:
# ILCE-7M2/7S: 0x01a0 (firmware 1.0x, 1.1x), 0x01b6 (firmware 1.20, 1.21, 2.00)
# ILCE-7/7R: 0x01aa (firmware 1.0x, 1.1x), 0x01c0 (firmware 1.20, 1.21, 2.00)
# Similarly for ILCE-6000 v2.00: 0x01aa --> 0x01c0: removed from 0x01aa
0x01a0 => {
Name => 'ImageCount3',
Format => 'int32u',
RawConv => '$val == 0 ? undef : $val',
Condition => '$$self{Model} =~ /^(ILCE-(5100|QX1)|ILCA-(68|77M2))/',
},
0x01aa => {
Name => 'ImageCount3',
Format => 'int32u',
RawConv => '$val == 0 ? undef : $val',
Condition => '$$self{Model} =~ /^(SLT-A(58|99V?)|HV|NEX-(3N|5R|5T|6|VG900|VG30E)|ILCE-([35]000|3500))\b/',
},
0x01bd => {
Name => 'ImageCount3',
Format => 'int32u',
RawConv => '$val == 0 ? undef : $val',
Condition => '$$self{Model} =~ /^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/',
},
# 0x0222 => {Name=>'LensType2',Format=>'int16u',Condition =>'$$self{Model}=~/^(ILCE-(5100|7S|7M2|QX1))/'},
# 0x0224 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(ILCE-(5100|7S|7M2|QX1)|ILCA-(68|77M2))/'},
# 0x0229 => {Name=>'LensType2',Format=>'int16u',Condition =>'$$self{Model}=~/^(NEX-(5R|5T|6|VG30E|VG900))/'},
# 0x022b => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(NEX-(5R|5T|6|VG30E|VG900))/'},
# 0x022c => {Name=>'LensType2',Format=>'int16u',Condition =>'$$self{Model}=~/^(ILCE-(3000|3500|5000|6000|7|7R)|NEX-3N)\b/'},
# 0x022e => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(ILCE-(3000|3500|5000|6000|7|7R)|NEX-3N|SLT-A(58|99V?)|HV)\b/'},
# 0x0231 => {Name=>'LensSpecFeatures',Format=>'undef[2]',Condition=>'$$self{Model}=~/^(ILCE-(7S|7M2|5100|QX1)|ILCA-(68|77M2))/'},
# 0x0238 => {Name=>'LensSpecFeatures',Format=>'undef[2]',Condition=>'$$self{Model}=~/^(NEX-(5R|5T|6|VG30E|VG900))/'},
# 0x023b => {Name=>'LensSpecFeatures',Format=>'undef[2]',Condition=>'$$self{Model}=~/^(SLT-A(58|99V?)|HV|ILCE-(3000|3500|5000|6000|7|7R)|NEX-3N)\b/'},
# 0x023c => {Name=>'LensType2',Format=>'int16u',Condition =>'$$self{Model}=~/^(Lunar|NEX-(F3|5N|7|VG20E))/'},
# 0x023e => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E)|ILCE-(5100|7S|7M2|QX1)|ILCA-(68|77M2))/'},
# 0x0245 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(NEX-(5R|5T|6|VG30E|VG900))/'},
# 0x0248 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(58|99V?)|HV|ILCE-(3000|3500|5000|6000|7|7R)|NEX-3N)\b/'},
# 0x0249 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(ILCE-(5100|7S|7M2|QX1)|ILCA-(68|77M2))/'},
# 0x024a => {Name=>'LensSpecFeatures',Format=>'undef[2]',Condition=>'$$self{Model}=~/^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/'},
# 0x0250 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(NEX-(5R|5T|6|VG30E|VG900))/'},
# 0x0253 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(58|99V?)|HV|ILCE-(3000|3500|5000|6000|7|7R|7S|7M2)|NEX-3N)\b/'},
# 0x0257 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/'},
# 0x0262 => {Name=>'LensType', Format=>'int16u',Condition =>'$$self{Model}=~/^(SLT-A(37|57|65|77)V?|Lunar|NEX-(F3|5N|7|VG20E))/'},
# 0x031b => {%gain2010,Condition=>'$$self{Model}=~/^(DSC-RX100M3|ILCA-(68|77M2)|ILCE-(5100|7S|7M2|QX1))/'},
# 0x032c => {%gain2010,Condition=>'$$self{Model}=~/^(NEX-(5R|5T|6|VG30E|VG900))/'},
# 0x032f => {%gain2010,Condition=>'$$self{Model}=~/^(DSC-RX10|SLT-A(58|99V?)|HV|ILCE-(3000|3500|5000|6000|7|7R)|NEX-3N)\b/'},
# 0x0350 => {%gain2010,Condition=>'$$self{Model}=~/^(SLT-A(37|57)|NEX-F3)/'},
# 0x037b => {%gain2010,Condition=>'$$self{Model}=~/^(SLT-A(65|77)V?|Lunar|NEX-(7|VG20E))/'},
);
%Image::ExifTool::Sony::Tag9050b = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => 'Valid from July 2015 for ILCE-6300/6500/7RM2/7RM3/7SM2/9, ILCA-99M2.',
WRITABLE => 1,
FIRST_ENTRY => 0,
DATAMEMBER => [ 0x0105 ],
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0000 => {
Condition => '$$self{Model} =~ /^(ILCA-)/',
Name => 'SonyMaxAperture', # (at current focal length)
# seen values from 17 - 48
ValueConv => '2 ** (($val/8 - 1.06) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x0001 => {
Condition => '$$self{Model} =~ /^(ILCA-)/',
Name => 'SonyMinAperture', # (at current focal length)
# seen values from 80 - 95
ValueConv => '2 ** (($val/8 - 1.06) / 2)',
ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x0039 => {
Name => 'FlashStatus',
RawConv => '$$self{FlashFired} = $val',
PrintConv => {
0 => 'No Flash present',
2 => 'Flash Inhibited', # seen for ILCE-7/7R continuous, panorama, HDR mode
64 => 'Built-in Flash present',
65 => 'Built-in Flash Fired',
66 => 'Built-in Flash Inhibited', # seen for panorama, HDR, burst mode
128 => 'External Flash present', # seen for NEX-5N/5T
129 => 'External Flash Fired', # seen for SLT-A99V, ILCE-7R, NEX-5N/5R
},
},
0x003a => {
Name => 'ImageCount',
# or "ShutterCount"? : number of shutter actuations, does not increase during Silent Shooting,
# at least for ILCE-7RM2
Format => 'int32u',
Notes => 'total number of image exposures made by the camera',
RawConv => '$val & 0x00ffffff',
},
0x0046 => { # appr. same value as Exif ExposureTime, but longer in HDR-modes
Name => 'SonyExposureTime',
Format => 'int16u',
ValueConv => '$val ? 2 ** (16 - $val/256) : 0',
ValueConvInv => '$val ? int((16 - log($val) / log(2)) * 256 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x0048 => {
Name => 'SonyFNumber',
Format => 'int16u',
ValueConv => '2 ** (($val/256 - 16) / 2)',
ValueConvInv => '(log($val)*2/log(2)+16)*256',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x004b => {
Name => 'ReleaseMode2',
%releaseMode2,
},
0x0052 => {
Name => 'ImageCount2',
Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} =~ /^(ILCE-7RM3)/)',
Format => 'int32u',
RawConv => '$val & 0x00ffffff',
PrintConv => 'sprintf("%6d",$val)',
},
# 0x0058 - 0x0067: A-Mount: 16 values, only non-zero data for lenses giving "A-mount (3)" in 0x0104 below.
# e.g for SAL70400G2: 9 5 5 64 69 74 79 84 89 94 98 104 255 105 89 80
# where 9 means 9 focal lengths: 64 ... 104,
# corresponding to 70-400mm via FocalLength = 4.375*2**($val/16)
# 0x0058, 0x0061: E-Mount: ImageCount and dateTime
0x0058 => { # appears not valid when flash is used ... not for ILCA-99M2
Name => 'ImageCount2',
Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} !~ /^(ILCA-99M2|ILCE-7RM3)/)',
Format => 'int32u',
RawConv => '$val & 0x00ffffff',
},
0x0061 => { # only minutes-seconds, not for ILCA-99M2, ILCE-9
Name => 'SonyTimeMinSec',
Condition => '$$self{Model} !~ /^(ILCA-99M2|ILCE-(7RM3|9))/',
Format => 'undef[2]',
ValueConv => q{
my @v = unpack('C*', $val);
return sprintf("%.2d:%.2d", @v)
},
},
0x0073 => {
Name => 'ReleaseMode2',
Condition => '$$self{Model} !~ /^(ILCE-7RM3)/',
%releaseMode2,
},
0x0088 => {
Name => 'InternalSerialNumber', #(NC)
Format => 'int8u[6]',
PrintConv => 'unpack "H*", pack "C*", split " ", $val',
},
##### same offsets for lens info tags
# 0x0104 - same as 0x0105, but has value 3 for 50mm F1.4 ZA, DT 18-135mm and for 70-400mm G II: meaning ??
0x0105 => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x0106 => {
Name => 'LensFormat',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x0107 => {
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x0109 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Priority => 0, #PH (just to be safe)
Format => 'int16u', #PH
Notes => 'SLT models, and NEX with A-mount lenses',
SeparateTable => 1,
# has a value of 0 for E-mount lenses (values 0x80xx)
ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
PrintConv => \%sonyLensTypes,
},
0x010b => {
Name => 'DistortionCorrParamsPresent',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
# 0x0116 and 0x0117:
# give the same info as the first and last bytes of LensSpec,
# but also for older Sony and Minolta lenses where all LensSpec bytes are 0.
0x0116 => {
Name => 'LensSpecFeatures',
Format => 'undef[2]',
ValueConv => 'join " ", unpack "H2H2", $val',
ValueConvInv => sub {
my @a = split(" ", shift);
return @a == 2 ? pack 'CC', hex($a[0]), hex($a[1]) : undef;
},
PrintConv => \&PrintLensSpec,
PrintConvInv => 'Image::ExifTool::Sony::PrintInvLensSpec($val, $self, 1)',
},
#
# tags becoming model- and/or firmware-dependent from here.
#
0x019f => {
Name => 'ImageCount3',
Condition => '$$self{Model} =~ /^(ILCE-(7RM3|9))/',
Format => 'int32u',
RawConv => '$val == 0 ? undef : $val',
},
0x01cb => {
Name => 'ImageCount3',
Condition => '$$self{Model} =~ /^(ILCE-(7RM2|7SM2))/',
Format => 'int32u',
RawConv => '$val == 0 ? undef : $val',
},
0x01cd => {
Name => 'ImageCount3',
Condition => '$$self{Model} =~ /^(ILCE-(6300|6500)|ILCA-99M2)/',
Format => 'int32u',
RawConv => '$val == 0 ? undef : $val',
},
# the following tags are commented out because they can cause problems for the
# Composite LensID of non-electronic lenses (even if Priority is set to 0)
# 0x020d => {
# Name=>'LensType2',
# Condition => '$$self{Model} =~ /^(ILCE-(7RM2|7SM2))/',
# Format=>'int16u',
# },
# 0x020f => [{
# Name=>'LensType',
# Condition => '$$self{Model} =~ /^(ILCE-(7RM2|7SM2))/',
# Format=>'int16u',
# },{
# Name=>'LensType2',
# Condition => '$$self{Model} =~ /^(ILCE-(6300|6500)|ILCA-99M2)/',
# Format=>'int16u',
# }],
# 0x0211 => {
# Name=>'LensType',
# Condition => '$$self{Model} =~ /^(ILCE-(6300|6500)|ILCA-99M2)/',
# Format=>'int16u',
# },
0x021c => {
Name => 'LensSpecFeatures',
Condition => '$$self{Model} =~ /^(ILCE-(7RM2|7SM2))/',
Priority => 0,
Format => 'undef[2]',
ValueConv => 'join " ", unpack "H2H2", $val',
ValueConvInv => sub {
my @a = split(" ", shift);
return @a == 2 ? pack 'CC', hex($a[0]), hex($a[1]) : undef;
},
PrintConv => \&PrintLensSpec,
PrintConvInv => 'Image::ExifTool::Sony::PrintInvLensSpec($val, $self, 1)',
},
0x021e => {
Name => 'LensSpecFeatures',
Condition => '$$self{Model} =~ /^(ILCE-(6300|6500)|ILCA-99M2)/',
Priority => 0,
Format => 'undef[2]',
ValueConv => 'join " ", unpack "H2H2", $val',
ValueConvInv => sub {
my @a = split(" ", shift);
return @a == 2 ? pack 'CC', hex($a[0]), hex($a[1]) : undef;
},
PrintConv => \&PrintLensSpec,
PrintConvInv => 'Image::ExifTool::Sony::PrintInvLensSpec($val, $self, 1)',
},
);
%Image::ExifTool::Sony::Tag9400a = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => 'Valid for many DSC, NEX and SLT models',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0008 => { %sequenceImageNumber }, #PH
0x000c => { %sequenceFileNumber }, #PH
0x0010 => { %releaseMode2 },
0x0012 => {
Name => 'DigitalZoom',
Condition => '$$self{Model} !~ /^(SLT-(A65|A77)V?|NEX-(5N|7|VG20E)|Lunar|DSC-(HX10V|HX20V|HX200V|TX20|TX55|TX300V|WX30|WX70))\b/',
PrintConv => {
0 => 'No',
1 => 'Yes',
},
},
# 0x0013 - Flash fired 0=no, 1=yes
# 0x0014 - related to flash / RedEyeReduction ?
# 0x0015 - CameraType: 1=HDR, 2=DSC, 3=SLT/NEX
0x001a => { #PH
Name => 'ShotNumberSincePowerUp',
Format => 'int32u',
},
# 0x001e - increments by 4 or 6 or 8 each shutter release press since power up
# 0x001f - 0=most pictures, 1='Self-timer/Self-portrait', 2='Self-portrait (2 people)',
# 3='Continuous Self-timer', 26='Sweep Panorama' (PH, RX100)
# 0x0021 - maybe related to Image Stabilization or Smile Shutter ?
0x0022 => {
Name => 'SequenceLength',
PrintConv => {
0 => 'Continuous', # (RX100 too)
1 => '1 shot',
2 => '2 shots', # (Background defocus, 3D Image)
3 => '3 shots', # (HDR, WB Bracketing) (RX100, also continuous bracket)
4 => '4 shots', # seen for DSC-WX300 in Superior-Auto Anti-Motion-Blur
5 => '5 shots', # (PH, RX100)
6 => '6 shots', # (Multi Frame NR, Anti Motion blur, Hand-held Twilight)
10 => '10 shots', # (HX9V Burst)
100 => 'Continuous - iSweep Panorama', # (HX9V)
200 => 'Continuous - Sweep Panorama',
},
},
# 0x0027 - 1=single exposure, 2=multi-exposure (eg. pano,some superior auto) (PH, RX100)
0x0028 => {
Name => 'CameraOrientation', # (also RX100 - PH)
PrintConv => {
1 => 'Horizontal (normal)',
3 => 'Rotate 180',
6 => 'Rotate 90 CW',
8 => 'Rotate 270 CW',
},
},
0x0029 => {
Name => 'Quality2', # (also RX100 - PH)
PrintConv => {
0 => 'JPEG',
1 => 'RAW',
2 => 'RAW + JPEG',
3 => 'JPEG + MPO', # 3D images
},
},
# 0x002b - FacesDetected_OK 0=no, 1=yes appears valid for SLT, but not for NEX and DSC-HX9V
# 0x0030 - long exposure noise reduction used 0=no, 1=yes (PH, RX100)
# 0x0031 - smile shutter used 0=no, 1=yes (PH, RX100)
# 0x0033 - 0 for DSC-HX9V, 8 for SLT, NEX
# 0x0034 and 0x0038 - different offset for HX9V and SLT/NEX, but similar numbers, non-zero when flash fired
0x0044 => {
Condition => '$$self{Model} =~ /^(SLT-|HV|NEX-|Lunar|DSC-RX|Stellar)/', # not valid for most other DSC and HDR models
Name => 'SonyImageHeight',
Format => 'int16u',
PrintConv => '$val > 0 ? 8*$val : "n.a."',
},
0x0052 => {
Name => 'ModelReleaseYear',
Condition => '$$self{Model} =~ /^(SLT-|HV|NEX-|Lunar|DSC-RX|Stellar)/', # not valid for most other DSC and HDR models
Format => 'int8u',
PrintConv => 'sprintf("20%.2d", $val)',
},
);
%Image::ExifTool::Sony::Tag9400b = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
NOTES => q{
Valid for NEX-3N, ILCE-3000/3500, SLT-A58, DSC-WX60, DSC-WX300, DSC-RX100M2,
DSC-HX50V, DSC-QX10/QX100.
},
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0008 => { %sequenceImageNumber }, #PH
0x000c => { %sequenceFileNumber }, #PH
0x0010 => { %releaseMode2 },
0x0012 => {
Name => 'DigitalZoom',
PrintConv => {
0 => 'No',
1 => 'Yes',
},
},
# 0x0013 - Flash fired 0=no, 1=yes
# 0x0014 - related to flash / RedEyeReduction ?
# 0x0015 - CameraType: 1=HDR, 2=DSC, 3=SLT/NEX
0x0016 => { #PH
Name => 'ShotNumberSincePowerUp',
Format => 'int32u',
},
0x001e => {
Name => 'SequenceLength',
PrintConv => {
0 => 'Continuous',
1 => '1 shot',
2 => '2 shots',
3 => '3 shots',
4 => '4 shots',
5 => '5 shots',
6 => '6 shots',
10 => '10 shots',
100 => 'Continuous - iSweep Panorama',
200 => 'Continuous - Sweep Panorama',
},
},
0x0024 => {
Name => 'CameraOrientation',
PrintConv => {
1 => 'Horizontal (normal)',
3 => 'Rotate 180',
6 => 'Rotate 90 CW',
8 => 'Rotate 270 CW',
},
},
0x0025 => {
Name => 'Quality2',
PrintConv => {
0 => 'JPEG',
1 => 'RAW',
2 => 'RAW + JPEG',
3 => 'JPEG + MPO', # 3D images
},
},
# 0x0027 - FacesDetected_OK 0=no, 1=yes
# 0x002c - long exposure noise reduction used 0=no, 1=yes (PH, RX100)
0x003f => {
Name => 'SonyImageHeight',
Format => 'int16u',
PrintConv => '$val > 0 ? 8*$val : "n.a."',
},
0x0046 => { # but Panorama images give incorrect result
Name => 'ModelReleaseYear',
Format => 'int8u',
PrintConv => 'sprintf("20%.2d", $val)',
},
);
%Image::ExifTool::Sony::Tag9400c = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
NOTES => q{
Valid for DSC-HX60V/HX90V/HX350/HX400V/QX30/RX0/RX1RM2/RX10/RX10M2/RX10M3/
RX10M4/RX100M3/RX100M4/RX100M5/WX220/WX350/WX500, ILCE-7/7R/7S/7M2/7RM2/
7RM3/7SM2/9/5000/5100/6000/6300/6500/QX1, ILCA-68/77M2/99M2.
},
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x0009 => { %releaseMode2 },
0x000a => [{
Condition => '$$self{Model} =~ /^(ILCE-(7RM3|9)|DSC-RX10M4)\b/',
Name => 'ShotNumberSincePowerUp',
Format => 'int8u',
},{
Name => 'ShotNumberSincePowerUp',
Format => 'int32u',
}],
0x0012 => { %sequenceImageNumber },
0x0016 => {
Name => 'SequenceLength',
PrintConv => {
0 => 'Continuous',
1 => '1 shot',
2 => '2 shots',
3 => '3 shots',
4 => '4 shots',
5 => '5 shots',
6 => '6 shots',
9 => '9 shots', # ILCE-7RM2 9-shot bracketing
10 => '10 shots',
12 => '12 shots', # ILCA-77M2 12-shot MFNR-mode
100 => 'Continuous - iSweep Panorama',
200 => 'Continuous - Sweep Panorama',
},
},
0x001a => { %sequenceFileNumber },
0x001e => {
Name => 'SequenceLength',
PrintConv => {
0 => 'Continuous',
1 => '1 file',
2 => '2 files',
3 => '3 files',
5 => '5 files',
9 => '9 files', # ILCE-7RM2 9-shot bracketing
10 => '10 files', # seen for DSC-WX500 with burst of 10 shots
},
},
0x0029 => {
Name => 'CameraOrientation',
PrintConv => {
1 => 'Horizontal (normal)',
3 => 'Rotate 180',
6 => 'Rotate 90 CW',
8 => 'Rotate 270 CW',
},
},
0x002a => {
Name => 'Quality2',
PrintConv => {
0 => 'JPEG',
1 => 'RAW',
2 => 'RAW + JPEG',
3 => 'JPEG + MPO', # 3D images
},
},
0x0047 => {
Name => 'SonyImageHeight',
Format => 'int16u',
PrintConv => '$val > 0 ? 8*$val : "n.a."',
},
0x0053 => {
Name => 'ModelReleaseYear',
Format => 'int8u',
PrintConv => 'sprintf("20%.2d", $val)',
},
);
# PH (RX100)
%Image::ExifTool::Sony::Tag9402 = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
DATAMEMBER => [ 0x02 ],
PRIORITY => 0,
0x02 => {
Name => 'TempTest1',
DataMember => 'TempTest1',
Hidden => 1,
RawConv => '$$self{TempTest1}=$val; $$self{OPTIONS}{Unknown}<2 ? undef : $val',
},
0x04 => {
Name => 'AmbientTemperature',
# this (and many other values) are only valid if 0x02 is 255 (why?)
Condition => '$$self{TempTest1} == 255',
Format => 'int8s', # (verified for negative temperature)
PrintConv => '"$val C"',
PrintConvInv => '$val=~s/ ?C//; $val',
},
0x16 => { #JR
Name => 'FocusMode',
Mask => 0x7f, # (often +128, not sure what upper bit is for)
PrintConv => {
0 => 'Manual',
2 => 'AF-S',
3 => 'AF-C',
4 => 'AF-A', # seen in ILCE-6000 images
6 => 'DMF',
# 7 => 'AF-D', # not for DSC, NEX, ILCE ...
},
},
0x17 => {
Name => 'AFAreaMode',
PrintConv => {
0 => 'Multi', # newer DSC/ILC use name 'Wide'
1 => 'Center',
2 => 'Spot', #(NC) seen for DSC-WX300
3 => 'Flexible Spot',
10 => 'Selective (for Miniature effect)', # seen for DSC-HX30V,TX30,WX60,WX100
11 => 'Zone', #JR (ILCE-7 series)
12 => 'Expanded Flexible Spot', #JR (HX90V, ILCE-7 series)
14 => 'Tracking',
15 => 'Face Tracking',
255 => 'Manual',
},
},
# 0x24, 0x26: factor 10 for NEX and ILCE, factor 100 for DSC
# 0x24, 0x26, 0x28, 0x2a: inconsistent for A-mount lenses on NEX/ILCE: some correct, some 0, some incorrect ...
# 0x28 - not valid for DSC-[HTW]X models, or DSC-RX100
# 0x24 => { # same values as Exif FocalLength
# Name => 'FocalLength',
# Format => 'int16u',
# RawConv => '$val || undef',
# ValueConv => '$val / ($$self{Model}=~/DSC/ ? 100 : 10)',
# ValueConvInv => '$val * ($$self{Model}=~/DSC/ ? 100 : 10)',
# PrintConv => 'sprintf("%.1f mm",$val)',
# PrintConvInv => '$val =~ s/ ?mm//; $val',
# },
# 0x26 => { # usually identical to 0x24 or 0
# Name => 'FocalLength',
# Format => 'int16u',
# ValueConv => '$val / ($$self{Model}=~/DSC/ ? 100 : 10)',
# ValueConvInv => '$val * ($$self{Model}=~/DSC/ ? 100 : 10)',
# PrintConv => 'sprintf("%.1f mm",$val)',
# PrintConvInv => '$val =~ s/ ?mm//; $val',
# },
# 0x28 => { # values slightly different from Exif FocalLength
# Name => 'FocalLength2',
# Format => 'int16u',
# RawConv => '$val || undef',
# ValueConv => '$val / 10',
# ValueConvInv => '$val * 10',
# PrintConv => 'sprintf("%.1f mm",$val)',
# PrintConvInv => '$val =~ s/ ?mm//; $val',
# },
# 0x2a => { # usually identical to 0x28 or 0
# Name => 'FocalLength2',
# Format => 'int16u',
# ValueConv => '$val / 10',
# ValueConvInv => '$val * 10',
# PrintConv => 'sprintf("%.1f mm",$val)',
# PrintConvInv => '$val =~ s/ ?mm//; $val',
# },
# 0x002c => {
# # seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
# Name => 'FocusPosition2',
# Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
# },
0x002d => { # usually same as 0x002c, but some differences
# seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
Name => 'FocusPosition2',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
},
# 0x8a - int32u: some sort of accumulated time or something since power up
# (doesn't increment during continuous shooting and at some other times)
);
# PH (RX100)
%Image::ExifTool::Sony::Tag9403 = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
DATAMEMBER => [ 0x04 ],
0x04 => {
# seen values 0,2,3,18,32,49,50,83,148
# CameraTemperature is valid for all values except 0,148
Name => 'TempTest2',
DataMember => 'TempTest2',
Hidden => 1,
RawConv => '$$self{TempTest2}=$val; $$self{OPTIONS}{Unknown}<2 ? undef : $val',
},
0x05 => {
Name => 'CameraTemperature', # (maybe SensorTemperature? - heats up when taking movies)
Condition => '$$self{TempTest2} and $$self{TempTest2} < 100',
Format => 'int8s', # have seen as low as -1 for AmbientTemperature of -18
PrintConv => '"$val C"',
PrintConvInv => '$val=~s/ ?C//; $val',
},
# 0x0f - same as 0x05
# 0x18 - maybe another temperature?
);
# Tag9404 (ref JR)
%Image::ExifTool::Sony::Tag9404a = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x000b => { %exposureProgram2010 },
0x000d => { Name => 'IntelligentAuto', PrintConv => { 0 => 'Off', 1 => 'On'} },
0x0019 => {
Name => 'LensZoomPosition',
Format => 'int16u',
Condition => '$$self{Model} !~ /^SLT-/',
PrintConv => 'sprintf("%.0f%%",$val/10.24)',
PrintConvInv => '$val=~s/ ?%$//; $val * 10.24',
},
);
# Tag9404 (ref JR)
%Image::ExifTool::Sony::Tag9404b= (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x000c => { %exposureProgram2010 },
0x000e => { Name => 'IntelligentAuto', PrintConv => { 0 => 'Off', 1 => 'On'} },
0x001e => {
Name => 'LensZoomPosition',
Format => 'int16u',
Condition => '$$self{Model} !~ /^(SLT-|HV|ILCA-)/',
PrintConv => 'sprintf("%.0f%%",$val/10.24)',
PrintConvInv => '$val=~s/ ?%$//; $val * 10.24',
},
0x0020 => {
# seen values from 80 - 255 (= infinity) -- see Composite:FocusDistance2 below
Name => 'FocusPosition2',
Condition => '$$self{Model} =~ /^(SLT-|HV|ILCA-)/',
},
);
# Tag9404 (ref JR)
%Image::ExifTool::Sony::Tag9404c= (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x000b => { %exposureProgram2010 },
0x000d => { Name => 'IntelligentAuto', PrintConv => { 0 => 'Off', 1 => 'On'} },
);
# Tag9405 (ref JR)
%Image::ExifTool::Sony::Tag9405a = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
DATAMEMBER => [ 0x0604 ],
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => 'Valid for SLT, NEX, ILCE-3000/3500 and several DSC models.',
0x0600 => {
Name => 'DistortionCorrParamsPresent',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
0x0601 => {
Name => 'DistortionCorrection',
PrintConv => {
0 => 'None',
1 => 'Applied',
},
},
# 0x0602 - same as 0x0604, but has value 3 for 50mm F1.4 ZA, DT 18-135mm and for 70-400mm G II: meaning ??
0x0603 => {
Name => 'LensFormat',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x0604 => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^(DSC-|Stellar)/ ? undef : $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
# 6 - seen for A58 panorama image
},
},
0x0605 => {
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
Notes => 'E-mount lenses',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x0608 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Format => 'int16u',
Notes => 'A-mount lenses on SLT and NEX',
SeparateTable => 1,
PrintConv => \%sonyLensTypes,
},
0x064a => {
Name => 'VignettingCorrParams',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
Format => 'int16s[16]',
},
0x066a => {
Name => 'ChromaticAberrationCorrParams',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
Format => 'int16s[32]',
},
0x06ca => {
Name => 'DistortionCorrParams',
Condition => '$$self{Model} !~ /^(DSC-|Stellar)/',
Format => 'int16s[16]',
},
);
# Tag9405b (ref JR)
%Image::ExifTool::Sony::Tag9405b = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
DATAMEMBER => [ 0x005e ],
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => q{
Valid for DSC-HX60V/HX350/HX400V/QX30/RX0/RX10/RX10M2/RX10M3/RX10M4/RX100M3/
RX100M4/RX100M5/WX220/WX350, ILCE-7/7M2/7R/7RM2/7S/7SM2/9/5000/5100/6000/
6300/6500/QX1, ILCA-68/77M2/99M2.
},
0x0004 => {
Name => 'SonyISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x0006 => {
Name => 'BaseISO',
Format => 'int16u',
ValueConv => '100 * 2**(16 - $val/256)',
ValueConvInv => '256 * (16 - log($val/100)/log(2))',
PrintConv => 'sprintf("%.0f",$val)',
PrintConvInv => '$val',
},
0x000a => { %gain2010 },
0x000e => { # appr. same value as Exif ExposureTime, but shorter in HDR-modes
Name => 'SonyExposureTime2',
Format => 'int16u',
ValueConv => '$val ? 2 ** (16 - $val/256) : 0',
ValueConvInv => '$val ? int((16 - log($val) / log(2)) * 256 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x0010 => {
Name => 'ExposureTime',
Format => 'rational32u',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"', # (Bulb NC)
PrintConvInv => 'lc($val) eq "bulb" ? 0 : $val',
},
0x0014 => { # but often odd results for DSC models: exclude
# also often deviating results for Sony FE 90mm F2.8 Macro G OSS ...
Name => 'SonyFNumber',
Format => 'int16u',
Condition => '$$self{Model} !~ /^DSC-/',
ValueConv => '2 ** (($val/256 - 16) / 2)',
ValueConvInv => '(log($val)*2/log(2)+16)*256',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x0016 => {
Name => 'SonyMaxApertureValue', # (at current focal length)
Format => 'int16u',
ValueConv => '2 ** (($val/256 - 16) / 2)',
ValueConvInv => '(log($val)*2/log(2)+16)*256',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x0024 => { %sequenceImageNumber },
0x0034 => { %releaseMode2 },
# 0x003e and 0x0040: maximum image size; ShotInfo gives actual image size
0x003e => { Name => 'SonyImageWidthMax', Format => 'int16u' },
0x0040 => { Name => 'SonyImageHeightMax', Format => 'int16u' },
0x0042 => {
Name => 'HighISONoiseReduction',
PrintConv => {
0 => 'Off',
1 => 'Low',
2 => 'Normal',
3 => 'High',
},
},
0x0044 => {
Name => 'LongExposureNoiseReduction',
PrintConv => {
0 => 'Off',
1 => 'On', # (unused or dark subject)
},
},
0x0046 => { %pictureEffect2010 },
0x0048 => { %exposureProgram2010 },
0x004a => {
Name => 'CreativeStyle',
PrintConv => {
0 => 'Standard',
1 => 'Vivid',
2 => 'Neutral',
3 => 'Portrait',
4 => 'Landscape',
5 => 'B&W',
6 => 'Clear',
7 => 'Deep',
8 => 'Light',
9 => 'Sunset',
10 => 'Night View/Portrait',
11 => 'Autumn Leaves',
13 => 'Sepia',
},
},
0x0052 => {
Name => 'Sharpness',
Format => 'int8s',
PrintConv => '$val > 0 ? "+$val" : $val',
PrintConvInv => '$val',
},
0x005a => {
Name => 'DistortionCorrParamsPresent',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => { 0 => 'No', 1 => 'Yes'},
},
0x005b => {
Name => 'DistortionCorrection',
PrintConv => {
0 => 'None',
1 => 'Applied',
},
},
# 0x005c - same as 0x005e, but has value 3 for 50mm F1.4 ZA, DT 18-135mm and for 70-400mm G II: meaning ??
0x005d => {
Name => 'LensFormat',
Condition => '$$self{Model} !~ /^DSC-/',
PrintConv => {
0 => 'Unknown',
1 => 'APS-C',
2 => 'Full-frame',
},
},
0x005e => {
Name => 'LensMount',
DataMember => 'LensMount',
RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^DSC-/ ? undef : $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount',
2 => 'E-mount',
},
},
0x0060 => {
Name => 'LensType2',
Condition => '$$self{LensMount} == 2',
Format => 'int16u',
Notes => 'E-mount lenses',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x0062 => {
Name => 'LensType',
Condition => '$$self{LensMount} == 1',
Format => 'int16u',
Notes => 'A-mount lenses on SLT and NEX',
SeparateTable => 1,
PrintConv => \%sonyLensTypes,
},
0x0064 => {
Name => 'DistortionCorrParams',
Condition => '$$self{Model} !~ /^DSC-/',
Format => 'int16s[16]',
},
0x0342 => {
Name => 'LensZoomPosition',
Condition => '$$self{Model} !~ /^(ILCA-|ILCE-(7RM2|7RM3|7SM2|6500|9)|DSC-(HX90V|RX0|RX10M2|RX10M3|RX10M4|RX100M4|RX100M5|WX500))/',
Format => 'int16u',
PrintConv => 'sprintf("%.0f%%",$val/10.24)',
PrintConvInv => '$val=~s/ ?%$//; $val * 10.24',
},
0x034a => {
Name => 'VignettingCorrParams',
Condition => '$$self{Model} =~ /^(ILCA-(68|77M2)|ILCE-(5000|5100|6000|7|7R|7S|QX1))\b/',
Format => 'int16s[16]',
},
0x0350 => {
Name => 'VignettingCorrParams',
Condition => '$$self{Model} =~ /^(ILCE-7M2)/',
Format => 'int16s[16]',
},
0x035c => {
Name => 'VignettingCorrParams',
Condition => '$$self{Model} =~ /^(ILCA-99M2|ILCE-(6500|7RM3|9))/',
Format => 'int16s[16]',
},
0x035a => {
Name => 'LensZoomPosition',
Condition => '$$self{Model} =~ /^(ILCE-(7RM2|7SM2)|DSC-(HX90V|RX10M2|RX10M3|RX100M4|WX500))/',
Format => 'int16u',
PrintConv => 'sprintf("%.0f%%",$val/10.24)',
PrintConvInv => '$val=~s/ ?%$//; $val * 10.24',
},
0x0368 => {
Name => 'VignettingCorrParams',
Condition => '$$self{Model} =~ /^(ILCE-(6300|7RM2|7SM2))/',
Format => 'int16s[16]',
},
0x037c => {
Name => 'ChromaticAberrationCorrParams',
Condition => '$$self{Model} =~ /^(ILCA-(68|77M2)|ILCE-(5000|5100|6000|7|7R|7S|QX1))\b/',
Format => 'int16s[32]',
},
0x0384 => {
Name => 'ChromaticAberrationCorrParams',
Condition => '$$self{Model} =~ /^(ILCE-7M2)/',
Format => 'int16s[32]',
},
0x039c => {
Name => 'ChromaticAberrationCorrParams',
Condition => '$$self{Model} =~ /^(ILCE-(6300|7RM2|7SM2))/',
Format => 'int16s[32]',
},
0x03b0 => {
Name => 'ChromaticAberrationCorrParams',
Condition => '$$self{Model} =~ /^(ILCA-99M2|ILCE-6500)/',
Format => 'int16s[32]',
},
0x03b8 => {
Name => 'ChromaticAberrationCorrParams',
Condition => '$$self{Model} =~ /^(ILCE-(7RM3|9))/',
Format => 'int16s[32]',
},
);
# Tag9406 (ref JR)
%Image::ExifTool::Sony::Tag9406 = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
# 0x0000: 1 for SLT-A37/A57/A65/A77, NEX-5N/7/F3/VG20
# 2 for SLT-A58/99V, NEX-3N/5R/5T/6/VG30/VG900, ILCA-68/77M2, ILCE-3000/3500/7/7M2/7R/7S/5000/6000
# 3 for ILCA-99M2, ILCE-6300/6500/7RM2/7SM2/9
# 0x0001+0x0002: Int16u, seen 580 - 770: similar to "BatteryUnknown" ??
# 0x0005: int8u, seen 73 - 117: maybe Fahrenheit? Higher than "AmbientTemperature", but same trend.
0x0005 => {
Name => 'BatteryTemperature',
ValueConv => '($val - 32) / 1.8', # convert to Celsius
ValueConvInv => '$val * 1.8 + 32',
PrintConv => 'sprintf("%.1f C",$val)',
PrintConvInv => '$val=~s/\s*C//; $val',
},
# 0x0006: usually 0, seen non-zero values only for SLT-A99V, ILCA-77M2/99M2 and ILCE-7/7R/7RM2/9: BatteryLevel Grip ?
0x0006 => {
Name => 'BatteryLevelGrip1',
Condition => '$$valPt !~ /^\x00/', # only valid when not 0
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
# 0x0007: seen values from 8 - 105, decreasing in sequences of images: BatteryLevel
0x0007 => {
Name => 'BatteryLevel',
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
# 0x0008: usually 255 or 0 (ILCE-7/7R), seen other values only for A99V and ILCE-7/7R when 0x0006 not 0.
# A99V with grip can have 3 batteries: => Grip 2;
# but ILCE-7/7R with grip can have max 2, and as all ILCE-7/7R samples give >100 values, exclude...
0x0008 => {
Name => 'BatteryLevelGrip2',
Condition => '$$valPt !~ /^[\x00\xff]/ and $$self{Model} !~ /^(ILCE-(7|7R))$/', # only when not 0 or 255 and not for ILCE-7/7R
PrintConv => '"$val%"',
PrintConvInv => '$val=~s/\s*\%//; $val',
},
# 0x0009-0x001a: looks like 9 Int16u values
# 0x0022: 0 or 1 for A99, NEX-5R, 6
# 0x0025: 0 or 1 for other SLT and NEX (0x0022, 0x0023, 0x0024 = 255)
);
# Tag940a (ref PH, decoded mainly from A77)
%Image::ExifTool::Sony::Tag940a = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'These tags are currently extracted for SLT models only.',
# 0x00 - 10(A65,A77,NEX-5N,7,VG20E), 11(A37,A57,A99,NEX-5R,6,F3,RX1,RX100),
# 9(HX9V), 4,68,86,110(panoramas) - ref JR
0x04 => {
Name => 'AFPointsSelected',
Format => 'int32u',
PrintConvColumns => 2,
PrintConv => {
# verified for A77 firmware 1.03 and 1.07 and A99 firmware 1.00,
# but there were inconsistencies with my A77 firmware 1.04 samples - PH
0 => '(none)',
0x00007801 => 'Center Zone',
0x0001821c => 'Right Zone',
0x000605c0 => 'Left Zone',
0x7fffffff => '(all)',
# 0xffffffff - 'n/a' - RX1 and NEX models always give this
# (on Wide AFAreaMode, outer focus points are dropped
# at progressively higher digital zoom ratios, ref JR)
BITMASK => {
0 => 'Center', # (1.04 gave this for Upper-middle and Near Left)
1 => 'Top', # (1.04 didn't give this value)
2 => 'Upper-right', # (1.04 OK)
3 => 'Right', # (1.04 didn't give this value)
4 => 'Lower-right', # (1.04 gave this for Bottom)
5 => 'Bottom', # (1.04 gave this for Lower-middle)
6 => 'Lower-left', # (1.04 gave this for Left and Lower Far Left)
7 => 'Left', # (1.04 gave this for Far Left)
8 => 'Upper-left', # (1.04 OK)
9 => 'Far Right', # (1.04 gave this for Upper Far Right and Right)
10 => 'Far Left', # (1.04 didn't give this value)
11 => 'Upper-middle', # (1.04 gave this for Top)
12 => 'Near Right', # (1.04 gave this for Center)
13 => 'Lower-middle', # (1.04 gave this for Lower-left and Near Right)
14 => 'Near Left', # (1.04 didn't give this value)
15 => 'Upper Far Right',# (1.04 didn't give this value)
16 => 'Lower Far Right',# (1.04 OK, but gave this for Far Right and Lower-right too)
17 => 'Lower Far Left', # (1.04 didn't give this value)
18 => 'Upper Far Left', # (1.04 OK)
# higher bits may be used in panorama images - ref JR
},
},
},
# 0x0a - int16u: 0,1,2,3
# 0xa6 - 8 bytes face detection info ?; starts with 1, otherwise all 0
);
# Tag940c (ref JR)
%Image::ExifTool::Sony::Tag940c = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
DATAMEMBER => [ 0x0008 ],
NOTES => 'NEX and ILCE models only.',
# 0x0001 - 0 for all NEX and ILCE-3000/3500, 20 for all other ILCE (17 for ILCE samples from Sony.net)
# 0x0008 - LensMount, but different values from Tag9405-0x0105 and Tag9050-0x0604.
# don't know what difference is between values '1' and '5' ...
0x0008 => {
Name => 'LensMount2', # ? maybe some other meaning ? (A-mount adapter-only images give 0)
RawConv => '$$self{LensMount} = $val',
PrintConv => {
0 => 'Unknown',
1 => 'A-mount (1)',
4 => 'E-mount',
5 => 'A-mount (5)',
},
},
# 0x0009 - LensType3:
# This tag appears to also indicate adapter info, similar to CameraSettings3-0x03f7 for the original NEX-3/5.
# (Tag9405-0x0605 and Tag9050-0x0107 LensType2 always give '0' for adapters/A-mount lenses.)
# - seen a few instances of 0x0009 indicating an E-mount lens, but 0xb027 LensType indicating an A-mount lens:
# possibly due to adapter info not being read/reset correctly ?
# August 2015: renamed from LensType2 into Lenstype3 because too often info here relates to previously-mounted-lens
0x0009 => {
Name => 'LensType3',
RawConv => '(($$self{LensMount} != 0) or ($val > 0 and $val < 32784)) ? $val : undef',
Format => 'int16u',
SeparateTable => 'LensType2',
PrintConv => \%sonyLensTypes2,
},
0x000b => {
Name => 'CameraE-mountVersion',
Format => 'int16u',
PrintConv => 'sprintf("%x.%.2x",$val>>8,$val&0xff)',
PrintConvInv => 'my @a=split(/\./,$val);(hex($a[0])<<8)|hex($a[1])',
# E-mount versions seen for various cameras / camera-firmware versions:
# - : info not present in CameraSettings3 for NEX-3/5/5C/C3/VG10E
# 1.14: NEX-5N/5R/6/7/F3/VG20E/VG30E/VG900 v1.00, NEX-5N v1.01, NEX-3N v0.90
# 1.20: NEX-3N v1.00, NEX-6 v1.01, NEX-7 v1.02, ILCE-3000 v1.00, ILCE-3500 v1.01
# 1.30: NEX-5T v1.00, NEX-6 v1.02/v1.03, NEX-7 v1.03
# 1.31: ILCE-7/7R v0.95/v1.00/v1.01, ILCE-5000
# 1.40: ILCE-7/7R v1.02/v1.10, ILCE-7S v1.00, ILCE-6000 v1.00/v1.10, ILCE-5100/QX1
# 1.50: ILCE-7/7R/7S v1.20-v3.20, ILCE-7M2 v1.00-v4.00, ILCE-7RM2 v1.00-v3.00, ILCE-7SM2 v1.00-v2.10,
# ILCE-6000 v1.20-v3.20
# 1.60: ILCE-6300 v1.00-v1.10, ILCE-6500 v1.00, ILCE-7RM2 v3.05-v4.00
# 1.70: ILCE-7RM3/9
},
0x000d => {
Name => 'LensE-mountVersion',
Condition => '$$self{LensMount} != 0',
Format => 'int16u',
PrintConv => 'sprintf("%x.%.2x",$val>>8,$val&0xff)',
PrintConvInv => 'my @a=split(/\./,$val);(hex($a[0])<<8)|hex($a[1])',
# E-mount versions seen for various lens models:
# 0.00: Unknown lenses/adapters
# 1.00: SEL18200LE, Sigma DN, Tamron Di III, Zeiss Touit
# 1.07: (Ver.01) original E-lenses (SEL16F28, SEL18200, SEL1855, SEL24F18Z, SEL30M35, SEL50F18, SEL55210) and LA-EA1
# 1.08: LA-EA1 (Ver.02), Metabones Smart
# 1.14: LA-EA2
# 1.20: (Ver.02) firmware-updated E-lenses (SEL1855, SEL24F18Z, SEL30M35, SEL50F18, SEL55210),
# newer E-lenses (SEL1018, SEL1670Z, SEL20F28, SEL35F18, SELP1650, SELP18105G, SELP18200) or LA-EA3 Ver.01
# 1.30: LA-EA4
# 1.31: original FE-lenses (SEL2470Z, SEL2870, SEL35F28Z, SEL55F18Z), SEL1850
# 1.35: SEL70200G, SEL55210 (Black?, seen with ILCE-3500)
# 1.40: SEL1635Z, SEL24240, SEL35F14Z, SELP28135G, Zeiss Loxia 35mm/50mm Ver.01, Zeiss Touit Ver.02
# 1.41: SELP18105G Ver.02
# 1.50: SEL28F20, SEL90M28G, Zeiss Batis 18mm/25mm/85mm/135mm, Zeiss Loxia 21mm, Zeiss Loxia 35mm/50mm Ver.02,
# Tokina Firin 20mm
# 1.60: SEL1224G, SEL1635GM, SELP18110G, SEL2470GM, SEL24105G, SEL50F14Z, SEL50F18F, SEL50M28, SEL70200GM, SEL70300G,
# SEL85F14GM, SEL85F18, SEL100F28GM, SEL100400GM, Sigma 30mm F1.4 DC DN, Sigma MC-11, Samyang AF 14mm/50mm,
# Voigtlander 15mm
# 1.70: LA-EA3 Ver.02, Samyang AF 35mm, Voigtlander 10mm/12mm/40mm/65mm, Zeiss Loxia 85mm
},
# 0x0014 and 0x0015: change together: LensFirmwareVersion
# 0x0015 as 2-digit hex matches known firmware versions of Sony lenses and Metabones adapters,
# 0x0014 as 3-digit decimal: not confirmed sub-versions
# Some versions as seen with this decoding:
# 00.nnn for several pre-production Sony E-mount lenses
# 01.000 - 01.009 for various Sony E-mount lenses
# 02.nnn, 03.nnn for various Sony E-mount lenses for which a Ver.02 or Ver.03 update is available
# 16.001 for Metabones Speed Booster
# 19/22/24/30/32/41.001 etc. for Metabones Canon EF Smart adapters
0x0014 => {
Name => 'LensFirmwareVersion',
Condition => '$$self{LensMount} != 0',
Format => 'int16u',
PrintConv => 'sprintf("Ver.%.2x.%.3d",$val>>8,$val&0xff)',
},
# 0x0016 - 0x003f: non-0 data present when: 0x0001>0 AND 0x0008=4(E-mount) AND 0x000f<255
);
# AFInfo (SLT models only) (ref PH, decoded mainly from A77)
%Image::ExifTool::Sony::AFInfo = (
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
WRITABLE => 1,
FIRST_ENTRY => 0,
PRIORITY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
DATAMEMBER => [ 0x02 ],
IS_SUBDIR => [ 0x11 ],
NOTES => 'These tags are currently extracted for SLT models only.',
# first 4 bytes (deciphered) (ref JR):
# 0 1 1 0 for A37, A57, A58
# 2 1 1 0 for A65V
# 2 1 2 0 for A77V
# 0 1 2 0 for A99V
# 1 1 3 0 for ILCA-68/77M2/99M2
# 0 0 0 0 for NEX and ILCE-3000/3500, also seen for SLT/ILCA with non-AF lens
# 1 0 0 0 for ILCE-5000/5100/6000/7/7M2/7R/7S/QX1
# 6 0 0 0 for ILCE-6300/6500/7RM2/7SM2/9
# 0 2 0 0 for NEX/ILCE with LA-EA2/EA4 Phase-AF adapter
# 2 0 0 0 seen for a few NEX-5N images
# 2 2 0 0 seen for a few NEX-5N/7 images with LA-EA2 adapter
0x02 => {
Name => 'AFType',
RawConv => '$$self{AFType} = $val',
PrintConv => {
# 0 => '?? n.a.', # seen on some A99V images with non-AF (Samyang) lens
1 => '15-point',
2 => '19-point',
3 => '79-point', # ILCA-68/77M2/99M2
},
},
### decoding for SLT; ILCA-68/77M2/99M2 (AFType == 3) uses different offsets: see below
0x04 => {
Name => 'AFStatusActiveSensor',
Condition => '$$self{Model} !~ /^ILCA-/',
%Image::ExifTool::Minolta::afStatusInfo,
},
0x07 => [ # the active AF sensor
{
Name => 'AFPoint',
Condition => '$$self{AFType} == 1',
Notes => 'models with 15-point AF',
PrintConvColumns => 2,
PrintConv => \%afPoint15,
},{
Name => 'AFPoint',
Condition => '$$self{AFType} == 2',
Notes => 'models with 19-point AF',
PrintConvColumns => 2,
PrintConv => \%afPoint19,
},
],
0x08 => [ # the AF sensor in focus at focus time (shutter release half press)
{
Name => 'AFPointInFocus',
Condition => '$$self{AFType} == 1',
Notes => 'models with 15-point AF',
PrintConvColumns => 2,
PrintConv => {
%afPoint15,
255 => '(none)',
},
},{
Name => 'AFPointInFocus',
Condition => '$$self{AFType} == 2',
Notes => 'models with 19-point AF',
PrintConvColumns => 2,
PrintConv => {
%afPoint19,
255 => '(none)',
},
},
],
0x09 => [ # the AF sensor in focus at shutter release (shutter release full press)
{
Name => 'AFPointAtShutterRelease',
Condition => '$$self{AFType} == 1',
Notes => 'models with 15-point AF',
PrintConvColumns => 2,
PrintConv => {
%afPoint15,
30 => '(out of focus)',
},
},{
Name => 'AFPointAtShutterRelease',
Condition => '$$self{AFType} == 2',
Notes => 'models with 19-point AF',
PrintConvColumns => 2,
PrintConv => {
%afPoint19,
30 => '(out of focus)',
},
},
],
0x0a => {
Name => 'AFAreaMode',
Condition => '$$self{Model} !~ /^ILCA-/',
PrintConv => {
0 => 'Wide',
1 => 'Spot',
2 => 'Local',
3 => 'Zone',
},
},
0x0b => {
Name => 'FocusMode',
Condition => '$$self{Model} !~ /^ILCA-/',
PrintConvColumns => 2,
# validated for A77 firmware 1.03, 1.04 and 1.07 and A99
# - not confirmed for A37,A57 and A65 which also write this tag
PrintConv => {
0 => 'Manual',
2 => 'AF-S',
3 => 'AF-C',
4 => 'AF-A',
6 => 'DMF',
7 => 'AF-D', # (unique to A99)
},
},
0x11 => [ #JR
{
Name => 'AFStatus15',
Condition => '$$self{AFType} == 1',
Format => 'int16s[18]',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::AFStatus15' },
},{
Name => 'AFStatus19',
Condition => '$$self{AFType} == 2',
Format => 'int16s[30]',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::AFStatus19' },
},
],
# 0x004d - 18 or 30 int16 values
# 0x0089 - 18 or 30 int16 values
# 0x00b1 - 18 or 30 int16 values
# 0x0121 - 18 or 30 int16s values, similar to 0x11 AFStatus
# 0x016e - SLT: 4 bytes indicating 'AFPointsUsed', identical to first 4 bytes of 0x2020 for A58/A99V
0x016e => {
Name => 'AFPointsUsed',
Condition => '$$self{Model} !~ /^ILCA-/',
Notes => 'SLT models only',
Format => 'int32u',
PrintConvColumns => 2,
PrintConv => {
0 => '(none)',
BITMASK => {
0 => 'Center',
1 => 'Top',
2 => 'Upper-right',
3 => 'Right',
4 => 'Lower-right',
5 => 'Bottom',
6 => 'Lower-left',
7 => 'Left',
8 => 'Upper-left',
9 => 'Far Right',
10 => 'Far Left',
11 => 'Upper-middle',
12 => 'Near Right',
13 => 'Lower-middle',
14 => 'Near Left',
15 => 'Upper Far Right',
16 => 'Lower Far Right',
17 => 'Lower Far Left',
18 => 'Upper Far Left',
},
},
},
# 0x017b and 0x017c also have to do with AFMicroAdj (ref JR)
0x017d => { #PH (verified for the SLT-A77/A99; other SLT models don't have this setting - ref JR)
# (different from AFMicroAdjValue because it is 0 when the adjustment is off)
Name => 'AFMicroAdj',
Condition => '$$self{Model} !~ /^ILCA-/',
Format => 'int8s',
},
0x017e => { #JR
Name => 'ExposureProgram',
Condition => '$$self{Model} !~ /^ILCA-/',
Priority => 0,
SeparateTable => 'ExposureProgram3',
PrintConv => \%sonyExposureProgram3,
},
# 0x01b8 - 65 AF Info blocks of 180 bytes each for SLT (ref JR)
# In each block, the 9th, 10th and 11th byte appear to relate to AFPoint as at offsets 0x07, 0x08, 0x09 above..
# Possibly, these blocks relate to sequential focusing attempts and/or object tracking,
# the first byte being an Index or Counter.
# The last block before the block with index 0, appears to relate to the AF data at ShutterRelease.
# 0xf38,0x1208,0x14d8,0x158c,0x1640,(and more) - 0 if AFMicroAdj is On, 1 if Off
# 0x1ab6 - 0x80 if AFMicroAdj is On, 0 if Off
# tags also related to AFPoint (PH, A77):
# 0x11ec, 0x122a, 0x1408, 0x1446, 0x14bc, 0x1f86,
# 0x14fa, 0x1570, 0x1572, 0x15ae, 0x1f48
### decoding for ILCA-68/77M2/99M2, AFType == 3
0x0005 => { #JR
Name => 'FocusMode',
Condition => '$$self{Model} =~ /^ILCA-/',
Notes => 'ILCA models only',
Writable => 'int8u',
Priority => 0,
PrintConv => {
0 => 'Manual',
2 => 'AF-S',
3 => 'AF-C',
4 => 'AF-A',
6 => 'DMF',
# 7 => 'AF-D', # not yet seen
},
},
# 0x0010 - for ILCA-68/77M2/99M2: 10 bytes identical to 0x2020, and probably indicating 'AFPointsUsed' (ref JR)
0x0010 => {
Name => 'AFPointsUsed',
Condition => '$$self{Model} =~ /^ILCA-/',
Format => 'int8u[10]',
BitsPerWord => 8,
BitsTotal => 80,
PrintConv => {
0 => '(none)',
BITMASK => { %afPoints79 },
},
},
# 0x0037, 0x0038, 0x0039 similar to 0x07, 0x08, 0x09, but using numbers from 0-94 for ILCA-68/77M2/99M2
0x0037 => { # the active AF sensor
Name => 'AFPoint',
Condition => '$$self{AFType} == 3',
PrintConv => {
%afPoints79_940e,
255 => '(none)',
},
},
0x0038 => { # the AF sensor in focus at focus time (shutter release half press)
Name => 'AFPointInFocus',
Condition => '$$self{AFType} == 3',
PrintConv => {
%afPoints79_940e,
255 => '(none)',
},
},
0x0039 => { # the AF sensor in focus at shutter release (shutter release full press)
Name => 'AFPointAtShutterRelease',
Condition => '$$self{AFType} == 3',
PrintConv => {
%afPoints79_940e,
95 => '(none)',
},
},
0x003a => { #JR
Name => 'AFAreaMode',
Condition => '$$self{Model} =~ /^ILCA-/',
PrintConv => {
0 => 'Wide',
1 => 'Center',
2 => 'Flexible Spot',
3 => 'Zone',
4 => 'Expanded Flexible Spot', #(NC)
},
},
0x003b => {
Name => 'AFStatusActiveSensor',
Condition => '$$self{Model} =~ /^ILCA-/',
%Image::ExifTool::Minolta::afStatusInfo,
},
0x0043 => {
Name => 'ExposureProgram',
Condition => '$$self{Model} =~ /^ILCA-/',
Priority => 0,
SeparateTable => 'ExposureProgram3',
PrintConv => \%sonyExposureProgram3,
},
# 0x004e and 0x004f also have to do with AFMicroAdj (ref JR)
0x0050 => { #PH (ILCA-A77M2, to be confirmed for other ILCA models)
Name => 'AFMicroAdj',
Condition => '$$self{Model} =~ /^ILCA-/',
Format => 'int8s',
},
# 0x007d - AFStatus79 - 95 int16s values for the ILCA-68/77M2/99M2: 79 AF points + 15 cross + 1 F2.8
0x007d => {
Name => 'AFStatus79',
Condition => '$$self{AFType} == 3',
Format => 'int16s[95]',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::AFStatus79' },
},
# 0x013b - 95 int8u values
# 0x01ab - 95 int8u values
# 0x021b - 95 int16s values, similar to 0x007d AFStatus79, but not sure if this is valid for ILCA-99M2
# 0x04c0 - 45 AF Info blocks of 244 bytes each for ILCA-68/77M2
# 0x12a0 - 30 AF Info blocks of 244 bytes each for ILCA-99M2
);
%Image::ExifTool::Sony::Tag940e = ( #JR
PROCESS_PROC => \&ProcessEnciphered,
WRITE_PROC => \&WriteEnciphered,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
FORMAT => 'int8u',
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
NOTES => 'E-mount models.',
# (see comment in AFInfo for deciphered values of first 4 bytes for various models)
# 0x0004 - if 0x0001 == 2: LA-EA2/EA4 15-point SLT Phase-detect AF adapter used:
# start of 164-byte AF Info Blocks, possibly the 11th byte might be the AFPoint.
# ILCE-7M2/7RM2/7SM2: 40 Blocks of 164 bytes
# other NEX/ILCE: 74 blocks of 164 bytes
# 0x1a06 onwards - first seen for ILCE-7RM2: appears to be some kind of metering image
0x1a06 => { Name => 'TiffMeteringImageWidth', Condition => '$$self{Model} =~ /^(ILCE-(6300|6500|7RM2|7SM2|9))\b/' },
0x1a07 => { Name => 'TiffMeteringImageHeight', Condition => '$$self{Model} =~ /^(ILCE-(6300|6500|7RM2|7SM2|9))\b/' },
0x1a08 => { # (2640 bytes: 1 set of 44x30 int16u values)
Name => 'TiffMeteringImage',
Condition => '$$self{Model} =~ /^(ILCE-(6300|6500|7RM2|7SM2|9))\b/',
Format => 'undef[2640]',
Notes => q{
13(?)-bit intensity data from 1320 (1200) metering segments, extracted as a
16-bit TIFF image
},
ValueConv => sub {
my ($val, $et) = @_;
return undef unless length $val >= 2640;
return \ "Binary data 2640 bytes" unless $et->Options('Binary');
my @dat = unpack('v*', $val);
# TIFF header for a 16-bit RGB 10dpi 44x30 image
$val = Image::ExifTool::MakeTiffHeader(44,30,3,16,10);
# re-order data to RGB pixels - use same value for R, G and B
my ($i, @val);
for ($i=0; $i<44*30; ++$i) {
# data is 13-bit (max 8191), shift left to fill 16 bits
push @val, int(5041.1*log($dat[$i]+1)/log(2)), int(5041.1*log($dat[$i]+1)/log(2)), int(5041.1*log($dat[$i]+1)/log(2));
}
$val .= pack('v*', @val); # add TIFF strip data
return \$val;
},
},
);
# AF Point Status (ref JR)
%Image::ExifTool::Sony::AFStatus15 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'AF Status information for models with 15-point AF.',
0x00 => { Name => 'AFStatusUpper-left', %Image::ExifTool::Minolta::afStatusInfo },
0x02 => { Name => 'AFStatusLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x04 => { Name => 'AFStatusLower-left', %Image::ExifTool::Minolta::afStatusInfo },
0x06 => { Name => 'AFStatusFarLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x08 => { Name => 'AFStatusTopHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x0a => { Name => 'AFStatusNearRight', %Image::ExifTool::Minolta::afStatusInfo },
0x0c => { Name => 'AFStatusCenterHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x0e => { Name => 'AFStatusNearLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x10 => { Name => 'AFStatusBottomHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x12 => { Name => 'AFStatusTopVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x14 => { Name => 'AFStatusCenterVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x16 => { Name => 'AFStatusBottomVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x18 => { Name => 'AFStatusFarRight', %Image::ExifTool::Minolta::afStatusInfo },
0x1a => { Name => 'AFStatusUpper-right', %Image::ExifTool::Minolta::afStatusInfo },
0x1c => { Name => 'AFStatusRight', %Image::ExifTool::Minolta::afStatusInfo },
0x1e => { Name => 'AFStatusLower-right', %Image::ExifTool::Minolta::afStatusInfo },
0x20 => { Name => 'AFStatusUpper-middle', %Image::ExifTool::Minolta::afStatusInfo },
0x22 => { Name => 'AFStatusLower-middle', %Image::ExifTool::Minolta::afStatusInfo },
);
# AF Point Status (ref JR)
%Image::ExifTool::Sony::AFStatus19 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'AF Status information for models with 19-point AF.',
0x00 => { Name => 'AFStatusUpperFarLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x02 => { Name => 'AFStatusUpper-leftHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x04 => { Name => 'AFStatusFarLeftHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x06 => { Name => 'AFStatusLeftHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x08 => { Name => 'AFStatusLowerFarLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x0a => { Name => 'AFStatusLower-leftHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x0c => { Name => 'AFStatusUpper-leftVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x0e => { Name => 'AFStatusLeftVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x10 => { Name => 'AFStatusLower-leftVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x12 => { Name => 'AFStatusFarLeftVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x14 => { Name => 'AFStatusTopHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x16 => { Name => 'AFStatusNearRight', %Image::ExifTool::Minolta::afStatusInfo },
0x18 => { Name => 'AFStatusCenterHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x1a => { Name => 'AFStatusNearLeft', %Image::ExifTool::Minolta::afStatusInfo },
0x1c => { Name => 'AFStatusBottomHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x1e => { Name => 'AFStatusTopVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x20 => { Name => 'AFStatusUpper-middle', %Image::ExifTool::Minolta::afStatusInfo },
0x22 => { Name => 'AFStatusCenterVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x24 => { Name => 'AFStatusLower-middle', %Image::ExifTool::Minolta::afStatusInfo },
0x26 => { Name => 'AFStatusBottomVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x28 => { Name => 'AFStatusUpperFarRight', %Image::ExifTool::Minolta::afStatusInfo },
0x2a => { Name => 'AFStatusUpper-rightHorizontal',%Image::ExifTool::Minolta::afStatusInfo },
0x2c => { Name => 'AFStatusFarRightHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x2e => { Name => 'AFStatusRightHorizontal', %Image::ExifTool::Minolta::afStatusInfo },
0x30 => { Name => 'AFStatusLowerFarRight', %Image::ExifTool::Minolta::afStatusInfo },
0x32 => { Name => 'AFStatusLower-rightHorizontal',%Image::ExifTool::Minolta::afStatusInfo },
0x34 => { Name => 'AFStatusFarRightVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x36 => { Name => 'AFStatusUpper-rightVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x38 => { Name => 'AFStatusRightVertical', %Image::ExifTool::Minolta::afStatusInfo },
0x3a => { Name => 'AFStatusLower-rightVertical', %Image::ExifTool::Minolta::afStatusInfo },
);
# AF Point Status (ref JR)
%Image::ExifTool::Sony::AFStatus79 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'AF Status information for models with 79-point AF.',
#
# ILCA-68/77M2 AF sensor layout:
# A5* A6* A7*
# B2 B3 B4 B5 B6 B7 B8 B9 B10
# C1 C2 C3 C4 C5* C6* C7* C8 C9 C10 C11
# D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11
# E1 E2 E3 E4 E5* E6* E7* E8 E9 E10 E11
# F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11
# G1 G2 G3 G4 G5* G6* G7* G8 G9 G10 G11
# H2 H3 H4 H5 H6 H7 H8 H9 H10
# I5* I6* I7*
# left section, from top to bottom, from right to left
0x00 => { Name => 'AFStatus_00_B4', %Image::ExifTool::Minolta::afStatusInfo },
0x02 => { Name => 'AFStatus_01_C4', %Image::ExifTool::Minolta::afStatusInfo },
0x04 => { Name => 'AFStatus_02_D4', %Image::ExifTool::Minolta::afStatusInfo },
0x06 => { Name => 'AFStatus_03_E4', %Image::ExifTool::Minolta::afStatusInfo },
0x08 => { Name => 'AFStatus_04_F4', %Image::ExifTool::Minolta::afStatusInfo },
0x0a => { Name => 'AFStatus_05_G4', %Image::ExifTool::Minolta::afStatusInfo },
0x0c => { Name => 'AFStatus_06_H4', %Image::ExifTool::Minolta::afStatusInfo },
0x0e => { Name => 'AFStatus_07_B3', %Image::ExifTool::Minolta::afStatusInfo },
0x10 => { Name => 'AFStatus_08_C3', %Image::ExifTool::Minolta::afStatusInfo },
0x12 => { Name => 'AFStatus_09_D3', %Image::ExifTool::Minolta::afStatusInfo },
0x14 => { Name => 'AFStatus_10_E3', %Image::ExifTool::Minolta::afStatusInfo },
0x16 => { Name => 'AFStatus_11_F3', %Image::ExifTool::Minolta::afStatusInfo },
0x18 => { Name => 'AFStatus_12_G3', %Image::ExifTool::Minolta::afStatusInfo },
0x1a => { Name => 'AFStatus_13_H3', %Image::ExifTool::Minolta::afStatusInfo },
0x1c => { Name => 'AFStatus_14_B2', %Image::ExifTool::Minolta::afStatusInfo },
0x1e => { Name => 'AFStatus_15_C2', %Image::ExifTool::Minolta::afStatusInfo },
0x20 => { Name => 'AFStatus_16_D2', %Image::ExifTool::Minolta::afStatusInfo },
0x22 => { Name => 'AFStatus_17_E2', %Image::ExifTool::Minolta::afStatusInfo },
0x24 => { Name => 'AFStatus_18_F2', %Image::ExifTool::Minolta::afStatusInfo },
0x26 => { Name => 'AFStatus_19_G2', %Image::ExifTool::Minolta::afStatusInfo },
0x28 => { Name => 'AFStatus_20_H2', %Image::ExifTool::Minolta::afStatusInfo },
0x2a => { Name => 'AFStatus_21_C1', %Image::ExifTool::Minolta::afStatusInfo },
0x2c => { Name => 'AFStatus_22_D1', %Image::ExifTool::Minolta::afStatusInfo },
0x2e => { Name => 'AFStatus_23_E1', %Image::ExifTool::Minolta::afStatusInfo },
0x30 => { Name => 'AFStatus_24_F1', %Image::ExifTool::Minolta::afStatusInfo },
0x32 => { Name => 'AFStatus_25_G1', %Image::ExifTool::Minolta::afStatusInfo },
# center section, cross-sensors *, from right to left, from top to bottom
# These are presumably Vertical, as all others are default Horizontal (ref Sony ILCA-77M2 brochure).
0x34 => { Name => 'AFStatus_26_A7_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x36 => { Name => 'AFStatus_27_A6_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x38 => { Name => 'AFStatus_28_A5_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x3a => { Name => 'AFStatus_29_C7_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x3c => { Name => 'AFStatus_30_C6_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x3e => { Name => 'AFStatus_31_C5_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x40 => { Name => 'AFStatus_32_E7_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x42 => { Name => 'AFStatus_33_E6_Center_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x44 => { Name => 'AFStatus_34_E5_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x46 => { Name => 'AFStatus_35_G7_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x48 => { Name => 'AFStatus_36_G6_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x4a => { Name => 'AFStatus_37_G5_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x4c => { Name => 'AFStatus_38_I7_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x4e => { Name => 'AFStatus_39_I6_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
0x50 => { Name => 'AFStatus_40_I5_Vertical', %Image::ExifTool::Minolta::afStatusInfo },
# center section, all sensors, from top to bottom, from right to left
0x52 => { Name => 'AFStatus_41_A7', %Image::ExifTool::Minolta::afStatusInfo },
0x54 => { Name => 'AFStatus_42_B7', %Image::ExifTool::Minolta::afStatusInfo },
0x56 => { Name => 'AFStatus_43_C7', %Image::ExifTool::Minolta::afStatusInfo },
0x58 => { Name => 'AFStatus_44_D7', %Image::ExifTool::Minolta::afStatusInfo },
0x5a => { Name => 'AFStatus_45_E7', %Image::ExifTool::Minolta::afStatusInfo },
0x5c => { Name => 'AFStatus_46_F7', %Image::ExifTool::Minolta::afStatusInfo },
0x5e => { Name => 'AFStatus_47_G7', %Image::ExifTool::Minolta::afStatusInfo },
0x60 => { Name => 'AFStatus_48_H7', %Image::ExifTool::Minolta::afStatusInfo },
0x62 => { Name => 'AFStatus_49_I7', %Image::ExifTool::Minolta::afStatusInfo },
0x64 => { Name => 'AFStatus_50_A6', %Image::ExifTool::Minolta::afStatusInfo },
0x66 => { Name => 'AFStatus_51_B6', %Image::ExifTool::Minolta::afStatusInfo },
0x68 => { Name => 'AFStatus_52_C6', %Image::ExifTool::Minolta::afStatusInfo },
0x6a => { Name => 'AFStatus_53_D6', %Image::ExifTool::Minolta::afStatusInfo },
0x6c => { Name => 'AFStatus_54_E6_Center', %Image::ExifTool::Minolta::afStatusInfo },
0x6e => { Name => 'AFStatus_55_F6', %Image::ExifTool::Minolta::afStatusInfo },
0x70 => { Name => 'AFStatus_56_G6', %Image::ExifTool::Minolta::afStatusInfo },
0x72 => { Name => 'AFStatus_57_H6', %Image::ExifTool::Minolta::afStatusInfo },
0x74 => { Name => 'AFStatus_58_I6', %Image::ExifTool::Minolta::afStatusInfo },
0x76 => { Name => 'AFStatus_59_A5', %Image::ExifTool::Minolta::afStatusInfo },
0x78 => { Name => 'AFStatus_60_B5', %Image::ExifTool::Minolta::afStatusInfo },
0x7a => { Name => 'AFStatus_61_C5', %Image::ExifTool::Minolta::afStatusInfo },
0x7c => { Name => 'AFStatus_62_D5', %Image::ExifTool::Minolta::afStatusInfo },
0x7e => { Name => 'AFStatus_63_E5', %Image::ExifTool::Minolta::afStatusInfo },
0x80 => { Name => 'AFStatus_64_F5', %Image::ExifTool::Minolta::afStatusInfo },
0x82 => { Name => 'AFStatus_65_G5', %Image::ExifTool::Minolta::afStatusInfo },
0x84 => { Name => 'AFStatus_66_H5', %Image::ExifTool::Minolta::afStatusInfo },
0x86 => { Name => 'AFStatus_67_I5', %Image::ExifTool::Minolta::afStatusInfo },
# right section, from top to bottom, from right to left
0x88 => { Name => 'AFStatus_68_C11', %Image::ExifTool::Minolta::afStatusInfo },
0x8a => { Name => 'AFStatus_69_D11', %Image::ExifTool::Minolta::afStatusInfo },
0x8c => { Name => 'AFStatus_70_E11', %Image::ExifTool::Minolta::afStatusInfo },
0x8e => { Name => 'AFStatus_71_F11', %Image::ExifTool::Minolta::afStatusInfo },
0x90 => { Name => 'AFStatus_72_G11', %Image::ExifTool::Minolta::afStatusInfo },
0x92 => { Name => 'AFStatus_73_B10', %Image::ExifTool::Minolta::afStatusInfo },
0x94 => { Name => 'AFStatus_74_C10', %Image::ExifTool::Minolta::afStatusInfo },
0x96 => { Name => 'AFStatus_75_D10', %Image::ExifTool::Minolta::afStatusInfo },
0x98 => { Name => 'AFStatus_76_E10', %Image::ExifTool::Minolta::afStatusInfo },
0x9a => { Name => 'AFStatus_77_F10', %Image::ExifTool::Minolta::afStatusInfo },
0x9c => { Name => 'AFStatus_78_G10', %Image::ExifTool::Minolta::afStatusInfo },
0x9e => { Name => 'AFStatus_79_H10', %Image::ExifTool::Minolta::afStatusInfo },
0xa0 => { Name => 'AFStatus_80_B9', %Image::ExifTool::Minolta::afStatusInfo },
0xa2 => { Name => 'AFStatus_81_C9', %Image::ExifTool::Minolta::afStatusInfo },
0xa4 => { Name => 'AFStatus_82_D9', %Image::ExifTool::Minolta::afStatusInfo },
0xa6 => { Name => 'AFStatus_83_E9', %Image::ExifTool::Minolta::afStatusInfo },
0xa8 => { Name => 'AFStatus_84_F9', %Image::ExifTool::Minolta::afStatusInfo },
0xaa => { Name => 'AFStatus_85_G9', %Image::ExifTool::Minolta::afStatusInfo },
0xac => { Name => 'AFStatus_86_H9', %Image::ExifTool::Minolta::afStatusInfo },
0xae => { Name => 'AFStatus_87_B8', %Image::ExifTool::Minolta::afStatusInfo },
0xb0 => { Name => 'AFStatus_88_C8', %Image::ExifTool::Minolta::afStatusInfo },
0xb2 => { Name => 'AFStatus_89_D8', %Image::ExifTool::Minolta::afStatusInfo },
0xb4 => { Name => 'AFStatus_90_E8', %Image::ExifTool::Minolta::afStatusInfo },
0xb6 => { Name => 'AFStatus_91_F8', %Image::ExifTool::Minolta::afStatusInfo },
0xb8 => { Name => 'AFStatus_92_G8', %Image::ExifTool::Minolta::afStatusInfo },
0xba => { Name => 'AFStatus_93_H8', %Image::ExifTool::Minolta::afStatusInfo },
# central F2.8 sensor
0xbc => { Name => 'AFStatus_94_E6_Center_F2-8', %Image::ExifTool::Minolta::afStatusInfo },
);
%Image::ExifTool::Sony::FaceInfo1 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x00 => {
Name => 'Face1Position',
Format => 'int16u[4]',
Notes => q{
top, left, height and width of detected face. Coordinates are relative to
the full-sized unrotated image, with increasing Y downwards
},
RawConv => '$$self{FacesDetected} < 1 ? undef : $val',
},
0x20 => {
Name => 'Face2Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 2 ? undef : $val',
},
0x40 => {
Name => 'Face3Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 3 ? undef : $val',
},
0x60 => {
Name => 'Face4Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 4 ? undef : $val',
},
0x80 => {
Name => 'Face5Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 5 ? undef : $val',
},
0xa0 => {
Name => 'Face6Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 6 ? undef : $val',
},
0xc0 => {
Name => 'Face7Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 7 ? undef : $val',
},
0xe0 => {
Name => 'Face8Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 8 ? undef : $val',
},
);
%Image::ExifTool::Sony::FaceInfo2 = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
0x00 => {
Name => 'Face1Position',
Format => 'int16u[4]',
Notes => q{
top, left, height and width of detected face. Coordinates are relative to
the full-sized unrotated image, with increasing Y downwards
},
RawConv => '$$self{FacesDetected} < 1 ? undef : $val',
},
0x25 => {
Name => 'Face2Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 2 ? undef : $val',
},
0x4a => {
Name => 'Face3Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 3 ? undef : $val',
},
0x6f => {
Name => 'Face4Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 4 ? undef : $val',
},
0x94 => {
Name => 'Face5Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 5 ? undef : $val',
},
0xb9 => {
Name => 'Face6Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 6 ? undef : $val',
},
0xde => {
Name => 'Face7Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 7 ? undef : $val',
},
0x103 => {
Name => 'Face8Position',
Format => 'int16u[4]',
RawConv => '$$self{FacesDetected} < 8 ? undef : $val',
},
);
# panorama info for cameras such as the HX1, HX5, TX7 (ref 9/PH)
%Image::ExifTool::Sony::Panorama = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
FORMAT => 'int32u',
NOTES => q{
Tags found in panorama images from various Sony DSC, NEX, SLT and DSLR
cameras. The width/height values of these tags are not affected by camera
rotation -- the width is always the longer dimension.
},
# 0: 257 for panorama images, 0 for all other images (ref JR)
1 => 'PanoramaFullWidth', # (including black/gray borders)
2 => 'PanoramaFullHeight',
3 => {
Name => 'PanoramaDirection',
PrintConv => {
0 => 'Left or Up',
1 => 'Right or Down',
},
},
# crop area to remove black/gray borders from full image
4 => 'PanoramaCropLeft',
5 => 'PanoramaCropTop', #PH guess (NC)
6 => 'PanoramaCropRight',
7 => 'PanoramaCropBottom',
# 8: 1728 (HX1), 1824 (HX5/TX7) (value8/value9 = 16/9)
8 => 'PanoramaFrameWidth', #PH guess (NC)
# 9: 972 (HX1), 1026 (HX5/TX7)
9 => 'PanoramaFrameHeight', #PH guess (NC)
# 10: 3200-3800 (HX1), 4000-4900 (HX5/TX7)
10 => 'PanoramaSourceWidth', #PH guess (NC)
# 11: 800-1800 (larger for taller panoramas)
11 => 'PanoramaSourceHeight', #PH guess (NC)
# 12-15: 0
);
# tag table for SRF0 IFD (ref 1)
%Image::ExifTool::Sony::SRF = (
PROCESS_PROC => \&ProcessSRF,
GROUPS => { 0 => 'MakerNotes', 1 => 'SRF#', 2 => 'Camera' },
NOTES => q{
The maker notes in SRF (Sony Raw Format) images contain 7 IFD's with family
1 group names SRF0 through SRF6. SRF0 and SRF1 use the tags in this table,
while SRF2 through SRF5 use the tags in the next table, and SRF6 uses
standard EXIF tags. All information other than SRF0 is encrypted, but
thanks to Dave Coffin the decryption algorithm is known. SRF images are
written by the Sony DSC-F828 and DSC-V3.
},
# tags 0-1 are used in SRF1
0 => {
Name => 'SRF2Key',
Notes => 'key to decrypt maker notes from the start of SRF2',
RawConv => '$$self{SRF2Key} = $val',
},
1 => {
Name => 'DataKey',
Notes => 'key to decrypt the rest of the file from the end of the maker notes',
RawConv => '$$self{SRFDataKey} = $val',
},
# SRF0 contains a single unknown tag with TagID 0x0003
);
# tag table for Sony RAW Format (ref 1)
%Image::ExifTool::Sony::SRF2 = (
PROCESS_PROC => \&ProcessSRF,
GROUPS => { 0 => 'MakerNotes', 1 => 'SRF#', 2 => 'Camera' },
NOTES => "These tags are found in the SRF2 through SRF5 IFD's.",
# the following tags are used in SRF2-5
2 => 'SRF6Offset', #PH
# SRFDataOffset references 2220 bytes of unknown data for the DSC-F828 - PH
3 => { Name => 'SRFDataOffset', Unknown => 1 }, #PH
4 => { Name => 'RawDataOffset' }, #PH
5 => { Name => 'RawDataLength' }, #PH
0x0043 => 'MaxApertureAtMaxFocal', #IB
0x0044 => 'MaxApertureAtMinFocal', #IB
0x0045 => { #IB
Name => 'MinFocalLength',
PrintConv => '"$val mm"',
},
0x0046 => { #IB
Name => 'MaxFocalLength',
PrintConv => '"$val mm"',
},
0x00c0 => 'WBRedDaylight', #IB
0x00c1 => 'WBGreenDaylight', #IB
0x00c2 => 'WBBlueDaylight', #IB
0x00c3 => 'WBRedCloudy', #IB
0x00c4 => 'WBGreenCloudy', #IB
0x00c5 => 'WBBlueCloudy', #IB
0x00c9 => 'WBRedTungsten', #IB
0x00ca => 'WBGreenTungsten', #IB
0x00cb => 'WBBlueTungsten', #IB
0x00cc => 'WBRedFlash', #IB
0x00cd => 'WBGreenFlash', #IB
0x00ce => 'WBBlueFlash', #IB
0x00d0 => 'WBRedAsShot', #IB
0x00d1 => 'WBGreenAsShot', #IB
0x00d2 => 'WBBlueAsShot', #IB
);
# tag table for Sony RAW 2 Format Private IFD (ref 1)
%Image::ExifTool::Sony::SR2Private = (
PROCESS_PROC => \&ProcessSR2,
WRITE_PROC => \&WriteSR2,
GROUPS => { 0 => 'MakerNotes', 1 => 'SR2', 2 => 'Camera' },
NOTES => q{
The SR2 format uses the DNGPrivateData tag to reference a private IFD
containing these tags. SR2 images are written by the Sony DSC-R1, but
this information is also written to ARW images by other models.
},
0x7200 => {
Name => 'SR2SubIFDOffset',
# (adjusting offset messes up calculations for AdobeSR2 in DNG images)
# Flags => 'IsOffset',
# (can't set OffsetPair or else DataMember won't be set when writing)
# OffsetPair => 0x7201,
DataMember => 'SR2SubIFDOffset',
RawConv => '$$self{SR2SubIFDOffset} = $val',
},
0x7201 => {
Name => 'SR2SubIFDLength',
# (can't set OffsetPair or else DataMember won't be set when writing)
# OffsetPair => 0x7200,
DataMember => 'SR2SubIFDLength',
RawConv => '$$self{SR2SubIFDLength} = $val',
},
0x7221 => {
Name => 'SR2SubIFDKey',
Format => 'int32u',
Notes => 'key to decrypt SR2SubIFD',
DataMember => 'SR2SubIFDKey',
RawConv => '$$self{SR2SubIFDKey} = $val',
PrintConv => 'sprintf("0x%.8x", $val)',
},
0x7240 => { #PH
Name => 'IDC_IFD',
Groups => { 1 => 'SonyIDC' },
Condition => '$$valPt !~ /^\0\0\0\0/', # (just in case this could be zero)
Flags => 'SubIFD',
SubDirectory => {
DirName => 'SonyIDC',
TagTable => 'Image::ExifTool::SonyIDC::Main',
Start => '$val',
},
},
0x7241 => { #PH
Name => 'IDC2_IFD',
Groups => { 1 => 'SonyIDC' },
Condition => '$$valPt !~ /^\0\0\0\0/', # may be zero if dir doesn't exist
Flags => 'SubIFD',
SubDirectory => {
DirName => 'SonyIDC2',
TagTable => 'Image::ExifTool::SonyIDC::Main',
Start => '$val',
Base => '$start',
MaxSubdirs => 20, # (A900 has 10 null entries, but IDC writes only 1)
RelativeBase => 1, # needed to write SubIFD with relative offsets
},
},
0x7250 => { #1
Name => 'MRWInfo',
Condition => '$$valPt !~ /^\0\0\0\0/', # (just in case this could be zero)
SubDirectory => {
TagTable => 'Image::ExifTool::MinoltaRaw::Main',
},
},
);
%Image::ExifTool::Sony::SR2SubIFD = (
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
GROUPS => { 0 => 'MakerNotes', 1 => 'SR2SubIFD', 2 => 'Camera' },
SET_GROUP1 => 1, # set group1 name to directory name for all tags in table
NOTES => 'Tags in the encrypted SR2SubIFD',
0x7300 => 'BlackLevel', #IB (R1)
0x7302 => 'WB_GRBGLevelsAuto', #IB (R1)
0x7303 => 'WB_GRBGLevels', #1 (R1 "as shot", ref IB)
0x7310 => 'BlackLevel', #IB (divide by 4)
0x7313 => 'WB_RGGBLevels', #6
0x7480 => 'WB_RGBLevelsDaylight', #IB (R1)
0x7481 => 'WB_RGBLevelsCloudy', #IB (R1)
0x7482 => 'WB_RGBLevelsTungsten', #IB (R1)
0x7483 => 'WB_RGBLevelsFlash', #IB (R1)
0x7484 => 'WB_RGBLevels4500K', #IB (R1)
0x7486 => 'WB_RGBLevelsFluorescent', #IB (R1)
0x74a0 => 'MaxApertureAtMaxFocal', #PH
0x74a1 => 'MaxApertureAtMinFocal', #PH
0x74a2 => { #IB (R1)
Name => 'MaxFocalLength',
PrintConv => '"$val mm"',
},
0x74a3 => { #IB (R1)
Name => 'MinFocalLength',
PrintConv => '"$val mm"',
},
0x74c0 => { #PH
Name => 'SR2DataIFD',
Groups => { 1 => 'SR2DataIFD' }, # (needed to set SubIFD DirName)
Flags => 'SubIFD',
SubDirectory => {
TagTable => 'Image::ExifTool::Sony::SR2DataIFD',
Start => '$val',
MaxSubdirs => 20, # an A700 ARW has 14 of these! - PH
},
},
0x7800 => 'ColorMatrix', #IB (divide by 1024)
0x7820 => 'WB_RGBLevelsDaylight', #6 (or 5300K, ref IB)
0x7821 => 'WB_RGBLevelsCloudy', #6 (or 6100K, ref IB)
0x7822 => 'WB_RGBLevelsTungsten', #6
0x7823 => 'WB_RGBLevelsFlash', #IB
0x7824 => 'WB_RGBLevels4500K', #IB
0x7825 => 'WB_RGBLevelsShade', #6 (or 7500K, ref IB)
0x7826 => 'WB_RGBLevelsFluorescent', #6 (~4000K)
0x7827 => 'WB_RGBLevelsFluorescentP1', #IB (~5000K)
0x7828 => 'WB_RGBLevelsFluorescentP2', #IB (~6500K) (was Flash, ref 6)
0x7829 => 'WB_RGBLevelsFluorescentM1', #IB (~3500K)
0x782a => 'WB_RGBLevels8500K', #IB
0x782b => 'WB_RGBLevels6000K', #IB
0x782c => 'WB_RGBLevels3200K', #IB
0x782d => 'WB_RGBLevels2500K', #IB
0x787f => 'WhiteLevel', #IB (divide by 4)
0x797d => 'VignettingCorrParams', #forum7640
0x7980 => 'ChromaticAberrationCorrParams', #forum6509 (Sony A7 ARW)
0x7982 => 'DistortionCorrParams', #forum6509 (Sony A7 ARW)
);
%Image::ExifTool::Sony::SR2DataIFD = (
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
GROUPS => { 0 => 'MakerNotes', 1 => 'SR2DataIFD', 2 => 'Camera' },
SET_GROUP1 => 1, # set group1 name to directory name for all tags in table
# 0x7313 => 'WB_RGGBLevels', (duplicated in all SR2DataIFD's)
0x7770 => { #PH
Name => 'ColorMode',
Priority => 0,
},
);
# extract information from "SONY PIC\0" maker notes (ref PH)
%Image::ExifTool::Sony::PIC = (
PROCESS_PROC => \&ProcessSonyPIC,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => q{
The TextInfo data is extracted as a block to preserve the formatting, and
some of the more interesting information is extracted as separate tags.
},
TextInfo1 => { Binary => 1 },
TextInfo2 => { Binary => 1 },
# tags extracted from TextInfo blocks (ID's must end with ':')
'Temp:' => {
Name => 'CameraTemperature',
RawConv => '$val =~ /^-?\d+/ ? $val : undef',
PrintConv => '"$val C"',
},
'Temp:Clbt:' => { Name => 'BoardTemperature', PrintConv => '"$val C"' }, #(NC)
'Capt:' => { Name => 'SensorTemperature', PrintConv => '"$val C"' }, #(NC)
'VR Enable C:' => {
Name => 'VibrationReduction',
PrintConv => { 0 => 'Off', 1 => 'On' }, #(NC)
},
'FWVer:' => 'FirmwareVersion',
'BC:' => {
Name => 'Barcode',
Condition => 'not $$self{VALUE}{Barcode}',
ValueConv => '$val=~s/IP1.*//; $val',
},
'barcode:' => 'Barcode',
'BarCode:' => {
Name => 'Barcode',
ValueConv => 'length($val) > 12 ? substr($val,0,12) : $val',
},
# 'EvA:' - exposure compensation * 10 (ref JR)
# for documentation only -- this IFD is handled manually
IFD => {
Name => 'PIC_IFD',
SubDirectory => { TagTable => 'Image::ExifTool::Sony::Main' },
},
);
# tags found in DSC-F1 PMP header (ref 10)
%Image::ExifTool::Sony::PMP = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
FIRST_ENTRY => 0,
NOTES => q{
These tags are written in the proprietary-format header of PMP images from
the DSC-F1.
},
8 => { #PH
Name => 'JpgFromRawStart',
Format => 'int32u',
Notes => q{
OK, not really a RAW file, but this mechanism is used to allow extraction of
the JPEG image from a PMP file
},
},
12 => { Name => 'JpgFromRawLength', Format => 'int32u' },
22 => { Name => 'SonyImageWidth', Format => 'int16u' },
24 => { Name => 'SonyImageHeight', Format => 'int16u' },
27 => {
Name => 'Orientation',
PrintConv => {
0 => 'Horizontal (normal)',
1 => 'Rotate 270 CW',#11
2 => 'Rotate 180',
3 => 'Rotate 90 CW',#11
},
},
29 => {
Name => 'ImageQuality',
PrintConv => {
8 => 'Snap Shot',
23 => 'Standard',
51 => 'Fine',
},
},
# 40 => ImageWidth again (int16u)
# 42 => ImageHeight again (int16u)
52 => { Name => 'Comment', Format => 'string[19]' },
76 => {
Name => 'DateTimeOriginal',
Description => 'Date/Time Original',
Format => 'int8u[6]',
Groups => { 2 => 'Time' },
ValueConv => q{
my @a = split ' ', $val;
$a[0] += $a[0] < 70 ? 2000 : 1900;
sprintf('%.4d:%.2d:%.2d %.2d:%.2d:%.2d', @a);
},
PrintConv => '$self->ConvertDateTime($val)',
},
84 => {
Name => 'ModifyDate',
Format => 'int8u[6]',
Groups => { 2 => 'Time' },
ValueConv => q{
my @a = split ' ', $val;
$a[0] += $a[0] < 70 ? 2000 : 1900;
sprintf('%.4d:%.2d:%.2d %.2d:%.2d:%.2d', @a);
},
PrintConv => '$self->ConvertDateTime($val)',
},
102 => {
Name => 'ExposureTime',
Format => 'int16s',
RawConv => '$val <= 0 ? undef : $val',
ValueConv => '2 ** (-$val / 100)',
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
},
106 => { # (NC -- not written by DSC-F1)
Name => 'FNumber',
Format => 'int16s',
RawConv => '$val <= 0 ? undef : $val',
ValueConv => '$val / 100', # (likely wrong)
},
108 => { # (NC -- not written by DSC-F1)
Name => 'ExposureCompensation',
Format => 'int16s',
RawConv => '($val == -1 or $val == -32768) ? undef : $val',
ValueConv => '$val / 100', # (probably wrong too)
},
112 => { # (NC -- not written by DSC-F1)
Name => 'FocalLength',
Format => 'int16s',
Groups => { 2 => 'Camera' },
RawConv => '$val <= 0 ? undef : $val',
ValueConv => '$val / 100',
PrintConv => 'sprintf("%.1f mm",$val)',
},
118 => {
Name => 'Flash',
Groups => { 2 => 'Camera' },
PrintConv => { 0 => 'No Flash', 1 => 'Fired' },
},
);
# tags found in 'rtmd' timed metadata (ref PH, ILCE-7S MP4)
%Image::ExifTool::Sony::rtmd = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 2 => 'Camera' },
FIRST_ENTRY => 0,
NOTES => q{
These tags are extracted from the 'rtmd' timed metadata of MP4 videos from
some models when the ExtractEmbedded option is used.
},
# 0x0e = int8u some minutes
# 0x0f = int8u some seconds
# 0x11 = int8u frame number? (0-25)
0xe4 => {
Name => 'DateTime',
Groups => { 2 => 'Time' },
Format => 'undef[7]',
ValueConv => 'my @a=unpack("H4H2H2H2H2H2",$val); "$a[0]:$a[1]:$a[2] $a[3]:$a[4]:$a[5]"',
PrintConv => '$self->ConvertDateTime($val)',
},
);
# Composite Sony tags
%Image::ExifTool::Sony::Composite = (
GROUPS => { 2 => 'Camera' },
FocusDistance => {
Require => {
0 => 'Sony:FocusPosition',
1 => 'FocalLength',
},
Notes => 'distance in metres = FocusPosition * FocalLength / 1000',
ValueConv => '$val >= 128 ? "inf" : $val * $val[1] / 1000',
PrintConv => '$val eq "inf" ? $val : "$val m"',
},
FocusDistance2 => {
# For DSLR-A550 and newer, NEX/ILCE/SLT/ILCA (only A65V/A77V are missing ...):
# seen FocusPosition2 with values from 80 - 255 (and 21 for Touit 12mm...)
# Formula from minolta.pm (WBInfoA100 - 0x49bb) gives mostly correct/acceptable distance indications.
# (http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3688.0.html)
# if this value is the 35mm equivalent magnification, then the formula could
# be (1.5 * 2**($val/16-5)+1) * FocalLength, but this tends to underestimate
# distance by about 18% (ref 20) (255=inf)
# modified 16-10-2014 based on A99V measurements: use FocalLengthIn35mmFormat and leave out the "1.5*" factor.
Require => {
0 => 'Sony:FocusPosition2',
1 => 'FocalLengthIn35mmFormat',
},
ValueConv => q{
return undef unless $val;
return 'inf' if $val >= 255;
return (2**($val/16-5) + 1) * $val[1] / 1000;
},
PrintConv => '$val eq "inf" ? $val : sprintf("%.2f m",$val)',
},
);
# add our composite tags
Image::ExifTool::AddCompositeTags('Image::ExifTool::Sony');
sub SortLensTypes
{
return $a <=> $b unless $a =~ /\./ and $b =~ /\./;
my @a = split /\./, $a;
my @b = split /\./, $b;
# must compare the decimal part separately to sort in proper order
return $a[0] <=> $b[0] || $a[1] <=> $b[1];
}
# fill in Sony LensType lookup based on Minolta values
{
my $minoltaTypes = \%Image::ExifTool::Minolta::minoltaLensTypes;
%sonyLensTypes = %$minoltaTypes;
my $other = $$minoltaTypes{OTHER};
delete $$minoltaTypes{Notes}; # (temporarily)
delete $$minoltaTypes{OTHER}; # (temporarily)
my $id;
# 5-digit lens ID's are missing the last digit (usually "1") in the metadata for
# some Sony models, so generate corresponding 4-digit entries for these cameras
foreach $id (sort SortLensTypes keys %$minoltaTypes) {
next if $id < 10000;
my $sid = int($id/10);
my $i;
my $lens = $$minoltaTypes{$id};
if ($sonyLensTypes{$sid}) {
# put lens name with "or" first in list
if ($lens =~ / or /) {
my $tmp = $sonyLensTypes{$sid};
$sonyLensTypes{$sid} = $lens;
$lens = $tmp;
}
for (;;) {
$i = ($i || 0) + 1;
$sid = int($id/10) . ".$i";
last unless $sonyLensTypes{$sid};
}
}
$sonyLensTypes{$sid} = $lens;
}
$$minoltaTypes{Notes} = $sonyLensTypes{Notes}; # (restore original Notes)
$$minoltaTypes{OTHER} = $other;
}
#------------------------------------------------------------------------------
# Process "SONY PIC\0" maker notes (DSC-H200/J10/W370/W510, MHS-TS20, ref PH)
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1
sub ProcessSonyPIC($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $dataPt = $$dirInfo{DataPt};
my $start = $$dirInfo{DirStart} || 0;
my $len = $$dirInfo{DirLen} || (length($$dataPt) - $start);
my $data = substr($$dataPt, $start, $len);
# H200 panorama images have an IFD at offset 12 (non-panoramas have 0's here)
# - assume other images could too, but do a bit of validation to check
# - MHS-TS20 images have some other data here
if ($len >= 26) {
my $count = Get16u($dataPt, $start + 12);
if ($count > 256) {
ToggleByteOrder();
$count = Get16u($dataPt, $start + 12);
}
if ($count and $count < 256) {
my $format = Get16u($dataPt, $start + 16);
if ($format >= 1 and $format <= 10) {
$$dirInfo{DirStart} = $start + 12;
$$dirInfo{DirLen} = $len - 12;
my $sonyTable = GetTagTable('Image::ExifTool::Sony::Main');
Image::ExifTool::Exif::ProcessExif($et, $dirInfo, $sonyTable);
}
}
}
# Do a brute force search for text data:
# For the DSC-J10/W370/W510 the first text block is at offset 0x1ec and
# starts with "BarCode:". For the H200 it is at 0x1f0 and starts with "BC:".
# For the TS20 it is at 0x5b and starts with "V400 AELOG\nbarcode:".
# The second text block starts with "AFLOG" (Auto-Focus log) and is at
# 0x600 for all models, except for the TS20 it is at 0x45b.
my $i = 0;
while ($data =~ /(\w[\x09\x0a\x0d\x20-\x7e]+)/sg) {
next unless length $1 > 32;
my ($tag, $val) = ('TextInfo' . (++$i), $1);
$$tagTablePtr{$tag} or AddTagToTable($tagTablePtr, $tag, { Name => $tag, Binary => 1 });
$et->HandleTag($tagTablePtr, $tag, $val);
# extract interesting tags separately (might want to speed this up)
foreach $tag (sort { lc $a cmp lc $b } keys %$tagTablePtr) {
next unless $tag =~ /:$/ and $val =~ /\b$tag\s*([^\s;,:]+)/;
$et->HandleTag($tagTablePtr, $tag, $1);
}
}
return 1;
}
#------------------------------------------------------------------------------
# MeterInfo value conversions
# Inputs: 0) value
# Returns: converted value
sub ConvMeter1($)
{
my $val = shift;
return \$val unless length($val) == 90;
my @a = unpack("SLLSLLSLLSLLSLLSLLSLLSLLSLL",$val);
return join ' ', @a;
}
sub ConvMeter2($)
{
my $val = shift;
return \$val unless length($val) == 110;
my @a = unpack("SLLSLLSLLSLLSLLSLLSLLSLLSLLSLLSLL",$val);
return join ' ', @a;
}
#------------------------------------------------------------------------------
# LensSpec value conversions
# Inputs: 0) value
# Returns: converted value
# Notes: unpacks in format compatible with LensInfo, with extra flags bytes at start and end
sub ConvLensSpec($)
{
my $val = shift;
return \$val unless length($val) == 8;
my @a = unpack("H2H4H4H2H2H2",$val);
$a[1] += 0; $a[2] += 0; # remove leading zeros from focal lengths
s/([a-f])/hex($1)/e foreach @a[3,4]; # convert hex digits (ie. "b0" = f11)
$a[3] /= 10; $a[4] /= 10; # divide f-numbers by 10
return join ' ', @a;
}
sub ConvInvLensSpec($)
{
my $val = shift;
my @a=split(" ", $val);
return $val unless @a == 6;
$a[3] *= 10; $a[4] *= 10; # f-numbers are multiplied by 10
s/^(\d{2})0$/sprintf('%x0',$1)/e foreach @a[3,4];
$_ = hex foreach @a; # convert from hex
return pack 'CnnCCC', @a;
}
#------------------------------------------------------------------------------
# Print Sony LensSpec value
# Inputs: 0) LensSpec numerical value
# Returns: converted LensSpec string (eg. "DT 18-55mm F3.5-5.6 SAM")
# Refs: http://equational.org/importphotos/alphalensinfo.html
# http://www.dyxum.com/dforum/the-lens-information-different-from-lensid_topic37682.html
my @lensFeatures = (
# lens features in the order they are added to the LensSpec string
# (high byte of Mask/Bits represents byte 0 of LensSpec, low byte is byte 7)
# Mask { Bits Name Bits Name } Prefix flag
# ------ ------ ----- ------ ----- -----------
[ 0x4000, { 0x4000 => 'PZ' }, 1 ],
[ 0x0300, { 0x0100 => 'DT', 0x0200 => 'FE', 0x0300 => 'E' }, 1 ], # (will come before preceding prefix), FE added (ref JR)
[ 0x00e0, { 0x0020 => 'STF', 0x0040 => 'Reflex', 0x0060 => 'Macro', 0x0080 => 'Fisheye' } ],
[ 0x000c, { 0x0004 => 'ZA', 0x0008 => 'G' } ],
[ 0x0003, { 0x0001 => 'SSM', 0x0002 => 'SAM' } ],
[ 0x8000, { 0x8000 => 'OSS' } ],
[ 0x2000, { 0x2000 => 'LE' } ], #JR
[ 0x0800, { 0x0800 => 'II' } ], #JR
);
sub PrintLensSpec($)
{
my $val = shift;
my ($rtnVal, $feature, $f1, $sf, $lf, $sa, $la, $f2);
# 0=flags1, 1=short focal, 2=long focal, 3=max aperture at short focal,
# 4=max aperture at long focal, 5=flags2
my @a = split ' ', $val;
if (@a == 2) { # LensSpecFeatures patch
($f1, $f2) = @a;
$rtnVal = '';
} elsif (@a >= 6) {
($f1, $sf, $lf, $sa, $la, $f2) = @a;
# crude validation of focal length and aperture values
if ($sf != 0 and $sa != 0 and ($lf == 0 or $lf >= $sf) and ($la == 0 or $la >= $sa)) {
# use focal and aperture range if this is a zoom lens
$sf .= '-' . $lf if $lf != $sf and $lf != 0;
$sa .= '-' . $la if $sa != $la and $la != 0;
$rtnVal = "${sf}mm F$sa"; # heart of LensSpec is a LensInfo string
}
}
if (defined $rtnVal) {
# loop through available lens features
my $flags = hex($f1 . $f2);
foreach $feature (@lensFeatures) {
my $bits = $$feature[0] & $flags;
next unless $bits or $$feature[1]{$bits};
# add feature name as a prefix or suffix to the LensSpec
my $str = $$feature[1]{$bits} || sprintf('Unknown(%.4x)',$bits);
$rtnVal = $rtnVal ? ($$feature[2] ? "$str $rtnVal" : "$rtnVal $str") : $str;
}
} else {
$rtnVal = "Unknown ($val)";
}
return $rtnVal;
}
# inverse conversion
sub PrintInvLensSpec($;$$)
{
my ($val, $self, $features) = @_;
return $1 if $val =~ /Unknown \((.*)\)/i;
my ($sf, $lf, $sa, $la) = Image::ExifTool::Exif::GetLensInfo($val);
my $str;
if ($features) {
$str = '';
} elsif ($sf) {
# fixed focal length and aperture have zero for 2nd number
$lf = 0 if $lf == $sf;
$la = 0 if $la == $sa;
$str = " $sf $lf $sa $la";
} else {
return undef;
}
my $flags = 0;
my ($feature, $bits);
foreach $feature (@lensFeatures) {
foreach $bits (keys %{$$feature[1]}) {
# set corresponding flag bits for each feature name found
my $name = $$feature[1]{$bits};
$val =~ /\b$name\b/i and $flags |= $bits;
}
}
return sprintf "%.2x$str %.2x", $flags>>8, $flags&0xff;
}
#------------------------------------------------------------------------------
# Read/Write MoreInfo information (tag 0x0020, count 20480)
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success when reading, or new directory when writing (IsWriting set)
sub ProcessMoreInfo($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
$et or return 1; # allow dummy access to write routine
my $dataPt = $$dirInfo{DataPt};
my $start = $$dirInfo{DirStart} || 0;
my $dirLen = $$dirInfo{DirLen} || length($$dataPt);
my $isWriting = $$dirInfo{IsWriting};
my $rtnVal = $isWriting ? undef : 0;
return $rtnVal if $dirLen < 4;
my $num = Get16u($dataPt, $start); # number of entries
my $len = Get16u($dataPt, $start + 2); # total data length
if ($dirLen < 4 + $num * 4) {
$et->Warn('Truncated MoreInfo data', 1);
return $rtnVal;
}
if ($num > 50) {
$et->Warn('Possibly corrupted MoreInfo data', 1);
return $rtnVal;
}
$et->VerboseDir('MoreInfo', $num, $len) unless $isWriting;
if ($len > $dirLen) {
$et->Warn('MoreInfo data length too large', 1);
$len = $dirLen;
}
# loop through the MoreInfo index section to get the block offsets and tag ID's
# (in case they are out of order, even though this may never happen)
my ($i, @offset, @tagID, %blockSize);
for ($i=0; $i<$num; ++$i) {
my $entry = $start + 4 + $i * 4;
push @tagID, Get16u($dataPt, $entry);
push @offset, Get16u($dataPt, $entry + 2);
if ($offset[-1] > $len and $offset[-1] <= $dirLen) {
$et->Warn('MoreInfo data length too small', 1);
$len = $dirLen;
}
}
# generate a lookup table of block sizes
my @sorted = sort { $a <=> $b } @offset;
push @sorted, 0xffff; # (simplifies logic in loop below)
for ($i=0; $i<$num; ++$i) {
my $offset = $sorted[$i];
my $size = $sorted[$i+1] - $offset;
# note that block size will be negative for blocks with starting
# offsets greater than $dirLen, but we will ignore these below
$size = $len - $offset if $size > $len - $offset;
# (if blockSize is already defined for this offset, then there
# are 2 blocks with the same starting offset and the existing
# size must be zero. Since we can't know which block is
# actually non-zero size, the reasonable thing to do is
# assume that both have a size of zero)
$blockSize{$offset} = $size unless defined $blockSize{$offset};
}
# initialize successful return value
$rtnVal = $isWriting ? substr($$dataPt, $start, $dirLen) : 1;
# now process each block
my $unknown = $$et{OPTIONS}{Unknown};
for ($i=0; $i<$num; ++$i) {
next if $offset[$i] > $dirLen; # ignore bad offsets
my $tag = $tagID[$i];
if ($isWriting) {
# write new tags
my $tagInfo = $$tagTablePtr{$tag};
next unless ref $tagInfo eq 'HASH' and $$tagInfo{SubDirectory};
my $offset = $offset[$i];
my $size = $blockSize{$offset};
next unless $size; # ignore zero-length blocks
my %dirInfo = (
DirName => $$tagInfo{Name},
Parent => $$dirInfo{DirName},
DataPt => \$rtnVal,
DirStart => $offset,
DirLen => $size,
);
my $subTable = GetTagTable($$tagInfo{SubDirectory}{TagTable});
my $val = $et->WriteDirectory(\%dirInfo, $subTable);
# update this block in the returned MoreInfo data
substr($rtnVal, $offset, $size) = $val if defined $val;
next;
}
# generate binary tables for unknown tags if -U option used
if (not defined $$tagTablePtr{$tag} and $unknown > 1) {
my $name = sprintf('MoreInfo%.4x', $tag);
my $table = "Image::ExifTool::Sony::$name";
no strict 'refs';
%$table = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
FIRST_ENTRY => 0,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
);
use strict 'refs';
my %tagInfo = (
Name => $name,
SubDirectory => { TagTable => $table },
);
AddTagToTable($tagTablePtr, $tag, \%tagInfo);
}
$et->HandleTag($tagTablePtr, $tag, undef,
Index => $i,
DataPt => $dataPt,
DataPos => $$dirInfo{DataPos},
Start => $start + $offset[$i],
Size => $blockSize{$offset[$i]},
);
}
return $rtnVal;
}
#------------------------------------------------------------------------------
# Read Sony DSC-F1 PMP file
# Inputs: 0) ExifTool object ref, 1) dirInfo ref
# Returns: 1 on success when reading, 0 if this isn't a valid PMP file
sub ProcessPMP($$)
{
my ($et, $dirInfo) = @_;
my $raf = $$dirInfo{RAF};
my $buff;
$raf->Read($buff, 128) == 128 or return 0;
# validate header length (124 bytes)
$buff =~ /^.{8}\0{3}\x7c.{112}\xff\xd8\xff\xdb$/s or return 0;
$et->SetFileType();
SetByteOrder('MM');
$et->FoundTag(Make => 'Sony');
$et->FoundTag(Model => 'DSC-F1');
# extract information from 124-byte header
my $tagTablePtr = GetTagTable('Image::ExifTool::Sony::PMP');
my %dirInfo = ( DataPt => \$buff, DirName => 'PMP' );
$et->ProcessDirectory(\%dirInfo, $tagTablePtr);
# process JPEG image
$raf->Seek(124, 0);
$$dirInfo{Base} = 124;
$et->ProcessJPEG($dirInfo);
return 1;
}
#------------------------------------------------------------------------------
# Set the ARW file type and decide between SubIFD and A100DataOffset
# Inputs: 0) ExifTool object ref, 1) reference to tag 0x14a raw data
# Returns: true if tag 0x14a is a SubIFD, false otherwise
sub SetARW($$)
{
my ($et, $valPt) = @_;
# assume ARW for now -- SR2's get identified when FileFormat is parsed
$et->OverrideFileType($$et{TIFF_TYPE} = 'ARW');
# this should always be a SubIFD for models other than the A100
return 1 unless $$et{Model} eq 'DSLR-A100' and length $$valPt == 4;
# for the A100, IFD0 tag 0x14a is either a pointer to the raw data if this is
# an original image, or a SubIFD offset if the image was edited by Sony IDC,
# so assume it points to the raw data if it isn't a valid IFD (this assumption
# will be checked later when we try to parse the SR2Private directory)
my %subdir = (
DirStart => Get32u($valPt, 0),
Base => 0,
RAF => $$et{RAF},
AllowOutOfOrderTags => 1, # doh!
);
return Image::ExifTool::Exif::ValidateIFD(\%subdir);
}
#------------------------------------------------------------------------------
# Finish writing ARW image, patching necessary Sony quirks, etc
# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) EXIF data ref, 3) image data reference
# Returns: undef on success, error string otherwise
# Notes: (it turns that all of this is for the A100 only)
sub FinishARW($$$$)
{
my ($et, $dirInfo, $dataPt, $imageData) = @_;
# pre-scan IFD0 to get IFD entry offsets for each tag
my $dataLen = length $$dataPt;
return 'Truncated IFD0' if $dataLen < 2;
my $n = Get16u($dataPt, 0);
return 'Truncated IFD0' if $dataLen < 2 + 12 * $n;
my ($i, %entry, $dataBlock, $pad, $dataOffset);
for ($i=0; $i<$n; ++$i) {
my $entry = 2 + $i * 12;
$entry{Get16u($dataPt, $entry)} = $entry;
}
# fix up SR2Private offset and A100DataOffset (A100 only)
if ($entry{0xc634} and $$et{MRWDirData}) {
return 'Unexpected MRW block' unless $$et{Model} eq 'DSLR-A100';
return 'Missing A100DataOffset' unless $entry{0x14a} and $$et{A100DataOffset};
# account for total length of image data
my $totalLen = 8 + $dataLen;
if (ref $imageData) {
foreach $dataBlock (@$imageData) {
my ($pos, $size, $pad) = @$dataBlock;
$totalLen += $size + $pad;
}
}
# align MRW block on an even 4-byte boundary
my $remain = $totalLen & 0x03;
$pad = 4 - $remain and $totalLen += $pad if $remain;
# set offset for the MRW directory data
Set32u($totalLen, $dataPt, $entry{0xc634} + 8);
# also pad MRWDirData data to an even 4 bytes (just to be safe)
$remain = length($$et{MRWDirData}) & 0x03;
$$et{MRWDirData} .= "\0" x (4 - $remain) if $remain;
$totalLen += length $$et{MRWDirData};
# fix up A100DataOffset
$dataOffset = $$et{A100DataOffset};
Set32u($totalLen, $dataPt, $entry{0x14a} + 8);
}
# patch double-referenced and incorrectly-sized A100 PreviewImage
if ($entry{0x201} and $$et{A100PreviewStart} and
$entry{0x202} and $$et{A100PreviewLength})
{
Set32u($$et{A100PreviewStart}, $dataPt, $entry{0x201} + 8);
Set32u($$et{A100PreviewLength}, $dataPt, $entry{0x202} + 8);
}
# write TIFF IFD structure
my $outfile = $$dirInfo{OutFile};
my $header = GetByteOrder() . Set16u(0x2a) . Set32u(8);
Write($outfile, $header, $$dataPt) or return 'Error writing';
# copy over image data
if (ref $imageData) {
$et->CopyImageData($imageData, $outfile) or return 'Error copying image data';
}
# write MRW data if necessary
if ($$et{MRWDirData}) {
Write($outfile, "\0" x $pad) if $pad; # write padding if necessary
Write($outfile, $$et{MRWDirData});
delete $$et{MRWDirData};
# set TIFF_END to copy over the MRW image data
$$et{TIFF_END} = $dataOffset if $dataOffset;
}
return undef;
}
#------------------------------------------------------------------------------
# Decrypt/Encrypt Sony data (ref 1) (reversible encryption)
# Inputs: 0) data reference, 1) start offset, 2) data length, 3) decryption key
# Returns: nothing (original data buffer is updated with decrypted data)
# Notes: data length should be a multiple of 4
sub Decrypt($$$$)
{
my ($dataPt, $start, $len, $key) = @_;
my ($i, $j, @pad);
my $words = int ($len / 4);
for ($i=0; $i<4; ++$i) {
my $lo = ($key & 0xffff) * 0x0edd + 1;
my $hi = ($key >> 16) * 0x0edd + ($key & 0xffff) * 0x02e9 + ($lo >> 16);
$pad[$i] = $key = (($hi & 0xffff) << 16) + ($lo & 0xffff);
}
$pad[3] = ($pad[3] << 1 | ($pad[0]^$pad[2]) >> 31) & 0xffffffff;
for ($i=4; $i<0x7f; ++$i) {
$pad[$i] = (($pad[$i-4]^$pad[$i-2]) << 1 |
($pad[$i-3]^$pad[$i-1]) >> 31) & 0xffffffff;
}
my @data = unpack("x$start N$words", $$dataPt);
for ($i=0x7f,$j=0; $j<$words; ++$i,++$j) {
$data[$j] ^= $pad[$i & 0x7f] = $pad[($i+1) & 0x7f] ^ $pad[($i+65) & 0x7f];
}
substr($$dataPt, $start, $words*4) = pack('N*', @data);
}
#------------------------------------------------------------------------------
# Decipher/encipher Sony tag 0x94xx data (ref PH)
# Inputs: 0) data reference, 1) true to encipher the data
sub Decipher($;$)
{
my ($dataPt, $encipher) = @_;
# This is a simple substitution cipher, so use a hardcoded translation table for speed.
# The formula is: $c = ($b*$b*$b) % 249, where $c is the enciphered data byte
# (note that bytes with values 249-255 are not translated, and 0-1, 82-84,
# 165-167 and 248 have the same enciphered value)
if ($encipher) { # encipher
$$dataPt =~ tr/\x02-\xf7/\x08\x1b\x40\x7d\xd8\x5e\x0e\xe7\x04V\xea\xcd\x05\x8ap\xb6i\x88\x200\xbe\xd7\x81\xbb\x92\x0c\x28\xecl\xa0\x95Q\xd3\x2f\x5dj\x5c9\x07\xc5\x87L\x1a\xf0\xe2\xef\x24y\x02\xb7\xac\xe0\x60\x2bG\xba\x91\xcbu\x8e\x233\xc4\xe3\x96\xdc\xc2N\x7fb\xf6OeE\xeet\xcf\x138KRST\x5bn\x93\xd02\xb1aAW\xa9D\x27X\xdd\xc3\x10\xbc\xdbs\x83\x181\xd4\x15\xe5_\x7bF\xbf\xf3\xe8\xa4\x2d\x82\xb0\xbd\xaf\x8cZ\x1f\xda\x9fmJ\x3cIw\xccU\x11\x06\x3a\xb3\x7e\x9a\x14\xe4\x25\xc8\xe1v\x86\x1e\x3d\xe96\x1c\xa1\xd2\xb5P\xa2\xb8\x98H\xc7\x29f\x8b\x9e\xa5\xa6\xa7\xae\xc1\xe6\x2a\x85\x0b\xb4\x94\xaa\x03\x97z\xab7\x1dc\x165\xc6\xd6k\x84\x2eh\x3f\xb2\xce\x99\x19MB\xf7\x80\xd5\x0a\x17\x09\xdf\xadr4\xf2\xc0\x9d\x8f\x9c\xca\x26\xa8dY\x8d\x0d\xd1\xedg\x3ex\x22\x3b\xc9\xd9q\x90C\x89o\xf4\x2c\x0f\xa3\xf5\x12\xeb\x9b\x21\x7c\xb9\xde\xf1/;
} else { # decipher
$$dataPt =~ tr/\x08\x1b\x40\x7d\xd8\x5e\x0e\xe7\x04V\xea\xcd\x05\x8ap\xb6i\x88\x200\xbe\xd7\x81\xbb\x92\x0c\x28\xecl\xa0\x95Q\xd3\x2f\x5dj\x5c9\x07\xc5\x87L\x1a\xf0\xe2\xef\x24y\x02\xb7\xac\xe0\x60\x2bG\xba\x91\xcbu\x8e\x233\xc4\xe3\x96\xdc\xc2N\x7fb\xf6OeE\xeet\xcf\x138KRST\x5bn\x93\xd02\xb1aAW\xa9D\x27X\xdd\xc3\x10\xbc\xdbs\x83\x181\xd4\x15\xe5_\x7bF\xbf\xf3\xe8\xa4\x2d\x82\xb0\xbd\xaf\x8cZ\x1f\xda\x9fmJ\x3cIw\xccU\x11\x06\x3a\xb3\x7e\x9a\x14\xe4\x25\xc8\xe1v\x86\x1e\x3d\xe96\x1c\xa1\xd2\xb5P\xa2\xb8\x98H\xc7\x29f\x8b\x9e\xa5\xa6\xa7\xae\xc1\xe6\x2a\x85\x0b\xb4\x94\xaa\x03\x97z\xab7\x1dc\x165\xc6\xd6k\x84\x2eh\x3f\xb2\xce\x99\x19MB\xf7\x80\xd5\x0a\x17\x09\xdf\xadr4\xf2\xc0\x9d\x8f\x9c\xca\x26\xa8dY\x8d\x0d\xd1\xedg\x3ex\x22\x3b\xc9\xd9q\x90C\x89o\xf4\x2c\x0f\xa3\xf5\x12\xeb\x9b\x21\x7c\xb9\xde\xf1/\x02-\xf7/;
}
}
#------------------------------------------------------------------------------
# Process Sony 0x94xx cipherdata directory
# Inputs: 0) ExifTool object ref, 1) directory information ref, 2) tag table ref
# Returns: 1 on success
# Notes:
# 1) dirInfo may contain VarFormatData (reference to empty list) to return
# details about any variable-length-format tags in the table (used when writing)
# 2) A bug in ExifTool 9.04-9.10 could have double-enciphered these blocks
sub ProcessEnciphered($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $dataPt = $$dirInfo{DataPt};
my $dirStart = $$dirInfo{DirStart} || 0;
my $dirLen = $$dirInfo{DirLen} || (length($$dataPt) - $dirStart);
my $data = substr($$dataPt, $dirStart, $dirLen);
my %dirInfo = (
%$dirInfo,
DataPt => \$data,
DataPos => $$dirInfo{DataPos} + $dirStart,
DirStart => 0,
);
Decipher(\$data);
if ($$et{DoubleCipher}) {
Decipher(\$data);
$et->WarnOnce('Some Sony metadata is double-enciphered. Write any tag to fix',1);
}
if ($et->Options('Verbose') > 2) {
my $tagInfo = $$dirInfo{TagInfo} || { Name => 'data' };
my $str = $$et{DoubleCipher} ? 'ouble-d' : '';
$et->VerboseDir("D${str}eciphered $$tagInfo{Name}");
$et->VerboseDump(\$data,
Prefix => $$et{INDENT} . ' ',
DataPos => $$dirInfo{DirStart} + $$dirInfo{DataPos} + ($$dirInfo{Base} || 0),
);
}
return $et->ProcessBinaryData(\%dirInfo, $tagTablePtr);
}
#------------------------------------------------------------------------------
# Write Sony 0x94xx cipherdata directory
# Inputs: 0) ExifTool object ref, 1) source dirInfo ref, 2) tag table ref
# Returns: cipherdata block or undefined on error
sub WriteEnciphered($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
$et or return 1;
my $dataPt = $$dirInfo{DataPt};
my $dirStart = $$dirInfo{DirStart} || 0;
my $dirLen = $$dirInfo{DirLen} || (length($$dataPt) - $dirStart);
my $data = substr($$dataPt, $dirStart, $dirLen);
my $changed = $$et{CHANGED};
Decipher(\$data);
# fix double-enciphered data (due to bug in ExifTool 9.04-9.10)
if ($$et{DoubleCipher}) {
Decipher(\$data);
++$$et{CHANGED};
$et->WarnOnce('Fixed double-enciphered Sony metadata',1);
}
my %dirInfo = (
%$dirInfo,
DataPt => \$data,
DataPos => $$dirInfo{DataPos} + $dirStart,
DirStart => 0,
);
$data = $et->WriteBinaryData(\%dirInfo, $tagTablePtr);
if ($changed == $$et{CHANGED}) {
# nothing changed, so recover original data
$data = substr($$dataPt, $dirStart, $dirLen);
} elsif (defined $data) {
Decipher(\$data,1); # re-encipher
}
return $data;
}
#------------------------------------------------------------------------------
# Process SRF maker notes
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success
sub ProcessSRF($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $dataPt = $$dirInfo{DataPt};
my $start = $$dirInfo{DirStart};
my $verbose = $et->Options('Verbose');
# process IFD chain
my ($ifd, $success);
for ($ifd=0; ; ) {
# switch tag table for SRF2-5 and SRF6
if ($ifd == 2) {
$tagTablePtr = GetTagTable('Image::ExifTool::Sony::SRF2');
} elsif ($ifd == 6) {
# SRF6 uses standard EXIF tags
$tagTablePtr = GetTagTable('Image::ExifTool::Exif::Main');
}
my $srf = $$dirInfo{DirName} = "SRF$ifd";
$$et{SET_GROUP1} = $srf;
$success = Image::ExifTool::Exif::ProcessExif($et, $dirInfo, $tagTablePtr);
delete $$et{SET_GROUP1};
last unless $success;
#
# get pointer to next IFD
#
my $count = Get16u($dataPt, $$dirInfo{DirStart});
my $dirEnd = $$dirInfo{DirStart} + 2 + $count * 12;
last if $dirEnd + 4 > length($$dataPt);
my $nextIFD = Get32u($dataPt, $dirEnd);
last unless $nextIFD;
$nextIFD -= $$dirInfo{DataPos}; # adjust for position of makernotes data
$$dirInfo{DirStart} = $nextIFD;
#
# decrypt next IFD data if necessary
#
++$ifd;
my ($key, $len);
if ($ifd == 1) {
# get the key to decrypt IFD1
my $cp = $start + 0x8ddc; # why?
my $ip = $cp + 4 * unpack("x$cp C", $$dataPt);
$key = unpack("x$ip N", $$dataPt);
$len = $cp + $nextIFD; # decrypt up to $cp
} elsif ($ifd == 2) {
# get the key to decrypt IFD2
$key = $$et{SRF2Key};
$len = length($$dataPt) - $nextIFD; # decrypt rest of maker notes
} else {
next; # no decryption needed
}
# decrypt data
Decrypt($dataPt, $nextIFD, $len, $key) if defined $key;
next unless $verbose > 2;
# display decrypted data in verbose mode
$et->VerboseDir("Decrypted SRF$ifd", 0, $nextIFD + $len);
$et->VerboseDump($dataPt,
Prefix => "$$et{INDENT} ",
Start => $nextIFD,
DataPos => $$dirInfo{DataPos},
);
}
}
#------------------------------------------------------------------------------
# Write SR2 data
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success when reading, or SR2 directory or undef when writing
sub WriteSR2($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
$et or return 1; # allow dummy access
my $buff = '';
$$dirInfo{OutFile} = \$buff;
return ProcessSR2($et, $dirInfo, $tagTablePtr);
}
#------------------------------------------------------------------------------
# Read/Write SR2 IFD and its encrypted subdirectories
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success when reading, or SR2 directory or undef when writing
sub ProcessSR2($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $raf = $$dirInfo{RAF};
my $dataPt = $$dirInfo{DataPt};
my $dataPos = $$dirInfo{DataPos};
my $dataLen = $$dirInfo{DataLen} || length $$dataPt;
my $base = $$dirInfo{Base} || 0;
my $outfile = $$dirInfo{OutFile};
# clear SR2 member variables to be safe
delete $$et{SR2SubIFDOffset};
delete $$et{SR2SubIFDLength};
delete $$et{SR2SubIFDKey};
# make sure we have the first 4 bytes available to test directory type
my $buff;
if ($dataLen < 4 and $raf) {
my $pos = $dataPos + ($$dirInfo{DirStart}||0) + $base;
if ($raf->Seek($pos, 0) and $raf->Read($buff, 4) == 4) {
$dataPt = \$buff;
undef $$dirInfo{DataPt}; # must load data from file
$raf->Seek($pos, 0);
}
}
# this may either be a normal IFD, or a MRW data block
# (only original ARW images from the A100 use the MRW block)
my $dataOffset;
if ($dataPt and $$dataPt =~ /^\0MR[IM]/) {
my ($err, $srfPos, $srfLen, $dataOffset);
$dataOffset = $$et{A100DataOffset};
if ($dataOffset) {
# save information about the RAW data trailer so it will be preserved
$$et{KnownTrailer} = { Name => 'A100 RAW Data', Start => $dataOffset };
} else {
$err = 'A100DataOffset tag is missing from A100 ARW image';
}
$raf or $err = 'Unrecognized SR2 structure';
unless ($err) {
$srfPos = $raf->Tell();
$srfLen = $dataOffset - $srfPos;
unless ($srfLen > 0 and $raf->Read($buff, $srfLen) == $srfLen) {
$err = 'Error reading MRW directory';
}
}
if ($err) {
$outfile and $et->Error($err), return undef;
$et->Warn($err);
return 0;
}
my %dirInfo = ( DataPt => \$buff );
require Image::ExifTool::MinoltaRaw;
if ($outfile) {
# save MRW data to be written last
$$et{MRWDirData} = Image::ExifTool::MinoltaRaw::WriteMRW($et, \%dirInfo);
return $$et{MRWDirData} ? "\0\0\0\0\0\0" : undef;
} else {
if (not $outfile and $$et{HTML_DUMP}) {
$et->HDump($srfPos, $srfLen, '[A100 SRF Data]');
}
return Image::ExifTool::MinoltaRaw::ProcessMRW($et, \%dirInfo);
}
} elsif ($$et{A100DataOffset}) {
my $err = 'Unexpected A100DataOffset tag';
$outfile and $et->Error($err), return undef;
$et->Warn($err);
return 0;
}
my $verbose = $et->Options('Verbose');
my $result;
if ($outfile) {
$result = Image::ExifTool::Exif::WriteExif($et, $dirInfo, $tagTablePtr);
return undef unless $result;
$$outfile .= $result;
} else {
$result = Image::ExifTool::Exif::ProcessExif($et, $dirInfo, $tagTablePtr);
}
return $result unless $result and $$et{SR2SubIFDOffset};
# only take first offset value if more than one!
my @offsets = split ' ', $$et{SR2SubIFDOffset};
my $offset = shift @offsets;
my $length = $$et{SR2SubIFDLength};
my $key = $$et{SR2SubIFDKey};
my @subifdPos;
if ($offset and $length and defined $key) {
my $buff;
# read encrypted SR2SubIFD from file
if (($raf and $raf->Seek($offset+$base, 0) and
$raf->Read($buff, $length) == $length) or
# or read from data (when processing Adobe DNGPrivateData)
($offset - $dataPos >= 0 and $offset - $dataPos + $length < $dataLen and
($buff = substr($$dataPt, $offset - $dataPos, $length))))
{
Decrypt(\$buff, 0, $length, $key);
# display decrypted data in verbose mode
if ($verbose > 2 and not $outfile) {
$et->VerboseDir("Decrypted SR2SubIFD", 0, $length);
$et->VerboseDump(\$buff, Addr => $offset + $base);
}
my $num = '';
my $dPos = $offset;
for (;;) {
my %dirInfo = (
Base => $base,
DataPt => \$buff,
DataLen => length $buff,
DirStart => $offset - $dPos,
DirName => "SR2SubIFD$num",
DataPos => $dPos,
);
my $subTable = GetTagTable('Image::ExifTool::Sony::SR2SubIFD');
if ($outfile) {
my $fixup = new Image::ExifTool::Fixup;
$dirInfo{Fixup} = $fixup;
$result = $et->WriteDirectory(\%dirInfo, $subTable);
return undef unless $result;
# save position of this SubIFD
push @subifdPos, length($$outfile);
# add this directory to the returned data
$$fixup{Start} += length($$outfile);
$$outfile .= $result;
$$dirInfo{Fixup}->AddFixup($fixup);
} else {
$result = $et->ProcessDirectory(\%dirInfo, $subTable);
}
last unless @offsets;
$offset = shift @offsets;
$num = ($num || 1) + 1;
}
} else {
$et->Warn('Error reading SR2 data');
}
}
if ($outfile and @subifdPos) {
# the SR2SubIFD must be padded to a multiple of 4 bytes for the encryption
my $sr2Len = length($$outfile) - $subifdPos[0];
if ($sr2Len & 0x03) {
my $pad = 4 - ($sr2Len & 0x03);
$sr2Len += $pad;
$$outfile .= ' ' x $pad;
}
# save the new SR2SubIFD Length and Key to be used later for encryption
$$et{SR2SubIFDLength} = $sr2Len;
my $newKey = $$et{VALUE}{SR2SubIFDKey};
$$et{SR2SubIFDKey} = $newKey if defined $newKey;
# update SubIFD pointers manually and add to fixup, and set SR2SubIFDLength
my $n = Get16u($outfile, 0);
my ($i, %found);
for ($i=0; $i<$n; ++$i) {
my $entry = 2 + 12 * $i;
my $tagID = Get16u($outfile, $entry);
# only interested in SR2SubIFDOffset (0x7200) and SR2SubIFDLength (0x7201)
next unless $tagID == 0x7200 or $tagID == 0x7201;
$found{$tagID} = 1;
my $fmt = Get16u($outfile, $entry + 2);
if ($fmt != 0x04) { # must be int32u
$et->Error("Unexpected format ($fmt) for SR2SubIFD tag");
return undef;
}
if ($tagID == 0x7201) { # SR2SubIFDLength
Set32u($sr2Len, $outfile, $entry + 8);
next;
}
my $tag = 'SR2SubIFDOffset';
my $valuePtr = @subifdPos < 2 ? $entry+8 : Get32u($outfile, $entry+8);
my $pos;
foreach $pos (@subifdPos) {
Set32u($pos, $outfile, $valuePtr);
$$dirInfo{Fixup}->AddFixup($valuePtr, $tag);
undef $tag;
$valuePtr += 4;
}
}
unless ($found{0x7200} and $found{0x7201}) {
$et->Error('Missing SR2SubIFD tag');
return undef;
}
}
return $outfile ? $$outfile : $result;
}
1; # end
__END__
=head1 NAME
Image::ExifTool::Sony - Sony EXIF maker notes tags
=head1 SYNOPSIS
This module is loaded automatically by Image::ExifTool when required.
=head1 DESCRIPTION
This module contains definitions required by Image::ExifTool to interpret
Sony maker notes EXIF meta information.
=head1 NOTES
Also see Minolta.pm since Sony DSLR models use structures originating from
Minolta.
=head1 AUTHOR
Copyright 2003-2018, Phil Harvey (phil at owl.phy.queensu.ca)
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 REFERENCES
=over 4
=item L<http://www.cybercom.net/~dcoffin/dcraw/>
=item L<http://homepage3.nifty.com/kamisaka/makernote/makernote_sony.htm>
=item L<http://www.klingebiel.com/tempest/hd/pmp.html>
=item (...plus lots of testing with my RX100!)
=back
=head1 ACKNOWLEDGEMENTS
Thanks to Thomas Bodenmann, Philippe Devaux, Jens Duttke, Marcus
Holland-Moritz, Andrey Tverdokhleb, Rudiger Lange, Igal Milchtaich, Michael
Reitinger and Jos Roost for help decoding some tags.
=head1 SEE ALSO
L<Image::ExifTool::TagNames/Sony Tags>,
L<Image::ExifTool::TagNames/Minolta Tags>,
L<Image::ExifTool(3pm)|Image::ExifTool>
=cut
|