exiftool-vendored.pl 13.16.0 → 13.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/bin/Changes +114 -4
  2. package/bin/MANIFEST +16 -2
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +1 -1
  5. package/bin/README +46 -46
  6. package/bin/config_files/example.config +1 -1
  7. package/bin/exiftool +212 -122
  8. package/bin/lib/Image/ExifTool/Apple.pm +12 -2
  9. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +16 -10
  10. package/bin/lib/Image/ExifTool/Canon.pm +3 -2
  11. package/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  12. package/bin/lib/Image/ExifTool/DJI.pm +190 -29
  13. package/bin/lib/Image/ExifTool/DarwinCore.pm +22 -11
  14. package/bin/lib/Image/ExifTool/EXE.pm +2 -9
  15. package/bin/lib/Image/ExifTool/GM.pm +1 -1
  16. package/bin/lib/Image/ExifTool/GPS.pm +3 -3
  17. package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  18. package/bin/lib/Image/ExifTool/GoPro.pm +86 -48
  19. package/bin/lib/Image/ExifTool/ICO.pm +2 -2
  20. package/bin/lib/Image/ExifTool/JPEG.pm +12 -2
  21. package/bin/lib/Image/ExifTool/JSON.pm +5 -1
  22. package/bin/lib/Image/ExifTool/Kodak.pm +3 -2
  23. package/bin/lib/Image/ExifTool/Nikon.pm +1003 -1399
  24. package/bin/lib/Image/ExifTool/NikonCustom.pm +4 -4
  25. package/bin/lib/Image/ExifTool/Olympus.pm +2 -1
  26. package/bin/lib/Image/ExifTool/PCAP.pm +462 -0
  27. package/bin/lib/Image/ExifTool/PDF.pm +10 -1
  28. package/bin/lib/Image/ExifTool/PLIST.pm +92 -29
  29. package/bin/lib/Image/ExifTool/PNG.pm +7 -1
  30. package/bin/lib/Image/ExifTool/Photoshop.pm +2 -2
  31. package/bin/lib/Image/ExifTool/Plot.pm +713 -0
  32. package/bin/lib/Image/ExifTool/Protobuf.pm +24 -11
  33. package/bin/lib/Image/ExifTool/Qualcomm.pm +78 -1
  34. package/bin/lib/Image/ExifTool/QuickTime.pm +348 -318
  35. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +75 -27
  36. package/bin/lib/Image/ExifTool/Samsung.pm +4 -0
  37. package/bin/lib/Image/ExifTool/Sony.pm +34 -15
  38. package/bin/lib/Image/ExifTool/TagLookup.pm +5061 -4967
  39. package/bin/lib/Image/ExifTool/TagNames.pod +8302 -8160
  40. package/bin/lib/Image/ExifTool/Trailer.pm +318 -0
  41. package/bin/lib/Image/ExifTool/Validate.pm +4 -4
  42. package/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  43. package/bin/lib/Image/ExifTool/WriteExif.pl +9 -4
  44. package/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  45. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +62 -5
  46. package/bin/lib/Image/ExifTool/Writer.pl +14 -13
  47. package/bin/lib/Image/ExifTool/XMP.pm +34 -6
  48. package/bin/lib/Image/ExifTool/XMP2.pl +5 -2
  49. package/bin/lib/Image/ExifTool.pm +193 -92
  50. package/bin/lib/Image/ExifTool.pod +121 -124
  51. package/bin/perl-Image-ExifTool.spec +45 -45
  52. package/bin/windows_exiftool.txt +95 -71
  53. package/package.json +3 -3
  54. package/bin/lib/Image/ExifTool/Vivo.pm +0 -124
@@ -65,7 +65,7 @@ use Image::ExifTool::Exif;
65
65
  use Image::ExifTool::GPS;
66
66
  use Image::ExifTool::XMP;
67
67
 
68
- $VERSION = '4.41';
68
+ $VERSION = '4.45';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -840,6 +840,73 @@ my %activeDLightingZ7 = (
840
840
  5 => 'Extra High',
841
841
  );
842
842
 
843
+ my %aFAreaModeCD = ( #contrast detect modes
844
+ 0 => 'Contrast-detect', # (D3)
845
+ 1 => 'Contrast-detect (normal area)', # (D90/D5000)
846
+ # (D90 and D5000 give value of 2 when set to 'Face Priority' and
847
+ # 'Subject Tracking', but I didn't have a face to shoot at or a
848
+ # moving subject to track so perhaps this value changes dynamically)
849
+ 2 => 'Contrast-detect (wide area)', # (D90/D5000)
850
+ 3 => 'Contrast-detect (face priority)', # (ViewNX)
851
+ 4 => 'Contrast-detect (subject tracking)', # (ViewNX)
852
+ 128 => 'Single', #PH (1V3)
853
+ 129 => 'Auto (41 points)', #PH (NC)
854
+ 130 => 'Subject Tracking (41 points)', #PH (NC)
855
+ 131 => 'Face Priority (41 points)', #PH (NC)
856
+ 192 => 'Pinpoint', #PH (Z7)
857
+ 193 => 'Single', #PH (Z7)
858
+ 194 => 'Dynamic', #PH (Z7)
859
+ 195 => 'Wide (S)', #PH (Z7)
860
+ 196 => 'Wide (L)', #PH (Z7)
861
+ 197 => 'Auto', #PH (Z7)
862
+ 198 => 'Auto (People)', #28 (Z7) #if no faces are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
863
+ 199 => 'Auto (Animal)', #28 (Z7) #if no animals are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
864
+ 200 => 'Normal-area AF', #28 (D6)
865
+ 201 => 'Wide-area AF', #28 (D6)
866
+ 202 => 'Face-priority AF', #28 (D6)
867
+ 203 => 'Subject-tracking AF', #28 (D6)
868
+ 204 => 'Dynamic Area (S)', #28 (Z9)
869
+ 205 => 'Dynamic Area (M)', #28 (Z9)
870
+ 206 => 'Dynamic Area (L)', #28 (Z9)
871
+ 207 => '3D-tracking', #28 (Z9)
872
+ 208 => 'Wide-Area (C1/C2)', #28 (Z8, Z9)
873
+ );
874
+
875
+ my %aFAreaModePD = ( #phase detect modes
876
+ 0 => 'Single Area', # (called "Single Point" in manual - PH)
877
+ 1 => 'Dynamic Area', #PH
878
+ 2 => 'Dynamic Area (closest subject)', #PH
879
+ 3 => 'Group Dynamic', #PH
880
+ 4 => 'Dynamic Area (9 points)', #JD/28
881
+ 5 => 'Dynamic Area (21 points)', #28
882
+ 6 => 'Dynamic Area (51 points)', #28
883
+ 7 => 'Dynamic Area (51 points, 3D-tracking)', #PH/28
884
+ 8 => 'Auto-area',
885
+ 9 => 'Dynamic Area (3D-tracking)', #PH (D5000 "3D-tracking (11 points)")
886
+ 10 => 'Single Area (wide)', #PH
887
+ 11 => 'Dynamic Area (wide)', #PH
888
+ 12 => 'Dynamic Area (wide, 3D-tracking)', #PH
889
+ 13 => 'Group Area', #PH
890
+ 14 => 'Dynamic Area (25 points)', #PH
891
+ 15 => 'Dynamic Area (72 points)', #PH
892
+ 16 => 'Group Area (HL)', #28
893
+ 17 => 'Group Area (VL)', #28
894
+ 18 => 'Dynamic Area (49 points)', #28
895
+ 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
896
+ 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
897
+ 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
898
+ 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
899
+ # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
900
+ # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
901
+ 192 => 'Pinpoint', #PH (NC)
902
+ 193 => 'Single', #PH (NC)
903
+ 194 => 'Dynamic', #28 (Z7)
904
+ 195 => 'Wide (S)', #PH (NC)
905
+ 196 => 'Wide (L)', #PH (NC)
906
+ 197 => 'Auto', #PH (NC)
907
+ 199 => 'Auto', #28 (Z7) Z7 has also been observed to record 197 for Auto-area (same camera, different firmware versions, early production model)
908
+ );
909
+
843
910
  my %aFAreaModeZ9 = (
844
911
  0 => 'Pinpoint',
845
912
  1 => 'Single',
@@ -853,6 +920,13 @@ my %aFAreaModeZ9 = (
853
920
  13 => 'Wide (C2)',
854
921
  );
855
922
 
923
+ my %aFDetectionMethod = (
924
+ 0 => 'Phase Detect', #thru viewfinder
925
+ 1 => 'Contrast Detect', #LiveView
926
+ 2 => 'Hybrid', #Z-series and D780
927
+ );
928
+
929
+
856
930
  my %banksZ9 = (
857
931
  0 => 'A',
858
932
  1 => 'B',
@@ -1021,38 +1095,31 @@ my %iSOAutoHiLimitZ6III = ( #28
1021
1095
  35 => 'ISO Hi 1.7',
1022
1096
  );
1023
1097
 
1024
- my %iSOAutoHiLimitZ7 = (
1025
- 0 => 'ISO 64',
1026
- 1 => 'ISO 80',
1027
- 2 => 'ISO 100',
1028
- 3 => 'ISO 125',
1029
- 4 => 'ISO 160',
1030
- 5 => 'ISO 200',
1031
- 6 => 'ISO 250',
1032
- 7 => 'ISO 320',
1033
- 8 => 'ISO 400',
1034
- 9 => 'ISO 500',
1035
- 10 => 'ISO 640',
1036
- 11 => 'ISO 800',
1037
- 12 => 'ISO 1000',
1038
- 13 => 'ISO 1250',
1039
- 14 => 'ISO 1600',
1040
- 15 => 'ISO 2000',
1041
- 16 => 'ISO 2500',
1042
- 17 => 'ISO 3200',
1043
- 18 => 'ISO 4000',
1044
- 19 => 'ISO 5000',
1045
- 20 => 'ISO 6400',
1046
- 21 => 'ISO 8000',
1047
- 22 => 'ISO 10000',
1048
- 23 => 'ISO 12800',
1049
- 24 => 'ISO 16000',
1050
- 25 => 'ISO 20000',
1051
- 26 => 'ISO 25600',
1052
- 27 => 'ISO Hi 0.3',
1053
- 28 => 'ISO Hi 0.7',
1054
- 29 => 'ISO Hi 1.0',
1055
- 32 => 'ISO Hi 2.0',
1098
+ my %isoAutoHiLimitZ7 = (
1099
+ Format => 'int16u',
1100
+ Unknown => 1,
1101
+ ValueConv => '($val-104)/8',
1102
+ ValueConvInv => '8 * ($val + 104)',
1103
+ SeparateTable => 'ISOAutoHiLimitZ7',
1104
+ PrintConv => {
1105
+ 0 => 'ISO 64', 17 => 'ISO 3200',
1106
+ 1 => 'ISO 80', 18 => 'ISO 4000',
1107
+ 2 => 'ISO 100', 19 => 'ISO 5000',
1108
+ 3 => 'ISO 125', 20 => 'ISO 6400',
1109
+ 4 => 'ISO 160', 21 => 'ISO 8000',
1110
+ 5 => 'ISO 200', 22 => 'ISO 10000',
1111
+ 6 => 'ISO 250', 23 => 'ISO 12800',
1112
+ 7 => 'ISO 320', 24 => 'ISO 16000',
1113
+ 8 => 'ISO 400', 25 => 'ISO 20000',
1114
+ 9 => 'ISO 500', 26 => 'ISO 25600',
1115
+ 10 => 'ISO 640', 27 => 'ISO Hi 0.3',
1116
+ 11 => 'ISO 800', 28 => 'ISO Hi 0.7',
1117
+ 12 => 'ISO 1000', 29 => 'ISO Hi 1.0',
1118
+ 13 => 'ISO 1250', 32 => 'ISO Hi 2.0',
1119
+ 14 => 'ISO 1600',
1120
+ 15 => 'ISO 2000',
1121
+ 16 => 'ISO 2500',
1122
+ },
1056
1123
  );
1057
1124
 
1058
1125
  my %iSOAutoShutterTimeZ9 = (
@@ -1203,29 +1270,23 @@ my %multipleExposureModeZ9 = (
1203
1270
  );
1204
1271
 
1205
1272
  my %nonCPULensApertureZ8 = ( # 2**(val/6) rounded - non-CPU aperture interface, values and storage differ from the Z8
1206
- 12 => 'f/1.2',
1207
- 24 => 'f/1.4',
1208
- 40 => 'f/1.8',
1209
- 48 => 'f/2.0',
1210
- 64 => 'f/2.5',
1211
- 72 => 'f/2.8',
1212
- 84 => 'f/3.3',
1213
- 88 => 'f/3.5',
1214
- 96 => 'f/4.0',
1215
- 104 => 'f/4.5',
1216
- 112 => 'f/5.0',
1217
- 120 => 'f/5.6',
1218
- 128 => 'f/6.3',
1219
- 136 => 'f/7.1',
1220
- 144 => 'f/8',
1221
- 156 => 'f/9.5',
1222
- 168 => 'f/11',
1223
- 180 => 'f/13',
1224
- 188 => 'f/15',
1225
- 192 => 'f/16',
1226
- 204 => 'f/19',
1227
- 216 => 'f/22',
1228
- 313 => 'N/A', #camera menu shows "--" indicating value has not been set for the lens
1273
+ Format => 'int16u',
1274
+ Unknown => 1,
1275
+ SeparateTable => 'NonCPULensApertureZ8',
1276
+ PrintConv => {
1277
+ 12 => 'f/1.2', 128 => 'f/6.3',
1278
+ 24 => 'f/1.4', 136 => 'f/7.1',
1279
+ 40 => 'f/1.8', 144 => 'f/8',
1280
+ 48 => 'f/2.0', 156 => 'f/9.5',
1281
+ 64 => 'f/2.5', 168 => 'f/11',
1282
+ 72 => 'f/2.8', 180 => 'f/13',
1283
+ 84 => 'f/3.3', 188 => 'f/15',
1284
+ 88 => 'f/3.5', 192 => 'f/16',
1285
+ 96 => 'f/4.0', 204 => 'f/19',
1286
+ 104 => 'f/4.5', 216 => 'f/22',
1287
+ 112 => 'f/5.0', 313 => 'N/A', #camera menu shows "--" indicating value has not been set for the lens,
1288
+ 120 => 'f/5.6',
1289
+ },
1229
1290
  );
1230
1291
 
1231
1292
  my %offLowNormalHighZ7 = (
@@ -1273,7 +1334,7 @@ my %secondarySlotFunctionZ9 = (
1273
1334
  3 => 'JPG Primary + JPG Secondary',
1274
1335
  );
1275
1336
 
1276
- my %subjectDetectionAreaMZ6III = ( #28
1337
+ my %subjectDetectionAreaMZ6III = ( #28
1277
1338
  0 => 'Off',
1278
1339
  1 => 'All',
1279
1340
  2 => 'Wide (L)',
@@ -1370,6 +1431,25 @@ my %retouchValues = ( #PH
1370
1431
  54 => 'Low Key', # (S3500)
1371
1432
  );
1372
1433
 
1434
+ # AF points for AFInfo models with 11 focus points
1435
+ my %afPoints11 = (
1436
+ 0 => '(none)',
1437
+ 0x7ff => 'All 11 Points',
1438
+ BITMASK => {
1439
+ 0 => 'Center',
1440
+ 1 => 'Top',
1441
+ 2 => 'Bottom',
1442
+ 3 => 'Mid-left',
1443
+ 4 => 'Mid-right',
1444
+ 5 => 'Upper-left',
1445
+ 6 => 'Upper-right',
1446
+ 7 => 'Lower-left',
1447
+ 8 => 'Lower-right',
1448
+ 9 => 'Far Left',
1449
+ 10 => 'Far Right',
1450
+ },
1451
+ );
1452
+
1373
1453
  # AF point indices for models with 51 focus points, eg. D3 (ref JD/PH)
1374
1454
  # A1 A2 A3 A4 A5 A6 A7 A8 A9
1375
1455
  # B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11
@@ -1511,7 +1591,7 @@ my %afPoints153 = (
1511
1591
  31 => 'B8', 62 => 'H13', 93 => 'C17', 124 => 'G4',
1512
1592
  );
1513
1593
 
1514
- # AF point indices for models with 81 focus points, eg. Z6/Z7/Z50 (ref 38)
1594
+ # AF point indices for models with 81 Auto-area focus points, eg. Z6/Z7/Z50 (ref 38)
1515
1595
  # - 9 rows (A-I) with 9 columns (1-9), center is E5
1516
1596
  #
1517
1597
  # 7 6 5 4 3 2 1 0
@@ -1546,167 +1626,61 @@ my %afPoints81 = (
1546
1626
  17 => 'H6', 34 => 'G7', 51 => 'F8', 68 => 'A9',
1547
1627
  );
1548
1628
 
1549
- # AF point indices for 209 focus point(single-point AF) cameras equipped with Expeed 7 processor eg. Z50ii). Single-point AF array is 11 rows x 19 columns. (ref 28)
1629
+ # AF point indices for 209/231 focus point(single-point AF) cameras equipped with Expeed 7 processor eg. Z50ii). Single-point AF array is 11 rows x 19 columns. (ref 28)
1550
1630
  # - Auto Area AF has 2 additional columns available and provides 231 focus points. Uses 11 rows (A-K) and 21 columns (1-21), center is F11
1551
- my %afPoints209 = (
1552
- 1 => 'A1', 22 => 'B1', 43 => 'C1', 64 => 'D1', 85 => 'E1', 106 => 'F1', 127 => 'G1', 148 => 'H1',
1553
- 2 => 'A2', 23 => 'B2', 44 => 'C2', 65 => 'D2', 86 => 'E2', 107 => 'F2', 128 => 'G2', 149 => 'H2',
1554
- 3 => 'A3', 24 => 'B3', 45 => 'C3', 66 => 'D3', 87 => 'E3', 108 => 'F3', 129 => 'G3', 150 => 'H3',
1555
- 4 => 'A4', 25 => 'B4', 46 => 'C4', 67 => 'D4', 88 => 'E4', 109 => 'F4', 130 => 'G4', 151 => 'H4',
1556
- 5 => 'A5', 26 => 'B5', 47 => 'C5', 68 => 'D5', 89 => 'E5', 110 => 'F5', 131 => 'G5', 152 => 'H5',
1557
- 6 => 'A6', 27 => 'B6', 48 => 'C6', 69 => 'D6', 90 => 'E6', 111 => 'F6', 132 => 'G6', 153 => 'H6',
1558
- 7 => 'A7', 28 => 'B7', 49 => 'C7', 70 => 'D7', 91 => 'E7', 112 => 'F7', 133 => 'G7', 154 => 'H7',
1559
- 8 => 'A8', 29 => 'B8', 50 => 'C8', 71 => 'D8', 92 => 'E8', 113 => 'F8', 134 => 'G8', 155 => 'H8',
1560
- 9 => 'A9', 30 => 'B9', 51 => 'C9', 72 => 'D9', 93 => 'E9', 114 => 'F9', 135 => 'G9', 156 => 'H9',
1561
- 10 => 'A10', 31 => 'B10', 52 => 'C10', 73 => 'D10', 94 => 'E10', 115 => 'F10', 136 => 'G10', 157 => 'H10',
1562
- 11 => 'A11', 32 => 'B11' , 53 => 'C11', 74 => 'D11', 95 => 'E11', 116 => 'F11', 137 => 'G11', 158 => 'H11',
1563
- 12 => 'A12', 33 => 'B12' , 54 => 'C12', 75 => 'D12', 96 => 'E12', 117 => 'F12', 138 => 'G12', 159 => 'H12',
1564
- 13 => 'A13', 34 => 'B13' , 55 => 'C13', 76 => 'D13', 97 => 'E13', 118 => 'F13', 139 => 'G13', 160 => 'H13',
1565
- 14 => 'A14', 35 => 'B14' , 56 => 'C14', 77 => 'D14', 98 => 'E14', 119 => 'F14', 140 => 'G14', 161 => 'H14',
1566
- 15 => 'A15', 36 => 'B15', 57 => 'C15', 78 => 'D15', 99 => 'E15', 120 => 'F15', 141 => 'G15', 162 => 'H15',
1567
- 16 => 'A16', 37 => 'B16' , 58 => 'C16', 79 => 'D16', 100 => 'E16', 121 => 'F16', 142 => 'G16', 163 => 'H16',
1568
- 17 => 'A17', 38 => 'B17', 59 => 'C17', 80 => 'D17', 101 => 'E17', 122 => 'F17', 143 => 'G17', 164 => 'H17',
1569
- 18 => 'A18', 39 => 'B18', 60 => 'C18', 81 => 'D18', 102 => 'E18', 123 => 'F18', 144 => 'G18', 165 => 'H18',
1570
- 19 => 'A19', 40 => 'B19', 61 => 'C19', 82 => 'D19', 103 => 'E19', 124 => 'F19', 145 => 'G19', 166 => 'H19',
1571
- 20 => 'A20', 41 => 'B20', 62 => 'C20', 83 => 'D20', 104 => 'E20', 125 => 'F20', 146 => 'G20', 167 => 'H20',
1572
- 21 => 'A21', 42 => 'B21', 63 => 'C21', 84 => 'D21', 105 => 'E21', 126 => 'F21', 147 => 'G21', 168 => 'H21',
1573
-
1574
- 169 => 'I1', 190 => 'J1', 211 => 'K1',
1575
- 170 => 'I2', 191 => 'J2', 212 => 'K2',
1576
- 171 => 'I3', 192 => 'J3', 213 => 'K3',
1577
- 172 => 'I4', 193 => 'J4', 214 => 'K4',
1578
- 173 => 'I5', 194 => 'J5', 215 => 'K5',
1579
- 174 => 'I6', 195 => 'J6', 216 => 'K6',
1580
- 175 => 'I7', 196 => 'J7', 217 => 'K7',
1581
- 176 => 'I8', 197 => 'J8', 218 => 'K8',
1582
- 177 => 'I9', 198 => 'J9', 219 => 'K9',
1583
- 178 => 'I10', 199 => 'J10', 220 => 'K10',
1584
- 179 => 'I11', 200 => 'J11', 221 => 'K11',
1585
- 180 => 'I12', 201 => 'J12', 222 => 'K12',
1586
- 181 => 'I13', 202 => 'J13', 223 => 'K13',
1587
- 182 => 'I14', 203 => 'J14', 224 => 'K14',
1588
- 183 => 'I15', 204 => 'J15', 225 => 'K15',
1589
- 184 => 'I16', 205 => 'J16', 226 => 'K16',
1590
- 185 => 'I17', 206 => 'J17', 227 => 'K17',
1591
- 186 => 'I18', 207 => 'J18', 228 => 'K18',
1592
- 187 => 'I19', 208 => 'J19', 229 => 'K19',
1593
- 188 => 'I20', 209 => 'J20', 230 => 'K20',
1594
- 189 => 'I21', 210 => 'J21', 231 => 'K21',
1595
- );
1596
-
1597
- # AF point indices for 273 focus point (single-point AF) cameras equipped with Expeed 7 processor (eg. Z6iii and Zf). Single-point AF array is 13 rows x 21 columns (ref 28)
1631
+ my @afPoints231 = (qw(
1632
+ A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21
1633
+ B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B16 B17 B18 B19 B20 B21
1634
+ C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21
1635
+ D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21
1636
+ E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 E17 E18 E19 E20 E21
1637
+ F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21
1638
+ G1 G2 G3 G4 G5 G6 G7 G8 G9 G10 G11 G12 G13 G14 G15 G16 G17 G18 G19 G20 G21
1639
+ H1 H2 H3 H4 H5 H6 H7 H8 H9 H10 H11 H12 H13 H14 H15 H16 H17 H18 H19 H20 H21
1640
+ I1 I2 I3 I4 I5 I6 I7 I8 I9 I10 I11 I12 I13 I14 I15 I16 I17 I18 I19 I20 I21
1641
+ J1 J2 J3 J4 J5 J6 J7 J8 J9 J10 J11 J12 J13 J14 J15 J16 J17 J18 J19 J20 J21
1642
+ K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 K13 K14 K15 K16 K17 K18 K19 K20 K21
1643
+ ));
1644
+
1645
+ # AF point indices for 273/299 focus point (single-point AF) cameras equipped with Expeed 7 processor (eg. Z6iii and Zf). Single-point AF array is 13 rows x 21 columns (ref 28)
1598
1646
  # - Auto Area AF has 2 additional columns available and provides 299 focus points. Uses 13 rows (A-M) and 23 columns (1-23), center is G12
1599
1647
  #
1600
- my %afPoints273 = (
1601
- 1 => 'A1', 24 => 'B1', 47 => 'C1', 70 => 'D1', 93 => 'E1', 116 => 'F1', 139 => 'G1', 162 => 'H1',
1602
- 2 => 'A2', 25 => 'B2', 48 => 'C2', 71 => 'D2', 94 => 'E2', 117 => 'F2', 140 => 'G2', 163 => 'H2',
1603
- 3 => 'A3', 26 => 'B3', 49 => 'C3', 72 => 'D3', 95 => 'E3', 118 => 'F3', 141 => 'G3', 164 => 'H3',
1604
- 4 => 'A4', 27 => 'B4', 50 => 'C4', 73 => 'D4', 96 => 'E4', 119 => 'F4', 142 => 'G4', 165 => 'H4',
1605
- 5 => 'A5', 28 => 'B5', 51 => 'C5', 74 => 'D5', 97 => 'E5', 120 => 'F5', 143 => 'G5', 166 => 'H5',
1606
- 6 => 'A6', 29 => 'B6', 52 => 'C6', 75 => 'D6', 98 => 'E6', 121 => 'F6', 144 => 'G6', 167 => 'H6',
1607
- 7 => 'A7', 30 => 'B7', 53 => 'C7', 76 => 'D7', 99 => 'E7', 122 => 'F7', 145 => 'G7', 168 => 'H7',
1608
- 8 => 'A8', 31 => 'B8', 54 => 'C8', 77 => 'D8', 100 => 'E8', 123 => 'F8', 146 => 'G8', 169 => 'H8',
1609
- 9 => 'A9', 32 => 'B9', 55 => 'C9', 78 => 'D9', 101 => 'E9', 124 => 'F9', 147 => 'G9', 170 => 'H9',
1610
- 10 => 'A10', 33 => 'B10', 56 => 'C10', 79 => 'D10', 102 => 'E10', 125 => 'F10', 148 => 'G10', 171 => 'H10',
1611
- 11 => 'A11', 34 => 'B11' , 57 => 'C11', 80 => 'D11', 103 => 'E11', 126 => 'F11', 149 => 'G11', 172 => 'H11',
1612
- 12 => 'A12', 35 => 'B12' , 58 => 'C12', 81 => 'D12', 104 => 'E12', 127 => 'F12', 150 => 'G12', 173 => 'H12',
1613
- 13 => 'A13', 36 => 'B13' , 59 => 'C13', 82 => 'D13', 105 => 'E13', 128 => 'F13', 151 => 'G13', 174 => 'H13',
1614
- 14 => 'A14', 37 => 'B14' , 60 => 'C14', 83 => 'D14', 106 => 'E14', 129 => 'F14', 152 => 'G14', 175 => 'H14',
1615
- 15 => 'A15', 38 => 'B15', 61 => 'C15', 84 => 'D15', 107 => 'E15', 130 => 'F15', 153 => 'G15', 176 => 'H15',
1616
- 16 => 'A16', 39 => 'B16' , 62 => 'C16', 85 => 'D16', 108 => 'E16', 131 => 'F16', 154 => 'G16', 177 => 'H16',
1617
- 17 => 'A17', 40 => 'B17', 63 => 'C17', 86 => 'D17', 109 => 'E17', 132 => 'F17', 155 => 'G17', 178 => 'H17',
1618
- 18 => 'A18', 41 => 'B18', 64 => 'C18', 87 => 'D18', 110 => 'E18', 133 => 'F18', 156 => 'G18', 179 => 'H18',
1619
- 19 => 'A19', 42 => 'B19', 65 => 'C19', 88 => 'D19', 111 => 'E19', 134 => 'F19', 157 => 'G19', 180 => 'H19',
1620
- 20 => 'A20', 43 => 'B20', 66 => 'C20', 89 => 'D20', 112 => 'E20', 135 => 'F20', 158 => 'G20', 181 => 'H20',
1621
- 21 => 'A21', 44 => 'B21', 67 => 'C21', 90 => 'D21', 113 => 'E21', 136 => 'F21', 159 => 'G21', 182 => 'H21',
1622
- 22 => 'A22', 45 => 'B22', 68 => 'C22', 91 => 'D22', 114 => 'E22', 137 => 'F22', 160 => 'G22', 183 => 'H22',
1623
- 23 => 'A23', 46 => 'B23', 69 => 'C23', 92 => 'D23', 115 => 'E23', 138 => 'F23', 161 => 'G23', 184 => 'H23',
1624
-
1625
- 185 => 'I1', 208 => 'J1', 231 => 'K1', 254 => 'L1', 277 => 'M1',
1626
- 186 => 'I2', 209 => 'J2', 232 => 'K2', 255 => 'L2', 278 => 'M2',
1627
- 187 => 'I3', 210 => 'J3', 233 => 'K3', 256 => 'L3', 279 => 'M3',
1628
- 188 => 'I4', 211 => 'J4', 234 => 'K4', 257 => 'L4', 280 => 'M4',
1629
- 189 => 'I5', 212 => 'J5', 235 => 'K5', 258 => 'L5', 281 => 'M5',
1630
- 190 => 'I6', 213 => 'J6', 236 => 'K6', 259 => 'L6', 282 => 'M6',
1631
- 191 => 'I7', 214 => 'J7', 237 => 'K7', 260 => 'L7', 283 => 'M7',
1632
- 192 => 'I8', 215 => 'J8', 238 => 'K8', 261 => 'L8', 284 => 'M8',
1633
- 193 => 'I9', 216 => 'J9', 239 => 'K9', 262 => 'L9', 285 => 'M9',
1634
- 194 => 'I10', 217 => 'J10', 240 => 'K10', 263 => 'L10', 286 => 'M10',
1635
- 195 => 'I11', 218 => 'J11', 241 => 'K11', 264 => 'L11', 287 => 'M11',
1636
- 196 => 'I12', 219 => 'J12', 242 => 'K12', 265 => 'L12', 288 => 'M12',
1637
- 197 => 'I13', 220 => 'J13', 243 => 'K13', 266 => 'L13', 289 => 'M13',
1638
- 198 => 'I14', 221 => 'J14', 244 => 'K14', 267 => 'L14', 290 => 'M14',
1639
- 199 => 'I15', 222 => 'J15', 245 => 'K15', 268 => 'L15', 291 => 'M15',
1640
- 200 => 'I16', 223 => 'J16', 246 => 'K16', 269 => 'L16', 292 => 'M16',
1641
- 201 => 'I17', 224 => 'J17', 247 => 'K17', 270 => 'L17', 293 => 'M17',
1642
- 202 => 'I18', 225 => 'J18', 248 => 'K18', 271 => 'L18', 294 => 'M18',
1643
- 203 => 'I19', 226 => 'J19', 249 => 'K19', 272 => 'L19', 295 => 'M19',
1644
- 204 => 'I20', 227 => 'J20', 250 => 'K20', 273 => 'L20', 296 => 'M20',
1645
- 205 => 'I21', 228 => 'J21', 251 => 'K21', 274 => 'L21', 297 => 'M21',
1646
- 206 => 'I22', 229 => 'J22', 252 => 'K22', 275 => 'L22', 298 => 'M22',
1647
- 208 => 'I23', 230 => 'J23', 253 => 'K23', 276 => 'L23', 299 => 'M23',
1648
- );
1649
-
1650
- # AF point indices for 493 focus point (single-point AF) cameras equipped with Expeed 7 processor (eg. Z8 and Z9). Single-point AF array is 17 rows x 29 columns (ref 28)
1651
- # - Auto Area AF uses 15 of the 17 rows (A-Q) and 27 of the 29 columns (1-27), center is H14 (405 of the 493 focus points can be used by Auto-area AF)
1648
+ my @afPoints299 = (qw(
1649
+ A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23
1650
+ B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B16 B17 B18 B19 B20 B21 B22 B23
1651
+ C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21 C22 C23
1652
+ D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23
1653
+ E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 E17 E18 E19 E20 E21 E22 E23
1654
+ F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23
1655
+ G1 G2 G3 G4 G5 G6 G7 G8 G9 G10 G11 G12 G13 G14 G15 G16 G17 G18 G19 G20 G21 G22 G23
1656
+ H1 H2 H3 H4 H5 H6 H7 H8 H9 H10 H11 H12 H13 H14 H15 H16 H17 H18 H19 H20 H21 H22 H23
1657
+ I1 I2 I3 I4 I5 I6 I7 I8 I9 I10 I11 I12 I13 I14 I15 I16 I17 I18 I19 I20 I21 I22 I23
1658
+ J1 J2 J3 J4 J5 J6 J7 J8 J9 J10 J11 J12 J13 J14 J15 J16 J17 J18 J19 J20 J21 J22 J23
1659
+ K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 K13 K14 K15 K16 K17 K18 K19 K20 K21 K22 K23
1660
+ L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 L11 L12 L13 L14 L15 L16 L17 L18 L19 L20 L21 L22 L23
1661
+ M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 M12 M13 M14 M15 M16 M17 M18 M19 M20 M21 M22 M23
1662
+ ));
1663
+
1664
+ # AF point indices for 405/493 focus point (single-point AF) cameras equipped with Expeed 7 processor (eg. Z8 and Z9). Single-point AF array is 17 rows x 29 columns (ref 28)
1665
+ # - Auto Area AF uses 15 of the 17 rows (A-O) and 27 of the 29 columns (1-27), center is H14 (405 of the 493 focus points can be used by Auto-area AF)
1652
1666
  #
1653
- my %afPoints493 = (
1654
- 1 => 'A1', 28 => 'B1', 55 => 'C1', 82 => 'D1', 109 => 'E1', 136 => 'F1', 163 => 'G1', 190 => 'H1',
1655
- 2 => 'A2', 29 => 'B2', 56 => 'C2', 83 => 'D2', 110 => 'E2', 137 => 'F2', 164 => 'G2', 191 => 'H2',
1656
- 3 => 'A3', 30 => 'B3', 57 => 'C3', 84 => 'D3', 111 => 'E3', 138 => 'F3', 165 => 'G3', 192 => 'H3',
1657
- 4 => 'A4', 31 => 'B4', 58 => 'C4', 85 => 'D4', 112 => 'E4', 139 => 'F4', 166 => 'G4', 193 => 'H4',
1658
- 5 => 'A5', 32 => 'B5', 59 => 'C5', 86 => 'D5', 113 => 'E5', 140 => 'F5', 167 => 'G5', 194 => 'H5',
1659
- 6 => 'A6', 33 => 'B6', 60 => 'C6', 87 => 'D6', 114 => 'E6', 141 => 'F6', 168 => 'G6', 195 => 'H6',
1660
- 7 => 'A7', 34 => 'B7', 61 => 'C7', 88 => 'D7', 115 => 'E7', 142 => 'F7', 169 => 'G7', 196 => 'H7',
1661
- 8 => 'A8', 35 => 'B8', 62 => 'C8', 89 => 'D8', 116 => 'E8', 143 => 'F8', 170 => 'G8', 197 => 'H8',
1662
- 9 => 'A9', 36 => 'B9', 63 => 'C9', 90 => 'D9', 117 => 'E9', 144 => 'F9', 171 => 'G9', 198 => 'H9',
1663
- 10 => 'A10', 37 => 'B10', 64 => 'C10', 91 => 'D10', 118 => 'E10', 145 => 'F10', 172 => 'G10', 199 => 'H10',
1664
- 11 => 'A11', 38 => 'B11' , 65 => 'C11', 92 => 'D11', 119 => 'E11', 146 => 'F11', 173 => 'G11', 200 => 'H11',
1665
- 12 => 'A12', 39 => 'B12' , 66 => 'C12', 93 => 'D12', 120 => 'E12', 147 => 'F12', 174 => 'G12', 201 => 'H12',
1666
- 13 => 'A13', 40 => 'B13' , 67 => 'C13', 94 => 'D13', 121 => 'E13', 148 => 'F13', 175 => 'G13', 202 => 'H13',
1667
- 14 => 'A14', 41 => 'B14' , 68 => 'C14', 95 => 'D14', 122 => 'E14', 149 => 'F14', 176 => 'G14', 203 => 'H14',
1668
- 15 => 'A15', 42 => 'B15', 69 => 'C15', 96 => 'D15', 123 => 'E15', 150 => 'F15', 177 => 'G15', 204 => 'H15',
1669
- 16 => 'A16', 43 => 'B16' , 70 => 'C16', 97 => 'D16', 124 => 'E16', 151 => 'F16', 178 => 'G16', 205 => 'H16',
1670
- 17 => 'A17', 44 => 'B17', 71 => 'C17', 98 => 'D17', 125 => 'E17', 152 => 'F17', 179 => 'G17', 206 => 'H17',
1671
- 18 => 'A18', 45 => 'B18', 72 => 'C18', 99 => 'D18', 126 => 'E18', 153 => 'F18', 180 => 'G18', 207 => 'H18',
1672
- 19 => 'A19', 46 => 'B19', 73 => 'C19', 100 => 'D19', 127 => 'E19', 154 => 'F19', 181 => 'G19', 208 => 'H19',
1673
- 20 => 'A20', 47 => 'B20', 74 => 'C20', 101 => 'D20', 128 => 'E20', 155 => 'F20', 182 => 'G20', 209 => 'H20',
1674
- 21 => 'A21', 48 => 'B21', 75 => 'C21', 102 => 'D21', 129 => 'E21', 156 => 'F21', 183 => 'G21', 210 => 'H21',
1675
- 22 => 'A22', 49 => 'B22', 76 => 'C22', 103 => 'D22', 130 => 'E22', 157 => 'F22', 184 => 'G22', 211 => 'H22',
1676
- 23 => 'A23', 50 => 'B23', 77 => 'C23', 104 => 'D23', 131 => 'E23', 158 => 'F23', 185 => 'G23', 212 => 'H23',
1677
- 24 => 'A24', 51 => 'B24', 78 => 'C24', 105 => 'D24', 132 => 'E24', 159 => 'F24', 186 => 'G24', 213 => 'H24',
1678
- 25 => 'A25', 52 => 'B25', 79 => 'C25', 106 => 'D25', 133 => 'E25', 160 => 'F25', 187 => 'G25', 214 => 'H25',
1679
- 26 => 'A26', 53 => 'B26', 80 => 'C26', 107 => 'D26', 134 => 'E26', 161 => 'F26', 188 => 'G26', 215 => 'H26',
1680
- 27 => 'A27', 54 => 'B27', 81 => 'C27', 108 => 'D27', 135 => 'E27', 162 => 'F27', 189 => 'G27', 216 => 'H27',
1681
-
1682
- 217 => 'I1', 244 => 'J1', 271 => 'K1', 298 => 'L1', 325 => 'M1', 352 => 'N1', 379 => 'O1',
1683
- 218 => 'I2', 245 => 'J2', 272 => 'K2', 299 => 'L2', 326 => 'M2', 353 => 'N2', 380 => 'O2',
1684
- 219 => 'I3', 246 => 'J3', 273 => 'K3', 300 => 'L3', 327 => 'M3', 354 => 'N3', 381 => 'O3',
1685
- 220 => 'I4', 247 => 'J4', 274 => 'K4', 301 => 'L4', 328 => 'M4', 355 => 'N4', 382 => 'O4',
1686
- 221 => 'I5', 248 => 'J5', 275 => 'K5', 302 => 'L5', 329 => 'M5', 356 => 'N5', 383 => 'O5',
1687
- 222 => 'I6', 249 => 'J6', 276 => 'K6', 303 => 'L6', 330 => 'M6', 357 => 'N6', 384 => 'O6',
1688
- 223 => 'I7', 250 => 'J7', 277 => 'K7', 304 => 'L7', 331 => 'M7', 358 => 'N7', 385 => 'O7',
1689
- 224 => 'I8', 251 => 'J8', 278 => 'K8', 305 => 'L8', 332 => 'M8', 359 => 'N8', 386 => 'O8',
1690
- 225 => 'I9', 252 => 'J9', 279 => 'K9', 306 => 'L9', 333 => 'M9', 360 => 'N9', 387 => 'O9',
1691
- 226 => 'I10', 253 => 'J10', 280 => 'K10', 307 => 'L10', 334 => 'M10', 361 => 'N10', 388 => 'O10',
1692
- 227 => 'I11', 254 => 'J11', 281 => 'K11', 308 => 'L11', 335 => 'M11', 362 => 'N11', 389 => 'O11',
1693
- 228 => 'I12', 255 => 'J12', 282 => 'K12', 309 => 'L12', 336 => 'M12', 363 => 'N12', 390 => 'O12',
1694
- 229 => 'I13', 256 => 'J13', 283 => 'K13', 310 => 'L13', 337 => 'M13', 364 => 'N13', 391 => 'O13',
1695
- 230 => 'I14', 257 => 'J14', 284 => 'K14', 311 => 'L14', 338 => 'M14', 365 => 'N14', 392 => 'O14',
1696
- 231 => 'I15', 258 => 'J15', 285 => 'K15', 312 => 'L15', 339 => 'M15', 366 => 'N15', 393 => 'O15',
1697
- 232 => 'I16', 259 => 'J16', 286 => 'K16', 313 => 'L16', 340 => 'M16', 367 => 'N16', 394 => 'O16',
1698
- 233 => 'I17', 260 => 'J17', 287 => 'K17', 314 => 'L17', 341 => 'M17', 368 => 'N17', 395 => 'O17',
1699
- 234 => 'I18', 261 => 'J18', 288 => 'K18', 315 => 'L18', 342 => 'M18', 369 => 'N18', 396 => 'O18',
1700
- 235 => 'I19', 262 => 'J19', 289 => 'K19', 316 => 'L19', 343 => 'M19', 370 => 'N19', 397 => 'O19',
1701
- 236 => 'I20', 263 => 'J20', 290 => 'K20', 317 => 'L20', 344 => 'M20', 371 => 'N20', 398 => 'O20',
1702
- 237 => 'I21', 264 => 'J21', 291 => 'K21', 318 => 'L21', 345 => 'M21', 372 => 'N21', 399 => 'O21',
1703
- 238 => 'I22', 265 => 'J22', 292 => 'K22', 319 => 'L22', 346 => 'M22', 373 => 'N22', 400 => 'O22',
1704
- 239 => 'I23', 266 => 'J23', 293 => 'K23', 320 => 'L23', 347 => 'M23', 374 => 'N23', 401 => 'O23',
1705
- 240 => 'I24', 267 => 'J24', 294 => 'K24', 321 => 'L24', 348 => 'M24', 375 => 'N24', 402 => 'O24',
1706
- 241 => 'I25', 268 => 'J25', 295 => 'K25', 322 => 'L25', 349 => 'M25', 376 => 'N25', 403 => 'O25',
1707
- 242 => 'I26', 269 => 'J26', 296 => 'K26', 323 => 'L26', 350 => 'M26', 377 => 'N26', 404 => 'O26',
1708
- 243 => 'I27', 270 => 'J27', 297 => 'K27', 324 => 'L27', 351 => 'M27', 378 => 'N27', 405 => 'O27',
1709
- );
1667
+ my @afPoints405 = (qw(
1668
+ A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 A24 A25 A26 A27
1669
+ B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B16 B17 B18 B19 B20 B21 B22 B23 B24 B25 B26 B27
1670
+ C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21 C22 C23 C24 C25 C26 C27
1671
+ D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27
1672
+ E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 E17 E18 E19 E20 E21 E22 E23 E24 E25 E26 E27
1673
+ F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 F25 F26 F27
1674
+ G1 G2 G3 G4 G5 G6 G7 G8 G9 G10 G11 G12 G13 G14 G15 G16 G17 G18 G19 G20 G21 G22 G23 G24 G25 G26 G27
1675
+ H1 H2 H3 H4 H5 H6 H7 H8 H9 H10 H11 H12 H13 H14 H15 H16 H17 H18 H19 H20 H21 H22 H23 H24 H25 H26 H27
1676
+ I1 I2 I3 I4 I5 I6 I7 I8 I9 I10 I11 I12 I13 I14 I15 I16 I17 I18 I19 I20 I21 I22 I23 I24 I25 I26 I27
1677
+ J1 J2 J3 J4 J5 J6 J7 J8 J9 J10 J11 J12 J13 J14 J15 J16 J17 J18 J19 J20 J21 J22 J23 J24 J25 J26 J27
1678
+ K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 K13 K14 K15 K16 K17 K18 K19 K20 K21 K22 K23 K24 K25 K26 K27
1679
+ L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 L11 L12 L13 L14 L15 L16 L17 L18 L19 L20 L21 L22 L23 L24 L25 L26 L27
1680
+ M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 M12 M13 M14 M15 M16 M17 M18 M19 M20 M21 M22 M23 M24 M25 M26 M27
1681
+ N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 N11 N12 N13 N14 N15 N16 N17 N18 N19 N20 N21 N22 N23 N24 N25 N26 N27
1682
+ O1 O2 O3 O4 O5 O6 O7 O8 O9 O10 O11 O12 O13 O14 O15 O16 O17 O18 O19 O20 O21 O22 O23 O24 O25 O26 O27
1683
+ ));
1710
1684
 
1711
1685
  my %cropHiSpeed = ( #IB
1712
1686
  0 => 'Off',
@@ -3112,15 +3086,31 @@ my %base64coord = (
3112
3086
  PrintConvInv => '$self->InverseDateTime($val,0)',
3113
3087
  },
3114
3088
  0x00b7 => [{
3089
+ Name => 'AFInfo2',
3090
+ # LiveView-enabled DSLRs introduced starting in 2007 (D3/D300)
3091
+ Condition => '$$valPt =~ /^0100/',
3092
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0100' },
3093
+ },{
3094
+ Name => 'AFInfo2',
3095
+ # All Expeed 5 processor and most Expeed 4 processor models from 2016 - D5, D500, D850, D3400, D3500, D7500 (D5600 is v0100)
3096
+ Condition => '$$valPt =~ /^0101/',
3097
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0101' },
3098
+ },{
3099
+ Name => 'AFInfo2',
3100
+ # Nikon 1 Series cameras
3101
+ Condition => '$$valPt =~ /^020[01]/',
3102
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0200' },
3103
+ },{
3104
+ Name => 'AFInfo2',
3105
+ # Expeed 6 processor models - D6, D780, Z5, Z6, Z7, Z30, Z50, Z6_2, Z7_2 and Zfc
3106
+ Condition => '$$valPt =~ /^030[01]/',
3107
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0300' },
3108
+ },{
3115
3109
  Name => 'AFInfo2',
3116
3110
  # Expeed 7 processor models - Z8 & Z9 (AFInfo2Version 0400), Z6iii & Zf (AFInfo2Version 0401)
3117
3111
  # and Z50ii (AFInfo2Version 0402)
3118
3112
  Condition => '$$valPt =~ /^040[012]/',
3119
3113
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
3120
- },{ #JD
3121
- Name => 'AFInfo2',
3122
- # (this structure may be byte swapped when rewritten by CaptureNX)
3123
- SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
3124
3114
  }],
3125
3115
  0x00b8 => [{ #PH
3126
3116
  Name => 'FileInfo',
@@ -4133,147 +4123,59 @@ my %base64coord = (
4133
4123
  Name => 'AFPointsInFocus',
4134
4124
  Format => 'int16u',
4135
4125
  PrintConvColumns => 2,
4136
- PrintConv => {
4137
- 0 => '(none)',
4138
- 0x7ff => 'All 11 Points',
4139
- BITMASK => {
4140
- 0 => 'Center',
4141
- 1 => 'Top',
4142
- 2 => 'Bottom',
4143
- 3 => 'Mid-left',
4144
- 4 => 'Mid-right',
4145
- 5 => 'Upper-left',
4146
- 6 => 'Upper-right',
4147
- 7 => 'Lower-left',
4148
- 8 => 'Lower-right',
4149
- 9 => 'Far Left',
4150
- 10 => 'Far Right',
4151
- },
4152
- },
4126
+ PrintConv => \%afPoints11,
4153
4127
  },
4154
4128
  );
4155
4129
 
4156
- # Nikon AF information for D3 and D300 (ref JD)
4157
- %Image::ExifTool::Nikon::AFInfo2 = (
4130
+ %Image::ExifTool::Nikon::AFInfo2V0100 = (
4158
4131
  %binaryDataAttrs,
4159
4132
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4160
4133
  DATAMEMBER => [ 0, 4, 6 ],
4161
- NOTES => "These tags are written by Nikon DSLR's which have the live view feature.",
4134
+ NOTES => q{
4135
+ AF information for Nikon cameras with LiveView that were introduced 2007
4136
+ thru 2015 (and the D5600 in 2016), including D3, D4, D3000, D3100-D3300,
4137
+ D5000-D5600, D6x0, D700, D7000, D7100, D810
4138
+ },
4162
4139
  0 => {
4163
4140
  Name => 'AFInfo2Version',
4164
4141
  Format => 'undef[4]',
4165
4142
  Writable => 0,
4166
4143
  RawConv => '$$self{AFInfo2Version} = $val',
4167
4144
  },
4168
- 4 => { #PH
4169
- Name => 'ContrastDetectAF',
4170
- RawConv => '$$self{ContrastDetectAF} = $val',
4171
- PrintConv => {
4172
- %offOn,
4173
- 2 => 'On (2)', #PH (Z7)
4174
- },
4175
- Notes => 'this is Off for the hybrid AF used in Nikon 1 models',
4145
+ 4 => {
4146
+ Name => 'AFDetectionMethod', #specifies phase detect or contrast detect
4147
+ RawConv => '$$self{AFDetectionMethod} = $val',
4148
+ PrintConv => \%aFDetectionMethod ,
4176
4149
  },
4177
4150
  5 => [
4178
4151
  {
4179
4152
  Name => 'AFAreaMode',
4180
- Condition => 'not $$self{ContrastDetectAF}',
4181
- Notes => 'ContrastDetectAF Off',
4182
- PrintConv => {
4183
- 0 => 'Single Area', # (called "Single Point" in manual - PH)
4184
- 1 => 'Dynamic Area', #PH
4185
- 2 => 'Dynamic Area (closest subject)', #PH
4186
- 3 => 'Group Dynamic', #PH
4187
- 4 => 'Dynamic Area (9 points)', #JD/28
4188
- 5 => 'Dynamic Area (21 points)', #28
4189
- 6 => 'Dynamic Area (51 points)', #28
4190
- 7 => 'Dynamic Area (51 points, 3D-tracking)', #PH/28
4191
- 8 => 'Auto-area',
4192
- 9 => 'Dynamic Area (3D-tracking)', #PH (D5000 "3D-tracking (11 points)")
4193
- 10 => 'Single Area (wide)', #PH
4194
- 11 => 'Dynamic Area (wide)', #PH
4195
- 12 => 'Dynamic Area (wide, 3D-tracking)', #PH
4196
- 13 => 'Group Area', #PH
4197
- 14 => 'Dynamic Area (25 points)', #PH
4198
- 15 => 'Dynamic Area (72 points)', #PH
4199
- 16 => 'Group Area (HL)', #28
4200
- 17 => 'Group Area (VL)', #28
4201
- 18 => 'Dynamic Area (49 points)', #28
4202
- 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
4203
- 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
4204
- 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
4205
- 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
4206
- # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
4207
- # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
4208
- 192 => 'Pinpoint', #PH (NC)
4209
- 193 => 'Single', #PH (NC)
4210
- 195 => 'Wide (S)', #PH (NC)
4211
- 196 => 'Wide (L)', #PH (NC)
4212
- 197 => 'Auto', #PH (NC)
4213
- },
4153
+ Condition => '$$self{AFDetectionMethod} == 0',
4154
+ PrintConv => \%aFAreaModePD, #phase detect
4214
4155
  },
4215
- { #PH (D3/D90/D5000)
4156
+ {
4216
4157
  Name => 'AFAreaMode',
4217
- Notes => 'ContrastDetectAF On',
4218
- PrintConv => {
4219
- 0 => 'Contrast-detect', # (D3)
4220
- 1 => 'Contrast-detect (normal area)', # (D90/D5000)
4221
- # (D90 and D5000 give value of 2 when set to 'Face Priority' and
4222
- # 'Subject Tracking', but I didn't have a face to shoot at or a
4223
- # moving subject to track so perhaps this value changes dynamically)
4224
- 2 => 'Contrast-detect (wide area)', # (D90/D5000)
4225
- 3 => 'Contrast-detect (face priority)', # (ViewNX)
4226
- 4 => 'Contrast-detect (subject tracking)', # (ViewNX)
4227
- 128 => 'Single', #PH (1V3)
4228
- 129 => 'Auto (41 points)', #PH (NC)
4229
- 130 => 'Subject Tracking (41 points)', #PH (NC)
4230
- 131 => 'Face Priority (41 points)', #PH (NC)
4231
- 192 => 'Pinpoint', #PH (Z7)
4232
- 193 => 'Single', #PH (Z7)
4233
- 194 => 'Dynamic', #PH (Z7)
4234
- 195 => 'Wide (S)', #PH (Z7)
4235
- 196 => 'Wide (L)', #PH (Z7)
4236
- 197 => 'Auto', #PH (Z7)
4237
- 198 => 'Auto (People)', #28 (Z7) #if no faces are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
4238
- 199 => 'Auto (Animal)', #28 (Z7) #if no animals are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
4239
- 200 => 'Normal-area AF', #28 (D6)
4240
- 201 => 'Wide-area AF', #28 (D6)
4241
- 202 => 'Face-priority AF', #28 (D6)
4242
- 203 => 'Subject-tracking AF', #28 (D6)
4243
- 204 => 'Dynamic Area (S)', #28 (Z9)
4244
- 205 => 'Dynamic Area (M)', #28 (Z9)
4245
- 206 => 'Dynamic Area (L)', #28 (Z9)
4246
- 207 => '3D-tracking', #28 (Z9)
4247
- 208 => 'Wide-Area (C1/C2)', #28 (Z8, Z9)
4248
- },
4158
+ PrintConv => \%aFAreaModeCD, #contrast detect
4249
4159
  },
4250
4160
  ],
4251
4161
  6 => {
4252
- Name => 'PhaseDetectAF', #JD(AutoFocus), PH(PhaseDetectAF)
4253
- Notes => 'PrimaryAFPoint and AFPointsUsed below are only valid when this is On',
4254
- RawConv => '$$self{PhaseDetectAF} = $val',
4162
+ Name => 'FocusPointSchema',
4163
+ RawConv => '$$self{FocusPointSchema} = $val',
4164
+ Hidden => 1,
4255
4165
  PrintConv => {
4256
- # [observed AFAreaMode values in square brackets for each PhaseDetectAF value]
4257
- 0 => 'Off',
4258
- 1 => 'On (51-point)', #PH
4259
- 2 => 'On (11-point)', #PH
4260
- 3 => 'On (39-point)', #29 (D7000)
4261
- 4 => 'On (73-point)', #PH (1J1[128/129],1J2[128/129/135],1J3/1S1/1V2[128/129/131],1V1[129],AW1[129/131])
4262
- 5 => 'On (5)', #PH (1S2[128/129], 1J4/1V3[129])
4263
- 6 => 'On (105-point)', #PH (1J4/1V3[128/130])
4264
- 7 => 'On (153-point)', #PH (D5/D500/D850)
4265
- 8 => 'On (81-point)', #38
4266
- 9 => 'On (105-point)', #28 (D6)
4166
+ 0 => 'Off', # LiveView or manual focus or no focus
4167
+ 1 => '51-point', # (D3/D3S/D3X/D4/D4S/D300/D300S/D700/D750/D800/D800E/D810/D7100/D7200)
4168
+ 2 => '11-point', # (D90/D3000/D3100/D3200/D3300/D5000/D5100)
4169
+ 3 => '39-point', # (D600/D610/D5200/D5300/D5500/D5600/D7000/Df)
4267
4170
  },
4268
4171
  },
4269
4172
  7 => [
4270
4173
  { #PH/JD
4271
4174
  Name => 'PrimaryAFPoint',
4272
- # PrimaryAFPoint may only be valid for PhaseDetect - certainly true on the D6, possibly other bodies? (ref 28)
4273
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
4175
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4274
4176
  Notes => q{
4275
4177
  models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
4276
- D4, D4S, D300, D300S, D700, D800, D800e and D810
4178
+ D4, D4S, D300, D300S, D700, D750, D800, D800E, D810, D7100 and D7200
4277
4179
  },
4278
4180
  PrintConvColumns => 5,
4279
4181
  PrintConv => {
@@ -4281,11 +4183,10 @@ my %base64coord = (
4281
4183
  %afPoints51,
4282
4184
  1 => 'C6 (Center)', # (add " (Center)" to central point)
4283
4185
  },
4284
- },
4285
- { #10
4186
+ },{ #10
4286
4187
  Name => 'PrimaryAFPoint',
4287
- Notes => 'models with 11-point AF: D90, D3000, D3100, D5000 and D5100',
4288
- Condition => '$$self{PhaseDetectAF} == 2',
4188
+ Notes => 'models with 11-point AF: D90, D3000-D3300, D5000 and D5100',
4189
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4289
4190
  PrintConvColumns => 2,
4290
4191
  PrintConv => {
4291
4192
  0 => '(none)',
@@ -4301,11 +4202,10 @@ my %base64coord = (
4301
4202
  10 => 'Lower-right',
4302
4203
  11 => 'Far Right',
4303
4204
  },
4304
- },
4305
- { #29
4205
+ },{ #29
4306
4206
  Name => 'PrimaryAFPoint',
4307
- Condition => '$$self{PhaseDetectAF} == 3',
4308
- Notes => 'models with 39-point AF: D600 and D7000',
4207
+ Condition => '$$self{FocusPointSchema} == 3', #39 focus-point models
4208
+ Notes => 'models with 39-point AF: D600, D610, D5200-D5600, D7000 and Df',
4309
4209
  PrintConvColumns => 5,
4310
4210
  PrintConv => {
4311
4211
  0 => '(none)',
@@ -4313,83 +4213,16 @@ my %base64coord = (
4313
4213
  1 => 'C6 (Center)', # (add " (Center)" to central point)
4314
4214
  },
4315
4215
  },
4316
- { #PH
4317
- Name => 'PrimaryAFPoint',
4318
- Condition => '$$self{PhaseDetectAF} == 4',
4319
- Notes => 'Nikon 1 models with older 135-point AF and 73-point phase-detect AF',
4320
- PrintConvColumns => 5,
4321
- PrintConv => {
4322
- 0 => '(none)',
4323
- %afPoints135,
4324
- 1 => 'E8 (Center)', # (add " (Center)" to central point)
4325
- },
4326
- },
4327
- { #PH (NC)
4328
- Name => 'PrimaryAFPoint',
4329
- Condition => '$$self{PhaseDetectAF} == 5',
4330
- Notes => q{
4331
- Nikon 1 models with newer 135-point AF and 73-point phase-detect AF -- 9
4332
- rows (B-J) and 15 columns (1-15), inside a grid of 11 rows by 15 columns.
4333
- The points are numbered sequentially, with F8 at the center
4334
- },
4335
- PrintConv => {
4336
- 0 => '(none)',
4337
- 82 => 'F8 (Center)',
4338
- OTHER => sub {
4339
- my ($val, $inv) = @_;
4340
- return GetAFPointGrid($val, 15, $inv);
4341
- },
4342
- },
4343
- },
4344
- { #PH
4345
- Name => 'PrimaryAFPoint',
4346
- Condition => '$$self{PhaseDetectAF} == 6',
4347
- Notes => q{
4348
- Nikon 1 models with 171-point AF and 105-point phase-detect AF -- 9 rows
4349
- (B-J) and 19 columns (2-20), inside a grid of 11 rows by 21 columns. The
4350
- points are numbered sequentially, with F11 at the center
4351
- },
4352
- PrintConv => {
4353
- 0 => '(none)',
4354
- #22 => 'B2 (Top-left)',
4355
- #40 => 'B20 (Top-right)',
4356
- 115 => 'F11 (Center)',
4357
- #190 => 'J2 (Bottom-left)',
4358
- #208 => 'J20 (Bottom-right)',
4359
- OTHER => sub {
4360
- my ($val, $inv) = @_;
4361
- return GetAFPointGrid($val, 21, $inv);
4362
- },
4363
- },
4364
- },
4365
- { #PH
4366
- Name => 'PrimaryAFPoint',
4367
- Condition => '$$self{PhaseDetectAF} == 7 and $$self{AFInfo2Version} eq "0100"',
4368
- Notes => q{
4369
- Nikon models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17): D5,
4370
- D500 and D850
4371
- },
4372
- PrintConvColumns => 5,
4373
- PrintConv => {
4374
- 0 => '(none)',
4375
- %afPoints153,
4376
- 1 => 'E9 (Center)',
4377
- },
4378
- },
4379
4216
  {
4380
4217
  Name => 'PrimaryAFPoint',
4381
- Condition => '$$self{AFInfo2Version} eq "0100"',
4382
- Notes => 'future models?...',
4383
- PrintConv => {
4384
- 0 => '(none)',
4385
- 1 => 'Center',
4386
- },
4218
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4219
+ PrintConv => { 0 => '(none)', },
4387
4220
  },
4388
4221
  ],
4389
4222
  8 => [
4390
4223
  { #JD/PH
4391
4224
  Name => 'AFPointsUsed',
4392
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
4225
+ Condition => '$$self{FocusPointSchema} == 1', # 51 focus-point models
4393
4226
  Notes => q{
4394
4227
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4395
4228
  point is C6
@@ -4397,12 +4230,12 @@ my %base64coord = (
4397
4230
  Format => 'undef[7]',
4398
4231
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
4399
4232
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4400
- PrintConv => sub { PrintAFPoints(shift, \%afPoints51); },
4401
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51); },
4233
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4234
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4402
4235
  },
4403
4236
  { #10
4404
4237
  Name => 'AFPointsUsed',
4405
- Condition => '$$self{PhaseDetectAF} == 2',
4238
+ Condition => '$$self{FocusPointSchema} == 2', # 11 focus-point models
4406
4239
  Notes => 'models with 11-point AF',
4407
4240
  # read as int16u in little-endian byte order
4408
4241
  Format => 'undef[2]',
@@ -4429,7 +4262,7 @@ my %base64coord = (
4429
4262
  },
4430
4263
  { #29/PH
4431
4264
  Name => 'AFPointsUsed',
4432
- Condition => '$$self{PhaseDetectAF} == 3',
4265
+ Condition => '$$self{FocusPointSchema} == 3', # 39 focus-point models
4433
4266
  Notes => q{
4434
4267
  models with 39-point AF -- 5 rows: A1-3, B1-11, C1-11, D1-11, E1-3. Center
4435
4268
  point is C6
@@ -4437,298 +4270,246 @@ my %base64coord = (
4437
4270
  Format => 'undef[5]',
4438
4271
  ValueConv => 'join(" ", unpack("H2"x5, $val))',
4439
4272
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4440
- PrintConv => sub { PrintAFPoints(shift, \%afPoints39); },
4441
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints39); },
4442
- },
4443
- { #PH (1AW1,1J1,1J2,1J3,1S1,1V1,1V2)
4444
- Name => 'AFPointsUsed',
4445
- Condition => '$$self{PhaseDetectAF} == 4',
4446
- Notes => q{
4447
- older models with 135-point AF -- 9 rows (A-I) and 15 columns (1-15).
4448
- Center point is E8. The odd-numbered columns, columns 2 and 14, and the
4449
- remaining corner points are not used for 41-point AF mode
4450
- },
4451
- Format => 'undef[17]',
4452
- ValueConv => 'join(" ", unpack("H2"x17, $val))',
4453
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4454
- PrintConv => sub { PrintAFPoints(shift, \%afPoints135); },
4455
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints135); },
4456
- },
4457
- { #PH (1S2)
4458
- Name => 'AFPointsUsed',
4459
- Condition => '$$self{PhaseDetectAF} == 5',
4460
- Notes => q{
4461
- newer models with 135-point AF -- 9 rows (B-J) and 15 columns (1-15). Center
4462
- point is F8
4463
- },
4464
- Format => 'undef[21]',
4465
- ValueConv => 'join(" ", unpack("H2"x21, $val))',
4466
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4467
- PrintConv => sub { PrintAFPointsGrid(shift, 15); },
4468
- PrintConvInv => sub { PrintAFPointsGridInv(shift, 15, 21); },
4469
- },
4470
- { #PH (1J4,1V3)
4471
- Name => 'AFPointsUsed',
4472
- Condition => '$$self{PhaseDetectAF} == 6',
4473
- Notes => q{
4474
- models with 171-point AF -- 9 rows (B-J) and 19 columns (2-20). Center
4475
- point is F10
4476
- },
4477
- Format => 'undef[29]',
4478
- ValueConv => 'join(" ", unpack("H2"x29, $val))',
4479
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4480
- PrintConv => sub { PrintAFPointsGrid(shift, 21); },
4481
- PrintConvInv => sub { PrintAFPointsGridInv(shift, 21, 29); },
4482
- },
4483
- { #PH (D5,D500)
4484
- Name => 'AFPointsUsed',
4485
- Condition => '$$self{PhaseDetectAF} == 7',
4486
- Notes => q{
4487
- models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17). Center
4488
- point is E9
4489
- },
4490
- Format => 'undef[20]',
4491
- ValueConv => 'join(" ", unpack("H2"x20, $val))',
4492
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4493
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4494
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4273
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints39) },
4274
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints39) },
4495
4275
  },
4496
- { #PH
4276
+ {
4497
4277
  Name => 'AFPointsUsed',
4498
- # version 301 uses a separate field at offset 0x0a for this tag (ref 28)
4499
- Condition => '$$self{AFInfo2Version} !~ /^03/',
4500
- Format => 'undef[7]',
4501
- ValueConv => 'join(" ", unpack("H2"x7, $val))',
4502
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4503
- PrintConv => '"Unknown ($val)"',
4504
- PrintConvInv => '$val=~s/Unknown \\((.*)\\)/$1/; $val',
4505
- },
4506
- { #PH
4507
- Name => 'PrimaryAFPoint',
4508
- Condition => '$$self{PhaseDetectAF} == 1 and $$self{AFInfo2Version} =~ /^03/',
4509
- Notes => 'newer models with 51-point AF',
4510
- PrintConvColumns => 5,
4511
- PrintConv => {
4512
- 0 => '(none)',
4513
- %afPoints51,
4514
- 1 => 'C6 (Center)', # (add " (Center)" to central point)
4515
- },
4516
- },
4517
- { #PH (Z7)
4518
- Name => 'PrimaryAFPoint',
4519
- Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
4520
- PrintConvColumns => 5,
4521
- PrintConv => {
4522
- 0 => '(none)',
4523
- %afPoints81,
4524
- 1 => 'E5 (Center)', # (add " (Center)" to central point)
4525
- },
4278
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4279
+ PrintConv => { 0 => '(none)', },
4526
4280
  },
4527
- # this was wrong, but keep the code as a comment in case it may be useful later
4528
- #{ #PH (Z7) (NC)
4529
- # Name => 'PrimaryAFPoint',
4530
- # Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
4531
- # Notes => q{
4532
- # Nikon models with 493-point AF -- 17 rows (A-Q) and 29 columns (1-29), I15
4533
- # at the center
4534
- # },
4535
- # PrintConv => {
4536
- # 0 => '(none)',
4537
- # 246 => 'I15 (Center)',
4538
- # OTHER => sub {
4539
- # my ($val, $inv) = @_;
4540
- # return GetAFPointGrid($val, 29, $inv);
4541
- # },
4542
- # },
4543
- #},
4544
4281
  ],
4545
- 0x0a => [{ #PH (D780)
4546
- Name => 'AFPointsUsed',
4547
- Condition => '$$self{PhaseDetectAF} == 1 and $$self{AFInfo2Version} =~ /^03/',
4548
- Notes => 'newer models with 51-point AF',
4549
- Format => 'undef[7]',
4550
- ValueConv => 'join(" ", unpack("H2"x7, $val))',
4551
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4552
- PrintConv => sub { PrintAFPoints(shift, \%afPoints51); },
4553
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51); },
4554
- },{ #38 (Z6/Z7/Z50)
4555
- Name => 'AFPointsUsed',
4556
- Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
4557
- Notes => q{
4558
- models with 81-selectable point AF -- 9 rows (A-I) and 9 columns (1-9) for
4559
- phase detect AF points. Center point is E5
4560
- },
4561
- Format => 'undef[11]',
4562
- ValueConv => 'join(" ", unpack("H2"x11, $val))',
4563
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4564
- PrintConv => sub { PrintAFPoints(shift, \%afPoints81); },
4565
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81); },
4566
- },{ #28 (D6) in any of the 3 Group modes on the D6, the points specify the outer boundaries of the focus point area; otherwise the tag value is consistent with other Nikon bodies
4567
- Name => 'AFPointsUsed',
4568
- Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
4569
- Notes => q{
4570
- models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15). Center
4571
- point is D8
4572
- },
4573
- Format => 'undef[14]',
4574
- ValueConv => 'join(" ", unpack("H2"x14, $val))',
4575
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4576
- PrintConv => sub { PrintAFPoints(shift, \%afPoints105); },
4577
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105); },
4578
- }],
4579
4282
  0x10 => { #PH (D90 and D5000)
4580
4283
  Name => 'AFImageWidth',
4581
- Condition => '$$self{AFInfo2Version} eq "0100"',
4284
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4582
4285
  Format => 'int16u',
4583
4286
  RawConv => '$val ? $val : undef',
4584
4287
  Notes => 'this and the following tags are valid only for contrast-detect AF',
4585
4288
  },
4586
4289
  0x12 => { #PH
4587
4290
  Name => 'AFImageHeight',
4588
- Condition => '$$self{AFInfo2Version} eq "0100"',
4291
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4589
4292
  Format => 'int16u',
4590
4293
  RawConv => '$val ? $val : undef',
4591
4294
  },
4592
4295
  0x14 => { #PH
4593
4296
  Name => 'AFAreaXPosition',
4594
- Condition => '$$self{AFInfo2Version} eq "0100"',
4297
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4595
4298
  Notes => 'center of AF area in AFImage coordinates',
4596
4299
  Format => 'int16u',
4597
4300
  RawConv => '$val ? $val : undef',
4598
4301
  },
4599
4302
  0x16 => { #PH
4600
4303
  Name => 'AFAreaYPosition',
4601
- Condition => '$$self{AFInfo2Version} eq "0100"',
4304
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4602
4305
  Format => 'int16u',
4603
4306
  RawConv => '$val ? $val : undef',
4604
4307
  },
4605
- # AFAreaWidth/Height for the D90 and D5000:
4606
- # 352x288 (AF normal area),
4607
- # 704x576 (AF face priority, wide area, subject tracking)
4608
4308
  0x18 => { #PH
4609
4309
  Name => 'AFAreaWidth',
4610
- Condition => '$$self{AFInfo2Version} eq "0100"',
4310
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4611
4311
  Format => 'int16u',
4612
4312
  Notes => 'size of AF area in AFImage coordinates',
4613
4313
  RawConv => '$val ? $val : undef',
4614
4314
  },
4615
4315
  0x1a => { #PH
4616
4316
  Name => 'AFAreaHeight',
4617
- Condition => '$$self{AFInfo2Version} eq "0100"',
4317
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4618
4318
  Format => 'int16u',
4619
4319
  RawConv => '$val ? $val : undef',
4620
4320
  },
4621
4321
  0x1c => [
4622
4322
  { #PH
4623
4323
  Name => 'ContrastDetectAFInFocus',
4624
- Condition => '$$self{AFInfo2Version} eq "0100"',
4324
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4625
4325
  PrintConv => { 0 => 'No', 1 => 'Yes' },
4626
4326
  },{ #PH (D500, see forum11190)
4627
4327
  Name => 'AFPointsSelected',
4628
- Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
4328
+ Condition => '$$self{FocusPointSchema} == 7',
4629
4329
  Format => 'undef[20]',
4630
4330
  ValueConv => 'join(" ", unpack("H2"x20, $val))',
4631
4331
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4632
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4633
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4634
- },
4332
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4333
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4334
+ },
4335
+ # (#28) this is incorrect - [observed values 0, 1, 16, 64, 128, 1024 (mostly 0 & 1), but not tied to the display of focus point in NXStudio]
4336
+ #{ #PH (D3400) (NC "selected")
4337
+ # Name => 'AFPointsSelected',
4338
+ # Condition => '$$self{FocusPointSchema} == 2',
4339
+ # Format => 'int16u',
4340
+ # PrintConv => \%afPoints11,
4341
+ #},
4635
4342
  ],
4636
- # 0x1d - always zero (with or without live view)
4637
- 0x2a => { #PH (Z7)
4638
- Name => 'AFImageWidth',
4639
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4640
- Format => 'int16u',
4641
- RawConv => '$val ? $val : undef',
4343
+ );
4344
+
4345
+ %Image::ExifTool::Nikon::AFInfo2V0101 = (
4346
+ %binaryDataAttrs,
4347
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4348
+ DATAMEMBER => [ 0, 4, 5, 6 ],
4349
+ NOTES => q{
4350
+ AF information for Nikon cameras D5, D500, D850, D3400, D3500 and D7500
4642
4351
  },
4643
- 0x2c => { #PH (Z7)
4644
- Name => 'AFImageHeight',
4645
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4646
- Format => 'int16u',
4647
- RawConv => '$val ? $val : undef',
4352
+ 0 => {
4353
+ Name => 'AFInfo2Version',
4354
+ Format => 'undef[4]',
4355
+ Writable => 0,
4356
+ RawConv => '$$self{AFInfo2Version} = $val',
4648
4357
  },
4649
- 0x2e => { #PH (Z7)
4650
- Name => 'AFAreaXPosition',
4651
- Condition => q{
4652
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4653
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4654
- },
4655
- Format => 'int16u', # (decodes same byte as 0x2f)
4358
+ 4 => {
4359
+ Name => 'AFDetectionMethod',
4360
+ RawConv => '$$self{AFDetectionMethod} = $val',
4361
+ PrintConv => \%aFDetectionMethod,
4656
4362
  },
4657
- 0x2f => { #28 (Z7) Still photography range 1-17 for the 493 point Z7 (arranged in a 29x17 grid. Center at x=16, y=10).
4658
- Name => 'FocusPositionHorizontal',
4659
- Condition => q{
4660
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4661
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4363
+ 5 => [
4364
+ {
4365
+ Name => 'AFAreaMode',
4366
+ Condition => '$$self{AFDetectionMethod} == 0',
4367
+ RawConv => '$$self{AFAreaMode} = $val',
4368
+ PrintConv => \%aFAreaModePD, #phase detect
4662
4369
  },
4663
- PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ); },
4664
- },
4665
- 0x30 => [
4666
- { #PH (Z7)
4667
- Name => 'AFAreaYPosition',
4668
- Condition => q{
4669
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4670
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4671
- },
4672
- Format => 'int16u', # (decodes same byte as 0x31)
4673
- },{ #PH (D500, see forum11190)
4674
- Name => 'AFPointsInFocus',
4675
- Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
4676
- Notes => 'AF points in focus at the time time image was captured',
4677
- Format => 'undef[20]',
4678
- ValueConv => 'join(" ", unpack("H2"x20, $val))',
4679
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4680
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4681
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4370
+ {
4371
+ Name => 'AFAreaMode',
4372
+ RawConv => '$$self{AFAreaMode} = $val',
4373
+ PrintConv => \%aFAreaModeCD, #contrast detect
4682
4374
  },
4683
4375
  ],
4684
- 0x31 => { #28 (Z7)
4685
- Name => 'FocusPositionVertical',
4686
- Condition => q{
4687
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4688
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4376
+ 6 => {
4377
+ Name => 'FocusPointSchema',
4378
+ RawConv => '$$self{FocusPointSchema} = $val',
4379
+ Hidden => 1,
4380
+ PrintConv => {
4381
+ 0 => 'Off', # LiveView or manual focus or no focus
4382
+ 1 => '51-point', # (D7500)
4383
+ 2 => '11-point', # (D3400/D3500)
4384
+ 7 => '153-point', # (D5/D500/D850) 153 focus points (17 columns x 9 rows) - of these 55 are user selectable (11 columns x 5 rows)
4689
4385
  },
4690
- PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ); },
4691
- },
4692
- 0x32 => { #PH (Z7)
4693
- Name => 'AFAreaWidth',
4694
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4695
- Format => 'int16u',
4696
- RawConv => '$val ? $val : undef',
4697
- },
4698
- 0x34 => { #PH (Z7)
4699
- Name => 'AFAreaHeight',
4700
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4701
- Format => 'int16u',
4702
- RawConv => '$val ? $val : undef',
4703
4386
  },
4704
- 0x38 => { #28
4705
- Name => 'PrimaryAFPoint',
4706
- Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
4707
- Notes => q{
4708
- Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
4387
+ 8 => [
4388
+ { #JD/PH
4389
+ Name => 'AFPointsUsed',
4390
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4391
+ Notes => q{
4392
+ models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4393
+ point is C6
4394
+ },
4395
+ Format => 'undef[7]',
4396
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4397
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4398
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4399
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4400
+ },{ #10
4401
+ Name => 'AFPointsUsed',
4402
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4403
+ Notes => 'models with 11-point AF',
4404
+ # read as int16u in little-endian byte order
4405
+ Format => 'undef[2]',
4406
+ ValueConv => 'unpack("v",$val)',
4407
+ ValueConvInv => 'pack("v",$val)',
4408
+ PrintConvColumns => 2,
4409
+ PrintConv => {
4410
+ 0 => '(none)',
4411
+ 0x7ff => 'All 11 Points',
4412
+ BITMASK => {
4413
+ 0 => 'Center',
4414
+ 1 => 'Top',
4415
+ 2 => 'Bottom',
4416
+ 3 => 'Mid-left',
4417
+ 4 => 'Upper-left',
4418
+ 5 => 'Lower-left',
4419
+ 6 => 'Far Left',
4420
+ 7 => 'Mid-right',
4421
+ 8 => 'Upper-right',
4422
+ 9 => 'Lower-right',
4423
+ 10 => 'Far Right',
4424
+ },
4425
+ },
4709
4426
  },
4710
- PrintConvColumns => 5,
4711
- PrintConv => {
4712
- 0 => '(none)',
4713
- %afPoints105,
4714
- 1 => 'D8 (Center)',
4427
+ { #PH (D5,D500, D850)
4428
+ Name => 'AFPointsUsed', #when focus is not obtained, will report '(none)' otherwise will report a single point from among AFPointsSelected
4429
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4430
+ Notes => q{
4431
+ models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17). Center
4432
+ point is E9
4433
+ },
4434
+ Format => 'undef[20]',
4435
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4436
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4437
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4438
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4439
+ },{
4440
+ Name => 'AFPointsUsed',
4441
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4442
+ PrintConv => { 0 => '(none)', },
4715
4443
  },
4716
- },
4717
- 0x44 => [
4718
- {
4444
+ ],
4445
+ 0x1c => [
4446
+ {#PH
4447
+ Name => 'ContrastDetectAFInFocus',
4448
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4449
+ PrintConv => { 0 => 'No', 1 => 'Yes' },
4450
+ },
4451
+ { #JD/PH
4452
+ Name => 'AFPointsUsed',
4453
+ Condition => '$$self{FocusPointSchema} == 1 and
4454
+ ($$self{AFAreaMode} == 8 or $$self{AFAreaMode} == 9 or $$self{AFAreaMode} == 13 )', #phase detect 51 focus-point models
4455
+ Format => 'undef[7]',
4456
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4457
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4458
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4459
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4460
+ },{ #PH (D500, see forum11190)
4461
+ Name => 'AFPointsSelected', # where the viewfinder AF point(s) were positioned when initiating focus in AFAreaMode 3D-tracking Group-area
4462
+ # will contain a value regardless of whether or not focus was obtained
4463
+ # reflects the focus points displayed by NXStudio when AFAreaMode is Group-area
4464
+ Condition => '$$self{FocusPointSchema} == 7 and
4465
+ ($$self{AFAreaMode} == 8 or $$self{AFAreaMode} == 9 or $$self{AFAreaMode} == 13 )', #phase detect 153 focus-point models in Auto-area/3D-tracking/Group-area
4466
+ Format => 'undef[20]',
4467
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4468
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4469
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4470
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4471
+ },
4472
+ ],
4473
+ 0x30 => [
4474
+ { #PH (D7500) (NC "in focus")
4475
+ Name => 'AFPointsInFocus', # refelcts the focus point(s) displayed by NXStudio when AFAreaMode is Auto-area or 3D-tracking.
4476
+ # erroneously named as there is no assurance the reported points are in focus
4477
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4478
+ Format => 'undef[7]',
4479
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4480
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4481
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4482
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4483
+ },{ #PH (D500, see forum11190)
4484
+ Name => 'AFPointsInFocus',
4485
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4486
+ Notes => 'AF points in focus at the time time image was captured',
4487
+ Format => 'undef[20]',
4488
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4489
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4490
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4491
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4492
+ },
4493
+ ],
4494
+ 0x44 => [ #AFInfoVersion 0100 use 0x08 for this tag. v0101 could do that as well. The difference is that when Group-area fails to focus..
4495
+ #...this code (incorrectly) reports a value for PrimaryAFPoint. Moving this code to the 0x08 slot would correctly report '(none)'...
4496
+ #...leaving it here for now for compatibility purposes
4497
+ { #PH/JD
4719
4498
  Name => 'PrimaryAFPoint',
4720
- Condition => '$$self{PhaseDetectAF} == 7 and $$self{AFInfo2Version} eq "0101"',
4499
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4500
+ Notes => q{
4501
+ models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D7500
4502
+ },
4721
4503
  PrintConvColumns => 5,
4722
4504
  PrintConv => {
4723
4505
  0 => '(none)',
4724
- %afPoints153,
4725
- 1 => 'E9 (Center)',
4506
+ %afPoints51,
4507
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
4726
4508
  },
4727
- },
4728
- { #PH
4509
+ },{ #10
4729
4510
  Name => 'PrimaryAFPoint',
4730
- Notes => 'D3500',
4731
- Condition => '$$self{PhaseDetectAF} == 2 and $$self{AFInfo2Version} eq "0101"',
4511
+ Notes => 'models with 11-point AF: D3400, D3500',
4512
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4732
4513
  PrintConvColumns => 2,
4733
4514
  PrintConv => {
4734
4515
  0 => '(none)',
@@ -4744,68 +4525,397 @@ my %base64coord = (
4744
4525
  10 => 'Lower-right',
4745
4526
  11 => 'Far Right',
4746
4527
  },
4747
- },
4748
- {
4528
+ },{ #PH
4749
4529
  Name => 'PrimaryAFPoint',
4750
- Condition => '$$self{AFInfo2Version} eq "0101"',
4751
- Notes => 'future models?...',
4752
- Priority => 0,
4530
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4531
+ Notes => q{
4532
+ Nikon models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17): D5,
4533
+ D500 and D850
4534
+ },
4535
+ PrintConvColumns => 5,
4753
4536
  PrintConv => {
4754
4537
  0 => '(none)',
4755
- 1 => 'Center',
4756
- },
4538
+ %afPoints153,
4539
+ 1 => 'E9 (Center)',
4540
+ },
4541
+ },{
4542
+ Name => 'PrimaryAFPoint',
4543
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4544
+ PrintConv => { 0 => '(none)', },
4757
4545
  },
4758
4546
  ],
4759
- 0x46 => {
4547
+ 0x46 => { #PH
4760
4548
  Name => 'AFImageWidth',
4761
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4549
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4762
4550
  Format => 'int16u',
4763
4551
  RawConv => '$val ? $val : undef',
4764
4552
  Notes => 'this and the following tags are valid only for contrast-detect AF',
4765
4553
  },
4766
- 0x48 => {
4554
+ 0x48 => { #PH
4767
4555
  Name => 'AFImageHeight',
4768
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4556
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4769
4557
  Format => 'int16u',
4770
4558
  RawConv => '$val ? $val : undef',
4771
4559
  },
4772
- 0x4a => {
4560
+ 0x4a => { #PH
4773
4561
  Name => 'AFAreaXPosition',
4774
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4562
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4775
4563
  Notes => 'center of AF area in AFImage coordinates',
4776
4564
  Format => 'int16u',
4777
4565
  RawConv => '$val ? $val : undef',
4778
4566
  },
4779
- 0x4c => {
4567
+ 0x4c => { #PH
4780
4568
  Name => 'AFAreaYPosition',
4781
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4569
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4782
4570
  Format => 'int16u',
4783
4571
  RawConv => '$val ? $val : undef',
4784
4572
  },
4785
- 0x4e => {
4573
+ 0x4e => { #PH
4786
4574
  Name => 'AFAreaWidth',
4787
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4575
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4788
4576
  Format => 'int16u',
4789
4577
  Notes => 'size of AF area in AFImage coordinates',
4790
4578
  RawConv => '$val ? $val : undef',
4791
4579
  },
4792
- 0x50 => {
4580
+ 0x50 => { #PH
4793
4581
  Name => 'AFAreaHeight',
4794
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4582
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4795
4583
  Format => 'int16u',
4796
4584
  RawConv => '$val ? $val : undef',
4797
4585
  },
4798
4586
  0x52 => {
4799
4587
  Name => 'ContrastDetectAFInFocus',
4800
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4588
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4801
4589
  PrintConv => { 0 => 'No', 1 => 'Yes' },
4802
4590
  },
4803
4591
  );
4804
4592
 
4593
+ %Image::ExifTool::Nikon::AFInfo2V0200 = (
4594
+ %binaryDataAttrs,
4595
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4596
+ DATAMEMBER => [ 0, 6 ],
4597
+ NOTES => q{
4598
+ AF information for Nikon 1 series cameras: Nikon 1 V1, V2, V3, J1, J2, J3,
4599
+ S1, S2 AW1.
4600
+ },
4601
+ 0 => {
4602
+ Name => 'AFInfo2Version',
4603
+ Format => 'undef[4]',
4604
+ Writable => 0,
4605
+ RawConv => '$$self{AFInfo2Version} = $val',
4606
+ },
4607
+ 5 => {
4608
+ Name => 'AFAreaMode',
4609
+ PrintConv => {
4610
+ 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
4611
+ 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
4612
+ 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
4613
+ 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
4614
+ # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
4615
+ # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
4616
+ },
4617
+ },
4618
+ 6 => {
4619
+ Name => 'PhaseDetectAF', #JD(AutoFocus), PH(PhaseDetectAF)
4620
+ Notes => 'PrimaryAFPoint and AFPointsUsed below are only valid when this is On',
4621
+ RawConv => '$$self{PhaseDetectAF} = $val',
4622
+ PrintConv => {
4623
+ # [observed AFAreaMode values in square brackets for each PhaseDetectAF value]
4624
+ 4 => 'On (73-point)', #PH (1J1[128/129],1J2[128/129/135],1J3/1S1/1V2[128/129/131],1V1[129],AW1[129/131])
4625
+ 5 => 'On (5)', #PH (1S2[128/129], 1J4/1V3[129])
4626
+ 6 => 'On (105-point)', #PH (1J4/1V3[128/130])
4627
+ },
4628
+ },
4629
+ 7 => [
4630
+ { #PH
4631
+ Name => 'PrimaryAFPoint',
4632
+ Condition => '$$self{PhaseDetectAF} == 4',
4633
+ Notes => 'Nikon 1 models with older 135-point AF and 73-point phase-detect AF',
4634
+ PrintConvColumns => 5,
4635
+ PrintConv => {
4636
+ 0 => '(none)',
4637
+ %afPoints135,
4638
+ 1 => 'E8 (Center)', # (add " (Center)" to central point)
4639
+ },
4640
+ },
4641
+ { #PH (NC)
4642
+ Name => 'PrimaryAFPoint',
4643
+ Condition => '$$self{PhaseDetectAF} == 5',
4644
+ Notes => q{
4645
+ Nikon 1 models with newer 135-point AF and 73-point phase-detect AF -- 9
4646
+ rows (B-J) and 15 columns (1-15), inside a grid of 11 rows by 15 columns.
4647
+ The points are numbered sequentially, with F8 at the center
4648
+ },
4649
+ PrintConv => {
4650
+ 0 => '(none)',
4651
+ 82 => 'F8 (Center)',
4652
+ OTHER => sub {
4653
+ my ($val, $inv) = @_;
4654
+ return GetAFPointGrid($val, 15, $inv);
4655
+ },
4656
+ },
4657
+ },
4658
+ { #PH
4659
+ Name => 'PrimaryAFPoint',
4660
+ Condition => '$$self{PhaseDetectAF} == 6',
4661
+ Notes => q{
4662
+ Nikon 1 models with 171-point AF and 105-point phase-detect AF -- 9 rows
4663
+ (B-J) and 19 columns (2-20), inside a grid of 11 rows by 21 columns. The
4664
+ points are numbered sequentially, with F11 at the center
4665
+ },
4666
+ PrintConv => {
4667
+ 0 => '(none)',
4668
+ #22 => 'B2 (Top-left)',
4669
+ #40 => 'B20 (Top-right)',
4670
+ 115 => 'F11 (Center)',
4671
+ #190 => 'J2 (Bottom-left)',
4672
+ #208 => 'J20 (Bottom-right)',
4673
+ OTHER => sub {
4674
+ my ($val, $inv) = @_;
4675
+ return GetAFPointGrid($val, 21, $inv);
4676
+ },
4677
+ },
4678
+ },
4679
+ ],
4680
+ 8 => [
4681
+ { #PH (1AW1,1J1,1J2,1J3,1S1,1V1,1V2)
4682
+ Name => 'AFPointsUsed',
4683
+ Condition => '$$self{PhaseDetectAF} == 4',
4684
+ Notes => q{
4685
+ older models with 135-point AF -- 9 rows (A-I) and 15 columns (1-15).
4686
+ Center point is E8. The odd-numbered columns, columns 2 and 14, and the
4687
+ remaining corner points are not used for 41-point AF mode
4688
+ },
4689
+ Format => 'undef[17]',
4690
+ ValueConv => 'join(" ", unpack("H2"x17, $val))',
4691
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4692
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints135) },
4693
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints135) },
4694
+ },
4695
+ { #PH (1S2)
4696
+ Name => 'AFPointsUsed',
4697
+ Condition => '$$self{PhaseDetectAF} == 5',
4698
+ Notes => q{
4699
+ newer models with 135-point AF -- 9 rows (B-J) and 15 columns (1-15). Center
4700
+ point is F8
4701
+ },
4702
+ Format => 'undef[21]',
4703
+ ValueConv => 'join(" ", unpack("H2"x21, $val))',
4704
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4705
+ PrintConv => sub { PrintAFPointsGrid(shift, 15) },
4706
+ PrintConvInv => sub { PrintAFPointsGridInv(shift, 15, 21) },
4707
+ },
4708
+ { #PH (1J4,1V3)
4709
+ Name => 'AFPointsUsed',
4710
+ Condition => '$$self{PhaseDetectAF} == 6',
4711
+ Notes => q{
4712
+ models with 171-point AF -- 9 rows (B-J) and 19 columns (2-20). Center
4713
+ point is F10
4714
+ },
4715
+ Format => 'undef[29]',
4716
+ ValueConv => 'join(" ", unpack("H2"x29, $val))',
4717
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4718
+ PrintConv => sub { PrintAFPointsGrid(shift, 21) },
4719
+ PrintConvInv => sub { PrintAFPointsGridInv(shift, 21, 29) },
4720
+ },
4721
+ ],
4722
+ );
4723
+
4724
+ %Image::ExifTool::Nikon::AFInfo2V0300 = (
4725
+ %binaryDataAttrs,
4726
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4727
+ DATAMEMBER => [ 0, 4, 6, 7, 46, 48 ],
4728
+ NOTES => q{
4729
+ AF information for Nikon cameras with the Expeed 6 processor: D6, D780, Z5,
4730
+ Z6, Z6ii, Z7, Z7ii, Z50 and Zfc.
4731
+ },
4732
+ 0 => {
4733
+ Name => 'AFInfo2Version',
4734
+ Format => 'undef[4]',
4735
+ Writable => 0,
4736
+ RawConv => '$$self{AFInfo2Version} = $val',
4737
+ },
4738
+ 4 => {
4739
+ Name => 'AFDetectionMethod',
4740
+ RawConv => '$$self{AFDetectionMethod} = $val',
4741
+ PrintConv => \%aFDetectionMethod ,
4742
+ },
4743
+ 5 => [
4744
+ {
4745
+ Name => 'AFAreaMode',
4746
+ Condition => '$$self{AFDetectionMethod} == 0',
4747
+ PrintConv => \%aFAreaModePD, #phase detect
4748
+ },
4749
+ {
4750
+ Name => 'AFAreaMode',
4751
+ PrintConv => \%aFAreaModeCD, #contrast detect
4752
+ },
4753
+ ],
4754
+ 6 => {
4755
+ Name => 'FocusPointSchema',
4756
+ RawConv => '$$self{FocusPointSchema} = $val',
4757
+ Hidden => 1,
4758
+ PrintConv => {
4759
+ 0 => 'Off', # LiveView or manual focus or no focus
4760
+ 1 => '51-point', # (D780) 51 points through the viewfinder, 81/273 points in LiveView
4761
+ 8 => '81-point', # (Z6/Z6ii/Z7/Z7ii/Z30/Z50/Z50ii/Zfc/D780) 81-points refers to the number of auto-area focus points arranged as a 9x9 grid. Number of single-point focus points vary by model.
4762
+ 9 => '105-point', # (D6) arranged as a 15 column x 9 row grid
4763
+ },
4764
+ },
4765
+ 7 => {
4766
+ Name => 'AFCoordinatesAvailable', #0 => 'AFPointsUsed is populated' 1 => 'AFAreaXPosition & AFAreaYPosition are populated'
4767
+ RawConv => '$$self{AFCoordinatesAvailable} = $val',
4768
+ PrintConv => \%noYes ,
4769
+ },
4770
+ 0x0a => [
4771
+ { #JD/PH
4772
+ Name => 'AFPointsUsed',
4773
+ Condition => '$$self{FocusPointSchema} == 1 and $$self{AFCoordinatesAvailable} == 0', #D780 when AFAreaXYPositions are not populated
4774
+ Notes => q{
4775
+ models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4776
+ point is C6
4777
+ },
4778
+ Format => 'undef[7]',
4779
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4780
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4781
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4782
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4783
+ },{
4784
+ Name => 'AFPointsUsed',
4785
+ Condition => '$$self{FocusPointSchema} == 8 and $$self{AFCoordinatesAvailable} == 0', # Z6/Z6ii/Z7/Z7ii/Z50/Z50ii/Zfc/D780 when AFAreaXYPositions are not populated
4786
+ Notes => q{
4787
+ models with hybrid detect AF have 81 auto-area points -- 9 rows (A-I) and 9 columns (1-9). Center point is E5
4788
+ },
4789
+ Format => 'undef[11]',
4790
+ ValueConv => 'join(" ", unpack("H2"x11, $val))',
4791
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4792
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints81) },
4793
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81) },
4794
+ },{
4795
+ Name => 'AFPointsUsed',
4796
+ Condition => '$$self{FocusPointSchema} == 9 and $$self{AFCoordinatesAvailable} == 0', # D6 focus-point model when AFAreaXYPositions are not populated
4797
+ Format => 'undef[14]',
4798
+ ValueConv => 'join(" ", unpack("H2"x14, $val))',
4799
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4800
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints105) },
4801
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105) },
4802
+ },
4803
+ ],
4804
+ 0x2a => { #PH (Z7)
4805
+ Name => 'AFImageWidth',
4806
+ Format => 'int16u',
4807
+ RawConv => '$val ? $val : undef',
4808
+ },
4809
+ 0x2c => { #PH (Z7)
4810
+ Name => 'AFImageHeight',
4811
+ Format => 'int16u',
4812
+ RawConv => '$val ? $val : undef',
4813
+ },
4814
+ 0x2e => { #PH (Z7)
4815
+ Name => 'AFAreaXPosition',
4816
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4817
+ RawConv => '$$self{AFAreaXPosition} = $val',
4818
+ Format => 'int16u', # (decodes same byte as 0x2f)
4819
+ },
4820
+ 0x2f => [
4821
+ {
4822
+ Name => 'FocusPositionHorizontal', # 209/231 focus point cameras
4823
+ Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaXPosition}', #models Z30, Z50, Zfc
4824
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is an estimate (chosen to cause center point to report 'C')
4825
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 19 ) },
4826
+ },{
4827
+ Name => 'FocusPositionHorizontal', #273/299 focus point cameras
4828
+ Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaXPosition}', #models Z5, Z6, Z6ii, D780
4829
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is an estimate (chosen to cause center point to report 'C')
4830
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 21 ) },
4831
+ },{
4832
+ Name => 'FocusPositionHorizontal', #405/493 focus point cameras
4833
+ Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaXPosition}', #models Z7/Z7ii
4834
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the measured horizontal pixel separation between adjacent points
4835
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ) },
4836
+ },
4837
+ #the only other AFInfoVersion 03xx camera is the D6. It allows the LiveView focus point to positioned anywhere in the frame, rendering this tag somewhat meaningless for that camera
4838
+ ],
4839
+ 0x30 => { #PH (Z7)
4840
+ Name => 'AFAreaYPosition',
4841
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4842
+ RawConv => '$$self{AFAreaYPosition} = $val',
4843
+ Format => 'int16u', # (decodes same byte as 0x31)
4844
+ },
4845
+ 0x31 => [
4846
+ {
4847
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
4848
+ Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaYPosition}', #models Z30, Z50, Zfc
4849
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4850
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
4851
+ },{
4852
+ Name => 'FocusPositionVertical', #273/299 focus point cameras
4853
+ Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaYPosition}', #models Z5, Z6, Z6ii, D780
4854
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4855
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
4856
+ },{
4857
+ Name => 'FocusPositionVertical', #405/493 focus point cameras
4858
+ Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaYPosition}', #models Z7/Z7ii
4859
+ ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
4860
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
4861
+ },
4862
+ ],
4863
+ 0x32 => { #PH
4864
+ Name => 'AFAreaWidth',
4865
+ Format => 'int16u',
4866
+ RawConv => '$val ? $val : undef',
4867
+ },
4868
+ 0x34 => { #PH
4869
+ Name => 'AFAreaHeight',
4870
+ Format => 'int16u',
4871
+ RawConv => '$val ? $val : undef',
4872
+ },
4873
+ 0x38 =>[
4874
+ { #PH/JD
4875
+ Name => 'PrimaryAFPoint',
4876
+ Condition => '$$self{FocusPointSchema} == 1 and $$self{AFCoordinatesAvailable} == 0', #51 focus-point models when AFAreaXYPositions are not populated
4877
+ Notes => q{
4878
+ models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
4879
+ D4, D4S, D300, D300S, D700, D750, D800, D800E, D810, D7100 and D7200
4880
+ },
4881
+ PrintConvColumns => 5,
4882
+ PrintConv => {
4883
+ 0 => '(none)',
4884
+ %afPoints51,
4885
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
4886
+ },
4887
+ },{
4888
+ Name => 'PrimaryAFPoint',
4889
+ Condition => '$$self{FocusPointSchema} == 8 and $$self{AFCoordinatesAvailable} == 0', # Z6/Z6ii/Z7/Z7ii/Z50/Z50ii/Zfc/D780 when AFAreaXYPositions are not populated
4890
+ Notes => q{
4891
+ models with hybrid detect AF have 81 auto-area points -- 9 rows (A-I) and 9 columns (1-9). Center point is E5
4892
+ },
4893
+ PrintConvColumns => 5,
4894
+ PrintConv => {
4895
+ 0 => '(none)',
4896
+ %afPoints81,
4897
+ 1 => 'E5 (Center)', # (add " (Center)" to central point)
4898
+ },
4899
+ },{ #28
4900
+ Name => 'PrimaryAFPoint',
4901
+ Condition => '$$self{FocusPointSchema} == 9 and $$self{AFCoordinatesAvailable} == 0', #153 focus-point models when AFAreaXYPositions are not populated
4902
+ Notes => q{
4903
+ Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
4904
+ },
4905
+ PrintConvColumns => 5,
4906
+ PrintConv => {
4907
+ 0 => '(none)',
4908
+ %afPoints105,
4909
+ 1 => 'D8 (Center)',
4910
+ },
4911
+ },
4912
+ ]
4913
+ );
4914
+
4805
4915
  %Image::ExifTool::Nikon::AFInfo2V0400 = (
4806
4916
  %binaryDataAttrs,
4807
4917
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4808
- DATAMEMBER => [ 0, 5 ],
4918
+ DATAMEMBER => [ 0, 4, 5, 7, 66, 68 ],
4809
4919
  NOTES => q{
4810
4920
  AF information for Nikon cameras with the Expeed 7 processor: The Zf, Z6_3,
4811
4921
  Z8, Z9 and Z50_3.
@@ -4816,7 +4926,12 @@ my %base64coord = (
4816
4926
  Writable => 0,
4817
4927
  RawConv => '$$self{AFInfo2Version} = $val',
4818
4928
  },
4819
- 5 => { #28
4929
+ 4 => {
4930
+ Name => 'AFDetectionMethod',
4931
+ RawConv => '$$self{AFDetectionMethod} = $val',
4932
+ PrintConv => \%aFDetectionMethod ,
4933
+ },
4934
+ 5 => {
4820
4935
  Name => 'AFAreaMode', #reflects the mode active when the shutter is tripped, not the position of the Focus Mode button (which is recorded in MenuSettingsZ9 tag also named AfAreaMode)
4821
4936
  RawConv => '$$self{AFAreaModeUsed} = $val',
4822
4937
  PrintConv => {
@@ -4832,6 +4947,11 @@ my %base64coord = (
4832
4947
  208 => 'Wide (C1/C2)',
4833
4948
  },
4834
4949
  },
4950
+ 7 => {
4951
+ Name => 'AFCoordinatesAvailable', #0 => 'AFPointsUsed is populated' 1 => 'AFAreaXPosition & AFAreaYPosition are populated'
4952
+ RawConv => '$$self{AFCoordinatesAvailable} = $val',
4953
+ PrintConv => \%noYes ,
4954
+ },
4835
4955
  10 => [{
4836
4956
  # valid only for AFAreaModes where the camera selects the focus point (i.e., AutoArea & 3D-Tracking)
4837
4957
  # and the camera has yet to determine a focus target (in these cases tags AFAreaXPosition and AFAreaYPosition will be zeroes)
@@ -4841,59 +4961,83 @@ my %base64coord = (
4841
4961
  Notes => 'either AFPointsUsed or AFAreaX/YPosition will be set, but not both',
4842
4962
  ValueConv => 'join(" ", unpack("H2"x51, $val))',
4843
4963
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4844
- PrintConv => sub { PrintAFPoints(shift, \%afPoints493); },
4845
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints493); },
4964
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints405) }, #full-frame sensor, 45MP, auto-area focus point configuration
4965
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints405) },
4846
4966
  },{
4847
4967
  Name => 'AFPointsUsed', # Z6iii and Zf (AFInfo2Version 0401)
4848
4968
  Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and ($$self{AFAreaModeUsed} == 197 or $$self{AFAreaModeUsed} == 207)',
4849
- Format => 'undef[35]',
4850
- ValueConv => 'join(" ", unpack("H2"x35, $val))',
4969
+ Format => 'undef[38]',
4970
+ ValueConv => 'join(" ", unpack("H2"x38, $val))',
4851
4971
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4852
- PrintConv => sub { PrintAFPoints(shift, \%afPoints273); },
4853
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints273); },
4972
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints299) },
4973
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints299) }, #full-frame sensor, 24MP, auto-area focus point configuration
4854
4974
  },{
4855
4975
  Name => 'AFPointsUsed', # Z50ii (AFInfo2Version 0402)
4856
4976
  Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and ($$self{AFAreaModeUsed} == 197 or $$self{AFAreaModeUsed} == 207)',
4857
- Format => 'undef[27]',
4858
- ValueConv => 'join(" ", unpack("H2"x27, $val))',
4977
+ Format => 'undef[29]',
4978
+ ValueConv => 'join(" ", unpack("H2"x29, $val))',
4859
4979
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4860
- PrintConv => sub { PrintAFPoints(shift, \%afPoints209); },
4861
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints209); },
4980
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints231) },
4981
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints231) }, #crop sensor, 21MP, auto-area focus point configuration
4862
4982
  }],
4863
4983
  0x3e => {
4864
4984
  Name => 'AFImageWidth',
4865
4985
  Format => 'int16u',
4986
+ RawConv => '$val ? $val : undef',
4866
4987
  },
4867
4988
  0x40 => {
4868
4989
  Name => 'AFImageHeight',
4869
4990
  Format => 'int16u',
4991
+ RawConv => '$val ? $val : undef',
4870
4992
  },
4871
4993
  0x42 => { #28
4872
4994
  Name => 'AFAreaXPosition', #top left image corner is the origin
4995
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4996
+ RawConv => '$$self{AFAreaXPosition} = $val',
4873
4997
  Format => 'int16u', # (decodes same byte as 0x43)
4874
- RawConv => '$val ? $val : undef',
4875
4998
  },
4876
- #0x43 => {
4877
- # Name => 'FocusPositionHorizontal',
4878
- # Notes => q{
4879
- # the focus points form a 29x17 grid, but the X,Y coordinate values run from 1,1
4880
- # to 30,19. The horizontal coordinate 11R (5) and the vertical coordinates 6U
4881
- # (4) and 2D (12) are not used for some reason
4882
- # },
4883
- # # 493 focus points for Z9 fall in a 30x19 grid
4884
- # # (the 11R (5) position is not used, for a total of 29 columns, ref AlbertShan email)
4885
- # PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29); },
4886
- #},
4999
+ 0x43 => [
5000
+ {
5001
+ Name => 'FocusPositionHorizontal', # 209/231 focus point cameras
5002
+ Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and $$self{AFAreaXPosition} != 0', #model Z50ii
5003
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the estimated separation between adjacent points (informed by the measured Z7ii separation)
5004
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 19 ) },
5005
+ },{
5006
+ Name => 'FocusPositionHorizontal', #273/299 focus point cameras
5007
+ Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and $$self{AFAreaXPosition} != 0', #models Z6iii and Zf
5008
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the estimated separation between adjacent points (informed by the measured Z7ii separation)
5009
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 21 ) },
5010
+ },{
5011
+ Name => 'FocusPositionHorizontal', #405/493 focus point cameras
5012
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i and $$self{AFAreaXPosition} != 0', #models Z8 and Z9
5013
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the measured horizontal pixel separation between adjacent points
5014
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ) },
5015
+ },
5016
+ ],
4887
5017
  0x44 => { #28
4888
5018
  Name => 'AFAreaYPosition',
5019
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
5020
+ RawConv => '$$self{AFAreaYPosition} = $val',
4889
5021
  Format => 'int16u', # (decodes same byte as 0x45)
4890
- RawConv => '$val ? $val : undef',
4891
5022
  },
4892
- #0x45 => {
4893
- # Name => 'FocusPositionVertical',
4894
- # # (the 6U (4) and 2D (12) are not used, for a total of 17 rows, ref AlbertShan email)
4895
- # PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17); },
4896
- #},
5023
+ 0x45 => [
5024
+ {
5025
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
5026
+ Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and $$self{AFAreaYPosition} != 0', #model Z50ii
5027
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor chosen to cause center point report 'C'
5028
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
5029
+ },{
5030
+ Name => 'FocusPositionVertical', #273/299 focus point cameras
5031
+ Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and $$self{AFAreaYPosition} != 0', #models Z6iii and Zf
5032
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor chosen to cause center point report 'C'
5033
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
5034
+ },{
5035
+ Name => 'FocusPositionVertical', #405/493 focus point cameras
5036
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i and $$self{AFAreaYPosition} != 0', #models Z8 and Z9
5037
+ ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
5038
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
5039
+ },
5040
+ ],
4897
5041
  0x46 => {
4898
5042
  Name => 'AFAreaWidth',
4899
5043
  Format => 'int16u',
@@ -5709,6 +5853,7 @@ my %nikonFocalConversions = (
5709
5853
  44 => 'Nikkor Z 70-180mm f/2.8', #28
5710
5854
  45 => 'Nikkor Z 600mm f/6.3 VR S', #28
5711
5855
  46 => 'Nikkor Z 135mm f/1.8 S Plena', #28
5856
+ 47 => 'Nikkor Z 35mm f/1.2 S', #28
5712
5857
  48 => 'Nikkor Z 28-400mm f/4-8 VR', #30
5713
5858
  51 => 'Nikkor Z 35mm f/1.4', #28
5714
5859
  52 => 'Nikkor Z 50mm f/1.4', #28
@@ -5778,7 +5923,7 @@ my %nikonFocalConversions = (
5778
5923
  Name => 'LensDriveEnd', # byte contains: 1 at CFD/MOD; 2 at Infinity; 0 otherwise
5779
5924
  Condition => '$$self{LensID} and $$self{LensID} != 0 and $$self{FocusMode} ne "Manual"', #valid for Z-mount lenses in focus modes other than M
5780
5925
  Format => 'int8u',
5781
- RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"}; } else{ $$self{LensDriveEnd} = "Inf"}',
5926
+ RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"} } else{ $$self{LensDriveEnd} = "Inf"}',
5782
5927
  Unknown => 1,
5783
5928
  },
5784
5929
  0x58 => { #28
@@ -9021,19 +9166,19 @@ my %nikonFocalConversions = (
9021
9166
  # 0x00 - int32u size of this directory
9022
9167
  0x10 => [
9023
9168
  {
9024
- Name => 'MenuSettingsOffsetZ8',
9169
+ Name => 'MenuSettingsOffsetZ8v1',
9025
9170
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "02.00"',
9026
9171
  Format => 'int32u',
9027
- Notes => 'Firmware versions 1.0.0 and 1.1.0',
9172
+ Notes => 'Firmware versions 1.00 and 1.10',
9028
9173
  SubDirectory => {
9029
- TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8',
9174
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8v1',
9030
9175
  Start => '$dirStart + $val',
9031
9176
  },
9032
9177
  },
9033
9178
  {
9034
9179
  Name => 'MenuSettingsOffsetZ8v2',
9035
9180
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.00"',
9036
- Notes => 'Firmware version 2.0',
9181
+ Notes => 'Firmware version 2.00 and 2.10',
9037
9182
  Format => 'int32u',
9038
9183
  SubDirectory => {
9039
9184
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8v2',
@@ -9062,7 +9207,7 @@ my %nikonFocalConversions = (
9062
9207
  {
9063
9208
  Name => 'MenuSettingsOffsetZ9v3',
9064
9209
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "04.00"',
9065
- Notes => 'Firmware versions 3.0 and v3.10',
9210
+ Notes => 'Firmware versions 3.00 and v3.10',
9066
9211
  Format => 'int32u',
9067
9212
  SubDirectory => {
9068
9213
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v3',
@@ -9071,23 +9216,13 @@ my %nikonFocalConversions = (
9071
9216
  },
9072
9217
  {
9073
9218
  Name => 'MenuSettingsOffsetZ9v4',
9074
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "05.01"',
9075
- Notes => 'Firmware versions 4.x and 5.0',
9219
+ Notes => 'Firmware versions 4.00 and higher',
9076
9220
  Format => 'int32u',
9077
9221
  SubDirectory => {
9078
9222
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v4',
9079
9223
  Start => '$dirStart + $val',
9080
9224
  },
9081
9225
  },
9082
- {
9083
- Name => 'MenuSettingsOffsetZ9v4',
9084
- Notes => 'Firmware versions 4.x and 5.0',
9085
- Format => 'int32u',
9086
- SubDirectory => {
9087
- TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v5',
9088
- Start => '$dirStart + $val',
9089
- },
9090
- },
9091
9226
  ],
9092
9227
  );
9093
9228
 
@@ -9241,7 +9376,7 @@ my %nikonFocalConversions = (
9241
9376
  },
9242
9377
  );
9243
9378
 
9244
- %Image::ExifTool::Nikon::MenuSettingsZ6III = (
9379
+ %Image::ExifTool::Nikon::MenuSettingsZ6III = (
9245
9380
  %binaryDataAttrs,
9246
9381
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9247
9382
  NOTES => 'These tags are used by the Z6III.',
@@ -9428,7 +9563,7 @@ my %nikonFocalConversions = (
9428
9563
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ6III' },
9429
9564
  },
9430
9565
  2300 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9431
- 2302 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9566
+ 2302 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9432
9567
  2308 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5 and Lo1, Lo2, Hi1, Hi2
9433
9568
  2444 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
9434
9569
  2450 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
@@ -9438,7 +9573,7 @@ my %nikonFocalConversions = (
9438
9573
  2496 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9439
9574
  ),
9440
9575
 
9441
- %Image::ExifTool::Nikon::MenuSettingsZ7II = (
9576
+ %Image::ExifTool::Nikon::MenuSettingsZ7II = (
9442
9577
  %binaryDataAttrs,
9443
9578
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9444
9579
  DATAMEMBER => [ 90, 176, 180, 328, 352, 858 ],
@@ -9523,7 +9658,7 @@ my %nikonFocalConversions = (
9523
9658
  PrintConv => \%offOn,
9524
9659
  },
9525
9660
  #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
9526
- 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7},
9661
+ 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7 },
9527
9662
  328 => {
9528
9663
  Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9529
9664
  RawConv => '$$self{FlashControlMode} = $val',
@@ -9599,11 +9734,7 @@ my %nikonFocalConversions = (
9599
9734
  516 => {
9600
9735
  Name => 'MovieISOAutoManualMode',
9601
9736
  Condition => '$$self{Model} =~ /^NIKON 7/', #ISO ranges vary by model. These mappings are for the Z7 and Z7II
9602
- Format => 'int16u',
9603
- Unknown => 1,
9604
- ValueConv => '($val-104)/8',
9605
- ValueConvInv => '8 * ($val + 104)',
9606
- PrintConv => \%iSOAutoHiLimitZ7,
9737
+ %isoAutoHiLimitZ7,
9607
9738
  },
9608
9739
  #520 => MovieWhiteBalanceSameAsPhoto
9609
9740
  568 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
@@ -9654,16 +9785,19 @@ my %nikonFocalConversions = (
9654
9785
  #859 => HDMIViewAssist
9655
9786
  );
9656
9787
 
9657
- %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9788
+ %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9658
9789
  %binaryDataAttrs,
9659
9790
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9660
- DATAMEMBER => [ 152, 200, 204, 244, 440, 548, 554, 570, 596 ],
9661
- IS_SUBDIR => [ 943 ],
9662
- NOTES => 'These tags are used by the Z8 firmware 1.00.',
9791
+ DATAMEMBER => [ 72, 152, 200, 204, 244, 440, 548, 554, 570, 596 ],
9792
+ NOTES => 'These tags are common to all Z8 firmware versions.',
9663
9793
  72 => {
9664
9794
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9665
9795
  PrintConv => \%highFrameRateZ9,
9796
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.10"',
9666
9797
  },
9798
+ #
9799
+ # firmware 2.10 adds 4 bytes somewhere in the range 105-107 (hence the Hook above)
9800
+ #
9667
9801
  152 => {
9668
9802
  Name => 'MultipleExposureMode',
9669
9803
  RawConv => '$$self{MultipleExposureMode} = $val',
@@ -9732,23 +9866,9 @@ my %nikonFocalConversions = (
9732
9866
  286 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9733
9867
  288 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9734
9868
  324 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9735
- 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9736
- 340 => {
9737
- Name => 'ISOAutoHiLimit',
9738
- Format => 'int16u',
9739
- Unknown => 1,
9740
- ValueConv => '($val-104)/8',
9741
- ValueConvInv => '8 * ($val + 104)',
9742
- PrintConv => \%iSOAutoHiLimitZ7,
9743
- },
9744
- 342 => {
9745
- Name => 'ISOAutoFlashLimit',
9746
- Format => 'int16u',
9747
- Unknown => 1,
9748
- ValueConv => '($val-104)/8',
9749
- ValueConvInv => '8 * ($val + 104)',
9750
- PrintConv => \%iSOAutoHiLimitZ7,
9751
- },
9869
+ 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9870
+ 340 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
9871
+ 342 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
9752
9872
  350 => {
9753
9873
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9754
9874
  ValueConv => '$val / 8',
@@ -9804,24 +9924,10 @@ my %nikonFocalConversions = (
9804
9924
  Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9805
9925
  PrintConv => \%imageAreaZ9b,
9806
9926
  },
9807
- 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9808
- 742 => {
9809
- Name => 'MovieISOAutoHiLimit',
9810
- Format => 'int16u',
9811
- Unknown => 1,
9812
- ValueConv => '($val-104)/8',
9813
- ValueConvInv => '8 * ($val + 104)',
9814
- PrintConv => \%iSOAutoHiLimitZ7,
9815
- },
9927
+ 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9928
+ 742 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
9816
9929
  744 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
9817
- 746 => {
9818
- Name => 'MovieISOAutoManualMode',
9819
- Format => 'int16u',
9820
- Unknown => 1,
9821
- ValueConv => '($val-104)/8',
9822
- ValueConvInv => '8 * ($val + 104)',
9823
- PrintConv => \%iSOAutoHiLimitZ7,
9824
- },
9930
+ 746 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
9825
9931
  820 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9826
9932
  822 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9827
9933
  828 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -9841,14 +9947,26 @@ my %nikonFocalConversions = (
9841
9947
  887 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9842
9948
  888 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9843
9949
  896 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9950
+ );
9951
+
9952
+ %Image::ExifTool::Nikon::MenuSettingsZ8v1 = (
9953
+ %binaryDataAttrs,
9954
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9955
+ NOTES => 'These tags are used by the Z8 firmware 1.00 and 1.10.',
9956
+ IS_SUBDIR => [ 0, 943 ],
9957
+ 0 => {
9958
+ Name => 'MenuSettingsZ8',
9959
+ Format => 'undef[943]',
9960
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8' },
9961
+ },
9844
9962
  943 => {
9845
9963
  Name => 'CustomSettingsZ8',
9846
9964
  Format => 'undef[730]',
9847
9965
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
9848
9966
  },
9849
- 1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9850
- 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9967
+ 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9851
9968
  1690 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9969
+ 1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9852
9970
  1712 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9853
9971
  1716 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
9854
9972
  1718 => { Name => 'NonCPULens2FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
@@ -9870,26 +9988,26 @@ my %nikonFocalConversions = (
9870
9988
  1750 => { Name => 'NonCPULens18FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9871
9989
  1752 => { Name => 'NonCPULens19FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9872
9990
  1754 => { Name => 'NonCPULens20FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9873
- 1756 => { Name => 'NonCPULens1MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9874
- 1758 => { Name => 'NonCPULens2MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9875
- 1760 => { Name => 'NonCPULens3MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9876
- 1762 => { Name => 'NonCPULens4MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9877
- 1764 => { Name => 'NonCPULens5MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9878
- 1766 => { Name => 'NonCPULens6MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9879
- 1768 => { Name => 'NonCPULens7MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9880
- 1770 => { Name => 'NonCPULens8MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9881
- 1772 => { Name => 'NonCPULens9MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9882
- 1774 => { Name => 'NonCPULens10MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9883
- 1776 => { Name => 'NonCPULens11MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9884
- 1778 => { Name => 'NonCPULens12MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9885
- 1780 => { Name => 'NonCPULens13MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9886
- 1782 => { Name => 'NonCPULens14MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9887
- 1784 => { Name => 'NonCPULens15MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9888
- 1786 => { Name => 'NonCPULens16MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9889
- 1788 => { Name => 'NonCPULens17MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9890
- 1790 => { Name => 'NonCPULens18MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9891
- 1792 => { Name => 'NonCPULens19MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9892
- 1794 => { Name => 'NonCPULens20MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9991
+ 1756 => { Name => 'NonCPULens1MaxAperture', %nonCPULensApertureZ8 },
9992
+ 1758 => { Name => 'NonCPULens2MaxAperture', %nonCPULensApertureZ8},
9993
+ 1760 => { Name => 'NonCPULens3MaxAperture', %nonCPULensApertureZ8},
9994
+ 1762 => { Name => 'NonCPULens4MaxAperture', %nonCPULensApertureZ8},
9995
+ 1764 => { Name => 'NonCPULens5MaxAperture', %nonCPULensApertureZ8},
9996
+ 1766 => { Name => 'NonCPULens6MaxAperture', %nonCPULensApertureZ8},
9997
+ 1768 => { Name => 'NonCPULens7MaxAperture', %nonCPULensApertureZ8},
9998
+ 1770 => { Name => 'NonCPULens8MaxAperture', %nonCPULensApertureZ8},
9999
+ 1772 => { Name => 'NonCPULens9MaxAperture', %nonCPULensApertureZ8},
10000
+ 1774 => { Name => 'NonCPULens10MaxAperture', %nonCPULensApertureZ8},
10001
+ 1776 => { Name => 'NonCPULens11MaxAperture', %nonCPULensApertureZ8},
10002
+ 1778 => { Name => 'NonCPULens12MaxAperture', %nonCPULensApertureZ8},
10003
+ 1780 => { Name => 'NonCPULens13MaxAperture', %nonCPULensApertureZ8},
10004
+ 1782 => { Name => 'NonCPULens14MaxAperture', %nonCPULensApertureZ8},
10005
+ 1784 => { Name => 'NonCPULens15MaxAperture', %nonCPULensApertureZ8},
10006
+ 1786 => { Name => 'NonCPULens16MaxAperture', %nonCPULensApertureZ8},
10007
+ 1788 => { Name => 'NonCPULens17MaxAperture', %nonCPULensApertureZ8},
10008
+ 1790 => { Name => 'NonCPULens18MaxAperture', %nonCPULensApertureZ8},
10009
+ 1792 => { Name => 'NonCPULens19MaxAperture', %nonCPULensApertureZ8},
10010
+ 1794 => { Name => 'NonCPULens20MaxAperture', %nonCPULensApertureZ8},
9893
10011
  1808 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
9894
10012
  1826 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9895
10013
  1827 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
@@ -9897,201 +10015,26 @@ my %nikonFocalConversions = (
9897
10015
  1890 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
9898
10016
  1899 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
9899
10017
  );
9900
- %Image::ExifTool::Nikon::MenuSettingsZ8v2 = (
10018
+
10019
+ %Image::ExifTool::Nikon::MenuSettingsZ8v2 = (
9901
10020
  %binaryDataAttrs,
9902
10021
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9903
- DATAMEMBER => [ 152, 200, 204, 244, 440, 548, 554, 570, 596, 2046 ],
9904
- IS_SUBDIR => [ 943 ],
9905
- NOTES => 'These tags are used by the Z8 firmware 1.00.',
9906
- 72 => {
9907
- Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9908
- PrintConv => \%highFrameRateZ9,
9909
- },
9910
- 152 => {
9911
- Name => 'MultipleExposureMode',
9912
- RawConv => '$$self{MultipleExposureMode} = $val',
9913
- PrintConv => \%multipleExposureModeZ9,
9914
- },
9915
- 154 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
9916
- 184 => {
9917
- Name => 'IntervalDurationHours',
9918
- Format => 'int32u',
9919
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9920
- },
9921
- 188 => {
9922
- Name => 'IntervalDurationMinutes',
9923
- Format => 'int32u',
9924
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9925
- },
9926
- 192 => {
9927
- Name => 'IntervalDurationSeconds',
9928
- Format => 'int32u',
9929
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9930
- },
9931
- 200 => {
9932
- Name => 'Intervals',
9933
- Format => 'int32u',
9934
- RawConv => '$$self{IntervalShootingIntervals} = $val',
9935
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9936
- },
9937
- 204 => {
9938
- Name => 'ShotsPerInterval',
9939
- Format => 'int32u',
9940
- RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
9941
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9942
- },
9943
- 208 => {
9944
- Name => 'IntervalExposureSmoothing',
9945
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9946
- Format => 'int8u',
9947
- PrintConv => \%offOn,
9948
- },
9949
- 210 => {
9950
- Name => 'IntervalPriority',
9951
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9952
- Format => 'int8u',
9953
- PrintConv => \%offOn,
9954
- },
9955
- 244 => {
9956
- Name => 'FocusShiftNumberShots', #1-300
9957
- RawConv => '$$self{FocusShiftNumberShots} = $val',
9958
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9959
- },
9960
- 248 => {
9961
- Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
9962
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9963
- },
9964
- 252 => {
9965
- Name => 'FocusShiftInterval',
9966
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9967
- PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
9968
- },
9969
- 256 => {
9970
- Name => 'FocusShiftExposureLock',
9971
- Unknown => 1,
9972
- PrintConv => \%offOn,
9973
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9974
- },
9975
- 286 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9976
- 288 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9977
- 324 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9978
- 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9979
- 340 => {
9980
- Name => 'ISOAutoHiLimit',
9981
- Format => 'int16u',
9982
- Unknown => 1,
9983
- ValueConv => '($val-104)/8',
9984
- ValueConvInv => '8 * ($val + 104)',
9985
- PrintConv => \%iSOAutoHiLimitZ7,
9986
- },
9987
- 342 => {
9988
- Name => 'ISOAutoFlashLimit',
9989
- Format => 'int16u',
9990
- Unknown => 1,
9991
- ValueConv => '($val-104)/8',
9992
- ValueConvInv => '8 * ($val + 104)',
9993
- PrintConv => \%iSOAutoHiLimitZ7,
9994
- },
9995
- 350 => {
9996
- Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9997
- ValueConv => '$val / 8',
9998
- Format => 'int16s',
9999
- PrintConv => \%iSOAutoShutterTimeZ9,
10000
- },
10001
- 432 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10002
- 434 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
10003
- 436 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
10004
- 440 => {
10005
- Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
10006
- RawConv => '$$self{FlashControlMode} = $val',
10007
- PrintConv => \%flashControlModeZ7,
10008
- },
10009
- 548 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
10010
- 550 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
10011
- 554 => {
10012
- Name => 'BracketSet',
10013
- RawConv => '$$self{BracketSet} = $val',
10014
- PrintConv => \%bracketSetZ9,
10015
- },
10016
- 556 => {
10017
- Name => 'BracketProgram',
10018
- Condition => '$$self{BracketSet} < 3',
10019
- Notes => 'AE and/or Flash Bracketing',
10020
- PrintConv => \%bracketProgramZ9,
10021
- },
10022
- 558 => {
10023
- Name => 'BracketIncrement',
10024
- Condition => '$$self{BracketSet} < 3',
10025
- Notes => 'AE and/or Flash Bracketing',
10026
- PrintConv => \%bracketIncrementZ9,
10027
- },
10028
- 570 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
10029
- #572 HDRSaveRaw 0=> No; 1=> Yes
10030
- 576 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
10031
- 582 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
10032
- 586 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
10033
- 592 => { Name => 'DXCropAlert', PrintConv => \%offOn },
10034
- 594 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
10035
- 596 => {
10036
- Name => 'DynamicAFAreaSize',
10037
- Condition => '$$self{AFAreaMode} == 2',
10038
- RawConv => '$$self{DynamicAFAreaSize} = $val',
10039
- PrintConv => \%dynamicAfAreaModesZ9,
10040
- },
10041
- 618 => { Name => 'ToneMap', PrintConv => { 0 => 'SDR', 1 => 'HLG' }, Unknown => 1 },
10042
- 622 => { Name => 'PortraitImpressionBalance', PrintConv => \%portraitImpressionBalanceZ8 },
10043
- 636 => { Name => 'HighFrequencyFlickerReduction', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
10044
- 730 => {
10045
- Name => 'MovieImageArea',
10046
- Unknown => 1,
10047
- Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
10048
- PrintConv => \%imageAreaZ9b,
10049
- },
10050
- #736 => { Name => 'MovieSlowMotion', PrintConv => \%movieSlowMotion, Unknown => 1 }, #only valid for MovieType H.264 8-bit
10051
- 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10052
- 742 => {
10053
- Name => 'MovieISOAutoHiLimit',
10054
- Format => 'int16u',
10055
- Unknown => 1,
10056
- ValueConv => '($val-104)/8',
10057
- ValueConvInv => '8 * ($val + 104)',
10058
- PrintConv => \%iSOAutoHiLimitZ7,
10059
- },
10060
- 744 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10061
- 746 => {
10062
- Name => 'MovieISOAutoManualMode',
10063
- Format => 'int16u',
10064
- Unknown => 1,
10065
- ValueConv => '($val-104)/8',
10066
- ValueConvInv => '8 * ($val + 104)',
10067
- PrintConv => \%iSOAutoHiLimitZ7,
10022
+ DATAMEMBER => [ 0, 2046 ],
10023
+ IS_SUBDIR => [ 0, 943 ],
10024
+ NOTES => 'These tags are used by the Z8 firmware 2.00 and 2.10.',
10025
+ 0 => {
10026
+ Name => 'MenuSettingsZ8',
10027
+ Format => 'undef[943]',
10028
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8' },
10029
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.10"',
10068
10030
  },
10069
- 820 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10070
- 822 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10071
- 828 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
10072
- 830 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
10073
- 832 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
10074
- 834 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
10075
- 836 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
10076
- 840 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
10077
- 842 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
10078
- 844 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
10079
- 846 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
10080
- 848 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
10081
- 850 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
10082
- 878 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
10083
- 880 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
10084
- 886 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
10085
- 887 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
10086
- 888 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
10087
- 896 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
10088
10031
  943 => {
10089
10032
  Name => 'CustomSettingsZ8',
10090
10033
  Format => 'undef[755]',
10091
10034
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
10092
10035
  },
10093
10036
  1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10094
- 1700 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10037
+ 1700 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10095
10038
  1706 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10096
10039
  1728 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10097
10040
  1732 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
@@ -10151,7 +10094,8 @@ my %nikonFocalConversions = (
10151
10094
  2062 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
10152
10095
  2064 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
10153
10096
  );
10154
- %Image::ExifTool::Nikon::MenuSettingsZ9 = (
10097
+
10098
+ %Image::ExifTool::Nikon::MenuSettingsZ9 = (
10155
10099
  %binaryDataAttrs,
10156
10100
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10157
10101
  DATAMEMBER => [ 140, 188, 192, 232, 308, 424, 528, 534, 576 ],
@@ -10202,22 +10146,8 @@ my %nikonFocalConversions = (
10202
10146
  308 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10203
10147
  #310 ImageQuality
10204
10148
  322 => { Name => 'AutoISO', PrintConv => \%offOn },
10205
- 324 => {
10206
- Name => 'ISOAutoHiLimit',
10207
- Format => 'int16u',
10208
- Unknown => 1,
10209
- ValueConv => '($val-104)/8',
10210
- ValueConvInv => '8 * ($val + 104)',
10211
- PrintConv => \%iSOAutoHiLimitZ7,
10212
- },
10213
- 326 => {
10214
- Name => 'ISOAutoFlashLimit',
10215
- Format => 'int16u',
10216
- Unknown => 1,
10217
- ValueConv => '($val-104)/8',
10218
- ValueConvInv => '8 * ($val + 104)',
10219
- PrintConv => \%iSOAutoHiLimitZ7,
10220
- },
10149
+ 324 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10150
+ 326 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10221
10151
  #332 ISOAutoShutterTime - Auto setting 0=> 'Auto (Slowest)', 1 => 'Auto (Slower)', 2=> 'Auto', 3=> 'Auto (Faster)', 4=> 'Auto (Fastest)'
10222
10152
  334 => {
10223
10153
  Name => 'ISOAutoShutterTime', #shutter speed is 2 ** (-$val/24)
@@ -10303,27 +10233,13 @@ my %nikonFocalConversions = (
10303
10233
  604 => {
10304
10234
  Name => 'MovieImageArea',
10305
10235
  Unknown => 1,
10306
- Mask => 0x01, # without the mask 4 => 'FX', 5 => DX. only the 2nd Z-series field encountered with a mask
10307
- PrintConv => \%imageAreaZ9b,
10308
- },
10309
- 614 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10310
- 616 => {
10311
- Name => 'MovieISOAutoHiLimit',
10312
- Format => 'int16u',
10313
- Unknown => 1,
10314
- ValueConv => '($val-104)/8',
10315
- ValueConvInv => '8 * ($val + 104)',
10316
- PrintConv => \%iSOAutoHiLimitZ7,
10317
- },
10318
- 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10319
- 620 => {
10320
- Name => 'MovieISOAutoManualMode',
10321
- Format => 'int16u',
10322
- Unknown => 1,
10323
- ValueConv => '($val-104)/8',
10324
- ValueConvInv => '8 * ($val + 104)',
10325
- PrintConv => \%iSOAutoHiLimitZ7,
10236
+ Mask => 0x01, # without the mask 4 => 'FX', 5 => DX. only the 2nd Z-series field encountered with a mask
10237
+ PrintConv => \%imageAreaZ9b,
10326
10238
  },
10239
+ 614 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10240
+ 616 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10241
+ 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10242
+ 620 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10327
10243
  696 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10328
10244
  698 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10329
10245
  704 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10349,7 +10265,7 @@ my %nikonFocalConversions = (
10349
10265
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
10350
10266
  },
10351
10267
  1426 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10352
- 1428 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10268
+ 1428 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10353
10269
  1434 => { Name => 'MonitorBrightness', ValueConv => '$val - 5', Unknown => 1 }, # settings: -5 to +5
10354
10270
  1456 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10355
10271
  1552 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
@@ -10362,7 +10278,7 @@ my %nikonFocalConversions = (
10362
10278
  1645 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
10363
10279
  );
10364
10280
 
10365
- %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
10281
+ %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
10366
10282
  %binaryDataAttrs,
10367
10283
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10368
10284
  DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 596 ],
@@ -10414,22 +10330,8 @@ my %nikonFocalConversions = (
10414
10330
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
10415
10331
  328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10416
10332
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
10417
- 344 => {
10418
- Name => 'ISOAutoHiLimit',
10419
- Format => 'int16u',
10420
- Unknown => 1,
10421
- ValueConv => '($val-104)/8',
10422
- ValueConvInv => '8 * ($val + 104)',
10423
- PrintConv => \%iSOAutoHiLimitZ7,
10424
- },
10425
- 346 => {
10426
- Name => 'ISOAutoFlashLimit',
10427
- Format => 'int16u',
10428
- Unknown => 1,
10429
- ValueConv => '($val-104)/8',
10430
- ValueConvInv => '8 * ($val + 104)',
10431
- PrintConv => \%iSOAutoHiLimitZ7,
10432
- },
10333
+ 344 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10334
+ 346 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10433
10335
  354 => {
10434
10336
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10435
10337
  ValueConv => '$val / 8',
@@ -10508,23 +10410,9 @@ my %nikonFocalConversions = (
10508
10410
  PrintConv => \%imageAreaZ9b,
10509
10411
  },
10510
10412
  656 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10511
- 658 => {
10512
- Name => 'MovieISOAutoHiLimit',
10513
- Format => 'int16u',
10514
- Unknown => 1,
10515
- ValueConv => '($val-104)/8',
10516
- ValueConvInv => '8 * ($val + 104)',
10517
- PrintConv => \%iSOAutoHiLimitZ7,
10518
- },
10413
+ 658 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10519
10414
  660 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10520
- 662 => {
10521
- Name => 'MovieISOAutoManualMode',
10522
- Format => 'int16u',
10523
- Unknown => 1,
10524
- ValueConv => '($val-104)/8',
10525
- ValueConvInv => '8 * ($val + 104)',
10526
- PrintConv => \%iSOAutoHiLimitZ7,
10527
- },
10415
+ 662 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10528
10416
  736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10529
10417
  738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10530
10418
  744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10551,7 +10439,7 @@ my %nikonFocalConversions = (
10551
10439
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
10552
10440
  },
10553
10441
  1474 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10554
- 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10442
+ 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10555
10443
  1482 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10556
10444
  1504 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10557
10445
  1600 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
@@ -10595,17 +10483,21 @@ my %nikonFocalConversions = (
10595
10483
  #1936 FocusPointDisplayOption3DTrackingColor CSa11-d 0=> 'White', 1= => 'Red'
10596
10484
  );
10597
10485
 
10598
- # firmware version 4.x menu settings (ref 28)
10599
- %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10486
+ # firmware version 4.x/5.x menu settings (ref 28)
10487
+ %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10600
10488
  %binaryDataAttrs,
10601
10489
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10602
- DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10490
+ DATAMEMBER => [ 72, 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10603
10491
  IS_SUBDIR => [ 847 ],
10604
- NOTES => 'These tags are used by the Z9 firmware 4.0.0 and 4.1.0.',
10492
+ NOTES => 'These tags are used by the Z9 firmware 4.00, 4.10, 5.00 and 5.10.',
10605
10493
  72 => {
10606
10494
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10607
10495
  PrintConv => \%highFrameRateZ9,
10496
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.10"',
10608
10497
  },
10498
+ #
10499
+ # Note: Offsets after this are shifted by +4 for firmware 5.1 (see Hook above)
10500
+ #
10609
10501
  154 => {
10610
10502
  Name => 'MultipleExposureMode',
10611
10503
  RawConv => '$$self{MultipleExposureMode} = $val',
@@ -10649,22 +10541,8 @@ my %nikonFocalConversions = (
10649
10541
  328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10650
10542
  #334 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
10651
10543
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
10652
- 344 => {
10653
- Name => 'ISOAutoHiLimit',
10654
- Format => 'int16u',
10655
- Unknown => 1,
10656
- ValueConv => '($val-104)/8',
10657
- ValueConvInv => '8 * ($val + 104)',
10658
- PrintConv => \%iSOAutoHiLimitZ7,
10659
- },
10660
- 346 => {
10661
- Name => 'ISOAutoFlashLimit',
10662
- Format => 'int16u',
10663
- Unknown => 1,
10664
- ValueConv => '($val-104)/8',
10665
- ValueConvInv => '8 * ($val + 104)',
10666
- PrintConv => \%iSOAutoHiLimitZ7,
10667
- },
10544
+ 344 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10545
+ 346 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10668
10546
  354 => {
10669
10547
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10670
10548
  ValueConv => '$val / 8',
@@ -10746,23 +10624,9 @@ my %nikonFocalConversions = (
10746
10624
  PrintConv => \%imageAreaZ9b,
10747
10625
  },
10748
10626
  656 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10749
- 658 => {
10750
- Name => 'MovieISOAutoHiLimit',
10751
- Format => 'int16u',
10752
- Unknown => 1,
10753
- ValueConv => '($val-104)/8',
10754
- ValueConvInv => '8 * ($val + 104)',
10755
- PrintConv => \%iSOAutoHiLimitZ7,
10756
- },
10627
+ 658 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10757
10628
  660 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10758
- 662 => {
10759
- Name => 'MovieISOAutoManualMode',
10760
- Format => 'int16u',
10761
- Unknown => 1,
10762
- ValueConv => '($val-104)/8',
10763
- ValueConvInv => '8 * ($val + 104)',
10764
- PrintConv => \%iSOAutoHiLimitZ7,
10765
- },
10629
+ 662 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10766
10630
  736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10767
10631
  738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10768
10632
  744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10789,7 +10653,7 @@ my %nikonFocalConversions = (
10789
10653
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
10790
10654
  },
10791
10655
  1498 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10792
- 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10656
+ 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10793
10657
  1506 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10794
10658
  1528 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10795
10659
  1532 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
@@ -10907,318 +10771,6 @@ my %nikonFocalConversions = (
10907
10771
  2072 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
10908
10772
  );
10909
10773
 
10910
- # menu settings for the Z9 with firmware version 5.1 (ref 28)
10911
- %Image::ExifTool::Nikon::MenuSettingsZ9v5 = (
10912
- %binaryDataAttrs,
10913
- GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10914
- DATAMEMBER => [ 158, 208, 212, 252, 332, 448, 552, 558, 574, 600 ],
10915
- IS_SUBDIR => [ 851 ],
10916
- NOTES => 'These tags are used by the Z9 firmware 5.1.',
10917
- 72 => {
10918
- Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10919
- PrintConv => \%highFrameRateZ9,
10920
- },
10921
- 158 => {
10922
- Name => 'MultipleExposureMode',
10923
- RawConv => '$$self{MultipleExposureMode} = $val',
10924
- PrintConv => \%multipleExposureModeZ9,
10925
- },
10926
- 160 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
10927
- 208 => {
10928
- Name => 'Intervals',
10929
- Format => 'int32u',
10930
- RawConv => '$$self{IntervalShootingIntervals} = $val',
10931
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
10932
- },
10933
- 212 => {
10934
- Name => 'ShotsPerInterval',
10935
- Format => 'int32u',
10936
- RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
10937
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
10938
- },
10939
- 252 => {
10940
- Name => 'FocusShiftNumberShots', #1-300
10941
- RawConv => '$$self{FocusShiftNumberShots} = $val',
10942
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10943
- },
10944
- 256 => {
10945
- Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
10946
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10947
- },
10948
- 260 => {
10949
- Name => 'FocusShiftInterval',
10950
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10951
- PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
10952
- },
10953
- 264 => {
10954
- Name => 'FocusShiftExposureLock',
10955
- Unknown => 1,
10956
- PrintConv => \%offOn,
10957
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10958
- },
10959
- 294 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
10960
- 296 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
10961
- 332 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10962
- #338 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
10963
- 346 => { Name => 'AutoISO', PrintConv => \%offOn },
10964
- 348 => {
10965
- Name => 'ISOAutoHiLimit',
10966
- Format => 'int16u',
10967
- Unknown => 1,
10968
- ValueConv => '($val-104)/8',
10969
- ValueConvInv => '8 * ($val + 104)',
10970
- PrintConv => \%iSOAutoHiLimitZ7,
10971
- },
10972
- 350 => {
10973
- Name => 'ISOAutoFlashLimit',
10974
- Format => 'int16u',
10975
- Unknown => 1,
10976
- ValueConv => '($val-104)/8',
10977
- ValueConvInv => '8 * ($val + 104)',
10978
- PrintConv => \%iSOAutoHiLimitZ7,
10979
- },
10980
- 358 => {
10981
- Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10982
- ValueConv => '$val / 8',
10983
- Format => 'int16s',
10984
- PrintConv => \%iSOAutoShutterTimeZ9,
10985
- },
10986
- 440 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10987
- 442 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
10988
- 444 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
10989
- 448 => {
10990
- Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
10991
- RawConv => '$$self{FlashControlMode} = $val',
10992
- PrintConv => \%flashControlModeZ7,
10993
- },
10994
- 450 => {
10995
- Name => 'FlashMasterCompensation',
10996
- Format => 'int8s',
10997
- Unknown => 1,
10998
- ValueConv => '$val/6',
10999
- ValueConvInv => '6 * $val',
11000
- PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
11001
- PrintConvInv => '$val',
11002
- },
11003
- 454 => {
11004
- Name => 'FlashGNDistance',
11005
- Condition => '$$self{FlashControlMode} == 2',
11006
- Unknown => 1,
11007
- ValueConv => '$val + 3',
11008
- PrintConv => \%flashGNDistance,
11009
- },
11010
- 458 => {
11011
- Name => 'FlashOutput', # range[0,24] with 0=>Full; 1=>50%; then decreasing flash power in 1/3 stops to 0.39% (1/256 full power). also found in FlashInfoUnknown at offset 0x0a (with different mappings)
11012
- Condition => '$$self{FlashControlMode} >= 3',
11013
- Unknown => 1,
11014
- ValueConv => '2 ** (-$val/3)',
11015
- ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
11016
- PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
11017
- PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
11018
- },
11019
- #466 flash wireless control 0=> 'Off' 1=> 'Optical AWL'
11020
- #468 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
11021
- #480 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
11022
- 552 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
11023
- 554 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
11024
- 558 => {
11025
- Name => 'BracketSet',
11026
- RawConv => '$$self{BracketSet} = $val',
11027
- PrintConv => \%bracketSetZ9,
11028
- },
11029
- 560 => {
11030
- Name => 'BracketProgram',
11031
- Condition => '$$self{BracketSet} < 3',
11032
- Notes => 'AE and/or Flash Bracketing',
11033
- PrintConv => \%bracketProgramZ9,
11034
- },
11035
- 562 => {
11036
- Name => 'BracketIncrement',
11037
- Condition => '$$self{BracketSet} < 3',
11038
- Notes => 'AE and/or Flash Bracketing',
11039
- PrintConv => \%bracketIncrementZ9,
11040
- },
11041
- 574 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
11042
- 580 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
11043
- 586 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
11044
- 590 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
11045
- 596 => { Name => 'DXCropAlert', PrintConv => \%offOn },
11046
- 598 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
11047
- 600 => {
11048
- Name => 'DynamicAFAreaSize',
11049
- Condition => '$$self{AFAreaMode} == 2',
11050
- RawConv => '$$self{DynamicAFAreaSize} = $val',
11051
- PrintConv => \%dynamicAfAreaModesZ9,
11052
- },
11053
- 640 => { Name => 'HighFrequencyFlickerReduction', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
11054
- 650 => {
11055
- Name => 'MovieImageArea',
11056
- Unknown => 1,
11057
- Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
11058
- PrintConv => \%imageAreaZ9b,
11059
- },
11060
- 660 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
11061
- 662 => {
11062
- Name => 'MovieISOAutoHiLimit',
11063
- Format => 'int16u',
11064
- Unknown => 1,
11065
- ValueConv => '($val-104)/8',
11066
- ValueConvInv => '8 * ($val + 104)',
11067
- PrintConv => \%iSOAutoHiLimitZ7,
11068
- },
11069
- 664 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
11070
- 666 => {
11071
- Name => 'MovieISOAutoManualMode',
11072
- Format => 'int16u',
11073
- Unknown => 1,
11074
- ValueConv => '($val-104)/8',
11075
- ValueConvInv => '8 * ($val + 104)',
11076
- PrintConv => \%iSOAutoHiLimitZ7,
11077
- },
11078
- 740 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
11079
- 742 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
11080
- 748 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
11081
- 750 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
11082
- 752 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
11083
- 754 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
11084
- 756 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
11085
- 760 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
11086
- 762 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
11087
- 764 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
11088
- 766 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
11089
- 768 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
11090
- 770 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
11091
- 792 => { Name => 'MovieToneMap', PrintConv => \%movieToneMapZ9, Unknown => 1 },
11092
- 798 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
11093
- 800 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
11094
- 806 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
11095
- 807 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
11096
- 808 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
11097
- 816 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
11098
- 851 => {
11099
- Name => 'CustomSettingsZ9v4',
11100
- Format => 'undef[632]',
11101
- SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
11102
- },
11103
- 1502 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
11104
- 1504 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
11105
- 1510 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
11106
- 1532 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
11107
- 1536 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
11108
- 1540 => { Name => 'NonCPULens2FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11109
- 1542 => { Name => 'NonCPULens3FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11110
- 1548 => { Name => 'NonCPULens4FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11111
- 1552 => { Name => 'NonCPULens5FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11112
- 1556 => { Name => 'NonCPULens6FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11113
- 1560 => { Name => 'NonCPULens7FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11114
- 1564 => { Name => 'NonCPULens8FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11115
- 1568 => { Name => 'NonCPULens9FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11116
- 1572 => { Name => 'NonCPULens10FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11117
- 1576 => { Name => 'NonCPULens11FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11118
- 1580 => { Name => 'NonCPULens12FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11119
- 1584 => { Name => 'NonCPULens13FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11120
- 1588 => { Name => 'NonCPULens14FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11121
- 1592 => { Name => 'NonCPULens15FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11122
- 1596 => { Name => 'NonCPULens16FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11123
- 1600 => { Name => 'NonCPULens17FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11124
- 1604 => { Name => 'NonCPULens18FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11125
- 1608 => { Name => 'NonCPULens19FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11126
- 1612 => { Name => 'NonCPULens20FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11127
- 1616 => { Name => 'NonCPULens1MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1}, #non-CPU aperture interface, values and storage differ from the Z8
11128
- 1620 => { Name => 'NonCPULens2MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11129
- 1624 => { Name => 'NonCPULens3MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11130
- 1628 => { Name => 'NonCPULens4MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11131
- 1632 => { Name => 'NonCPULens5MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11132
- 1636 => { Name => 'NonCPULens6MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11133
- 1640 => { Name => 'NonCPULens7MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11134
- 1644 => { Name => 'NonCPULens8MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11135
- 1648 => { Name => 'NonCPULens9MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11136
- 1652 => { Name => 'NonCPULens10MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11137
- 1656 => { Name => 'NonCPULens11MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11138
- 1660 => { Name => 'NonCPULens12MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11139
- 1664 => { Name => 'NonCPULens13MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11140
- 1668 => { Name => 'NonCPULens14MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11141
- 1672 => { Name => 'NonCPULens15MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11142
- 1676 => { Name => 'NonCPULens16MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11143
- 1680 => { Name => 'NonCPULens17MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11144
- 1684 => { Name => 'NonCPULens18MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11145
- 1688 => { Name => 'NonCPULens19MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11146
- 1692 => { Name => 'NonCPULens20MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11147
- 1708 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
11148
- 1721 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
11149
- 1728 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
11150
- 1729 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
11151
- 1764 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
11152
- 1788 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
11153
- 1792 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
11154
- 1801 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
11155
- 1866 => {
11156
- Name => 'AutoCapturePreset',
11157
- PrintConv => {
11158
- 0 => '1',
11159
- 1 => '2',
11160
- 2 => '3',
11161
- 3 => '4',
11162
- 4 => '5',
11163
- },
11164
- },
11165
- 1868 => {
11166
- Name => 'FocusShiftAutoReset',
11167
- Unknown => 1,
11168
- PrintConv => \%offOn,
11169
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
11170
- },
11171
- 1926 => { #CSd4-a
11172
- Name => 'PreReleaseBurstLength',
11173
- PrintConv => {
11174
- 0 => 'None',
11175
- 1 => '0.3 Sec',
11176
- 2 => '0.5 Sec',
11177
- 3 => '1 Sec',
11178
- },
11179
- },
11180
- 1928 => { #CSd4-b
11181
- Name => 'PostReleaseBurstLength',
11182
- PrintConv => {
11183
- 0 => '1 Sec',
11184
- 1 => '2 Sec',
11185
- 2 => '3 Sec',
11186
- 3 => 'Max',
11187
- },
11188
- },
11189
- 1942 => { Name => 'VerticalISOButton', %buttonsZ9}, #CSf2
11190
- 1944 => { Name => 'ExposureCompensationButton', %buttonsZ9}, #CSf2
11191
- 1946 => { Name => 'ISOButton', %buttonsZ9}, #CSf2
11192
- 2006 => { Name => 'ViewModeShowEffectsOfSettings', PrintConv => { 0=>'Always', 1=> 'Only When Flash Not Used'}, Unknown => 1 }, #CSd9-a
11193
- 2008 => { Name => 'DispButton', %buttonsZ9}, #CSf2
11194
- 2052 => { #CSd6
11195
- Name => 'ExposureDelay',
11196
- Format => 'fixed32u',
11197
- PrintConv => '$val ? sprintf("%.1f sec",$val/1000) : "Off"',
11198
- },
11199
- 2056 => { #CSf2-m3
11200
- Name => 'CommandDialFrameAdvanceZoom',
11201
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11202
- PrintConv => \%dialsFrameAdvanceZoomPositionZ9,
11203
- Unknown => 1
11204
- },
11205
- 2058 => { #CSf2-n3
11206
- Name => 'SubCommandDialFrameAdvanceZoom',
11207
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11208
- PrintConv => \%dialsFrameAdvanceZoomPositionZ9,
11209
- Unknown => 1
11210
- },
11211
- 2060 => { Name => 'PlaybackButton', %buttonsZ9}, #CSf2
11212
- 2062 => { Name => 'WBButton', %buttonsZ9}, #CSf2
11213
- 2064 => { Name => 'BracketButton', %buttonsZ9}, #CSf2
11214
- 2066 => { Name => 'FlashModeButton', %buttonsZ9}, #CSf2
11215
- 2068 => { Name => 'LensFunc1ButtonPlaybackMode', %buttonsZ9}, #CSf2
11216
- 2070 => { Name => 'LensFunc2ButtonPlaybackMode', %buttonsZ9}, #CSf2
11217
- 2072 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
11218
- 2074 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
11219
- 2076 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
11220
- );
11221
-
11222
10774
  # Flash information (ref JD)
11223
10775
  %Image::ExifTool::Nikon::FlashInfo0100 = (
11224
10776
  %binaryDataAttrs,
@@ -12489,6 +12041,7 @@ my %nikonFocalConversions = (
12489
12041
  Name => 'FirmwareVersion51',
12490
12042
  Format => 'string[8]',
12491
12043
  Writable => 0,
12044
+ ValueConv => 'join ".", $val =~ /../g',
12492
12045
  },
12493
12046
  10 => {
12494
12047
  Name => 'NEFCompression',
@@ -12503,9 +12056,10 @@ my %nikonFocalConversions = (
12503
12056
  %binaryDataAttrs,
12504
12057
  GROUPS => { 0 => 'MakerNotes' },
12505
12058
  0 => {
12506
- Name => 'FirmwareVersion',
12059
+ Name => 'FirmwareVersion56',
12507
12060
  Format => 'string[4]',
12508
12061
  Writable => 0,
12062
+ ValueConv => '$val =~ s/(\d{2})/$1./; $val',
12509
12063
  },
12510
12064
  4 => {
12511
12065
  Name => 'BurstGroupID', #all frames shot within a burst (using CL/CH/C30/C60/C120) will share the same BurstGroupID. Value will be > 0 for all images shot in continuous modes (or via Pixel Shift). 0 for single-frame.
@@ -13429,10 +12983,33 @@ my %nikonFocalConversions = (
13429
12983
  6 => 'High',
13430
12984
  },
13431
12985
  },
13432
- 0x20000b7 => {
12986
+ 0x20000b7 => [{
13433
12987
  Name => 'AFInfo2',
13434
- SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
13435
- },
12988
+ # LiveView-enabled DSLRs introduced starting in 2007 (D3/D300)
12989
+ Condition => '$$valPt =~ /^0100/',
12990
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0100' },
12991
+ },{
12992
+ Name => 'AFInfo2',
12993
+ # All Expeed 5 processor and most Expeed 4 processor models from 2016 - D5, D500, D850, D3400, D3500, D7500 (D5600 is v0100)
12994
+ Condition => '$$valPt =~ /^0101/',
12995
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0101' },
12996
+ },{
12997
+ Name => 'AFInfo2',
12998
+ # Nikon 1 Series cameras
12999
+ Condition => '$$valPt =~ /^020[01]/',
13000
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0200' },
13001
+ },{
13002
+ Name => 'AFInfo2',
13003
+ # Expeed 6 processor models - D6, D780, Z5, Z6, Z7, Z30, Z50, Z6_2, Z7_2 and Zfc
13004
+ Condition => '$$valPt =~ /^030[01]/',
13005
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0300' },
13006
+ },{
13007
+ Name => 'AFInfo2',
13008
+ # Expeed 7 processor models - Z8 & Z9 (AFInfo2Version 0400), Z6iii & Zf (AFInfo2Version 0401)
13009
+ # and Z50ii (AFInfo2Version 0402)
13010
+ Condition => '$$valPt =~ /^040[012]/',
13011
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
13012
+ }],
13436
13013
  # 0x20000c0 - undef[8]
13437
13014
  0x20000c3 => {
13438
13015
  Name => 'BarometerInfo',
@@ -13570,10 +13147,33 @@ my %nikonFocalConversions = (
13570
13147
  },
13571
13148
  AutoFocus => {
13572
13149
  Require => {
13573
- 0 => 'Nikon:PhaseDetectAF',
13574
- 1 => 'Nikon:ContrastDetectAF',
13150
+ 0 => 'Nikon:FocusMode',
13151
+ },
13152
+ ValueConv => '($val[0] =~ /^Manual/i) ? 0 : 1',
13153
+ PrintConv => \%offOn,
13154
+ },
13155
+ PhaseDetectAF => {
13156
+ Require => {
13157
+ 0 => 'Nikon:FocusPointSchema',
13158
+ 1 => 'Nikon:AFDetectionMethod',
13159
+ },
13160
+ ValueConv => '(($val[1]) == 0) ? ($val[0]) : 0', # for backward compatibility, report FocusPointSchema when AFDetectionMethod indicates Phase Detect is on
13161
+ PrintConv => {
13162
+ 0 => 'Off', #contrast detect or hybrid detect
13163
+ 1 => 'On (51-point)', #PH
13164
+ 2 => 'On (11-point)', #PH
13165
+ 3 => 'On (39-point)', #29 (D7000)
13166
+ 7 => 'On (153-point)', #PH (D5/D500/D850)
13167
+ #8 => 'On (81-point)', #38 will not see this value - only available in hybrid detect
13168
+ 9 => 'On (105-point)', #28 (D6)
13169
+ },
13170
+ },
13171
+ ContrastDetectAF => {
13172
+ Require => {
13173
+ 0 => 'Nikon:FocusMode',
13174
+ 1 => 'Nikon:AFDetectionMethod',
13575
13175
  },
13576
- ValueConv => '($val[0] or $val[1]) ? 1 : 0',
13176
+ ValueConv => '(($val[0] !~ /^Manual/i) and ($val[1] == 1)) ? 1 : 0',
13577
13177
  PrintConv => \%offOn,
13578
13178
  },
13579
13179
  );
@@ -13611,7 +13211,7 @@ sub ProcessNikonAVI($$$)
13611
13211
  #------------------------------------------------------------------------------
13612
13212
  # Print conversion for Nikon AF points
13613
13213
  # Inputs: 0) value to convert (as a string of hex bytes),
13614
- # 1) lookup for AF point bit number (starting at 1)
13214
+ # 1) lookup for AF point bit number (starting at 1), or array ref
13615
13215
  sub PrintAFPoints($$)
13616
13216
  {
13617
13217
  my ($val, $afPoints) = @_;
@@ -13623,7 +13223,7 @@ sub PrintAFPoints($$)
13623
13223
  next unless $dat[$i];
13624
13224
  for ($j=0; $j<8; ++$j) {
13625
13225
  next unless $dat[$i] & (1 << $j);
13626
- my $point = $$afPoints{$i*8 + $j + 1};
13226
+ my $point = ref $afPoints eq 'HASH' ? $$afPoints{$i*8+$j+1} : $$afPoints[$i*8+$j];
13627
13227
  push @points, $point if defined $point;
13628
13228
  }
13629
13229
  }
@@ -13638,17 +13238,21 @@ sub PrintAFPoints($$)
13638
13238
 
13639
13239
  #------------------------------------------------------------------------------
13640
13240
  # Inverse print conversion for AF points
13641
- # Inputs: 0) AF point string, 1) AF point lookup
13241
+ # Inputs: 0) AF point string, 1) AF point hash or array ref
13642
13242
  # Returns: AF point data as a string of hex bytes
13643
13243
  sub PrintAFPointsInv($$)
13644
13244
  {
13645
13245
  my ($val, $afPoints) = @_;
13646
13246
  my @points = ($val =~ /[A-Za-z]\d+/g);
13647
- my $size = int((scalar(keys %$afPoints) + 7) / 8);
13247
+ my $size = int((scalar(ref $afPoints eq 'HASH' ? keys %$afPoints : @$afPoints) + 7) / 8);
13648
13248
  my @dat = (0) x $size;
13649
13249
  if (@points) {
13650
13250
  my (%bitNum, $point);
13651
- $bitNum{$$afPoints{$_}} = $_ foreach keys %$afPoints; # build reverse lookup
13251
+ if (ref $afPoints eq 'HASH') {
13252
+ $bitNum{$$afPoints{$_}} = $_ foreach keys %$afPoints; # build reverse lookup
13253
+ } else {
13254
+ $bitNum{$$afPoints[$_]} = $_ + 1 foreach 0..$#$afPoints;
13255
+ }
13652
13256
  foreach $point (@points) {
13653
13257
  my $bitNum = $bitNum{uc $point} or next;
13654
13258
  my $byte = int(($bitNum - 1) / 8);
@@ -13724,7 +13328,7 @@ sub PrintAFPointsGridInv($$$)
13724
13328
  sub PrintAFPointsLeftRight($$)
13725
13329
  {
13726
13330
  my ($col, $ncol) = @_;
13727
- my $center = 1 + ($ncol + 1)/2;
13331
+ my $center = ($ncol + 1) / 2;
13728
13332
  return 'n/a' if $col == 0; #out of focus
13729
13333
  return 'C' if $col == $center;
13730
13334
  return sprintf('%d', $center - $col) . 'L of Center' if $col < $center;
@@ -13738,7 +13342,7 @@ sub PrintAFPointsLeftRight($$)
13738
13342
  sub PrintAFPointsUpDown($$)
13739
13343
  {
13740
13344
  my ($row, $nrow) = @_;
13741
- my $center = 1 + ($nrow + 1)/2;
13345
+ my $center = ($nrow + 1) / 2;
13742
13346
  return 'n/a' if $row == 0; #out of focus
13743
13347
  return 'C' if $row == $center;
13744
13348
  return sprintf('%d', $center - $row) . 'U from Center' if $row < $center;