exiftool-vendored.exe 13.17.0 → 13.26.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 (49) hide show
  1. package/bin/README.txt +14 -14
  2. package/bin/exiftool.exe +0 -0
  3. package/bin/exiftool_files/exiftool.pl +117 -46
  4. package/bin/exiftool_files/lib/Image/ExifTool/Apple.pm +12 -2
  5. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +2 -2
  6. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +3 -2
  7. package/bin/exiftool_files/lib/Image/ExifTool/CanonRaw.pm +1 -1
  8. package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +190 -29
  9. package/bin/exiftool_files/lib/Image/ExifTool/DarwinCore.pm +22 -11
  10. package/bin/exiftool_files/lib/Image/ExifTool/EXE.pm +2 -9
  11. package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +1 -1
  12. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +3 -3
  13. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat +0 -0
  14. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +86 -48
  15. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +1 -0
  16. package/bin/exiftool_files/lib/Image/ExifTool/ICO.pm +2 -2
  17. package/bin/exiftool_files/lib/Image/ExifTool/JPEG.pm +5 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +5 -1
  19. package/bin/exiftool_files/lib/Image/ExifTool/Kodak.pm +3 -2
  20. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +944 -1237
  21. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +3 -1
  22. package/bin/exiftool_files/lib/Image/ExifTool/PCAP.pm +462 -0
  23. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +10 -1
  24. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +92 -29
  25. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +7 -1
  26. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +2 -1
  27. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +2 -2
  28. package/bin/exiftool_files/lib/Image/ExifTool/Plot.pm +713 -0
  29. package/bin/exiftool_files/lib/Image/ExifTool/Protobuf.pm +24 -11
  30. package/bin/exiftool_files/lib/Image/ExifTool/Qualcomm.pm +78 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +371 -324
  32. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +75 -27
  33. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +15 -6
  34. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +33 -14
  35. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +5067 -4967
  36. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +457 -336
  37. package/bin/exiftool_files/lib/Image/ExifTool/Trailer.pm +3 -3
  38. package/bin/exiftool_files/lib/Image/ExifTool/Validate.pm +4 -4
  39. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  40. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +9 -4
  41. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -1
  42. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +58 -5
  43. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +14 -13
  44. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +55 -20
  45. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +7 -1
  46. package/bin/exiftool_files/lib/Image/ExifTool.pm +63 -29
  47. package/bin/exiftool_files/lib/Image/ExifTool.pod +84 -86
  48. package/bin/exiftool_files/windows_exiftool.txt +96 -72
  49. package/package.json +4 -4
@@ -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.42';
68
+ $VERSION = '4.46';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -552,6 +552,7 @@ sub GetAFPointGrid($$;$);
552
552
  '21 56 8E 8E 24 24 14 00' => 'Tamron SP AF 300mm f/2.8 LD-IF (60E)',
553
553
  '27 54 8E 8E 24 24 1D 02' => 'Tamron SP AF 300mm f/2.8 LD-IF (360E)',
554
554
  'E1 40 19 36 2C 35 DF 4E' => 'Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023)',
555
+ 'E1 40 19 36 2C 35 DF 0E' => 'Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023)', #30
555
556
  'F6 3F 18 37 2C 34 84 06' => 'Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)',
556
557
  'F6 3F 18 37 2C 34 DF 06' => 'Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)', #30
557
558
  '00 36 1C 2D 34 3C 00 06' => 'Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF) (A13)',
@@ -840,6 +841,73 @@ my %activeDLightingZ7 = (
840
841
  5 => 'Extra High',
841
842
  );
842
843
 
844
+ my %aFAreaModeCD = ( #contrast detect modes
845
+ 0 => 'Contrast-detect', # (D3)
846
+ 1 => 'Contrast-detect (normal area)', # (D90/D5000)
847
+ # (D90 and D5000 give value of 2 when set to 'Face Priority' and
848
+ # 'Subject Tracking', but I didn't have a face to shoot at or a
849
+ # moving subject to track so perhaps this value changes dynamically)
850
+ 2 => 'Contrast-detect (wide area)', # (D90/D5000)
851
+ 3 => 'Contrast-detect (face priority)', # (ViewNX)
852
+ 4 => 'Contrast-detect (subject tracking)', # (ViewNX)
853
+ 128 => 'Single', #PH (1V3)
854
+ 129 => 'Auto (41 points)', #PH (NC)
855
+ 130 => 'Subject Tracking (41 points)', #PH (NC)
856
+ 131 => 'Face Priority (41 points)', #PH (NC)
857
+ 192 => 'Pinpoint', #PH (Z7)
858
+ 193 => 'Single', #PH (Z7)
859
+ 194 => 'Dynamic', #PH (Z7)
860
+ 195 => 'Wide (S)', #PH (Z7)
861
+ 196 => 'Wide (L)', #PH (Z7)
862
+ 197 => 'Auto', #PH (Z7)
863
+ 198 => 'Auto (People)', #28 (Z7) #if no faces are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
864
+ 199 => 'Auto (Animal)', #28 (Z7) #if no animals are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
865
+ 200 => 'Normal-area AF', #28 (D6)
866
+ 201 => 'Wide-area AF', #28 (D6)
867
+ 202 => 'Face-priority AF', #28 (D6)
868
+ 203 => 'Subject-tracking AF', #28 (D6)
869
+ 204 => 'Dynamic Area (S)', #28 (Z9)
870
+ 205 => 'Dynamic Area (M)', #28 (Z9)
871
+ 206 => 'Dynamic Area (L)', #28 (Z9)
872
+ 207 => '3D-tracking', #28 (Z9)
873
+ 208 => 'Wide-Area (C1/C2)', #28 (Z8, Z9)
874
+ );
875
+
876
+ my %aFAreaModePD = ( #phase detect modes
877
+ 0 => 'Single Area', # (called "Single Point" in manual - PH)
878
+ 1 => 'Dynamic Area', #PH
879
+ 2 => 'Dynamic Area (closest subject)', #PH
880
+ 3 => 'Group Dynamic', #PH
881
+ 4 => 'Dynamic Area (9 points)', #JD/28
882
+ 5 => 'Dynamic Area (21 points)', #28
883
+ 6 => 'Dynamic Area (51 points)', #28
884
+ 7 => 'Dynamic Area (51 points, 3D-tracking)', #PH/28
885
+ 8 => 'Auto-area',
886
+ 9 => 'Dynamic Area (3D-tracking)', #PH (D5000 "3D-tracking (11 points)")
887
+ 10 => 'Single Area (wide)', #PH
888
+ 11 => 'Dynamic Area (wide)', #PH
889
+ 12 => 'Dynamic Area (wide, 3D-tracking)', #PH
890
+ 13 => 'Group Area', #PH
891
+ 14 => 'Dynamic Area (25 points)', #PH
892
+ 15 => 'Dynamic Area (72 points)', #PH
893
+ 16 => 'Group Area (HL)', #28
894
+ 17 => 'Group Area (VL)', #28
895
+ 18 => 'Dynamic Area (49 points)', #28
896
+ 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
897
+ 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
898
+ 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
899
+ 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
900
+ # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
901
+ # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
902
+ 192 => 'Pinpoint', #PH (NC)
903
+ 193 => 'Single', #PH (NC)
904
+ 194 => 'Dynamic', #28 (Z7)
905
+ 195 => 'Wide (S)', #PH (NC)
906
+ 196 => 'Wide (L)', #PH (NC)
907
+ 197 => 'Auto', #PH (NC)
908
+ 199 => 'Auto', #28 (Z7) Z7 has also been observed to record 197 for Auto-area (same camera, different firmware versions, early production model)
909
+ );
910
+
843
911
  my %aFAreaModeZ9 = (
844
912
  0 => 'Pinpoint',
845
913
  1 => 'Single',
@@ -853,6 +921,13 @@ my %aFAreaModeZ9 = (
853
921
  13 => 'Wide (C2)',
854
922
  );
855
923
 
924
+ my %aFDetectionMethod = (
925
+ 0 => 'Phase Detect', #thru viewfinder
926
+ 1 => 'Contrast Detect', #LiveView
927
+ 2 => 'Hybrid', #Z-series and D780
928
+ );
929
+
930
+
856
931
  my %banksZ9 = (
857
932
  0 => 'A',
858
933
  1 => 'B',
@@ -1021,38 +1096,31 @@ my %iSOAutoHiLimitZ6III = ( #28
1021
1096
  35 => 'ISO Hi 1.7',
1022
1097
  );
1023
1098
 
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',
1099
+ my %isoAutoHiLimitZ7 = (
1100
+ Format => 'int16u',
1101
+ Unknown => 1,
1102
+ ValueConv => '($val-104)/8',
1103
+ ValueConvInv => '8 * ($val + 104)',
1104
+ SeparateTable => 'ISOAutoHiLimitZ7',
1105
+ PrintConv => {
1106
+ 0 => 'ISO 64', 17 => 'ISO 3200',
1107
+ 1 => 'ISO 80', 18 => 'ISO 4000',
1108
+ 2 => 'ISO 100', 19 => 'ISO 5000',
1109
+ 3 => 'ISO 125', 20 => 'ISO 6400',
1110
+ 4 => 'ISO 160', 21 => 'ISO 8000',
1111
+ 5 => 'ISO 200', 22 => 'ISO 10000',
1112
+ 6 => 'ISO 250', 23 => 'ISO 12800',
1113
+ 7 => 'ISO 320', 24 => 'ISO 16000',
1114
+ 8 => 'ISO 400', 25 => 'ISO 20000',
1115
+ 9 => 'ISO 500', 26 => 'ISO 25600',
1116
+ 10 => 'ISO 640', 27 => 'ISO Hi 0.3',
1117
+ 11 => 'ISO 800', 28 => 'ISO Hi 0.7',
1118
+ 12 => 'ISO 1000', 29 => 'ISO Hi 1.0',
1119
+ 13 => 'ISO 1250', 32 => 'ISO Hi 2.0',
1120
+ 14 => 'ISO 1600',
1121
+ 15 => 'ISO 2000',
1122
+ 16 => 'ISO 2500',
1123
+ },
1056
1124
  );
1057
1125
 
1058
1126
  my %iSOAutoShutterTimeZ9 = (
@@ -1203,29 +1271,23 @@ my %multipleExposureModeZ9 = (
1203
1271
  );
1204
1272
 
1205
1273
  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
1274
+ Format => 'int16u',
1275
+ Unknown => 1,
1276
+ SeparateTable => 'NonCPULensApertureZ8',
1277
+ PrintConv => {
1278
+ 12 => 'f/1.2', 128 => 'f/6.3',
1279
+ 24 => 'f/1.4', 136 => 'f/7.1',
1280
+ 40 => 'f/1.8', 144 => 'f/8',
1281
+ 48 => 'f/2.0', 156 => 'f/9.5',
1282
+ 64 => 'f/2.5', 168 => 'f/11',
1283
+ 72 => 'f/2.8', 180 => 'f/13',
1284
+ 84 => 'f/3.3', 188 => 'f/15',
1285
+ 88 => 'f/3.5', 192 => 'f/16',
1286
+ 96 => 'f/4.0', 204 => 'f/19',
1287
+ 104 => 'f/4.5', 216 => 'f/22',
1288
+ 112 => 'f/5.0', 313 => 'N/A', #camera menu shows "--" indicating value has not been set for the lens,
1289
+ 120 => 'f/5.6',
1290
+ },
1229
1291
  );
1230
1292
 
1231
1293
  my %offLowNormalHighZ7 = (
@@ -1273,7 +1335,7 @@ my %secondarySlotFunctionZ9 = (
1273
1335
  3 => 'JPG Primary + JPG Secondary',
1274
1336
  );
1275
1337
 
1276
- my %subjectDetectionAreaMZ6III = ( #28
1338
+ my %subjectDetectionAreaMZ6III = ( #28
1277
1339
  0 => 'Off',
1278
1340
  1 => 'All',
1279
1341
  2 => 'Wide (L)',
@@ -1370,6 +1432,25 @@ my %retouchValues = ( #PH
1370
1432
  54 => 'Low Key', # (S3500)
1371
1433
  );
1372
1434
 
1435
+ # AF points for AFInfo models with 11 focus points
1436
+ my %afPoints11 = (
1437
+ 0 => '(none)',
1438
+ 0x7ff => 'All 11 Points',
1439
+ BITMASK => {
1440
+ 0 => 'Center',
1441
+ 1 => 'Top',
1442
+ 2 => 'Bottom',
1443
+ 3 => 'Mid-left',
1444
+ 4 => 'Mid-right',
1445
+ 5 => 'Upper-left',
1446
+ 6 => 'Upper-right',
1447
+ 7 => 'Lower-left',
1448
+ 8 => 'Lower-right',
1449
+ 9 => 'Far Left',
1450
+ 10 => 'Far Right',
1451
+ },
1452
+ );
1453
+
1373
1454
  # AF point indices for models with 51 focus points, eg. D3 (ref JD/PH)
1374
1455
  # A1 A2 A3 A4 A5 A6 A7 A8 A9
1375
1456
  # B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11
@@ -1511,7 +1592,7 @@ my %afPoints153 = (
1511
1592
  31 => 'B8', 62 => 'H13', 93 => 'C17', 124 => 'G4',
1512
1593
  );
1513
1594
 
1514
- # AF point indices for models with 81 focus points, eg. Z6/Z7/Z50 (ref 38)
1595
+ # AF point indices for models with 81 Auto-area focus points, eg. Z6/Z7/Z50 (ref 38)
1515
1596
  # - 9 rows (A-I) with 9 columns (1-9), center is E5
1516
1597
  #
1517
1598
  # 7 6 5 4 3 2 1 0
@@ -3006,15 +3087,31 @@ my %base64coord = (
3006
3087
  PrintConvInv => '$self->InverseDateTime($val,0)',
3007
3088
  },
3008
3089
  0x00b7 => [{
3090
+ Name => 'AFInfo2',
3091
+ # LiveView-enabled DSLRs introduced starting in 2007 (D3/D300)
3092
+ Condition => '$$valPt =~ /^0100/',
3093
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0100' },
3094
+ },{
3095
+ Name => 'AFInfo2',
3096
+ # All Expeed 5 processor and most Expeed 4 processor models from 2016 - D5, D500, D850, D3400, D3500, D7500 (D5600 is v0100)
3097
+ Condition => '$$valPt =~ /^0101/',
3098
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0101' },
3099
+ },{
3100
+ Name => 'AFInfo2',
3101
+ # Nikon 1 Series cameras
3102
+ Condition => '$$valPt =~ /^020[01]/',
3103
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0200' },
3104
+ },{
3105
+ Name => 'AFInfo2',
3106
+ # Expeed 6 processor models - D6, D780, Z5, Z6, Z7, Z30, Z50, Z6_2, Z7_2 and Zfc
3107
+ Condition => '$$valPt =~ /^030[01]/',
3108
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0300' },
3109
+ },{
3009
3110
  Name => 'AFInfo2',
3010
3111
  # Expeed 7 processor models - Z8 & Z9 (AFInfo2Version 0400), Z6iii & Zf (AFInfo2Version 0401)
3011
3112
  # and Z50ii (AFInfo2Version 0402)
3012
3113
  Condition => '$$valPt =~ /^040[012]/',
3013
3114
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
3014
- },{ #JD
3015
- Name => 'AFInfo2',
3016
- # (this structure may be byte swapped when rewritten by CaptureNX)
3017
- SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
3018
3115
  }],
3019
3116
  0x00b8 => [{ #PH
3020
3117
  Name => 'FileInfo',
@@ -4027,147 +4124,59 @@ my %base64coord = (
4027
4124
  Name => 'AFPointsInFocus',
4028
4125
  Format => 'int16u',
4029
4126
  PrintConvColumns => 2,
4030
- PrintConv => {
4031
- 0 => '(none)',
4032
- 0x7ff => 'All 11 Points',
4033
- BITMASK => {
4034
- 0 => 'Center',
4035
- 1 => 'Top',
4036
- 2 => 'Bottom',
4037
- 3 => 'Mid-left',
4038
- 4 => 'Mid-right',
4039
- 5 => 'Upper-left',
4040
- 6 => 'Upper-right',
4041
- 7 => 'Lower-left',
4042
- 8 => 'Lower-right',
4043
- 9 => 'Far Left',
4044
- 10 => 'Far Right',
4045
- },
4046
- },
4127
+ PrintConv => \%afPoints11,
4047
4128
  },
4048
4129
  );
4049
4130
 
4050
- # Nikon AF information for D3 and D300 (ref JD)
4051
- %Image::ExifTool::Nikon::AFInfo2 = (
4131
+ %Image::ExifTool::Nikon::AFInfo2V0100 = (
4052
4132
  %binaryDataAttrs,
4053
4133
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4054
4134
  DATAMEMBER => [ 0, 4, 6 ],
4055
- NOTES => "These tags are written by Nikon DSLR's which have the live view feature.",
4135
+ NOTES => q{
4136
+ AF information for Nikon cameras with LiveView that were introduced 2007
4137
+ thru 2015 (and the D5600 in 2016), including D3, D4, D3000, D3100-D3300,
4138
+ D5000-D5600, D6x0, D700, D7000, D7100, D810
4139
+ },
4056
4140
  0 => {
4057
4141
  Name => 'AFInfo2Version',
4058
4142
  Format => 'undef[4]',
4059
4143
  Writable => 0,
4060
4144
  RawConv => '$$self{AFInfo2Version} = $val',
4061
4145
  },
4062
- 4 => { #PH
4063
- Name => 'ContrastDetectAF',
4064
- RawConv => '$$self{ContrastDetectAF} = $val',
4065
- PrintConv => {
4066
- %offOn,
4067
- 2 => 'On (2)', #PH (Z7)
4068
- },
4069
- Notes => 'this is Off for the hybrid AF used in Nikon 1 models',
4146
+ 4 => {
4147
+ Name => 'AFDetectionMethod', #specifies phase detect or contrast detect
4148
+ RawConv => '$$self{AFDetectionMethod} = $val',
4149
+ PrintConv => \%aFDetectionMethod ,
4070
4150
  },
4071
4151
  5 => [
4072
4152
  {
4073
4153
  Name => 'AFAreaMode',
4074
- Condition => 'not $$self{ContrastDetectAF}',
4075
- Notes => 'ContrastDetectAF Off',
4076
- PrintConv => {
4077
- 0 => 'Single Area', # (called "Single Point" in manual - PH)
4078
- 1 => 'Dynamic Area', #PH
4079
- 2 => 'Dynamic Area (closest subject)', #PH
4080
- 3 => 'Group Dynamic', #PH
4081
- 4 => 'Dynamic Area (9 points)', #JD/28
4082
- 5 => 'Dynamic Area (21 points)', #28
4083
- 6 => 'Dynamic Area (51 points)', #28
4084
- 7 => 'Dynamic Area (51 points, 3D-tracking)', #PH/28
4085
- 8 => 'Auto-area',
4086
- 9 => 'Dynamic Area (3D-tracking)', #PH (D5000 "3D-tracking (11 points)")
4087
- 10 => 'Single Area (wide)', #PH
4088
- 11 => 'Dynamic Area (wide)', #PH
4089
- 12 => 'Dynamic Area (wide, 3D-tracking)', #PH
4090
- 13 => 'Group Area', #PH
4091
- 14 => 'Dynamic Area (25 points)', #PH
4092
- 15 => 'Dynamic Area (72 points)', #PH
4093
- 16 => 'Group Area (HL)', #28
4094
- 17 => 'Group Area (VL)', #28
4095
- 18 => 'Dynamic Area (49 points)', #28
4096
- 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
4097
- 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
4098
- 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
4099
- 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
4100
- # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
4101
- # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
4102
- 192 => 'Pinpoint', #PH (NC)
4103
- 193 => 'Single', #PH (NC)
4104
- 195 => 'Wide (S)', #PH (NC)
4105
- 196 => 'Wide (L)', #PH (NC)
4106
- 197 => 'Auto', #PH (NC)
4107
- },
4154
+ Condition => '$$self{AFDetectionMethod} == 0',
4155
+ PrintConv => \%aFAreaModePD, #phase detect
4108
4156
  },
4109
- { #PH (D3/D90/D5000)
4157
+ {
4110
4158
  Name => 'AFAreaMode',
4111
- Notes => 'ContrastDetectAF On',
4112
- PrintConv => {
4113
- 0 => 'Contrast-detect', # (D3)
4114
- 1 => 'Contrast-detect (normal area)', # (D90/D5000)
4115
- # (D90 and D5000 give value of 2 when set to 'Face Priority' and
4116
- # 'Subject Tracking', but I didn't have a face to shoot at or a
4117
- # moving subject to track so perhaps this value changes dynamically)
4118
- 2 => 'Contrast-detect (wide area)', # (D90/D5000)
4119
- 3 => 'Contrast-detect (face priority)', # (ViewNX)
4120
- 4 => 'Contrast-detect (subject tracking)', # (ViewNX)
4121
- 128 => 'Single', #PH (1V3)
4122
- 129 => 'Auto (41 points)', #PH (NC)
4123
- 130 => 'Subject Tracking (41 points)', #PH (NC)
4124
- 131 => 'Face Priority (41 points)', #PH (NC)
4125
- 192 => 'Pinpoint', #PH (Z7)
4126
- 193 => 'Single', #PH (Z7)
4127
- 194 => 'Dynamic', #PH (Z7)
4128
- 195 => 'Wide (S)', #PH (Z7)
4129
- 196 => 'Wide (L)', #PH (Z7)
4130
- 197 => 'Auto', #PH (Z7)
4131
- 198 => 'Auto (People)', #28 (Z7) #if no faces are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
4132
- 199 => 'Auto (Animal)', #28 (Z7) #if no animals are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
4133
- 200 => 'Normal-area AF', #28 (D6)
4134
- 201 => 'Wide-area AF', #28 (D6)
4135
- 202 => 'Face-priority AF', #28 (D6)
4136
- 203 => 'Subject-tracking AF', #28 (D6)
4137
- 204 => 'Dynamic Area (S)', #28 (Z9)
4138
- 205 => 'Dynamic Area (M)', #28 (Z9)
4139
- 206 => 'Dynamic Area (L)', #28 (Z9)
4140
- 207 => '3D-tracking', #28 (Z9)
4141
- 208 => 'Wide-Area (C1/C2)', #28 (Z8, Z9)
4142
- },
4159
+ PrintConv => \%aFAreaModeCD, #contrast detect
4143
4160
  },
4144
4161
  ],
4145
4162
  6 => {
4146
- Name => 'PhaseDetectAF', #JD(AutoFocus), PH(PhaseDetectAF)
4147
- Notes => 'PrimaryAFPoint and AFPointsUsed below are only valid when this is On',
4148
- RawConv => '$$self{PhaseDetectAF} = $val',
4163
+ Name => 'FocusPointSchema',
4164
+ RawConv => '$$self{FocusPointSchema} = $val',
4165
+ Hidden => 1,
4149
4166
  PrintConv => {
4150
- # [observed AFAreaMode values in square brackets for each PhaseDetectAF value]
4151
- 0 => 'Off',
4152
- 1 => 'On (51-point)', #PH
4153
- 2 => 'On (11-point)', #PH
4154
- 3 => 'On (39-point)', #29 (D7000)
4155
- 4 => 'On (73-point)', #PH (1J1[128/129],1J2[128/129/135],1J3/1S1/1V2[128/129/131],1V1[129],AW1[129/131])
4156
- 5 => 'On (5)', #PH (1S2[128/129], 1J4/1V3[129])
4157
- 6 => 'On (105-point)', #PH (1J4/1V3[128/130])
4158
- 7 => 'On (153-point)', #PH (D5/D500/D850)
4159
- 8 => 'On (81-point)', #38
4160
- 9 => 'On (105-point)', #28 (D6)
4167
+ 0 => 'Off', # LiveView or manual focus or no focus
4168
+ 1 => '51-point', # (D3/D3S/D3X/D4/D4S/D300/D300S/D700/D750/D800/D800E/D810/D7100/D7200)
4169
+ 2 => '11-point', # (D90/D3000/D3100/D3200/D3300/D5000/D5100)
4170
+ 3 => '39-point', # (D600/D610/D5200/D5300/D5500/D5600/D7000/Df)
4161
4171
  },
4162
4172
  },
4163
4173
  7 => [
4164
4174
  { #PH/JD
4165
4175
  Name => 'PrimaryAFPoint',
4166
- # PrimaryAFPoint may only be valid for PhaseDetect - certainly true on the D6, possibly other bodies? (ref 28)
4167
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
4176
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4168
4177
  Notes => q{
4169
4178
  models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
4170
- D4, D4S, D300, D300S, D700, D800, D800e and D810
4179
+ D4, D4S, D300, D300S, D700, D750, D800, D800E, D810, D7100 and D7200
4171
4180
  },
4172
4181
  PrintConvColumns => 5,
4173
4182
  PrintConv => {
@@ -4175,11 +4184,10 @@ my %base64coord = (
4175
4184
  %afPoints51,
4176
4185
  1 => 'C6 (Center)', # (add " (Center)" to central point)
4177
4186
  },
4178
- },
4179
- { #10
4187
+ },{ #10
4180
4188
  Name => 'PrimaryAFPoint',
4181
- Notes => 'models with 11-point AF: D90, D3000, D3100, D5000 and D5100',
4182
- Condition => '$$self{PhaseDetectAF} == 2',
4189
+ Notes => 'models with 11-point AF: D90, D3000-D3300, D5000 and D5100',
4190
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4183
4191
  PrintConvColumns => 2,
4184
4192
  PrintConv => {
4185
4193
  0 => '(none)',
@@ -4195,11 +4203,10 @@ my %base64coord = (
4195
4203
  10 => 'Lower-right',
4196
4204
  11 => 'Far Right',
4197
4205
  },
4198
- },
4199
- { #29
4206
+ },{ #29
4200
4207
  Name => 'PrimaryAFPoint',
4201
- Condition => '$$self{PhaseDetectAF} == 3',
4202
- Notes => 'models with 39-point AF: D600 and D7000',
4208
+ Condition => '$$self{FocusPointSchema} == 3', #39 focus-point models
4209
+ Notes => 'models with 39-point AF: D600, D610, D5200-D5600, D7000 and Df',
4203
4210
  PrintConvColumns => 5,
4204
4211
  PrintConv => {
4205
4212
  0 => '(none)',
@@ -4207,83 +4214,16 @@ my %base64coord = (
4207
4214
  1 => 'C6 (Center)', # (add " (Center)" to central point)
4208
4215
  },
4209
4216
  },
4210
- { #PH
4211
- Name => 'PrimaryAFPoint',
4212
- Condition => '$$self{PhaseDetectAF} == 4',
4213
- Notes => 'Nikon 1 models with older 135-point AF and 73-point phase-detect AF',
4214
- PrintConvColumns => 5,
4215
- PrintConv => {
4216
- 0 => '(none)',
4217
- %afPoints135,
4218
- 1 => 'E8 (Center)', # (add " (Center)" to central point)
4219
- },
4220
- },
4221
- { #PH (NC)
4222
- Name => 'PrimaryAFPoint',
4223
- Condition => '$$self{PhaseDetectAF} == 5',
4224
- Notes => q{
4225
- Nikon 1 models with newer 135-point AF and 73-point phase-detect AF -- 9
4226
- rows (B-J) and 15 columns (1-15), inside a grid of 11 rows by 15 columns.
4227
- The points are numbered sequentially, with F8 at the center
4228
- },
4229
- PrintConv => {
4230
- 0 => '(none)',
4231
- 82 => 'F8 (Center)',
4232
- OTHER => sub {
4233
- my ($val, $inv) = @_;
4234
- return GetAFPointGrid($val, 15, $inv);
4235
- },
4236
- },
4237
- },
4238
- { #PH
4239
- Name => 'PrimaryAFPoint',
4240
- Condition => '$$self{PhaseDetectAF} == 6',
4241
- Notes => q{
4242
- Nikon 1 models with 171-point AF and 105-point phase-detect AF -- 9 rows
4243
- (B-J) and 19 columns (2-20), inside a grid of 11 rows by 21 columns. The
4244
- points are numbered sequentially, with F11 at the center
4245
- },
4246
- PrintConv => {
4247
- 0 => '(none)',
4248
- #22 => 'B2 (Top-left)',
4249
- #40 => 'B20 (Top-right)',
4250
- 115 => 'F11 (Center)',
4251
- #190 => 'J2 (Bottom-left)',
4252
- #208 => 'J20 (Bottom-right)',
4253
- OTHER => sub {
4254
- my ($val, $inv) = @_;
4255
- return GetAFPointGrid($val, 21, $inv);
4256
- },
4257
- },
4258
- },
4259
- { #PH
4260
- Name => 'PrimaryAFPoint',
4261
- Condition => '$$self{PhaseDetectAF} == 7 and $$self{AFInfo2Version} eq "0100"',
4262
- Notes => q{
4263
- Nikon models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17): D5,
4264
- D500 and D850
4265
- },
4266
- PrintConvColumns => 5,
4267
- PrintConv => {
4268
- 0 => '(none)',
4269
- %afPoints153,
4270
- 1 => 'E9 (Center)',
4271
- },
4272
- },
4273
4217
  {
4274
4218
  Name => 'PrimaryAFPoint',
4275
- Condition => '$$self{AFInfo2Version} eq "0100"',
4276
- Notes => 'future models?...',
4277
- PrintConv => {
4278
- 0 => '(none)',
4279
- 1 => 'Center',
4280
- },
4219
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4220
+ PrintConv => { 0 => '(none)', },
4281
4221
  },
4282
4222
  ],
4283
4223
  8 => [
4284
4224
  { #JD/PH
4285
4225
  Name => 'AFPointsUsed',
4286
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
4226
+ Condition => '$$self{FocusPointSchema} == 1', # 51 focus-point models
4287
4227
  Notes => q{
4288
4228
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4289
4229
  point is C6
@@ -4291,12 +4231,12 @@ my %base64coord = (
4291
4231
  Format => 'undef[7]',
4292
4232
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
4293
4233
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4294
- PrintConv => sub { PrintAFPoints(shift, \%afPoints51); },
4295
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51); },
4234
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4235
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4296
4236
  },
4297
4237
  { #10
4298
4238
  Name => 'AFPointsUsed',
4299
- Condition => '$$self{PhaseDetectAF} == 2',
4239
+ Condition => '$$self{FocusPointSchema} == 2', # 11 focus-point models
4300
4240
  Notes => 'models with 11-point AF',
4301
4241
  # read as int16u in little-endian byte order
4302
4242
  Format => 'undef[2]',
@@ -4323,7 +4263,7 @@ my %base64coord = (
4323
4263
  },
4324
4264
  { #29/PH
4325
4265
  Name => 'AFPointsUsed',
4326
- Condition => '$$self{PhaseDetectAF} == 3',
4266
+ Condition => '$$self{FocusPointSchema} == 3', # 39 focus-point models
4327
4267
  Notes => q{
4328
4268
  models with 39-point AF -- 5 rows: A1-3, B1-11, C1-11, D1-11, E1-3. Center
4329
4269
  point is C6
@@ -4331,298 +4271,246 @@ my %base64coord = (
4331
4271
  Format => 'undef[5]',
4332
4272
  ValueConv => 'join(" ", unpack("H2"x5, $val))',
4333
4273
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4334
- PrintConv => sub { PrintAFPoints(shift, \%afPoints39); },
4335
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints39); },
4336
- },
4337
- { #PH (1AW1,1J1,1J2,1J3,1S1,1V1,1V2)
4338
- Name => 'AFPointsUsed',
4339
- Condition => '$$self{PhaseDetectAF} == 4',
4340
- Notes => q{
4341
- older models with 135-point AF -- 9 rows (A-I) and 15 columns (1-15).
4342
- Center point is E8. The odd-numbered columns, columns 2 and 14, and the
4343
- remaining corner points are not used for 41-point AF mode
4344
- },
4345
- Format => 'undef[17]',
4346
- ValueConv => 'join(" ", unpack("H2"x17, $val))',
4347
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4348
- PrintConv => sub { PrintAFPoints(shift, \%afPoints135); },
4349
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints135); },
4350
- },
4351
- { #PH (1S2)
4352
- Name => 'AFPointsUsed',
4353
- Condition => '$$self{PhaseDetectAF} == 5',
4354
- Notes => q{
4355
- newer models with 135-point AF -- 9 rows (B-J) and 15 columns (1-15). Center
4356
- point is F8
4357
- },
4358
- Format => 'undef[21]',
4359
- ValueConv => 'join(" ", unpack("H2"x21, $val))',
4360
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4361
- PrintConv => sub { PrintAFPointsGrid(shift, 15); },
4362
- PrintConvInv => sub { PrintAFPointsGridInv(shift, 15, 21); },
4363
- },
4364
- { #PH (1J4,1V3)
4365
- Name => 'AFPointsUsed',
4366
- Condition => '$$self{PhaseDetectAF} == 6',
4367
- Notes => q{
4368
- models with 171-point AF -- 9 rows (B-J) and 19 columns (2-20). Center
4369
- point is F10
4370
- },
4371
- Format => 'undef[29]',
4372
- ValueConv => 'join(" ", unpack("H2"x29, $val))',
4373
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4374
- PrintConv => sub { PrintAFPointsGrid(shift, 21); },
4375
- PrintConvInv => sub { PrintAFPointsGridInv(shift, 21, 29); },
4376
- },
4377
- { #PH (D5,D500)
4378
- Name => 'AFPointsUsed',
4379
- Condition => '$$self{PhaseDetectAF} == 7',
4380
- Notes => q{
4381
- models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17). Center
4382
- point is E9
4383
- },
4384
- Format => 'undef[20]',
4385
- ValueConv => 'join(" ", unpack("H2"x20, $val))',
4386
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4387
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4388
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4274
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints39) },
4275
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints39) },
4389
4276
  },
4390
- { #PH
4277
+ {
4391
4278
  Name => 'AFPointsUsed',
4392
- # version 301 uses a separate field at offset 0x0a for this tag (ref 28)
4393
- Condition => '$$self{AFInfo2Version} !~ /^03/',
4394
- Format => 'undef[7]',
4395
- ValueConv => 'join(" ", unpack("H2"x7, $val))',
4396
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4397
- PrintConv => '"Unknown ($val)"',
4398
- PrintConvInv => '$val=~s/Unknown \\((.*)\\)/$1/; $val',
4399
- },
4400
- { #PH
4401
- Name => 'PrimaryAFPoint',
4402
- Condition => '$$self{PhaseDetectAF} == 1 and $$self{AFInfo2Version} =~ /^03/',
4403
- Notes => 'newer models with 51-point AF',
4404
- PrintConvColumns => 5,
4405
- PrintConv => {
4406
- 0 => '(none)',
4407
- %afPoints51,
4408
- 1 => 'C6 (Center)', # (add " (Center)" to central point)
4409
- },
4410
- },
4411
- { #PH (Z7)
4412
- Name => 'PrimaryAFPoint',
4413
- Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
4414
- PrintConvColumns => 5,
4415
- PrintConv => {
4416
- 0 => '(none)',
4417
- %afPoints81,
4418
- 1 => 'E5 (Center)', # (add " (Center)" to central point)
4419
- },
4279
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4280
+ PrintConv => { 0 => '(none)', },
4420
4281
  },
4421
- # this was wrong, but keep the code as a comment in case it may be useful later
4422
- #{ #PH (Z7) (NC)
4423
- # Name => 'PrimaryAFPoint',
4424
- # Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
4425
- # Notes => q{
4426
- # Nikon models with 493-point AF -- 17 rows (A-Q) and 29 columns (1-29), I15
4427
- # at the center
4428
- # },
4429
- # PrintConv => {
4430
- # 0 => '(none)',
4431
- # 246 => 'I15 (Center)',
4432
- # OTHER => sub {
4433
- # my ($val, $inv) = @_;
4434
- # return GetAFPointGrid($val, 29, $inv);
4435
- # },
4436
- # },
4437
- #},
4438
4282
  ],
4439
- 0x0a => [{ #PH (D780)
4440
- Name => 'AFPointsUsed',
4441
- Condition => '$$self{PhaseDetectAF} == 1 and $$self{AFInfo2Version} =~ /^03/',
4442
- Notes => 'newer models with 51-point AF',
4443
- Format => 'undef[7]',
4444
- ValueConv => 'join(" ", unpack("H2"x7, $val))',
4445
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4446
- PrintConv => sub { PrintAFPoints(shift, \%afPoints51); },
4447
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51); },
4448
- },{ #38 (Z6/Z7/Z50)
4449
- Name => 'AFPointsUsed',
4450
- Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
4451
- Notes => q{
4452
- models with 81-selectable point AF -- 9 rows (A-I) and 9 columns (1-9) for
4453
- phase detect AF points. Center point is E5
4454
- },
4455
- Format => 'undef[11]',
4456
- ValueConv => 'join(" ", unpack("H2"x11, $val))',
4457
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4458
- PrintConv => sub { PrintAFPoints(shift, \%afPoints81); },
4459
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81); },
4460
- },{ #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
4461
- Name => 'AFPointsUsed',
4462
- Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
4463
- Notes => q{
4464
- models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15). Center
4465
- point is D8
4466
- },
4467
- Format => 'undef[14]',
4468
- ValueConv => 'join(" ", unpack("H2"x14, $val))',
4469
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4470
- PrintConv => sub { PrintAFPoints(shift, \%afPoints105); },
4471
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105); },
4472
- }],
4473
4283
  0x10 => { #PH (D90 and D5000)
4474
4284
  Name => 'AFImageWidth',
4475
- Condition => '$$self{AFInfo2Version} eq "0100"',
4285
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4476
4286
  Format => 'int16u',
4477
4287
  RawConv => '$val ? $val : undef',
4478
4288
  Notes => 'this and the following tags are valid only for contrast-detect AF',
4479
4289
  },
4480
4290
  0x12 => { #PH
4481
4291
  Name => 'AFImageHeight',
4482
- Condition => '$$self{AFInfo2Version} eq "0100"',
4292
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4483
4293
  Format => 'int16u',
4484
4294
  RawConv => '$val ? $val : undef',
4485
4295
  },
4486
4296
  0x14 => { #PH
4487
4297
  Name => 'AFAreaXPosition',
4488
- Condition => '$$self{AFInfo2Version} eq "0100"',
4298
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4489
4299
  Notes => 'center of AF area in AFImage coordinates',
4490
4300
  Format => 'int16u',
4491
4301
  RawConv => '$val ? $val : undef',
4492
4302
  },
4493
4303
  0x16 => { #PH
4494
4304
  Name => 'AFAreaYPosition',
4495
- Condition => '$$self{AFInfo2Version} eq "0100"',
4305
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4496
4306
  Format => 'int16u',
4497
4307
  RawConv => '$val ? $val : undef',
4498
4308
  },
4499
- # AFAreaWidth/Height for the D90 and D5000:
4500
- # 352x288 (AF normal area),
4501
- # 704x576 (AF face priority, wide area, subject tracking)
4502
4309
  0x18 => { #PH
4503
4310
  Name => 'AFAreaWidth',
4504
- Condition => '$$self{AFInfo2Version} eq "0100"',
4311
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4505
4312
  Format => 'int16u',
4506
4313
  Notes => 'size of AF area in AFImage coordinates',
4507
4314
  RawConv => '$val ? $val : undef',
4508
4315
  },
4509
4316
  0x1a => { #PH
4510
4317
  Name => 'AFAreaHeight',
4511
- Condition => '$$self{AFInfo2Version} eq "0100"',
4318
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4512
4319
  Format => 'int16u',
4513
4320
  RawConv => '$val ? $val : undef',
4514
4321
  },
4515
4322
  0x1c => [
4516
4323
  { #PH
4517
4324
  Name => 'ContrastDetectAFInFocus',
4518
- Condition => '$$self{AFInfo2Version} eq "0100"',
4325
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4519
4326
  PrintConv => { 0 => 'No', 1 => 'Yes' },
4520
4327
  },{ #PH (D500, see forum11190)
4521
4328
  Name => 'AFPointsSelected',
4522
- Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
4329
+ Condition => '$$self{FocusPointSchema} == 7',
4523
4330
  Format => 'undef[20]',
4524
4331
  ValueConv => 'join(" ", unpack("H2"x20, $val))',
4525
4332
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4526
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4527
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4528
- },
4333
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4334
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4335
+ },
4336
+ # (#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]
4337
+ #{ #PH (D3400) (NC "selected")
4338
+ # Name => 'AFPointsSelected',
4339
+ # Condition => '$$self{FocusPointSchema} == 2',
4340
+ # Format => 'int16u',
4341
+ # PrintConv => \%afPoints11,
4342
+ #},
4529
4343
  ],
4530
- # 0x1d - always zero (with or without live view)
4531
- 0x2a => { #PH (Z7)
4532
- Name => 'AFImageWidth',
4533
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4534
- Format => 'int16u',
4535
- RawConv => '$val ? $val : undef',
4344
+ );
4345
+
4346
+ %Image::ExifTool::Nikon::AFInfo2V0101 = (
4347
+ %binaryDataAttrs,
4348
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4349
+ DATAMEMBER => [ 0, 4, 5, 6 ],
4350
+ NOTES => q{
4351
+ AF information for Nikon cameras D5, D500, D850, D3400, D3500 and D7500
4536
4352
  },
4537
- 0x2c => { #PH (Z7)
4538
- Name => 'AFImageHeight',
4539
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4540
- Format => 'int16u',
4541
- RawConv => '$val ? $val : undef',
4353
+ 0 => {
4354
+ Name => 'AFInfo2Version',
4355
+ Format => 'undef[4]',
4356
+ Writable => 0,
4357
+ RawConv => '$$self{AFInfo2Version} = $val',
4542
4358
  },
4543
- 0x2e => { #PH (Z7)
4544
- Name => 'AFAreaXPosition',
4545
- Condition => q{
4546
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4547
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4548
- },
4549
- Format => 'int16u', # (decodes same byte as 0x2f)
4359
+ 4 => {
4360
+ Name => 'AFDetectionMethod',
4361
+ RawConv => '$$self{AFDetectionMethod} = $val',
4362
+ PrintConv => \%aFDetectionMethod,
4550
4363
  },
4551
- 0x2f => { #28 (Z7) Still photography range 1-17 for the 493 point Z7 (arranged in a 29x17 grid. Center at x=16, y=10).
4552
- Name => 'FocusPositionHorizontal',
4553
- Condition => q{
4554
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4555
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4364
+ 5 => [
4365
+ {
4366
+ Name => 'AFAreaMode',
4367
+ Condition => '$$self{AFDetectionMethod} == 0',
4368
+ RawConv => '$$self{AFAreaMode} = $val',
4369
+ PrintConv => \%aFAreaModePD, #phase detect
4556
4370
  },
4557
- PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ); },
4558
- },
4559
- 0x30 => [
4560
- { #PH (Z7)
4561
- Name => 'AFAreaYPosition',
4562
- Condition => q{
4563
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4564
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4565
- },
4566
- Format => 'int16u', # (decodes same byte as 0x31)
4567
- },{ #PH (D500, see forum11190)
4568
- Name => 'AFPointsInFocus',
4569
- Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
4570
- Notes => 'AF points in focus at the time time image was captured',
4571
- Format => 'undef[20]',
4572
- ValueConv => 'join(" ", unpack("H2"x20, $val))',
4573
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4574
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4575
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4371
+ {
4372
+ Name => 'AFAreaMode',
4373
+ RawConv => '$$self{AFAreaMode} = $val',
4374
+ PrintConv => \%aFAreaModeCD, #contrast detect
4576
4375
  },
4577
4376
  ],
4578
- 0x31 => { #28 (Z7)
4579
- Name => 'FocusPositionVertical',
4580
- Condition => q{
4581
- $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
4582
- $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
4583
- },
4584
- PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ); },
4585
- },
4586
- 0x32 => { #PH (Z7)
4587
- Name => 'AFAreaWidth',
4588
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4589
- Format => 'int16u',
4590
- RawConv => '$val ? $val : undef',
4591
- },
4592
- 0x34 => { #PH (Z7)
4593
- Name => 'AFAreaHeight',
4594
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4595
- Format => 'int16u',
4596
- RawConv => '$val ? $val : undef',
4597
- },
4598
- 0x38 => { #28
4599
- Name => 'PrimaryAFPoint',
4600
- Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
4601
- Notes => q{
4602
- Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
4603
- },
4604
- PrintConvColumns => 5,
4377
+ 6 => {
4378
+ Name => 'FocusPointSchema',
4379
+ RawConv => '$$self{FocusPointSchema} = $val',
4380
+ Hidden => 1,
4605
4381
  PrintConv => {
4606
- 0 => '(none)',
4607
- %afPoints105,
4608
- 1 => 'D8 (Center)',
4382
+ 0 => 'Off', # LiveView or manual focus or no focus
4383
+ 1 => '51-point', # (D7500)
4384
+ 2 => '11-point', # (D3400/D3500)
4385
+ 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)
4609
4386
  },
4610
4387
  },
4611
- 0x44 => [
4612
- {
4388
+ 8 => [
4389
+ { #JD/PH
4390
+ Name => 'AFPointsUsed',
4391
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4392
+ Notes => q{
4393
+ models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4394
+ point is C6
4395
+ },
4396
+ Format => 'undef[7]',
4397
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4398
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4399
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4400
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4401
+ },{ #10
4402
+ Name => 'AFPointsUsed',
4403
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4404
+ Notes => 'models with 11-point AF',
4405
+ # read as int16u in little-endian byte order
4406
+ Format => 'undef[2]',
4407
+ ValueConv => 'unpack("v",$val)',
4408
+ ValueConvInv => 'pack("v",$val)',
4409
+ PrintConvColumns => 2,
4410
+ PrintConv => {
4411
+ 0 => '(none)',
4412
+ 0x7ff => 'All 11 Points',
4413
+ BITMASK => {
4414
+ 0 => 'Center',
4415
+ 1 => 'Top',
4416
+ 2 => 'Bottom',
4417
+ 3 => 'Mid-left',
4418
+ 4 => 'Upper-left',
4419
+ 5 => 'Lower-left',
4420
+ 6 => 'Far Left',
4421
+ 7 => 'Mid-right',
4422
+ 8 => 'Upper-right',
4423
+ 9 => 'Lower-right',
4424
+ 10 => 'Far Right',
4425
+ },
4426
+ },
4427
+ },
4428
+ { #PH (D5,D500, D850)
4429
+ Name => 'AFPointsUsed', #when focus is not obtained, will report '(none)' otherwise will report a single point from among AFPointsSelected
4430
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4431
+ Notes => q{
4432
+ models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17). Center
4433
+ point is E9
4434
+ },
4435
+ Format => 'undef[20]',
4436
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4437
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4438
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4439
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4440
+ },{
4441
+ Name => 'AFPointsUsed',
4442
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4443
+ PrintConv => { 0 => '(none)', },
4444
+ },
4445
+ ],
4446
+ 0x1c => [
4447
+ {#PH
4448
+ Name => 'ContrastDetectAFInFocus',
4449
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4450
+ PrintConv => { 0 => 'No', 1 => 'Yes' },
4451
+ },
4452
+ { #JD/PH
4453
+ Name => 'AFPointsUsed',
4454
+ Condition => '$$self{FocusPointSchema} == 1 and
4455
+ ($$self{AFAreaMode} == 8 or $$self{AFAreaMode} == 9 or $$self{AFAreaMode} == 13 )', #phase detect 51 focus-point models
4456
+ Format => 'undef[7]',
4457
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4458
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4459
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4460
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4461
+ },{ #PH (D500, see forum11190)
4462
+ Name => 'AFPointsSelected', # where the viewfinder AF point(s) were positioned when initiating focus in AFAreaMode 3D-tracking Group-area
4463
+ # will contain a value regardless of whether or not focus was obtained
4464
+ # reflects the focus points displayed by NXStudio when AFAreaMode is Group-area
4465
+ Condition => '$$self{FocusPointSchema} == 7 and
4466
+ ($$self{AFAreaMode} == 8 or $$self{AFAreaMode} == 9 or $$self{AFAreaMode} == 13 )', #phase detect 153 focus-point models in Auto-area/3D-tracking/Group-area
4467
+ Format => 'undef[20]',
4468
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4469
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4470
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4471
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4472
+ },
4473
+ ],
4474
+ 0x30 => [
4475
+ { #PH (D7500) (NC "in focus")
4476
+ Name => 'AFPointsInFocus', # refelcts the focus point(s) displayed by NXStudio when AFAreaMode is Auto-area or 3D-tracking.
4477
+ # erroneously named as there is no assurance the reported points are in focus
4478
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4479
+ Format => 'undef[7]',
4480
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4481
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4482
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4483
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4484
+ },{ #PH (D500, see forum11190)
4485
+ Name => 'AFPointsInFocus',
4486
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4487
+ Notes => 'AF points in focus at the time time image was captured',
4488
+ Format => 'undef[20]',
4489
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4490
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4491
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4492
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4493
+ },
4494
+ ],
4495
+ 0x44 => [ #AFInfoVersion 0100 use 0x08 for this tag. v0101 could do that as well. The difference is that when Group-area fails to focus..
4496
+ #...this code (incorrectly) reports a value for PrimaryAFPoint. Moving this code to the 0x08 slot would correctly report '(none)'...
4497
+ #...leaving it here for now for compatibility purposes
4498
+ { #PH/JD
4613
4499
  Name => 'PrimaryAFPoint',
4614
- Condition => '$$self{PhaseDetectAF} == 7 and $$self{AFInfo2Version} eq "0101"',
4500
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4501
+ Notes => q{
4502
+ models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D7500
4503
+ },
4615
4504
  PrintConvColumns => 5,
4616
4505
  PrintConv => {
4617
4506
  0 => '(none)',
4618
- %afPoints153,
4619
- 1 => 'E9 (Center)',
4507
+ %afPoints51,
4508
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
4620
4509
  },
4621
- },
4622
- { #PH
4510
+ },{ #10
4623
4511
  Name => 'PrimaryAFPoint',
4624
- Notes => 'D3500',
4625
- Condition => '$$self{PhaseDetectAF} == 2 and $$self{AFInfo2Version} eq "0101"',
4512
+ Notes => 'models with 11-point AF: D3400, D3500',
4513
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4626
4514
  PrintConvColumns => 2,
4627
4515
  PrintConv => {
4628
4516
  0 => '(none)',
@@ -4638,68 +4526,397 @@ my %base64coord = (
4638
4526
  10 => 'Lower-right',
4639
4527
  11 => 'Far Right',
4640
4528
  },
4641
- },
4642
- {
4529
+ },{ #PH
4643
4530
  Name => 'PrimaryAFPoint',
4644
- Condition => '$$self{AFInfo2Version} eq "0101"',
4645
- Notes => 'future models?...',
4646
- Priority => 0,
4531
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4532
+ Notes => q{
4533
+ Nikon models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17): D5,
4534
+ D500 and D850
4535
+ },
4536
+ PrintConvColumns => 5,
4647
4537
  PrintConv => {
4648
4538
  0 => '(none)',
4649
- 1 => 'Center',
4650
- },
4539
+ %afPoints153,
4540
+ 1 => 'E9 (Center)',
4541
+ },
4542
+ },{
4543
+ Name => 'PrimaryAFPoint',
4544
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4545
+ PrintConv => { 0 => '(none)', },
4651
4546
  },
4652
4547
  ],
4653
- 0x46 => {
4548
+ 0x46 => { #PH
4654
4549
  Name => 'AFImageWidth',
4655
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4550
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4656
4551
  Format => 'int16u',
4657
4552
  RawConv => '$val ? $val : undef',
4658
4553
  Notes => 'this and the following tags are valid only for contrast-detect AF',
4659
4554
  },
4660
- 0x48 => {
4555
+ 0x48 => { #PH
4661
4556
  Name => 'AFImageHeight',
4662
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4557
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4663
4558
  Format => 'int16u',
4664
4559
  RawConv => '$val ? $val : undef',
4665
4560
  },
4666
- 0x4a => {
4561
+ 0x4a => { #PH
4667
4562
  Name => 'AFAreaXPosition',
4668
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4563
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4669
4564
  Notes => 'center of AF area in AFImage coordinates',
4670
4565
  Format => 'int16u',
4671
4566
  RawConv => '$val ? $val : undef',
4672
4567
  },
4673
- 0x4c => {
4568
+ 0x4c => { #PH
4674
4569
  Name => 'AFAreaYPosition',
4675
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4570
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4676
4571
  Format => 'int16u',
4677
4572
  RawConv => '$val ? $val : undef',
4678
4573
  },
4679
- 0x4e => {
4574
+ 0x4e => { #PH
4680
4575
  Name => 'AFAreaWidth',
4681
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4576
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4682
4577
  Format => 'int16u',
4683
4578
  Notes => 'size of AF area in AFImage coordinates',
4684
4579
  RawConv => '$val ? $val : undef',
4685
4580
  },
4686
- 0x50 => {
4581
+ 0x50 => { #PH
4687
4582
  Name => 'AFAreaHeight',
4688
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4583
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4689
4584
  Format => 'int16u',
4690
4585
  RawConv => '$val ? $val : undef',
4691
4586
  },
4692
4587
  0x52 => {
4693
4588
  Name => 'ContrastDetectAFInFocus',
4694
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4589
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4695
4590
  PrintConv => { 0 => 'No', 1 => 'Yes' },
4696
4591
  },
4697
4592
  );
4698
4593
 
4594
+ %Image::ExifTool::Nikon::AFInfo2V0200 = (
4595
+ %binaryDataAttrs,
4596
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4597
+ DATAMEMBER => [ 0, 6 ],
4598
+ NOTES => q{
4599
+ AF information for Nikon 1 series cameras: Nikon 1 V1, V2, V3, J1, J2, J3,
4600
+ S1, S2 AW1.
4601
+ },
4602
+ 0 => {
4603
+ Name => 'AFInfo2Version',
4604
+ Format => 'undef[4]',
4605
+ Writable => 0,
4606
+ RawConv => '$$self{AFInfo2Version} = $val',
4607
+ },
4608
+ 5 => {
4609
+ Name => 'AFAreaMode',
4610
+ PrintConv => {
4611
+ 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
4612
+ 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
4613
+ 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
4614
+ 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
4615
+ # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
4616
+ # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
4617
+ },
4618
+ },
4619
+ 6 => {
4620
+ Name => 'PhaseDetectAF', #JD(AutoFocus), PH(PhaseDetectAF)
4621
+ Notes => 'PrimaryAFPoint and AFPointsUsed below are only valid when this is On',
4622
+ RawConv => '$$self{PhaseDetectAF} = $val',
4623
+ PrintConv => {
4624
+ # [observed AFAreaMode values in square brackets for each PhaseDetectAF value]
4625
+ 4 => 'On (73-point)', #PH (1J1[128/129],1J2[128/129/135],1J3/1S1/1V2[128/129/131],1V1[129],AW1[129/131])
4626
+ 5 => 'On (5)', #PH (1S2[128/129], 1J4/1V3[129])
4627
+ 6 => 'On (105-point)', #PH (1J4/1V3[128/130])
4628
+ },
4629
+ },
4630
+ 7 => [
4631
+ { #PH
4632
+ Name => 'PrimaryAFPoint',
4633
+ Condition => '$$self{PhaseDetectAF} == 4',
4634
+ Notes => 'Nikon 1 models with older 135-point AF and 73-point phase-detect AF',
4635
+ PrintConvColumns => 5,
4636
+ PrintConv => {
4637
+ 0 => '(none)',
4638
+ %afPoints135,
4639
+ 1 => 'E8 (Center)', # (add " (Center)" to central point)
4640
+ },
4641
+ },
4642
+ { #PH (NC)
4643
+ Name => 'PrimaryAFPoint',
4644
+ Condition => '$$self{PhaseDetectAF} == 5',
4645
+ Notes => q{
4646
+ Nikon 1 models with newer 135-point AF and 73-point phase-detect AF -- 9
4647
+ rows (B-J) and 15 columns (1-15), inside a grid of 11 rows by 15 columns.
4648
+ The points are numbered sequentially, with F8 at the center
4649
+ },
4650
+ PrintConv => {
4651
+ 0 => '(none)',
4652
+ 82 => 'F8 (Center)',
4653
+ OTHER => sub {
4654
+ my ($val, $inv) = @_;
4655
+ return GetAFPointGrid($val, 15, $inv);
4656
+ },
4657
+ },
4658
+ },
4659
+ { #PH
4660
+ Name => 'PrimaryAFPoint',
4661
+ Condition => '$$self{PhaseDetectAF} == 6',
4662
+ Notes => q{
4663
+ Nikon 1 models with 171-point AF and 105-point phase-detect AF -- 9 rows
4664
+ (B-J) and 19 columns (2-20), inside a grid of 11 rows by 21 columns. The
4665
+ points are numbered sequentially, with F11 at the center
4666
+ },
4667
+ PrintConv => {
4668
+ 0 => '(none)',
4669
+ #22 => 'B2 (Top-left)',
4670
+ #40 => 'B20 (Top-right)',
4671
+ 115 => 'F11 (Center)',
4672
+ #190 => 'J2 (Bottom-left)',
4673
+ #208 => 'J20 (Bottom-right)',
4674
+ OTHER => sub {
4675
+ my ($val, $inv) = @_;
4676
+ return GetAFPointGrid($val, 21, $inv);
4677
+ },
4678
+ },
4679
+ },
4680
+ ],
4681
+ 8 => [
4682
+ { #PH (1AW1,1J1,1J2,1J3,1S1,1V1,1V2)
4683
+ Name => 'AFPointsUsed',
4684
+ Condition => '$$self{PhaseDetectAF} == 4',
4685
+ Notes => q{
4686
+ older models with 135-point AF -- 9 rows (A-I) and 15 columns (1-15).
4687
+ Center point is E8. The odd-numbered columns, columns 2 and 14, and the
4688
+ remaining corner points are not used for 41-point AF mode
4689
+ },
4690
+ Format => 'undef[17]',
4691
+ ValueConv => 'join(" ", unpack("H2"x17, $val))',
4692
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4693
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints135) },
4694
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints135) },
4695
+ },
4696
+ { #PH (1S2)
4697
+ Name => 'AFPointsUsed',
4698
+ Condition => '$$self{PhaseDetectAF} == 5',
4699
+ Notes => q{
4700
+ newer models with 135-point AF -- 9 rows (B-J) and 15 columns (1-15). Center
4701
+ point is F8
4702
+ },
4703
+ Format => 'undef[21]',
4704
+ ValueConv => 'join(" ", unpack("H2"x21, $val))',
4705
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4706
+ PrintConv => sub { PrintAFPointsGrid(shift, 15) },
4707
+ PrintConvInv => sub { PrintAFPointsGridInv(shift, 15, 21) },
4708
+ },
4709
+ { #PH (1J4,1V3)
4710
+ Name => 'AFPointsUsed',
4711
+ Condition => '$$self{PhaseDetectAF} == 6',
4712
+ Notes => q{
4713
+ models with 171-point AF -- 9 rows (B-J) and 19 columns (2-20). Center
4714
+ point is F10
4715
+ },
4716
+ Format => 'undef[29]',
4717
+ ValueConv => 'join(" ", unpack("H2"x29, $val))',
4718
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4719
+ PrintConv => sub { PrintAFPointsGrid(shift, 21) },
4720
+ PrintConvInv => sub { PrintAFPointsGridInv(shift, 21, 29) },
4721
+ },
4722
+ ],
4723
+ );
4724
+
4725
+ %Image::ExifTool::Nikon::AFInfo2V0300 = (
4726
+ %binaryDataAttrs,
4727
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4728
+ DATAMEMBER => [ 0, 4, 6, 7, 46, 48 ],
4729
+ NOTES => q{
4730
+ AF information for Nikon cameras with the Expeed 6 processor: D6, D780, Z5,
4731
+ Z6, Z6ii, Z7, Z7ii, Z50 and Zfc.
4732
+ },
4733
+ 0 => {
4734
+ Name => 'AFInfo2Version',
4735
+ Format => 'undef[4]',
4736
+ Writable => 0,
4737
+ RawConv => '$$self{AFInfo2Version} = $val',
4738
+ },
4739
+ 4 => {
4740
+ Name => 'AFDetectionMethod',
4741
+ RawConv => '$$self{AFDetectionMethod} = $val',
4742
+ PrintConv => \%aFDetectionMethod ,
4743
+ },
4744
+ 5 => [
4745
+ {
4746
+ Name => 'AFAreaMode',
4747
+ Condition => '$$self{AFDetectionMethod} == 0',
4748
+ PrintConv => \%aFAreaModePD, #phase detect
4749
+ },
4750
+ {
4751
+ Name => 'AFAreaMode',
4752
+ PrintConv => \%aFAreaModeCD, #contrast detect
4753
+ },
4754
+ ],
4755
+ 6 => {
4756
+ Name => 'FocusPointSchema',
4757
+ RawConv => '$$self{FocusPointSchema} = $val',
4758
+ Hidden => 1,
4759
+ PrintConv => {
4760
+ 0 => 'Off', # LiveView or manual focus or no focus
4761
+ 1 => '51-point', # (D780) 51 points through the viewfinder, 81/273 points in LiveView
4762
+ 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.
4763
+ 9 => '105-point', # (D6) arranged as a 15 column x 9 row grid
4764
+ },
4765
+ },
4766
+ 7 => {
4767
+ Name => 'AFCoordinatesAvailable', #0 => 'AFPointsUsed is populated' 1 => 'AFAreaXPosition & AFAreaYPosition are populated'
4768
+ RawConv => '$$self{AFCoordinatesAvailable} = $val',
4769
+ PrintConv => \%noYes ,
4770
+ },
4771
+ 0x0a => [
4772
+ { #JD/PH
4773
+ Name => 'AFPointsUsed',
4774
+ Condition => '$$self{FocusPointSchema} == 1 and $$self{AFCoordinatesAvailable} == 0', #D780 when AFAreaXYPositions are not populated
4775
+ Notes => q{
4776
+ models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4777
+ point is C6
4778
+ },
4779
+ Format => 'undef[7]',
4780
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4781
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4782
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4783
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4784
+ },{
4785
+ Name => 'AFPointsUsed',
4786
+ Condition => '$$self{FocusPointSchema} == 8 and $$self{AFCoordinatesAvailable} == 0', # Z6/Z6ii/Z7/Z7ii/Z50/Z50ii/Zfc/D780 when AFAreaXYPositions are not populated
4787
+ Notes => q{
4788
+ models with hybrid detect AF have 81 auto-area points -- 9 rows (A-I) and 9 columns (1-9). Center point is E5
4789
+ },
4790
+ Format => 'undef[11]',
4791
+ ValueConv => 'join(" ", unpack("H2"x11, $val))',
4792
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4793
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints81) },
4794
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81) },
4795
+ },{
4796
+ Name => 'AFPointsUsed',
4797
+ Condition => '$$self{FocusPointSchema} == 9 and $$self{AFCoordinatesAvailable} == 0', # D6 focus-point model when AFAreaXYPositions are not populated
4798
+ Format => 'undef[14]',
4799
+ ValueConv => 'join(" ", unpack("H2"x14, $val))',
4800
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4801
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints105) },
4802
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105) },
4803
+ },
4804
+ ],
4805
+ 0x2a => { #PH (Z7)
4806
+ Name => 'AFImageWidth',
4807
+ Format => 'int16u',
4808
+ RawConv => '$val ? $val : undef',
4809
+ },
4810
+ 0x2c => { #PH (Z7)
4811
+ Name => 'AFImageHeight',
4812
+ Format => 'int16u',
4813
+ RawConv => '$val ? $val : undef',
4814
+ },
4815
+ 0x2e => { #PH (Z7)
4816
+ Name => 'AFAreaXPosition',
4817
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4818
+ RawConv => '$$self{AFAreaXPosition} = $val',
4819
+ Format => 'int16u', # (decodes same byte as 0x2f)
4820
+ },
4821
+ 0x2f => [
4822
+ {
4823
+ Name => 'FocusPositionHorizontal', # 209/231 focus point cameras
4824
+ Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaXPosition}', #models Z30, Z50, Zfc
4825
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is an estimate (chosen to cause center point to report 'C')
4826
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 19 ) },
4827
+ },{
4828
+ Name => 'FocusPositionHorizontal', #273/299 focus point cameras
4829
+ Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaXPosition}', #models Z5, Z6, Z6ii, D780
4830
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is an estimate (chosen to cause center point to report 'C')
4831
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 21 ) },
4832
+ },{
4833
+ Name => 'FocusPositionHorizontal', #405/493 focus point cameras
4834
+ Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaXPosition}', #models Z7/Z7ii
4835
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the measured horizontal pixel separation between adjacent points
4836
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ) },
4837
+ },
4838
+ #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
4839
+ ],
4840
+ 0x30 => { #PH (Z7)
4841
+ Name => 'AFAreaYPosition',
4842
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4843
+ RawConv => '$$self{AFAreaYPosition} = $val',
4844
+ Format => 'int16u', # (decodes same byte as 0x31)
4845
+ },
4846
+ 0x31 => [
4847
+ {
4848
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
4849
+ Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaYPosition}', #models Z30, Z50, Zfc
4850
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4851
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
4852
+ },{
4853
+ Name => 'FocusPositionVertical', #273/299 focus point cameras
4854
+ Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaYPosition}', #models Z5, Z6, Z6ii, D780
4855
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4856
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
4857
+ },{
4858
+ Name => 'FocusPositionVertical', #405/493 focus point cameras
4859
+ Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaYPosition}', #models Z7/Z7ii
4860
+ ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
4861
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
4862
+ },
4863
+ ],
4864
+ 0x32 => { #PH
4865
+ Name => 'AFAreaWidth',
4866
+ Format => 'int16u',
4867
+ RawConv => '$val ? $val : undef',
4868
+ },
4869
+ 0x34 => { #PH
4870
+ Name => 'AFAreaHeight',
4871
+ Format => 'int16u',
4872
+ RawConv => '$val ? $val : undef',
4873
+ },
4874
+ 0x38 =>[
4875
+ { #PH/JD
4876
+ Name => 'PrimaryAFPoint',
4877
+ Condition => '$$self{FocusPointSchema} == 1 and $$self{AFCoordinatesAvailable} == 0', #51 focus-point models when AFAreaXYPositions are not populated
4878
+ Notes => q{
4879
+ models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
4880
+ D4, D4S, D300, D300S, D700, D750, D800, D800E, D810, D7100 and D7200
4881
+ },
4882
+ PrintConvColumns => 5,
4883
+ PrintConv => {
4884
+ 0 => '(none)',
4885
+ %afPoints51,
4886
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
4887
+ },
4888
+ },{
4889
+ Name => 'PrimaryAFPoint',
4890
+ Condition => '$$self{FocusPointSchema} == 8 and $$self{AFCoordinatesAvailable} == 0', # Z6/Z6ii/Z7/Z7ii/Z50/Z50ii/Zfc/D780 when AFAreaXYPositions are not populated
4891
+ Notes => q{
4892
+ models with hybrid detect AF have 81 auto-area points -- 9 rows (A-I) and 9 columns (1-9). Center point is E5
4893
+ },
4894
+ PrintConvColumns => 5,
4895
+ PrintConv => {
4896
+ 0 => '(none)',
4897
+ %afPoints81,
4898
+ 1 => 'E5 (Center)', # (add " (Center)" to central point)
4899
+ },
4900
+ },{ #28
4901
+ Name => 'PrimaryAFPoint',
4902
+ Condition => '$$self{FocusPointSchema} == 9 and $$self{AFCoordinatesAvailable} == 0', #153 focus-point models when AFAreaXYPositions are not populated
4903
+ Notes => q{
4904
+ Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
4905
+ },
4906
+ PrintConvColumns => 5,
4907
+ PrintConv => {
4908
+ 0 => '(none)',
4909
+ %afPoints105,
4910
+ 1 => 'D8 (Center)',
4911
+ },
4912
+ },
4913
+ ]
4914
+ );
4915
+
4699
4916
  %Image::ExifTool::Nikon::AFInfo2V0400 = (
4700
4917
  %binaryDataAttrs,
4701
4918
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4702
- DATAMEMBER => [ 0, 5 ],
4919
+ DATAMEMBER => [ 0, 4, 5, 7, 66, 68 ],
4703
4920
  NOTES => q{
4704
4921
  AF information for Nikon cameras with the Expeed 7 processor: The Zf, Z6_3,
4705
4922
  Z8, Z9 and Z50_3.
@@ -4710,7 +4927,12 @@ my %base64coord = (
4710
4927
  Writable => 0,
4711
4928
  RawConv => '$$self{AFInfo2Version} = $val',
4712
4929
  },
4713
- 5 => { #28
4930
+ 4 => {
4931
+ Name => 'AFDetectionMethod',
4932
+ RawConv => '$$self{AFDetectionMethod} = $val',
4933
+ PrintConv => \%aFDetectionMethod ,
4934
+ },
4935
+ 5 => {
4714
4936
  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)
4715
4937
  RawConv => '$$self{AFAreaModeUsed} = $val',
4716
4938
  PrintConv => {
@@ -4726,6 +4948,11 @@ my %base64coord = (
4726
4948
  208 => 'Wide (C1/C2)',
4727
4949
  },
4728
4950
  },
4951
+ 7 => {
4952
+ Name => 'AFCoordinatesAvailable', #0 => 'AFPointsUsed is populated' 1 => 'AFAreaXPosition & AFAreaYPosition are populated'
4953
+ RawConv => '$$self{AFCoordinatesAvailable} = $val',
4954
+ PrintConv => \%noYes ,
4955
+ },
4729
4956
  10 => [{
4730
4957
  # valid only for AFAreaModes where the camera selects the focus point (i.e., AutoArea & 3D-Tracking)
4731
4958
  # and the camera has yet to determine a focus target (in these cases tags AFAreaXPosition and AFAreaYPosition will be zeroes)
@@ -4735,59 +4962,83 @@ my %base64coord = (
4735
4962
  Notes => 'either AFPointsUsed or AFAreaX/YPosition will be set, but not both',
4736
4963
  ValueConv => 'join(" ", unpack("H2"x51, $val))',
4737
4964
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4738
- PrintConv => sub { PrintAFPoints(shift, \@afPoints405); },
4739
- PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints405); },
4965
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints405) }, #full-frame sensor, 45MP, auto-area focus point configuration
4966
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints405) },
4740
4967
  },{
4741
4968
  Name => 'AFPointsUsed', # Z6iii and Zf (AFInfo2Version 0401)
4742
4969
  Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and ($$self{AFAreaModeUsed} == 197 or $$self{AFAreaModeUsed} == 207)',
4743
4970
  Format => 'undef[38]',
4744
4971
  ValueConv => 'join(" ", unpack("H2"x38, $val))',
4745
4972
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4746
- PrintConv => sub { PrintAFPoints(shift, \@afPoints299); },
4747
- PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints299); },
4973
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints299) },
4974
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints299) }, #full-frame sensor, 24MP, auto-area focus point configuration
4748
4975
  },{
4749
4976
  Name => 'AFPointsUsed', # Z50ii (AFInfo2Version 0402)
4750
4977
  Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and ($$self{AFAreaModeUsed} == 197 or $$self{AFAreaModeUsed} == 207)',
4751
4978
  Format => 'undef[29]',
4752
4979
  ValueConv => 'join(" ", unpack("H2"x29, $val))',
4753
4980
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4754
- PrintConv => sub { PrintAFPoints(shift, \@afPoints231); },
4755
- PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints231); },
4981
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints231) },
4982
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints231) }, #crop sensor, 21MP, auto-area focus point configuration
4756
4983
  }],
4757
- 62 => {
4984
+ 0x3e => {
4758
4985
  Name => 'AFImageWidth',
4759
4986
  Format => 'int16u',
4987
+ RawConv => '$val ? $val : undef',
4760
4988
  },
4761
4989
  0x40 => {
4762
4990
  Name => 'AFImageHeight',
4763
4991
  Format => 'int16u',
4992
+ RawConv => '$val ? $val : undef',
4764
4993
  },
4765
4994
  0x42 => { #28
4766
4995
  Name => 'AFAreaXPosition', #top left image corner is the origin
4996
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4997
+ RawConv => '$$self{AFAreaXPosition} = $val',
4767
4998
  Format => 'int16u', # (decodes same byte as 0x43)
4768
- RawConv => '$val ? $val : undef',
4769
4999
  },
4770
- #0x43 => {
4771
- # Name => 'FocusPositionHorizontal',
4772
- # Notes => q{
4773
- # the focus points form a 29x17 grid, but the X,Y coordinate values run from 1,1
4774
- # to 30,19. The horizontal coordinate 11R (5) and the vertical coordinates 6U
4775
- # (4) and 2D (12) are not used for some reason
4776
- # },
4777
- # # 493 focus points for Z9 fall in a 30x19 grid
4778
- # # (the 11R (5) position is not used, for a total of 29 columns, ref AlbertShan email)
4779
- # PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29); },
4780
- #},
5000
+ 0x43 => [
5001
+ {
5002
+ Name => 'FocusPositionHorizontal', # 209/231 focus point cameras
5003
+ Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and $$self{AFAreaXPosition} != 0', #model Z50ii
5004
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the estimated separation between adjacent points (informed by the measured Z7ii separation)
5005
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 19 ) },
5006
+ },{
5007
+ Name => 'FocusPositionHorizontal', #273/299 focus point cameras
5008
+ Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and $$self{AFAreaXPosition} != 0', #models Z6iii and Zf
5009
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the estimated separation between adjacent points (informed by the measured Z7ii separation)
5010
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 21 ) },
5011
+ },{
5012
+ Name => 'FocusPositionHorizontal', #405/493 focus point cameras
5013
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i and $$self{AFAreaXPosition} != 0', #models Z8 and Z9
5014
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the measured horizontal pixel separation between adjacent points
5015
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ) },
5016
+ },
5017
+ ],
4781
5018
  0x44 => { #28
4782
5019
  Name => 'AFAreaYPosition',
5020
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
5021
+ RawConv => '$$self{AFAreaYPosition} = $val',
4783
5022
  Format => 'int16u', # (decodes same byte as 0x45)
4784
- RawConv => '$val ? $val : undef',
4785
5023
  },
4786
- #0x45 => {
4787
- # Name => 'FocusPositionVertical',
4788
- # # (the 6U (4) and 2D (12) are not used, for a total of 17 rows, ref AlbertShan email)
4789
- # PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17); },
4790
- #},
5024
+ 0x45 => [
5025
+ {
5026
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
5027
+ Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and $$self{AFAreaYPosition} != 0', #model Z50ii
5028
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor chosen to cause center point report 'C'
5029
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
5030
+ },{
5031
+ Name => 'FocusPositionVertical', #273/299 focus point cameras
5032
+ Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and $$self{AFAreaYPosition} != 0', #models Z6iii and Zf
5033
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor chosen to cause center point report 'C'
5034
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
5035
+ },{
5036
+ Name => 'FocusPositionVertical', #405/493 focus point cameras
5037
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i and $$self{AFAreaYPosition} != 0', #models Z8 and Z9
5038
+ ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
5039
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
5040
+ },
5041
+ ],
4791
5042
  0x46 => {
4792
5043
  Name => 'AFAreaWidth',
4793
5044
  Format => 'int16u',
@@ -5603,6 +5854,7 @@ my %nikonFocalConversions = (
5603
5854
  44 => 'Nikkor Z 70-180mm f/2.8', #28
5604
5855
  45 => 'Nikkor Z 600mm f/6.3 VR S', #28
5605
5856
  46 => 'Nikkor Z 135mm f/1.8 S Plena', #28
5857
+ 47 => 'Nikkor Z 35mm f/1.2 S', #28
5606
5858
  48 => 'Nikkor Z 28-400mm f/4-8 VR', #30
5607
5859
  51 => 'Nikkor Z 35mm f/1.4', #28
5608
5860
  52 => 'Nikkor Z 50mm f/1.4', #28
@@ -5672,7 +5924,7 @@ my %nikonFocalConversions = (
5672
5924
  Name => 'LensDriveEnd', # byte contains: 1 at CFD/MOD; 2 at Infinity; 0 otherwise
5673
5925
  Condition => '$$self{LensID} and $$self{LensID} != 0 and $$self{FocusMode} ne "Manual"', #valid for Z-mount lenses in focus modes other than M
5674
5926
  Format => 'int8u',
5675
- RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"}; } else{ $$self{LensDriveEnd} = "Inf"}',
5927
+ RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"} } else{ $$self{LensDriveEnd} = "Inf"}',
5676
5928
  Unknown => 1,
5677
5929
  },
5678
5930
  0x58 => { #28
@@ -8915,19 +9167,19 @@ my %nikonFocalConversions = (
8915
9167
  # 0x00 - int32u size of this directory
8916
9168
  0x10 => [
8917
9169
  {
8918
- Name => 'MenuSettingsOffsetZ8',
9170
+ Name => 'MenuSettingsOffsetZ8v1',
8919
9171
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "02.00"',
8920
9172
  Format => 'int32u',
8921
- Notes => 'Firmware versions 1.0.0 and 1.1.0',
9173
+ Notes => 'Firmware versions 1.00 and 1.10',
8922
9174
  SubDirectory => {
8923
- TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8',
9175
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8v1',
8924
9176
  Start => '$dirStart + $val',
8925
9177
  },
8926
9178
  },
8927
9179
  {
8928
9180
  Name => 'MenuSettingsOffsetZ8v2',
8929
9181
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.00"',
8930
- Notes => 'Firmware version 2.0',
9182
+ Notes => 'Firmware version 2.00 and 2.10',
8931
9183
  Format => 'int32u',
8932
9184
  SubDirectory => {
8933
9185
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8v2',
@@ -8956,7 +9208,7 @@ my %nikonFocalConversions = (
8956
9208
  {
8957
9209
  Name => 'MenuSettingsOffsetZ9v3',
8958
9210
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "04.00"',
8959
- Notes => 'Firmware versions 3.0 and v3.10',
9211
+ Notes => 'Firmware versions 3.00 and v3.10',
8960
9212
  Format => 'int32u',
8961
9213
  SubDirectory => {
8962
9214
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v3',
@@ -8965,23 +9217,13 @@ my %nikonFocalConversions = (
8965
9217
  },
8966
9218
  {
8967
9219
  Name => 'MenuSettingsOffsetZ9v4',
8968
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "05.01"',
8969
- Notes => 'Firmware versions 4.x and 5.0',
9220
+ Notes => 'Firmware versions 4.00 and higher',
8970
9221
  Format => 'int32u',
8971
9222
  SubDirectory => {
8972
9223
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v4',
8973
9224
  Start => '$dirStart + $val',
8974
9225
  },
8975
9226
  },
8976
- {
8977
- Name => 'MenuSettingsOffsetZ9v4',
8978
- Notes => 'Firmware versions 4.x and 5.0',
8979
- Format => 'int32u',
8980
- SubDirectory => {
8981
- TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v5',
8982
- Start => '$dirStart + $val',
8983
- },
8984
- },
8985
9227
  ],
8986
9228
  );
8987
9229
 
@@ -9135,7 +9377,7 @@ my %nikonFocalConversions = (
9135
9377
  },
9136
9378
  );
9137
9379
 
9138
- %Image::ExifTool::Nikon::MenuSettingsZ6III = (
9380
+ %Image::ExifTool::Nikon::MenuSettingsZ6III = (
9139
9381
  %binaryDataAttrs,
9140
9382
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9141
9383
  NOTES => 'These tags are used by the Z6III.',
@@ -9322,7 +9564,7 @@ my %nikonFocalConversions = (
9322
9564
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ6III' },
9323
9565
  },
9324
9566
  2300 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9325
- 2302 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9567
+ 2302 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9326
9568
  2308 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5 and Lo1, Lo2, Hi1, Hi2
9327
9569
  2444 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
9328
9570
  2450 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
@@ -9332,7 +9574,7 @@ my %nikonFocalConversions = (
9332
9574
  2496 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9333
9575
  ),
9334
9576
 
9335
- %Image::ExifTool::Nikon::MenuSettingsZ7II = (
9577
+ %Image::ExifTool::Nikon::MenuSettingsZ7II = (
9336
9578
  %binaryDataAttrs,
9337
9579
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9338
9580
  DATAMEMBER => [ 90, 176, 180, 328, 352, 858 ],
@@ -9417,7 +9659,7 @@ my %nikonFocalConversions = (
9417
9659
  PrintConv => \%offOn,
9418
9660
  },
9419
9661
  #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
9420
- 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7},
9662
+ 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7 },
9421
9663
  328 => {
9422
9664
  Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9423
9665
  RawConv => '$$self{FlashControlMode} = $val',
@@ -9493,11 +9735,7 @@ my %nikonFocalConversions = (
9493
9735
  516 => {
9494
9736
  Name => 'MovieISOAutoManualMode',
9495
9737
  Condition => '$$self{Model} =~ /^NIKON 7/', #ISO ranges vary by model. These mappings are for the Z7 and Z7II
9496
- Format => 'int16u',
9497
- Unknown => 1,
9498
- ValueConv => '($val-104)/8',
9499
- ValueConvInv => '8 * ($val + 104)',
9500
- PrintConv => \%iSOAutoHiLimitZ7,
9738
+ %isoAutoHiLimitZ7,
9501
9739
  },
9502
9740
  #520 => MovieWhiteBalanceSameAsPhoto
9503
9741
  568 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
@@ -9548,16 +9786,19 @@ my %nikonFocalConversions = (
9548
9786
  #859 => HDMIViewAssist
9549
9787
  );
9550
9788
 
9551
- %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9789
+ %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9552
9790
  %binaryDataAttrs,
9553
9791
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9554
- DATAMEMBER => [ 152, 200, 204, 244, 440, 548, 554, 570, 596 ],
9555
- IS_SUBDIR => [ 943 ],
9556
- NOTES => 'These tags are used by the Z8 firmware 1.00.',
9792
+ DATAMEMBER => [ 72, 152, 200, 204, 244, 440, 548, 554, 570, 596 ],
9793
+ NOTES => 'These tags are common to all Z8 firmware versions.',
9557
9794
  72 => {
9558
9795
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9559
9796
  PrintConv => \%highFrameRateZ9,
9797
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.10"',
9560
9798
  },
9799
+ #
9800
+ # firmware 2.10 adds 4 bytes somewhere in the range 105-107 (hence the Hook above)
9801
+ #
9561
9802
  152 => {
9562
9803
  Name => 'MultipleExposureMode',
9563
9804
  RawConv => '$$self{MultipleExposureMode} = $val',
@@ -9626,23 +9867,9 @@ my %nikonFocalConversions = (
9626
9867
  286 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9627
9868
  288 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9628
9869
  324 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9629
- 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9630
- 340 => {
9631
- Name => 'ISOAutoHiLimit',
9632
- Format => 'int16u',
9633
- Unknown => 1,
9634
- ValueConv => '($val-104)/8',
9635
- ValueConvInv => '8 * ($val + 104)',
9636
- PrintConv => \%iSOAutoHiLimitZ7,
9637
- },
9638
- 342 => {
9639
- Name => 'ISOAutoFlashLimit',
9640
- Format => 'int16u',
9641
- Unknown => 1,
9642
- ValueConv => '($val-104)/8',
9643
- ValueConvInv => '8 * ($val + 104)',
9644
- PrintConv => \%iSOAutoHiLimitZ7,
9645
- },
9870
+ 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9871
+ 340 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
9872
+ 342 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
9646
9873
  350 => {
9647
9874
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9648
9875
  ValueConv => '$val / 8',
@@ -9698,24 +9925,10 @@ my %nikonFocalConversions = (
9698
9925
  Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9699
9926
  PrintConv => \%imageAreaZ9b,
9700
9927
  },
9701
- 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9702
- 742 => {
9703
- Name => 'MovieISOAutoHiLimit',
9704
- Format => 'int16u',
9705
- Unknown => 1,
9706
- ValueConv => '($val-104)/8',
9707
- ValueConvInv => '8 * ($val + 104)',
9708
- PrintConv => \%iSOAutoHiLimitZ7,
9709
- },
9928
+ 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9929
+ 742 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
9710
9930
  744 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
9711
- 746 => {
9712
- Name => 'MovieISOAutoManualMode',
9713
- Format => 'int16u',
9714
- Unknown => 1,
9715
- ValueConv => '($val-104)/8',
9716
- ValueConvInv => '8 * ($val + 104)',
9717
- PrintConv => \%iSOAutoHiLimitZ7,
9718
- },
9931
+ 746 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
9719
9932
  820 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9720
9933
  822 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9721
9934
  828 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -9735,14 +9948,26 @@ my %nikonFocalConversions = (
9735
9948
  887 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9736
9949
  888 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9737
9950
  896 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9951
+ );
9952
+
9953
+ %Image::ExifTool::Nikon::MenuSettingsZ8v1 = (
9954
+ %binaryDataAttrs,
9955
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9956
+ NOTES => 'These tags are used by the Z8 firmware 1.00 and 1.10.',
9957
+ IS_SUBDIR => [ 0, 943 ],
9958
+ 0 => {
9959
+ Name => 'MenuSettingsZ8',
9960
+ Format => 'undef[943]',
9961
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8' },
9962
+ },
9738
9963
  943 => {
9739
9964
  Name => 'CustomSettingsZ8',
9740
9965
  Format => 'undef[730]',
9741
9966
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
9742
9967
  },
9743
- 1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9744
- 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9968
+ 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9745
9969
  1690 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9970
+ 1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9746
9971
  1712 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9747
9972
  1716 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
9748
9973
  1718 => { Name => 'NonCPULens2FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
@@ -9764,26 +9989,26 @@ my %nikonFocalConversions = (
9764
9989
  1750 => { Name => 'NonCPULens18FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9765
9990
  1752 => { Name => 'NonCPULens19FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9766
9991
  1754 => { Name => 'NonCPULens20FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9767
- 1756 => { Name => 'NonCPULens1MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9768
- 1758 => { Name => 'NonCPULens2MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9769
- 1760 => { Name => 'NonCPULens3MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9770
- 1762 => { Name => 'NonCPULens4MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9771
- 1764 => { Name => 'NonCPULens5MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9772
- 1766 => { Name => 'NonCPULens6MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9773
- 1768 => { Name => 'NonCPULens7MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9774
- 1770 => { Name => 'NonCPULens8MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9775
- 1772 => { Name => 'NonCPULens9MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9776
- 1774 => { Name => 'NonCPULens10MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9777
- 1776 => { Name => 'NonCPULens11MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9778
- 1778 => { Name => 'NonCPULens12MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9779
- 1780 => { Name => 'NonCPULens13MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9780
- 1782 => { Name => 'NonCPULens14MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9781
- 1784 => { Name => 'NonCPULens15MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9782
- 1786 => { Name => 'NonCPULens16MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9783
- 1788 => { Name => 'NonCPULens17MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9784
- 1790 => { Name => 'NonCPULens18MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9785
- 1792 => { Name => 'NonCPULens19MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9786
- 1794 => { Name => 'NonCPULens20MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9992
+ 1756 => { Name => 'NonCPULens1MaxAperture', %nonCPULensApertureZ8 },
9993
+ 1758 => { Name => 'NonCPULens2MaxAperture', %nonCPULensApertureZ8},
9994
+ 1760 => { Name => 'NonCPULens3MaxAperture', %nonCPULensApertureZ8},
9995
+ 1762 => { Name => 'NonCPULens4MaxAperture', %nonCPULensApertureZ8},
9996
+ 1764 => { Name => 'NonCPULens5MaxAperture', %nonCPULensApertureZ8},
9997
+ 1766 => { Name => 'NonCPULens6MaxAperture', %nonCPULensApertureZ8},
9998
+ 1768 => { Name => 'NonCPULens7MaxAperture', %nonCPULensApertureZ8},
9999
+ 1770 => { Name => 'NonCPULens8MaxAperture', %nonCPULensApertureZ8},
10000
+ 1772 => { Name => 'NonCPULens9MaxAperture', %nonCPULensApertureZ8},
10001
+ 1774 => { Name => 'NonCPULens10MaxAperture', %nonCPULensApertureZ8},
10002
+ 1776 => { Name => 'NonCPULens11MaxAperture', %nonCPULensApertureZ8},
10003
+ 1778 => { Name => 'NonCPULens12MaxAperture', %nonCPULensApertureZ8},
10004
+ 1780 => { Name => 'NonCPULens13MaxAperture', %nonCPULensApertureZ8},
10005
+ 1782 => { Name => 'NonCPULens14MaxAperture', %nonCPULensApertureZ8},
10006
+ 1784 => { Name => 'NonCPULens15MaxAperture', %nonCPULensApertureZ8},
10007
+ 1786 => { Name => 'NonCPULens16MaxAperture', %nonCPULensApertureZ8},
10008
+ 1788 => { Name => 'NonCPULens17MaxAperture', %nonCPULensApertureZ8},
10009
+ 1790 => { Name => 'NonCPULens18MaxAperture', %nonCPULensApertureZ8},
10010
+ 1792 => { Name => 'NonCPULens19MaxAperture', %nonCPULensApertureZ8},
10011
+ 1794 => { Name => 'NonCPULens20MaxAperture', %nonCPULensApertureZ8},
9787
10012
  1808 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
9788
10013
  1826 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9789
10014
  1827 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
@@ -9791,201 +10016,26 @@ my %nikonFocalConversions = (
9791
10016
  1890 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
9792
10017
  1899 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
9793
10018
  );
9794
- %Image::ExifTool::Nikon::MenuSettingsZ8v2 = (
10019
+
10020
+ %Image::ExifTool::Nikon::MenuSettingsZ8v2 = (
9795
10021
  %binaryDataAttrs,
9796
10022
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9797
- DATAMEMBER => [ 152, 200, 204, 244, 440, 548, 554, 570, 596, 2046 ],
9798
- IS_SUBDIR => [ 943 ],
9799
- NOTES => 'These tags are used by the Z8 firmware 1.00.',
9800
- 72 => {
9801
- Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9802
- PrintConv => \%highFrameRateZ9,
9803
- },
9804
- 152 => {
9805
- Name => 'MultipleExposureMode',
9806
- RawConv => '$$self{MultipleExposureMode} = $val',
9807
- PrintConv => \%multipleExposureModeZ9,
9808
- },
9809
- 154 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
9810
- 184 => {
9811
- Name => 'IntervalDurationHours',
9812
- Format => 'int32u',
9813
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9814
- },
9815
- 188 => {
9816
- Name => 'IntervalDurationMinutes',
9817
- Format => 'int32u',
9818
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9819
- },
9820
- 192 => {
9821
- Name => 'IntervalDurationSeconds',
9822
- Format => 'int32u',
9823
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9824
- },
9825
- 200 => {
9826
- Name => 'Intervals',
9827
- Format => 'int32u',
9828
- RawConv => '$$self{IntervalShootingIntervals} = $val',
9829
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9830
- },
9831
- 204 => {
9832
- Name => 'ShotsPerInterval',
9833
- Format => 'int32u',
9834
- RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
9835
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9836
- },
9837
- 208 => {
9838
- Name => 'IntervalExposureSmoothing',
9839
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9840
- Format => 'int8u',
9841
- PrintConv => \%offOn,
9842
- },
9843
- 210 => {
9844
- Name => 'IntervalPriority',
9845
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9846
- Format => 'int8u',
9847
- PrintConv => \%offOn,
9848
- },
9849
- 244 => {
9850
- Name => 'FocusShiftNumberShots', #1-300
9851
- RawConv => '$$self{FocusShiftNumberShots} = $val',
9852
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9853
- },
9854
- 248 => {
9855
- Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
9856
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9857
- },
9858
- 252 => {
9859
- Name => 'FocusShiftInterval',
9860
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9861
- PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
9862
- },
9863
- 256 => {
9864
- Name => 'FocusShiftExposureLock',
9865
- Unknown => 1,
9866
- PrintConv => \%offOn,
9867
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9868
- },
9869
- 286 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9870
- 288 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9871
- 324 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9872
- 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9873
- 340 => {
9874
- Name => 'ISOAutoHiLimit',
9875
- Format => 'int16u',
9876
- Unknown => 1,
9877
- ValueConv => '($val-104)/8',
9878
- ValueConvInv => '8 * ($val + 104)',
9879
- PrintConv => \%iSOAutoHiLimitZ7,
9880
- },
9881
- 342 => {
9882
- Name => 'ISOAutoFlashLimit',
9883
- Format => 'int16u',
9884
- Unknown => 1,
9885
- ValueConv => '($val-104)/8',
9886
- ValueConvInv => '8 * ($val + 104)',
9887
- PrintConv => \%iSOAutoHiLimitZ7,
9888
- },
9889
- 350 => {
9890
- Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9891
- ValueConv => '$val / 8',
9892
- Format => 'int16s',
9893
- PrintConv => \%iSOAutoShutterTimeZ9,
9894
- },
9895
- 432 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9896
- 434 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
9897
- 436 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
9898
- 440 => {
9899
- Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9900
- RawConv => '$$self{FlashControlMode} = $val',
9901
- PrintConv => \%flashControlModeZ7,
9902
- },
9903
- 548 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
9904
- 550 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
9905
- 554 => {
9906
- Name => 'BracketSet',
9907
- RawConv => '$$self{BracketSet} = $val',
9908
- PrintConv => \%bracketSetZ9,
9909
- },
9910
- 556 => {
9911
- Name => 'BracketProgram',
9912
- Condition => '$$self{BracketSet} < 3',
9913
- Notes => 'AE and/or Flash Bracketing',
9914
- PrintConv => \%bracketProgramZ9,
9915
- },
9916
- 558 => {
9917
- Name => 'BracketIncrement',
9918
- Condition => '$$self{BracketSet} < 3',
9919
- Notes => 'AE and/or Flash Bracketing',
9920
- PrintConv => \%bracketIncrementZ9,
9921
- },
9922
- 570 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
9923
- #572 HDRSaveRaw 0=> No; 1=> Yes
9924
- 576 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
9925
- 582 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
9926
- 586 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
9927
- 592 => { Name => 'DXCropAlert', PrintConv => \%offOn },
9928
- 594 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
9929
- 596 => {
9930
- Name => 'DynamicAFAreaSize',
9931
- Condition => '$$self{AFAreaMode} == 2',
9932
- RawConv => '$$self{DynamicAFAreaSize} = $val',
9933
- PrintConv => \%dynamicAfAreaModesZ9,
9934
- },
9935
- 618 => { Name => 'ToneMap', PrintConv => { 0 => 'SDR', 1 => 'HLG' }, Unknown => 1 },
9936
- 622 => { Name => 'PortraitImpressionBalance', PrintConv => \%portraitImpressionBalanceZ8 },
9937
- 636 => { Name => 'HighFrequencyFlickerReduction', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
9938
- 730 => {
9939
- Name => 'MovieImageArea',
9940
- Unknown => 1,
9941
- Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9942
- PrintConv => \%imageAreaZ9b,
9943
- },
9944
- #736 => { Name => 'MovieSlowMotion', PrintConv => \%movieSlowMotion, Unknown => 1 }, #only valid for MovieType H.264 8-bit
9945
- 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9946
- 742 => {
9947
- Name => 'MovieISOAutoHiLimit',
9948
- Format => 'int16u',
9949
- Unknown => 1,
9950
- ValueConv => '($val-104)/8',
9951
- ValueConvInv => '8 * ($val + 104)',
9952
- PrintConv => \%iSOAutoHiLimitZ7,
9953
- },
9954
- 744 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
9955
- 746 => {
9956
- Name => 'MovieISOAutoManualMode',
9957
- Format => 'int16u',
9958
- Unknown => 1,
9959
- ValueConv => '($val-104)/8',
9960
- ValueConvInv => '8 * ($val + 104)',
9961
- PrintConv => \%iSOAutoHiLimitZ7,
10023
+ DATAMEMBER => [ 0, 2046 ],
10024
+ IS_SUBDIR => [ 0, 943 ],
10025
+ NOTES => 'These tags are used by the Z8 firmware 2.00 and 2.10.',
10026
+ 0 => {
10027
+ Name => 'MenuSettingsZ8',
10028
+ Format => 'undef[943]',
10029
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8' },
10030
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.10"',
9962
10031
  },
9963
- 820 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9964
- 822 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9965
- 828 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
9966
- 830 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
9967
- 832 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
9968
- 834 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
9969
- 836 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
9970
- 840 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9971
- 842 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
9972
- 844 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
9973
- 846 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9974
- 848 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
9975
- 850 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
9976
- 878 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
9977
- 880 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
9978
- 886 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
9979
- 887 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9980
- 888 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9981
- 896 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9982
10032
  943 => {
9983
10033
  Name => 'CustomSettingsZ8',
9984
10034
  Format => 'undef[755]',
9985
10035
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
9986
10036
  },
9987
10037
  1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9988
- 1700 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10038
+ 1700 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9989
10039
  1706 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9990
10040
  1728 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9991
10041
  1732 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
@@ -10045,7 +10095,8 @@ my %nikonFocalConversions = (
10045
10095
  2062 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
10046
10096
  2064 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
10047
10097
  );
10048
- %Image::ExifTool::Nikon::MenuSettingsZ9 = (
10098
+
10099
+ %Image::ExifTool::Nikon::MenuSettingsZ9 = (
10049
10100
  %binaryDataAttrs,
10050
10101
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10051
10102
  DATAMEMBER => [ 140, 188, 192, 232, 308, 424, 528, 534, 576 ],
@@ -10096,22 +10147,8 @@ my %nikonFocalConversions = (
10096
10147
  308 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10097
10148
  #310 ImageQuality
10098
10149
  322 => { Name => 'AutoISO', PrintConv => \%offOn },
10099
- 324 => {
10100
- Name => 'ISOAutoHiLimit',
10101
- Format => 'int16u',
10102
- Unknown => 1,
10103
- ValueConv => '($val-104)/8',
10104
- ValueConvInv => '8 * ($val + 104)',
10105
- PrintConv => \%iSOAutoHiLimitZ7,
10106
- },
10107
- 326 => {
10108
- Name => 'ISOAutoFlashLimit',
10109
- Format => 'int16u',
10110
- Unknown => 1,
10111
- ValueConv => '($val-104)/8',
10112
- ValueConvInv => '8 * ($val + 104)',
10113
- PrintConv => \%iSOAutoHiLimitZ7,
10114
- },
10150
+ 324 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10151
+ 326 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10115
10152
  #332 ISOAutoShutterTime - Auto setting 0=> 'Auto (Slowest)', 1 => 'Auto (Slower)', 2=> 'Auto', 3=> 'Auto (Faster)', 4=> 'Auto (Fastest)'
10116
10153
  334 => {
10117
10154
  Name => 'ISOAutoShutterTime', #shutter speed is 2 ** (-$val/24)
@@ -10194,30 +10231,16 @@ my %nikonFocalConversions = (
10194
10231
  RawConv => '$$self{DynamicAFAreaSize} = $val',
10195
10232
  PrintConv => \%dynamicAfAreaModesZ9,
10196
10233
  },
10197
- 604 => {
10198
- Name => 'MovieImageArea',
10199
- Unknown => 1,
10200
- Mask => 0x01, # without the mask 4 => 'FX', 5 => DX. only the 2nd Z-series field encountered with a mask
10201
- PrintConv => \%imageAreaZ9b,
10202
- },
10203
- 614 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10204
- 616 => {
10205
- Name => 'MovieISOAutoHiLimit',
10206
- Format => 'int16u',
10207
- Unknown => 1,
10208
- ValueConv => '($val-104)/8',
10209
- ValueConvInv => '8 * ($val + 104)',
10210
- PrintConv => \%iSOAutoHiLimitZ7,
10211
- },
10212
- 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10213
- 620 => {
10214
- Name => 'MovieISOAutoManualMode',
10215
- Format => 'int16u',
10234
+ 604 => {
10235
+ Name => 'MovieImageArea',
10216
10236
  Unknown => 1,
10217
- ValueConv => '($val-104)/8',
10218
- ValueConvInv => '8 * ($val + 104)',
10219
- PrintConv => \%iSOAutoHiLimitZ7,
10237
+ Mask => 0x01, # without the mask 4 => 'FX', 5 => DX. only the 2nd Z-series field encountered with a mask
10238
+ PrintConv => \%imageAreaZ9b,
10220
10239
  },
10240
+ 614 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10241
+ 616 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10242
+ 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10243
+ 620 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10221
10244
  696 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10222
10245
  698 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10223
10246
  704 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10243,7 +10266,7 @@ my %nikonFocalConversions = (
10243
10266
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
10244
10267
  },
10245
10268
  1426 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10246
- 1428 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10269
+ 1428 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10247
10270
  1434 => { Name => 'MonitorBrightness', ValueConv => '$val - 5', Unknown => 1 }, # settings: -5 to +5
10248
10271
  1456 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10249
10272
  1552 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
@@ -10256,7 +10279,7 @@ my %nikonFocalConversions = (
10256
10279
  1645 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
10257
10280
  );
10258
10281
 
10259
- %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
10282
+ %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
10260
10283
  %binaryDataAttrs,
10261
10284
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10262
10285
  DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 596 ],
@@ -10308,22 +10331,8 @@ my %nikonFocalConversions = (
10308
10331
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
10309
10332
  328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10310
10333
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
10311
- 344 => {
10312
- Name => 'ISOAutoHiLimit',
10313
- Format => 'int16u',
10314
- Unknown => 1,
10315
- ValueConv => '($val-104)/8',
10316
- ValueConvInv => '8 * ($val + 104)',
10317
- PrintConv => \%iSOAutoHiLimitZ7,
10318
- },
10319
- 346 => {
10320
- Name => 'ISOAutoFlashLimit',
10321
- Format => 'int16u',
10322
- Unknown => 1,
10323
- ValueConv => '($val-104)/8',
10324
- ValueConvInv => '8 * ($val + 104)',
10325
- PrintConv => \%iSOAutoHiLimitZ7,
10326
- },
10334
+ 344 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10335
+ 346 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10327
10336
  354 => {
10328
10337
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10329
10338
  ValueConv => '$val / 8',
@@ -10402,23 +10411,9 @@ my %nikonFocalConversions = (
10402
10411
  PrintConv => \%imageAreaZ9b,
10403
10412
  },
10404
10413
  656 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10405
- 658 => {
10406
- Name => 'MovieISOAutoHiLimit',
10407
- Format => 'int16u',
10408
- Unknown => 1,
10409
- ValueConv => '($val-104)/8',
10410
- ValueConvInv => '8 * ($val + 104)',
10411
- PrintConv => \%iSOAutoHiLimitZ7,
10412
- },
10414
+ 658 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10413
10415
  660 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10414
- 662 => {
10415
- Name => 'MovieISOAutoManualMode',
10416
- Format => 'int16u',
10417
- Unknown => 1,
10418
- ValueConv => '($val-104)/8',
10419
- ValueConvInv => '8 * ($val + 104)',
10420
- PrintConv => \%iSOAutoHiLimitZ7,
10421
- },
10416
+ 662 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10422
10417
  736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10423
10418
  738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10424
10419
  744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10445,7 +10440,7 @@ my %nikonFocalConversions = (
10445
10440
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
10446
10441
  },
10447
10442
  1474 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10448
- 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10443
+ 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10449
10444
  1482 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10450
10445
  1504 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10451
10446
  1600 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
@@ -10489,17 +10484,21 @@ my %nikonFocalConversions = (
10489
10484
  #1936 FocusPointDisplayOption3DTrackingColor CSa11-d 0=> 'White', 1= => 'Red'
10490
10485
  );
10491
10486
 
10492
- # firmware version 4.x menu settings (ref 28)
10493
- %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10487
+ # firmware version 4.x/5.x menu settings (ref 28)
10488
+ %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10494
10489
  %binaryDataAttrs,
10495
10490
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10496
- DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10491
+ DATAMEMBER => [ 72, 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10497
10492
  IS_SUBDIR => [ 847 ],
10498
- NOTES => 'These tags are used by the Z9 firmware 4.0.0 and 4.1.0.',
10493
+ NOTES => 'These tags are used by the Z9 firmware 4.00, 4.10, 5.00 and 5.10.',
10499
10494
  72 => {
10500
10495
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10501
10496
  PrintConv => \%highFrameRateZ9,
10497
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.10"',
10502
10498
  },
10499
+ #
10500
+ # Note: Offsets after this are shifted by +4 for firmware 5.1 (see Hook above)
10501
+ #
10503
10502
  154 => {
10504
10503
  Name => 'MultipleExposureMode',
10505
10504
  RawConv => '$$self{MultipleExposureMode} = $val',
@@ -10543,22 +10542,8 @@ my %nikonFocalConversions = (
10543
10542
  328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10544
10543
  #334 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
10545
10544
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
10546
- 344 => {
10547
- Name => 'ISOAutoHiLimit',
10548
- Format => 'int16u',
10549
- Unknown => 1,
10550
- ValueConv => '($val-104)/8',
10551
- ValueConvInv => '8 * ($val + 104)',
10552
- PrintConv => \%iSOAutoHiLimitZ7,
10553
- },
10554
- 346 => {
10555
- Name => 'ISOAutoFlashLimit',
10556
- Format => 'int16u',
10557
- Unknown => 1,
10558
- ValueConv => '($val-104)/8',
10559
- ValueConvInv => '8 * ($val + 104)',
10560
- PrintConv => \%iSOAutoHiLimitZ7,
10561
- },
10545
+ 344 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10546
+ 346 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10562
10547
  354 => {
10563
10548
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10564
10549
  ValueConv => '$val / 8',
@@ -10640,23 +10625,9 @@ my %nikonFocalConversions = (
10640
10625
  PrintConv => \%imageAreaZ9b,
10641
10626
  },
10642
10627
  656 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10643
- 658 => {
10644
- Name => 'MovieISOAutoHiLimit',
10645
- Format => 'int16u',
10646
- Unknown => 1,
10647
- ValueConv => '($val-104)/8',
10648
- ValueConvInv => '8 * ($val + 104)',
10649
- PrintConv => \%iSOAutoHiLimitZ7,
10650
- },
10628
+ 658 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10651
10629
  660 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10652
- 662 => {
10653
- Name => 'MovieISOAutoManualMode',
10654
- Format => 'int16u',
10655
- Unknown => 1,
10656
- ValueConv => '($val-104)/8',
10657
- ValueConvInv => '8 * ($val + 104)',
10658
- PrintConv => \%iSOAutoHiLimitZ7,
10659
- },
10630
+ 662 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10660
10631
  736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10661
10632
  738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10662
10633
  744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10683,7 +10654,7 @@ my %nikonFocalConversions = (
10683
10654
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
10684
10655
  },
10685
10656
  1498 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10686
- 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10657
+ 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10687
10658
  1506 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10688
10659
  1528 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10689
10660
  1532 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
@@ -10801,318 +10772,6 @@ my %nikonFocalConversions = (
10801
10772
  2072 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
10802
10773
  );
10803
10774
 
10804
- # menu settings for the Z9 with firmware version 5.1 (ref 28)
10805
- %Image::ExifTool::Nikon::MenuSettingsZ9v5 = (
10806
- %binaryDataAttrs,
10807
- GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10808
- DATAMEMBER => [ 158, 208, 212, 252, 332, 448, 552, 558, 574, 600 ],
10809
- IS_SUBDIR => [ 851 ],
10810
- NOTES => 'These tags are used by the Z9 firmware 5.1.',
10811
- 72 => {
10812
- Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10813
- PrintConv => \%highFrameRateZ9,
10814
- },
10815
- 158 => {
10816
- Name => 'MultipleExposureMode',
10817
- RawConv => '$$self{MultipleExposureMode} = $val',
10818
- PrintConv => \%multipleExposureModeZ9,
10819
- },
10820
- 160 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
10821
- 208 => {
10822
- Name => 'Intervals',
10823
- Format => 'int32u',
10824
- RawConv => '$$self{IntervalShootingIntervals} = $val',
10825
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
10826
- },
10827
- 212 => {
10828
- Name => 'ShotsPerInterval',
10829
- Format => 'int32u',
10830
- RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
10831
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
10832
- },
10833
- 252 => {
10834
- Name => 'FocusShiftNumberShots', #1-300
10835
- RawConv => '$$self{FocusShiftNumberShots} = $val',
10836
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10837
- },
10838
- 256 => {
10839
- Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
10840
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10841
- },
10842
- 260 => {
10843
- Name => 'FocusShiftInterval',
10844
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10845
- PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
10846
- },
10847
- 264 => {
10848
- Name => 'FocusShiftExposureLock',
10849
- Unknown => 1,
10850
- PrintConv => \%offOn,
10851
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10852
- },
10853
- 294 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
10854
- 296 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
10855
- 332 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10856
- #338 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
10857
- 346 => { Name => 'AutoISO', PrintConv => \%offOn },
10858
- 348 => {
10859
- Name => 'ISOAutoHiLimit',
10860
- Format => 'int16u',
10861
- Unknown => 1,
10862
- ValueConv => '($val-104)/8',
10863
- ValueConvInv => '8 * ($val + 104)',
10864
- PrintConv => \%iSOAutoHiLimitZ7,
10865
- },
10866
- 350 => {
10867
- Name => 'ISOAutoFlashLimit',
10868
- Format => 'int16u',
10869
- Unknown => 1,
10870
- ValueConv => '($val-104)/8',
10871
- ValueConvInv => '8 * ($val + 104)',
10872
- PrintConv => \%iSOAutoHiLimitZ7,
10873
- },
10874
- 358 => {
10875
- Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10876
- ValueConv => '$val / 8',
10877
- Format => 'int16s',
10878
- PrintConv => \%iSOAutoShutterTimeZ9,
10879
- },
10880
- 440 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10881
- 442 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
10882
- 444 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
10883
- 448 => {
10884
- Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
10885
- RawConv => '$$self{FlashControlMode} = $val',
10886
- PrintConv => \%flashControlModeZ7,
10887
- },
10888
- 450 => {
10889
- Name => 'FlashMasterCompensation',
10890
- Format => 'int8s',
10891
- Unknown => 1,
10892
- ValueConv => '$val/6',
10893
- ValueConvInv => '6 * $val',
10894
- PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
10895
- PrintConvInv => '$val',
10896
- },
10897
- 454 => {
10898
- Name => 'FlashGNDistance',
10899
- Condition => '$$self{FlashControlMode} == 2',
10900
- Unknown => 1,
10901
- ValueConv => '$val + 3',
10902
- PrintConv => \%flashGNDistance,
10903
- },
10904
- 458 => {
10905
- 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)
10906
- Condition => '$$self{FlashControlMode} >= 3',
10907
- Unknown => 1,
10908
- ValueConv => '2 ** (-$val/3)',
10909
- ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
10910
- PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
10911
- PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
10912
- },
10913
- #466 flash wireless control 0=> 'Off' 1=> 'Optical AWL'
10914
- #468 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
10915
- #480 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
10916
- 552 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
10917
- 554 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
10918
- 558 => {
10919
- Name => 'BracketSet',
10920
- RawConv => '$$self{BracketSet} = $val',
10921
- PrintConv => \%bracketSetZ9,
10922
- },
10923
- 560 => {
10924
- Name => 'BracketProgram',
10925
- Condition => '$$self{BracketSet} < 3',
10926
- Notes => 'AE and/or Flash Bracketing',
10927
- PrintConv => \%bracketProgramZ9,
10928
- },
10929
- 562 => {
10930
- Name => 'BracketIncrement',
10931
- Condition => '$$self{BracketSet} < 3',
10932
- Notes => 'AE and/or Flash Bracketing',
10933
- PrintConv => \%bracketIncrementZ9,
10934
- },
10935
- 574 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
10936
- 580 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
10937
- 586 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
10938
- 590 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
10939
- 596 => { Name => 'DXCropAlert', PrintConv => \%offOn },
10940
- 598 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
10941
- 600 => {
10942
- Name => 'DynamicAFAreaSize',
10943
- Condition => '$$self{AFAreaMode} == 2',
10944
- RawConv => '$$self{DynamicAFAreaSize} = $val',
10945
- PrintConv => \%dynamicAfAreaModesZ9,
10946
- },
10947
- 640 => { Name => 'HighFrequencyFlickerReduction', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
10948
- 650 => {
10949
- Name => 'MovieImageArea',
10950
- Unknown => 1,
10951
- Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
10952
- PrintConv => \%imageAreaZ9b,
10953
- },
10954
- 660 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10955
- 662 => {
10956
- Name => 'MovieISOAutoHiLimit',
10957
- Format => 'int16u',
10958
- Unknown => 1,
10959
- ValueConv => '($val-104)/8',
10960
- ValueConvInv => '8 * ($val + 104)',
10961
- PrintConv => \%iSOAutoHiLimitZ7,
10962
- },
10963
- 664 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10964
- 666 => {
10965
- Name => 'MovieISOAutoManualMode',
10966
- Format => 'int16u',
10967
- Unknown => 1,
10968
- ValueConv => '($val-104)/8',
10969
- ValueConvInv => '8 * ($val + 104)',
10970
- PrintConv => \%iSOAutoHiLimitZ7,
10971
- },
10972
- 740 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10973
- 742 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10974
- 748 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
10975
- 750 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
10976
- 752 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
10977
- 754 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
10978
- 756 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
10979
- 760 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
10980
- 762 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
10981
- 764 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
10982
- 766 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
10983
- 768 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
10984
- 770 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
10985
- 792 => { Name => 'MovieToneMap', PrintConv => \%movieToneMapZ9, Unknown => 1 },
10986
- 798 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
10987
- 800 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
10988
- 806 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
10989
- 807 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
10990
- 808 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
10991
- 816 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
10992
- 851 => {
10993
- Name => 'CustomSettingsZ9v4',
10994
- Format => 'undef[632]',
10995
- SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
10996
- },
10997
- 1502 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10998
- 1504 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10999
- 1510 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
11000
- 1532 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
11001
- 1536 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
11002
- 1540 => { Name => 'NonCPULens2FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11003
- 1542 => { Name => 'NonCPULens3FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11004
- 1548 => { Name => 'NonCPULens4FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11005
- 1552 => { Name => 'NonCPULens5FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11006
- 1556 => { Name => 'NonCPULens6FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11007
- 1560 => { Name => 'NonCPULens7FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11008
- 1564 => { Name => 'NonCPULens8FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11009
- 1568 => { Name => 'NonCPULens9FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11010
- 1572 => { Name => 'NonCPULens10FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11011
- 1576 => { Name => 'NonCPULens11FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11012
- 1580 => { Name => 'NonCPULens12FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11013
- 1584 => { Name => 'NonCPULens13FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11014
- 1588 => { Name => 'NonCPULens14FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11015
- 1592 => { Name => 'NonCPULens15FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11016
- 1596 => { Name => 'NonCPULens16FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11017
- 1600 => { Name => 'NonCPULens17FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11018
- 1604 => { Name => 'NonCPULens18FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11019
- 1608 => { Name => 'NonCPULens19FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11020
- 1612 => { Name => 'NonCPULens20FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11021
- 1616 => { Name => 'NonCPULens1MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1}, #non-CPU aperture interface, values and storage differ from the Z8
11022
- 1620 => { Name => 'NonCPULens2MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11023
- 1624 => { Name => 'NonCPULens3MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11024
- 1628 => { Name => 'NonCPULens4MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11025
- 1632 => { Name => 'NonCPULens5MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11026
- 1636 => { Name => 'NonCPULens6MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11027
- 1640 => { Name => 'NonCPULens7MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11028
- 1644 => { Name => 'NonCPULens8MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11029
- 1648 => { Name => 'NonCPULens9MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11030
- 1652 => { Name => 'NonCPULens10MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11031
- 1656 => { Name => 'NonCPULens11MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11032
- 1660 => { Name => 'NonCPULens12MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11033
- 1664 => { Name => 'NonCPULens13MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11034
- 1668 => { Name => 'NonCPULens14MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11035
- 1672 => { Name => 'NonCPULens15MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11036
- 1676 => { Name => 'NonCPULens16MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11037
- 1680 => { Name => 'NonCPULens17MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11038
- 1684 => { Name => 'NonCPULens18MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11039
- 1688 => { Name => 'NonCPULens19MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11040
- 1692 => { Name => 'NonCPULens20MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11041
- 1708 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
11042
- 1721 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
11043
- 1728 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
11044
- 1729 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
11045
- 1764 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
11046
- 1788 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
11047
- 1792 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
11048
- 1801 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
11049
- 1866 => {
11050
- Name => 'AutoCapturePreset',
11051
- PrintConv => {
11052
- 0 => '1',
11053
- 1 => '2',
11054
- 2 => '3',
11055
- 3 => '4',
11056
- 4 => '5',
11057
- },
11058
- },
11059
- 1868 => {
11060
- Name => 'FocusShiftAutoReset',
11061
- Unknown => 1,
11062
- PrintConv => \%offOn,
11063
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
11064
- },
11065
- 1926 => { #CSd4-a
11066
- Name => 'PreReleaseBurstLength',
11067
- PrintConv => {
11068
- 0 => 'None',
11069
- 1 => '0.3 Sec',
11070
- 2 => '0.5 Sec',
11071
- 3 => '1 Sec',
11072
- },
11073
- },
11074
- 1928 => { #CSd4-b
11075
- Name => 'PostReleaseBurstLength',
11076
- PrintConv => {
11077
- 0 => '1 Sec',
11078
- 1 => '2 Sec',
11079
- 2 => '3 Sec',
11080
- 3 => 'Max',
11081
- },
11082
- },
11083
- 1942 => { Name => 'VerticalISOButton', %buttonsZ9}, #CSf2
11084
- 1944 => { Name => 'ExposureCompensationButton', %buttonsZ9}, #CSf2
11085
- 1946 => { Name => 'ISOButton', %buttonsZ9}, #CSf2
11086
- 2006 => { Name => 'ViewModeShowEffectsOfSettings', PrintConv => { 0=>'Always', 1=> 'Only When Flash Not Used'}, Unknown => 1 }, #CSd9-a
11087
- 2008 => { Name => 'DispButton', %buttonsZ9}, #CSf2
11088
- 2052 => { #CSd6
11089
- Name => 'ExposureDelay',
11090
- Format => 'fixed32u',
11091
- PrintConv => '$val ? sprintf("%.1f sec",$val/1000) : "Off"',
11092
- },
11093
- 2056 => { #CSf2-m3
11094
- Name => 'CommandDialFrameAdvanceZoom',
11095
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11096
- PrintConv => \%dialsFrameAdvanceZoomPositionZ9,
11097
- Unknown => 1
11098
- },
11099
- 2058 => { #CSf2-n3
11100
- Name => 'SubCommandDialFrameAdvanceZoom',
11101
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11102
- PrintConv => \%dialsFrameAdvanceZoomPositionZ9,
11103
- Unknown => 1
11104
- },
11105
- 2060 => { Name => 'PlaybackButton', %buttonsZ9}, #CSf2
11106
- 2062 => { Name => 'WBButton', %buttonsZ9}, #CSf2
11107
- 2064 => { Name => 'BracketButton', %buttonsZ9}, #CSf2
11108
- 2066 => { Name => 'FlashModeButton', %buttonsZ9}, #CSf2
11109
- 2068 => { Name => 'LensFunc1ButtonPlaybackMode', %buttonsZ9}, #CSf2
11110
- 2070 => { Name => 'LensFunc2ButtonPlaybackMode', %buttonsZ9}, #CSf2
11111
- 2072 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
11112
- 2074 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
11113
- 2076 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
11114
- );
11115
-
11116
10775
  # Flash information (ref JD)
11117
10776
  %Image::ExifTool::Nikon::FlashInfo0100 = (
11118
10777
  %binaryDataAttrs,
@@ -12383,6 +12042,7 @@ my %nikonFocalConversions = (
12383
12042
  Name => 'FirmwareVersion51',
12384
12043
  Format => 'string[8]',
12385
12044
  Writable => 0,
12045
+ ValueConv => 'join ".", $val =~ /../g',
12386
12046
  },
12387
12047
  10 => {
12388
12048
  Name => 'NEFCompression',
@@ -12397,9 +12057,10 @@ my %nikonFocalConversions = (
12397
12057
  %binaryDataAttrs,
12398
12058
  GROUPS => { 0 => 'MakerNotes' },
12399
12059
  0 => {
12400
- Name => 'FirmwareVersion',
12060
+ Name => 'FirmwareVersion56',
12401
12061
  Format => 'string[4]',
12402
12062
  Writable => 0,
12063
+ ValueConv => '$val =~ s/(\d{2})/$1./; $val',
12403
12064
  },
12404
12065
  4 => {
12405
12066
  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.
@@ -13323,10 +12984,33 @@ my %nikonFocalConversions = (
13323
12984
  6 => 'High',
13324
12985
  },
13325
12986
  },
13326
- 0x20000b7 => {
12987
+ 0x20000b7 => [{
13327
12988
  Name => 'AFInfo2',
13328
- SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
13329
- },
12989
+ # LiveView-enabled DSLRs introduced starting in 2007 (D3/D300)
12990
+ Condition => '$$valPt =~ /^0100/',
12991
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0100' },
12992
+ },{
12993
+ Name => 'AFInfo2',
12994
+ # All Expeed 5 processor and most Expeed 4 processor models from 2016 - D5, D500, D850, D3400, D3500, D7500 (D5600 is v0100)
12995
+ Condition => '$$valPt =~ /^0101/',
12996
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0101' },
12997
+ },{
12998
+ Name => 'AFInfo2',
12999
+ # Nikon 1 Series cameras
13000
+ Condition => '$$valPt =~ /^020[01]/',
13001
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0200' },
13002
+ },{
13003
+ Name => 'AFInfo2',
13004
+ # Expeed 6 processor models - D6, D780, Z5, Z6, Z7, Z30, Z50, Z6_2, Z7_2 and Zfc
13005
+ Condition => '$$valPt =~ /^030[01]/',
13006
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0300' },
13007
+ },{
13008
+ Name => 'AFInfo2',
13009
+ # Expeed 7 processor models - Z8 & Z9 (AFInfo2Version 0400), Z6iii & Zf (AFInfo2Version 0401)
13010
+ # and Z50ii (AFInfo2Version 0402)
13011
+ Condition => '$$valPt =~ /^040[012]/',
13012
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
13013
+ }],
13330
13014
  # 0x20000c0 - undef[8]
13331
13015
  0x20000c3 => {
13332
13016
  Name => 'BarometerInfo',
@@ -13464,10 +13148,33 @@ my %nikonFocalConversions = (
13464
13148
  },
13465
13149
  AutoFocus => {
13466
13150
  Require => {
13467
- 0 => 'Nikon:PhaseDetectAF',
13468
- 1 => 'Nikon:ContrastDetectAF',
13151
+ 0 => 'Nikon:FocusMode',
13152
+ },
13153
+ ValueConv => '($val[0] =~ /^Manual/i) ? 0 : 1',
13154
+ PrintConv => \%offOn,
13155
+ },
13156
+ PhaseDetectAF => {
13157
+ Require => {
13158
+ 0 => 'Nikon:FocusPointSchema',
13159
+ 1 => 'Nikon:AFDetectionMethod',
13160
+ },
13161
+ ValueConv => '(($val[1]) == 0) ? ($val[0]) : 0', # for backward compatibility, report FocusPointSchema when AFDetectionMethod indicates Phase Detect is on
13162
+ PrintConv => {
13163
+ 0 => 'Off', #contrast detect or hybrid detect
13164
+ 1 => 'On (51-point)', #PH
13165
+ 2 => 'On (11-point)', #PH
13166
+ 3 => 'On (39-point)', #29 (D7000)
13167
+ 7 => 'On (153-point)', #PH (D5/D500/D850)
13168
+ #8 => 'On (81-point)', #38 will not see this value - only available in hybrid detect
13169
+ 9 => 'On (105-point)', #28 (D6)
13170
+ },
13171
+ },
13172
+ ContrastDetectAF => {
13173
+ Require => {
13174
+ 0 => 'Nikon:FocusMode',
13175
+ 1 => 'Nikon:AFDetectionMethod',
13469
13176
  },
13470
- ValueConv => '($val[0] or $val[1]) ? 1 : 0',
13177
+ ValueConv => '(($val[0] !~ /^Manual/i) and ($val[1] == 1)) ? 1 : 0',
13471
13178
  PrintConv => \%offOn,
13472
13179
  },
13473
13180
  );
@@ -13622,7 +13329,7 @@ sub PrintAFPointsGridInv($$$)
13622
13329
  sub PrintAFPointsLeftRight($$)
13623
13330
  {
13624
13331
  my ($col, $ncol) = @_;
13625
- my $center = 1 + ($ncol + 1)/2;
13332
+ my $center = ($ncol + 1) / 2;
13626
13333
  return 'n/a' if $col == 0; #out of focus
13627
13334
  return 'C' if $col == $center;
13628
13335
  return sprintf('%d', $center - $col) . 'L of Center' if $col < $center;
@@ -13636,7 +13343,7 @@ sub PrintAFPointsLeftRight($$)
13636
13343
  sub PrintAFPointsUpDown($$)
13637
13344
  {
13638
13345
  my ($row, $nrow) = @_;
13639
- my $center = 1 + ($nrow + 1)/2;
13346
+ my $center = ($nrow + 1) / 2;
13640
13347
  return 'n/a' if $row == 0; #out of focus
13641
13348
  return 'C' if $row == $center;
13642
13349
  return sprintf('%d', $center - $row) . 'U from Center' if $row < $center;