exiftool-vendored.pl 13.17.0 → 13.25.1

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 (50) hide show
  1. package/bin/Changes +102 -7
  2. package/bin/MANIFEST +14 -0
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +1 -1
  5. package/bin/README +46 -46
  6. package/bin/config_files/example.config +1 -1
  7. package/bin/exiftool +211 -121
  8. package/bin/lib/Image/ExifTool/Apple.pm +12 -2
  9. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +2 -2
  10. package/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  11. package/bin/lib/Image/ExifTool/DJI.pm +190 -29
  12. package/bin/lib/Image/ExifTool/DarwinCore.pm +22 -11
  13. package/bin/lib/Image/ExifTool/EXE.pm +2 -9
  14. package/bin/lib/Image/ExifTool/GM.pm +1 -1
  15. package/bin/lib/Image/ExifTool/GPS.pm +3 -3
  16. package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  17. package/bin/lib/Image/ExifTool/GoPro.pm +86 -48
  18. package/bin/lib/Image/ExifTool/ICO.pm +2 -2
  19. package/bin/lib/Image/ExifTool/JPEG.pm +5 -1
  20. package/bin/lib/Image/ExifTool/JSON.pm +5 -1
  21. package/bin/lib/Image/ExifTool/Kodak.pm +3 -2
  22. package/bin/lib/Image/ExifTool/Nikon.pm +943 -1237
  23. package/bin/lib/Image/ExifTool/Olympus.pm +2 -1
  24. package/bin/lib/Image/ExifTool/PCAP.pm +462 -0
  25. package/bin/lib/Image/ExifTool/PDF.pm +10 -1
  26. package/bin/lib/Image/ExifTool/PLIST.pm +92 -29
  27. package/bin/lib/Image/ExifTool/PNG.pm +7 -1
  28. package/bin/lib/Image/ExifTool/Photoshop.pm +2 -2
  29. package/bin/lib/Image/ExifTool/Plot.pm +713 -0
  30. package/bin/lib/Image/ExifTool/Protobuf.pm +24 -11
  31. package/bin/lib/Image/ExifTool/Qualcomm.pm +78 -1
  32. package/bin/lib/Image/ExifTool/QuickTime.pm +347 -318
  33. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +75 -27
  34. package/bin/lib/Image/ExifTool/Sony.pm +33 -14
  35. package/bin/lib/Image/ExifTool/TagLookup.pm +5056 -4967
  36. package/bin/lib/Image/ExifTool/TagNames.pod +443 -334
  37. package/bin/lib/Image/ExifTool/Trailer.pm +3 -3
  38. package/bin/lib/Image/ExifTool/Validate.pm +4 -4
  39. package/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  40. package/bin/lib/Image/ExifTool/WriteExif.pl +9 -4
  41. package/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  42. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +58 -5
  43. package/bin/lib/Image/ExifTool/Writer.pl +14 -13
  44. package/bin/lib/Image/ExifTool/XMP.pm +34 -6
  45. package/bin/lib/Image/ExifTool/XMP2.pl +2 -0
  46. package/bin/lib/Image/ExifTool.pm +63 -29
  47. package/bin/lib/Image/ExifTool.pod +83 -86
  48. package/bin/perl-Image-ExifTool.spec +45 -45
  49. package/bin/windows_exiftool.txt +95 -71
  50. package/package.json +6 -3
@@ -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.45';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -840,6 +840,73 @@ my %activeDLightingZ7 = (
840
840
  5 => 'Extra High',
841
841
  );
842
842
 
843
+ my %aFAreaModeCD = ( #contrast detect modes
844
+ 0 => 'Contrast-detect', # (D3)
845
+ 1 => 'Contrast-detect (normal area)', # (D90/D5000)
846
+ # (D90 and D5000 give value of 2 when set to 'Face Priority' and
847
+ # 'Subject Tracking', but I didn't have a face to shoot at or a
848
+ # moving subject to track so perhaps this value changes dynamically)
849
+ 2 => 'Contrast-detect (wide area)', # (D90/D5000)
850
+ 3 => 'Contrast-detect (face priority)', # (ViewNX)
851
+ 4 => 'Contrast-detect (subject tracking)', # (ViewNX)
852
+ 128 => 'Single', #PH (1V3)
853
+ 129 => 'Auto (41 points)', #PH (NC)
854
+ 130 => 'Subject Tracking (41 points)', #PH (NC)
855
+ 131 => 'Face Priority (41 points)', #PH (NC)
856
+ 192 => 'Pinpoint', #PH (Z7)
857
+ 193 => 'Single', #PH (Z7)
858
+ 194 => 'Dynamic', #PH (Z7)
859
+ 195 => 'Wide (S)', #PH (Z7)
860
+ 196 => 'Wide (L)', #PH (Z7)
861
+ 197 => 'Auto', #PH (Z7)
862
+ 198 => 'Auto (People)', #28 (Z7) #if no faces are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
863
+ 199 => 'Auto (Animal)', #28 (Z7) #if no animals are detected, will record as 'Auto'. Camera setting recorded in AFAreaMode field in the MakerNotes area
864
+ 200 => 'Normal-area AF', #28 (D6)
865
+ 201 => 'Wide-area AF', #28 (D6)
866
+ 202 => 'Face-priority AF', #28 (D6)
867
+ 203 => 'Subject-tracking AF', #28 (D6)
868
+ 204 => 'Dynamic Area (S)', #28 (Z9)
869
+ 205 => 'Dynamic Area (M)', #28 (Z9)
870
+ 206 => 'Dynamic Area (L)', #28 (Z9)
871
+ 207 => '3D-tracking', #28 (Z9)
872
+ 208 => 'Wide-Area (C1/C2)', #28 (Z8, Z9)
873
+ );
874
+
875
+ my %aFAreaModePD = ( #phase detect modes
876
+ 0 => 'Single Area', # (called "Single Point" in manual - PH)
877
+ 1 => 'Dynamic Area', #PH
878
+ 2 => 'Dynamic Area (closest subject)', #PH
879
+ 3 => 'Group Dynamic', #PH
880
+ 4 => 'Dynamic Area (9 points)', #JD/28
881
+ 5 => 'Dynamic Area (21 points)', #28
882
+ 6 => 'Dynamic Area (51 points)', #28
883
+ 7 => 'Dynamic Area (51 points, 3D-tracking)', #PH/28
884
+ 8 => 'Auto-area',
885
+ 9 => 'Dynamic Area (3D-tracking)', #PH (D5000 "3D-tracking (11 points)")
886
+ 10 => 'Single Area (wide)', #PH
887
+ 11 => 'Dynamic Area (wide)', #PH
888
+ 12 => 'Dynamic Area (wide, 3D-tracking)', #PH
889
+ 13 => 'Group Area', #PH
890
+ 14 => 'Dynamic Area (25 points)', #PH
891
+ 15 => 'Dynamic Area (72 points)', #PH
892
+ 16 => 'Group Area (HL)', #28
893
+ 17 => 'Group Area (VL)', #28
894
+ 18 => 'Dynamic Area (49 points)', #28
895
+ 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
896
+ 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
897
+ 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
898
+ 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
899
+ # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
900
+ # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
901
+ 192 => 'Pinpoint', #PH (NC)
902
+ 193 => 'Single', #PH (NC)
903
+ 194 => 'Dynamic', #28 (Z7)
904
+ 195 => 'Wide (S)', #PH (NC)
905
+ 196 => 'Wide (L)', #PH (NC)
906
+ 197 => 'Auto', #PH (NC)
907
+ 199 => 'Auto', #28 (Z7) Z7 has also been observed to record 197 for Auto-area (same camera, different firmware versions, early production model)
908
+ );
909
+
843
910
  my %aFAreaModeZ9 = (
844
911
  0 => 'Pinpoint',
845
912
  1 => 'Single',
@@ -853,6 +920,13 @@ my %aFAreaModeZ9 = (
853
920
  13 => 'Wide (C2)',
854
921
  );
855
922
 
923
+ my %aFDetectionMethod = (
924
+ 0 => 'Phase Detect', #thru viewfinder
925
+ 1 => 'Contrast Detect', #LiveView
926
+ 2 => 'Hybrid', #Z-series and D780
927
+ );
928
+
929
+
856
930
  my %banksZ9 = (
857
931
  0 => 'A',
858
932
  1 => 'B',
@@ -1021,38 +1095,31 @@ my %iSOAutoHiLimitZ6III = ( #28
1021
1095
  35 => 'ISO Hi 1.7',
1022
1096
  );
1023
1097
 
1024
- my %iSOAutoHiLimitZ7 = (
1025
- 0 => 'ISO 64',
1026
- 1 => 'ISO 80',
1027
- 2 => 'ISO 100',
1028
- 3 => 'ISO 125',
1029
- 4 => 'ISO 160',
1030
- 5 => 'ISO 200',
1031
- 6 => 'ISO 250',
1032
- 7 => 'ISO 320',
1033
- 8 => 'ISO 400',
1034
- 9 => 'ISO 500',
1035
- 10 => 'ISO 640',
1036
- 11 => 'ISO 800',
1037
- 12 => 'ISO 1000',
1038
- 13 => 'ISO 1250',
1039
- 14 => 'ISO 1600',
1040
- 15 => 'ISO 2000',
1041
- 16 => 'ISO 2500',
1042
- 17 => 'ISO 3200',
1043
- 18 => 'ISO 4000',
1044
- 19 => 'ISO 5000',
1045
- 20 => 'ISO 6400',
1046
- 21 => 'ISO 8000',
1047
- 22 => 'ISO 10000',
1048
- 23 => 'ISO 12800',
1049
- 24 => 'ISO 16000',
1050
- 25 => 'ISO 20000',
1051
- 26 => 'ISO 25600',
1052
- 27 => 'ISO Hi 0.3',
1053
- 28 => 'ISO Hi 0.7',
1054
- 29 => 'ISO Hi 1.0',
1055
- 32 => 'ISO Hi 2.0',
1098
+ my %isoAutoHiLimitZ7 = (
1099
+ Format => 'int16u',
1100
+ Unknown => 1,
1101
+ ValueConv => '($val-104)/8',
1102
+ ValueConvInv => '8 * ($val + 104)',
1103
+ SeparateTable => 'ISOAutoHiLimitZ7',
1104
+ PrintConv => {
1105
+ 0 => 'ISO 64', 17 => 'ISO 3200',
1106
+ 1 => 'ISO 80', 18 => 'ISO 4000',
1107
+ 2 => 'ISO 100', 19 => 'ISO 5000',
1108
+ 3 => 'ISO 125', 20 => 'ISO 6400',
1109
+ 4 => 'ISO 160', 21 => 'ISO 8000',
1110
+ 5 => 'ISO 200', 22 => 'ISO 10000',
1111
+ 6 => 'ISO 250', 23 => 'ISO 12800',
1112
+ 7 => 'ISO 320', 24 => 'ISO 16000',
1113
+ 8 => 'ISO 400', 25 => 'ISO 20000',
1114
+ 9 => 'ISO 500', 26 => 'ISO 25600',
1115
+ 10 => 'ISO 640', 27 => 'ISO Hi 0.3',
1116
+ 11 => 'ISO 800', 28 => 'ISO Hi 0.7',
1117
+ 12 => 'ISO 1000', 29 => 'ISO Hi 1.0',
1118
+ 13 => 'ISO 1250', 32 => 'ISO Hi 2.0',
1119
+ 14 => 'ISO 1600',
1120
+ 15 => 'ISO 2000',
1121
+ 16 => 'ISO 2500',
1122
+ },
1056
1123
  );
1057
1124
 
1058
1125
  my %iSOAutoShutterTimeZ9 = (
@@ -1203,29 +1270,23 @@ my %multipleExposureModeZ9 = (
1203
1270
  );
1204
1271
 
1205
1272
  my %nonCPULensApertureZ8 = ( # 2**(val/6) rounded - non-CPU aperture interface, values and storage differ from the Z8
1206
- 12 => 'f/1.2',
1207
- 24 => 'f/1.4',
1208
- 40 => 'f/1.8',
1209
- 48 => 'f/2.0',
1210
- 64 => 'f/2.5',
1211
- 72 => 'f/2.8',
1212
- 84 => 'f/3.3',
1213
- 88 => 'f/3.5',
1214
- 96 => 'f/4.0',
1215
- 104 => 'f/4.5',
1216
- 112 => 'f/5.0',
1217
- 120 => 'f/5.6',
1218
- 128 => 'f/6.3',
1219
- 136 => 'f/7.1',
1220
- 144 => 'f/8',
1221
- 156 => 'f/9.5',
1222
- 168 => 'f/11',
1223
- 180 => 'f/13',
1224
- 188 => 'f/15',
1225
- 192 => 'f/16',
1226
- 204 => 'f/19',
1227
- 216 => 'f/22',
1228
- 313 => 'N/A', #camera menu shows "--" indicating value has not been set for the lens
1273
+ Format => 'int16u',
1274
+ Unknown => 1,
1275
+ SeparateTable => 'NonCPULensApertureZ8',
1276
+ PrintConv => {
1277
+ 12 => 'f/1.2', 128 => 'f/6.3',
1278
+ 24 => 'f/1.4', 136 => 'f/7.1',
1279
+ 40 => 'f/1.8', 144 => 'f/8',
1280
+ 48 => 'f/2.0', 156 => 'f/9.5',
1281
+ 64 => 'f/2.5', 168 => 'f/11',
1282
+ 72 => 'f/2.8', 180 => 'f/13',
1283
+ 84 => 'f/3.3', 188 => 'f/15',
1284
+ 88 => 'f/3.5', 192 => 'f/16',
1285
+ 96 => 'f/4.0', 204 => 'f/19',
1286
+ 104 => 'f/4.5', 216 => 'f/22',
1287
+ 112 => 'f/5.0', 313 => 'N/A', #camera menu shows "--" indicating value has not been set for the lens,
1288
+ 120 => 'f/5.6',
1289
+ },
1229
1290
  );
1230
1291
 
1231
1292
  my %offLowNormalHighZ7 = (
@@ -1273,7 +1334,7 @@ my %secondarySlotFunctionZ9 = (
1273
1334
  3 => 'JPG Primary + JPG Secondary',
1274
1335
  );
1275
1336
 
1276
- my %subjectDetectionAreaMZ6III = ( #28
1337
+ my %subjectDetectionAreaMZ6III = ( #28
1277
1338
  0 => 'Off',
1278
1339
  1 => 'All',
1279
1340
  2 => 'Wide (L)',
@@ -1370,6 +1431,25 @@ my %retouchValues = ( #PH
1370
1431
  54 => 'Low Key', # (S3500)
1371
1432
  );
1372
1433
 
1434
+ # AF points for AFInfo models with 11 focus points
1435
+ my %afPoints11 = (
1436
+ 0 => '(none)',
1437
+ 0x7ff => 'All 11 Points',
1438
+ BITMASK => {
1439
+ 0 => 'Center',
1440
+ 1 => 'Top',
1441
+ 2 => 'Bottom',
1442
+ 3 => 'Mid-left',
1443
+ 4 => 'Mid-right',
1444
+ 5 => 'Upper-left',
1445
+ 6 => 'Upper-right',
1446
+ 7 => 'Lower-left',
1447
+ 8 => 'Lower-right',
1448
+ 9 => 'Far Left',
1449
+ 10 => 'Far Right',
1450
+ },
1451
+ );
1452
+
1373
1453
  # AF point indices for models with 51 focus points, eg. D3 (ref JD/PH)
1374
1454
  # A1 A2 A3 A4 A5 A6 A7 A8 A9
1375
1455
  # B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11
@@ -1511,7 +1591,7 @@ my %afPoints153 = (
1511
1591
  31 => 'B8', 62 => 'H13', 93 => 'C17', 124 => 'G4',
1512
1592
  );
1513
1593
 
1514
- # AF point indices for models with 81 focus points, eg. Z6/Z7/Z50 (ref 38)
1594
+ # AF point indices for models with 81 Auto-area focus points, eg. Z6/Z7/Z50 (ref 38)
1515
1595
  # - 9 rows (A-I) with 9 columns (1-9), center is E5
1516
1596
  #
1517
1597
  # 7 6 5 4 3 2 1 0
@@ -3006,15 +3086,31 @@ my %base64coord = (
3006
3086
  PrintConvInv => '$self->InverseDateTime($val,0)',
3007
3087
  },
3008
3088
  0x00b7 => [{
3089
+ Name => 'AFInfo2',
3090
+ # LiveView-enabled DSLRs introduced starting in 2007 (D3/D300)
3091
+ Condition => '$$valPt =~ /^0100/',
3092
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0100' },
3093
+ },{
3094
+ Name => 'AFInfo2',
3095
+ # All Expeed 5 processor and most Expeed 4 processor models from 2016 - D5, D500, D850, D3400, D3500, D7500 (D5600 is v0100)
3096
+ Condition => '$$valPt =~ /^0101/',
3097
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0101' },
3098
+ },{
3099
+ Name => 'AFInfo2',
3100
+ # Nikon 1 Series cameras
3101
+ Condition => '$$valPt =~ /^020[01]/',
3102
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0200' },
3103
+ },{
3104
+ Name => 'AFInfo2',
3105
+ # Expeed 6 processor models - D6, D780, Z5, Z6, Z7, Z30, Z50, Z6_2, Z7_2 and Zfc
3106
+ Condition => '$$valPt =~ /^030[01]/',
3107
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0300' },
3108
+ },{
3009
3109
  Name => 'AFInfo2',
3010
3110
  # Expeed 7 processor models - Z8 & Z9 (AFInfo2Version 0400), Z6iii & Zf (AFInfo2Version 0401)
3011
3111
  # and Z50ii (AFInfo2Version 0402)
3012
3112
  Condition => '$$valPt =~ /^040[012]/',
3013
3113
  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
3114
  }],
3019
3115
  0x00b8 => [{ #PH
3020
3116
  Name => 'FileInfo',
@@ -4027,147 +4123,59 @@ my %base64coord = (
4027
4123
  Name => 'AFPointsInFocus',
4028
4124
  Format => 'int16u',
4029
4125
  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
- },
4126
+ PrintConv => \%afPoints11,
4047
4127
  },
4048
4128
  );
4049
4129
 
4050
- # Nikon AF information for D3 and D300 (ref JD)
4051
- %Image::ExifTool::Nikon::AFInfo2 = (
4130
+ %Image::ExifTool::Nikon::AFInfo2V0100 = (
4052
4131
  %binaryDataAttrs,
4053
4132
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4054
4133
  DATAMEMBER => [ 0, 4, 6 ],
4055
- NOTES => "These tags are written by Nikon DSLR's which have the live view feature.",
4134
+ NOTES => q{
4135
+ AF information for Nikon cameras with LiveView that were introduced 2007
4136
+ thru 2015 (and the D5600 in 2016), including D3, D4, D3000, D3100-D3300,
4137
+ D5000-D5600, D6x0, D700, D7000, D7100, D810
4138
+ },
4056
4139
  0 => {
4057
4140
  Name => 'AFInfo2Version',
4058
4141
  Format => 'undef[4]',
4059
4142
  Writable => 0,
4060
4143
  RawConv => '$$self{AFInfo2Version} = $val',
4061
4144
  },
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',
4145
+ 4 => {
4146
+ Name => 'AFDetectionMethod', #specifies phase detect or contrast detect
4147
+ RawConv => '$$self{AFDetectionMethod} = $val',
4148
+ PrintConv => \%aFDetectionMethod ,
4070
4149
  },
4071
4150
  5 => [
4072
4151
  {
4073
4152
  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
- },
4153
+ Condition => '$$self{AFDetectionMethod} == 0',
4154
+ PrintConv => \%aFAreaModePD, #phase detect
4108
4155
  },
4109
- { #PH (D3/D90/D5000)
4156
+ {
4110
4157
  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
- },
4158
+ PrintConv => \%aFAreaModeCD, #contrast detect
4143
4159
  },
4144
4160
  ],
4145
4161
  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',
4162
+ Name => 'FocusPointSchema',
4163
+ RawConv => '$$self{FocusPointSchema} = $val',
4164
+ Hidden => 1,
4149
4165
  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)
4166
+ 0 => 'Off', # LiveView or manual focus or no focus
4167
+ 1 => '51-point', # (D3/D3S/D3X/D4/D4S/D300/D300S/D700/D750/D800/D800E/D810/D7100/D7200)
4168
+ 2 => '11-point', # (D90/D3000/D3100/D3200/D3300/D5000/D5100)
4169
+ 3 => '39-point', # (D600/D610/D5200/D5300/D5500/D5600/D7000/Df)
4161
4170
  },
4162
4171
  },
4163
4172
  7 => [
4164
4173
  { #PH/JD
4165
4174
  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/',
4175
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4168
4176
  Notes => q{
4169
4177
  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
4178
+ D4, D4S, D300, D300S, D700, D750, D800, D800E, D810, D7100 and D7200
4171
4179
  },
4172
4180
  PrintConvColumns => 5,
4173
4181
  PrintConv => {
@@ -4175,11 +4183,10 @@ my %base64coord = (
4175
4183
  %afPoints51,
4176
4184
  1 => 'C6 (Center)', # (add " (Center)" to central point)
4177
4185
  },
4178
- },
4179
- { #10
4186
+ },{ #10
4180
4187
  Name => 'PrimaryAFPoint',
4181
- Notes => 'models with 11-point AF: D90, D3000, D3100, D5000 and D5100',
4182
- Condition => '$$self{PhaseDetectAF} == 2',
4188
+ Notes => 'models with 11-point AF: D90, D3000-D3300, D5000 and D5100',
4189
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4183
4190
  PrintConvColumns => 2,
4184
4191
  PrintConv => {
4185
4192
  0 => '(none)',
@@ -4195,11 +4202,10 @@ my %base64coord = (
4195
4202
  10 => 'Lower-right',
4196
4203
  11 => 'Far Right',
4197
4204
  },
4198
- },
4199
- { #29
4205
+ },{ #29
4200
4206
  Name => 'PrimaryAFPoint',
4201
- Condition => '$$self{PhaseDetectAF} == 3',
4202
- Notes => 'models with 39-point AF: D600 and D7000',
4207
+ Condition => '$$self{FocusPointSchema} == 3', #39 focus-point models
4208
+ Notes => 'models with 39-point AF: D600, D610, D5200-D5600, D7000 and Df',
4203
4209
  PrintConvColumns => 5,
4204
4210
  PrintConv => {
4205
4211
  0 => '(none)',
@@ -4207,83 +4213,16 @@ my %base64coord = (
4207
4213
  1 => 'C6 (Center)', # (add " (Center)" to central point)
4208
4214
  },
4209
4215
  },
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
4216
  {
4274
4217
  Name => 'PrimaryAFPoint',
4275
- Condition => '$$self{AFInfo2Version} eq "0100"',
4276
- Notes => 'future models?...',
4277
- PrintConv => {
4278
- 0 => '(none)',
4279
- 1 => 'Center',
4280
- },
4218
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4219
+ PrintConv => { 0 => '(none)', },
4281
4220
  },
4282
4221
  ],
4283
4222
  8 => [
4284
4223
  { #JD/PH
4285
4224
  Name => 'AFPointsUsed',
4286
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
4225
+ Condition => '$$self{FocusPointSchema} == 1', # 51 focus-point models
4287
4226
  Notes => q{
4288
4227
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4289
4228
  point is C6
@@ -4291,12 +4230,12 @@ my %base64coord = (
4291
4230
  Format => 'undef[7]',
4292
4231
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
4293
4232
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4294
- PrintConv => sub { PrintAFPoints(shift, \%afPoints51); },
4295
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51); },
4233
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4234
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4296
4235
  },
4297
4236
  { #10
4298
4237
  Name => 'AFPointsUsed',
4299
- Condition => '$$self{PhaseDetectAF} == 2',
4238
+ Condition => '$$self{FocusPointSchema} == 2', # 11 focus-point models
4300
4239
  Notes => 'models with 11-point AF',
4301
4240
  # read as int16u in little-endian byte order
4302
4241
  Format => 'undef[2]',
@@ -4323,7 +4262,7 @@ my %base64coord = (
4323
4262
  },
4324
4263
  { #29/PH
4325
4264
  Name => 'AFPointsUsed',
4326
- Condition => '$$self{PhaseDetectAF} == 3',
4265
+ Condition => '$$self{FocusPointSchema} == 3', # 39 focus-point models
4327
4266
  Notes => q{
4328
4267
  models with 39-point AF -- 5 rows: A1-3, B1-11, C1-11, D1-11, E1-3. Center
4329
4268
  point is C6
@@ -4331,298 +4270,246 @@ my %base64coord = (
4331
4270
  Format => 'undef[5]',
4332
4271
  ValueConv => 'join(" ", unpack("H2"x5, $val))',
4333
4272
  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); },
4273
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints39) },
4274
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints39) },
4389
4275
  },
4390
- { #PH
4276
+ {
4391
4277
  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
- },
4278
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4279
+ PrintConv => { 0 => '(none)', },
4420
4280
  },
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
4281
  ],
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
4282
  0x10 => { #PH (D90 and D5000)
4474
4283
  Name => 'AFImageWidth',
4475
- Condition => '$$self{AFInfo2Version} eq "0100"',
4284
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4476
4285
  Format => 'int16u',
4477
4286
  RawConv => '$val ? $val : undef',
4478
4287
  Notes => 'this and the following tags are valid only for contrast-detect AF',
4479
4288
  },
4480
4289
  0x12 => { #PH
4481
4290
  Name => 'AFImageHeight',
4482
- Condition => '$$self{AFInfo2Version} eq "0100"',
4291
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4483
4292
  Format => 'int16u',
4484
4293
  RawConv => '$val ? $val : undef',
4485
4294
  },
4486
4295
  0x14 => { #PH
4487
4296
  Name => 'AFAreaXPosition',
4488
- Condition => '$$self{AFInfo2Version} eq "0100"',
4297
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4489
4298
  Notes => 'center of AF area in AFImage coordinates',
4490
4299
  Format => 'int16u',
4491
4300
  RawConv => '$val ? $val : undef',
4492
4301
  },
4493
4302
  0x16 => { #PH
4494
4303
  Name => 'AFAreaYPosition',
4495
- Condition => '$$self{AFInfo2Version} eq "0100"',
4304
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4496
4305
  Format => 'int16u',
4497
4306
  RawConv => '$val ? $val : undef',
4498
4307
  },
4499
- # AFAreaWidth/Height for the D90 and D5000:
4500
- # 352x288 (AF normal area),
4501
- # 704x576 (AF face priority, wide area, subject tracking)
4502
4308
  0x18 => { #PH
4503
4309
  Name => 'AFAreaWidth',
4504
- Condition => '$$self{AFInfo2Version} eq "0100"',
4310
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4505
4311
  Format => 'int16u',
4506
4312
  Notes => 'size of AF area in AFImage coordinates',
4507
4313
  RawConv => '$val ? $val : undef',
4508
4314
  },
4509
4315
  0x1a => { #PH
4510
4316
  Name => 'AFAreaHeight',
4511
- Condition => '$$self{AFInfo2Version} eq "0100"',
4317
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4512
4318
  Format => 'int16u',
4513
4319
  RawConv => '$val ? $val : undef',
4514
4320
  },
4515
4321
  0x1c => [
4516
4322
  { #PH
4517
4323
  Name => 'ContrastDetectAFInFocus',
4518
- Condition => '$$self{AFInfo2Version} eq "0100"',
4324
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4519
4325
  PrintConv => { 0 => 'No', 1 => 'Yes' },
4520
4326
  },{ #PH (D500, see forum11190)
4521
4327
  Name => 'AFPointsSelected',
4522
- Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
4328
+ Condition => '$$self{FocusPointSchema} == 7',
4523
4329
  Format => 'undef[20]',
4524
4330
  ValueConv => 'join(" ", unpack("H2"x20, $val))',
4525
4331
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4526
- PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
4527
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
4528
- },
4332
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4333
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4334
+ },
4335
+ # (#28) this is incorrect - [observed values 0, 1, 16, 64, 128, 1024 (mostly 0 & 1), but not tied to the display of focus point in NXStudio]
4336
+ #{ #PH (D3400) (NC "selected")
4337
+ # Name => 'AFPointsSelected',
4338
+ # Condition => '$$self{FocusPointSchema} == 2',
4339
+ # Format => 'int16u',
4340
+ # PrintConv => \%afPoints11,
4341
+ #},
4529
4342
  ],
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',
4343
+ );
4344
+
4345
+ %Image::ExifTool::Nikon::AFInfo2V0101 = (
4346
+ %binaryDataAttrs,
4347
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4348
+ DATAMEMBER => [ 0, 4, 5, 6 ],
4349
+ NOTES => q{
4350
+ AF information for Nikon cameras D5, D500, D850, D3400, D3500 and D7500
4536
4351
  },
4537
- 0x2c => { #PH (Z7)
4538
- Name => 'AFImageHeight',
4539
- Condition => '$$self{AFInfo2Version} =~ /^03/',
4540
- Format => 'int16u',
4541
- RawConv => '$val ? $val : undef',
4352
+ 0 => {
4353
+ Name => 'AFInfo2Version',
4354
+ Format => 'undef[4]',
4355
+ Writable => 0,
4356
+ RawConv => '$$self{AFInfo2Version} = $val',
4542
4357
  },
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)
4358
+ 4 => {
4359
+ Name => 'AFDetectionMethod',
4360
+ RawConv => '$$self{AFDetectionMethod} = $val',
4361
+ PrintConv => \%aFDetectionMethod,
4550
4362
  },
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/
4363
+ 5 => [
4364
+ {
4365
+ Name => 'AFAreaMode',
4366
+ Condition => '$$self{AFDetectionMethod} == 0',
4367
+ RawConv => '$$self{AFAreaMode} = $val',
4368
+ PrintConv => \%aFAreaModePD, #phase detect
4556
4369
  },
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); },
4370
+ {
4371
+ Name => 'AFAreaMode',
4372
+ RawConv => '$$self{AFAreaMode} = $val',
4373
+ PrintConv => \%aFAreaModeCD, #contrast detect
4576
4374
  },
4577
4375
  ],
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,
4376
+ 6 => {
4377
+ Name => 'FocusPointSchema',
4378
+ RawConv => '$$self{FocusPointSchema} = $val',
4379
+ Hidden => 1,
4605
4380
  PrintConv => {
4606
- 0 => '(none)',
4607
- %afPoints105,
4608
- 1 => 'D8 (Center)',
4381
+ 0 => 'Off', # LiveView or manual focus or no focus
4382
+ 1 => '51-point', # (D7500)
4383
+ 2 => '11-point', # (D3400/D3500)
4384
+ 7 => '153-point', # (D5/D500/D850) 153 focus points (17 columns x 9 rows) - of these 55 are user selectable (11 columns x 5 rows)
4609
4385
  },
4610
4386
  },
4611
- 0x44 => [
4612
- {
4387
+ 8 => [
4388
+ { #JD/PH
4389
+ Name => 'AFPointsUsed',
4390
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4391
+ Notes => q{
4392
+ models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4393
+ point is C6
4394
+ },
4395
+ Format => 'undef[7]',
4396
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4397
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4398
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4399
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4400
+ },{ #10
4401
+ Name => 'AFPointsUsed',
4402
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4403
+ Notes => 'models with 11-point AF',
4404
+ # read as int16u in little-endian byte order
4405
+ Format => 'undef[2]',
4406
+ ValueConv => 'unpack("v",$val)',
4407
+ ValueConvInv => 'pack("v",$val)',
4408
+ PrintConvColumns => 2,
4409
+ PrintConv => {
4410
+ 0 => '(none)',
4411
+ 0x7ff => 'All 11 Points',
4412
+ BITMASK => {
4413
+ 0 => 'Center',
4414
+ 1 => 'Top',
4415
+ 2 => 'Bottom',
4416
+ 3 => 'Mid-left',
4417
+ 4 => 'Upper-left',
4418
+ 5 => 'Lower-left',
4419
+ 6 => 'Far Left',
4420
+ 7 => 'Mid-right',
4421
+ 8 => 'Upper-right',
4422
+ 9 => 'Lower-right',
4423
+ 10 => 'Far Right',
4424
+ },
4425
+ },
4426
+ },
4427
+ { #PH (D5,D500, D850)
4428
+ Name => 'AFPointsUsed', #when focus is not obtained, will report '(none)' otherwise will report a single point from among AFPointsSelected
4429
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4430
+ Notes => q{
4431
+ models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17). Center
4432
+ point is E9
4433
+ },
4434
+ Format => 'undef[20]',
4435
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4436
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4437
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4438
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4439
+ },{
4440
+ Name => 'AFPointsUsed',
4441
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4442
+ PrintConv => { 0 => '(none)', },
4443
+ },
4444
+ ],
4445
+ 0x1c => [
4446
+ {#PH
4447
+ Name => 'ContrastDetectAFInFocus',
4448
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4449
+ PrintConv => { 0 => 'No', 1 => 'Yes' },
4450
+ },
4451
+ { #JD/PH
4452
+ Name => 'AFPointsUsed',
4453
+ Condition => '$$self{FocusPointSchema} == 1 and
4454
+ ($$self{AFAreaMode} == 8 or $$self{AFAreaMode} == 9 or $$self{AFAreaMode} == 13 )', #phase detect 51 focus-point models
4455
+ Format => 'undef[7]',
4456
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4457
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4458
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4459
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4460
+ },{ #PH (D500, see forum11190)
4461
+ Name => 'AFPointsSelected', # where the viewfinder AF point(s) were positioned when initiating focus in AFAreaMode 3D-tracking Group-area
4462
+ # will contain a value regardless of whether or not focus was obtained
4463
+ # reflects the focus points displayed by NXStudio when AFAreaMode is Group-area
4464
+ Condition => '$$self{FocusPointSchema} == 7 and
4465
+ ($$self{AFAreaMode} == 8 or $$self{AFAreaMode} == 9 or $$self{AFAreaMode} == 13 )', #phase detect 153 focus-point models in Auto-area/3D-tracking/Group-area
4466
+ Format => 'undef[20]',
4467
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4468
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4469
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4470
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4471
+ },
4472
+ ],
4473
+ 0x30 => [
4474
+ { #PH (D7500) (NC "in focus")
4475
+ Name => 'AFPointsInFocus', # refelcts the focus point(s) displayed by NXStudio when AFAreaMode is Auto-area or 3D-tracking.
4476
+ # erroneously named as there is no assurance the reported points are in focus
4477
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4478
+ Format => 'undef[7]',
4479
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4480
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4481
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4482
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4483
+ },{ #PH (D500, see forum11190)
4484
+ Name => 'AFPointsInFocus',
4485
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4486
+ Notes => 'AF points in focus at the time time image was captured',
4487
+ Format => 'undef[20]',
4488
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
4489
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4490
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153) },
4491
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153) },
4492
+ },
4493
+ ],
4494
+ 0x44 => [ #AFInfoVersion 0100 use 0x08 for this tag. v0101 could do that as well. The difference is that when Group-area fails to focus..
4495
+ #...this code (incorrectly) reports a value for PrimaryAFPoint. Moving this code to the 0x08 slot would correctly report '(none)'...
4496
+ #...leaving it here for now for compatibility purposes
4497
+ { #PH/JD
4613
4498
  Name => 'PrimaryAFPoint',
4614
- Condition => '$$self{PhaseDetectAF} == 7 and $$self{AFInfo2Version} eq "0101"',
4499
+ Condition => '$$self{FocusPointSchema} == 1', #51 focus-point models
4500
+ Notes => q{
4501
+ models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D7500
4502
+ },
4615
4503
  PrintConvColumns => 5,
4616
4504
  PrintConv => {
4617
4505
  0 => '(none)',
4618
- %afPoints153,
4619
- 1 => 'E9 (Center)',
4506
+ %afPoints51,
4507
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
4620
4508
  },
4621
- },
4622
- { #PH
4509
+ },{ #10
4623
4510
  Name => 'PrimaryAFPoint',
4624
- Notes => 'D3500',
4625
- Condition => '$$self{PhaseDetectAF} == 2 and $$self{AFInfo2Version} eq "0101"',
4511
+ Notes => 'models with 11-point AF: D3400, D3500',
4512
+ Condition => '$$self{FocusPointSchema} == 2', #11 focus-point models
4626
4513
  PrintConvColumns => 2,
4627
4514
  PrintConv => {
4628
4515
  0 => '(none)',
@@ -4638,68 +4525,397 @@ my %base64coord = (
4638
4525
  10 => 'Lower-right',
4639
4526
  11 => 'Far Right',
4640
4527
  },
4641
- },
4642
- {
4528
+ },{ #PH
4643
4529
  Name => 'PrimaryAFPoint',
4644
- Condition => '$$self{AFInfo2Version} eq "0101"',
4645
- Notes => 'future models?...',
4646
- Priority => 0,
4530
+ Condition => '$$self{FocusPointSchema} == 7', #153 focus-point models
4531
+ Notes => q{
4532
+ Nikon models with 153-point AF -- 9 rows (A-I) and 17 columns (1-17): D5,
4533
+ D500 and D850
4534
+ },
4535
+ PrintConvColumns => 5,
4647
4536
  PrintConv => {
4648
4537
  0 => '(none)',
4649
- 1 => 'Center',
4650
- },
4538
+ %afPoints153,
4539
+ 1 => 'E9 (Center)',
4540
+ },
4541
+ },{
4542
+ Name => 'PrimaryAFPoint',
4543
+ Condition => '$$self{FocusPointSchema} == 0', #LiveView or manual focus or no focus (reporting only for purposes of backward compatibility with v13.19 and earlier)
4544
+ PrintConv => { 0 => '(none)', },
4651
4545
  },
4652
4546
  ],
4653
- 0x46 => {
4547
+ 0x46 => { #PH
4654
4548
  Name => 'AFImageWidth',
4655
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4549
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4656
4550
  Format => 'int16u',
4657
4551
  RawConv => '$val ? $val : undef',
4658
4552
  Notes => 'this and the following tags are valid only for contrast-detect AF',
4659
4553
  },
4660
- 0x48 => {
4554
+ 0x48 => { #PH
4661
4555
  Name => 'AFImageHeight',
4662
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4556
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4663
4557
  Format => 'int16u',
4664
4558
  RawConv => '$val ? $val : undef',
4665
4559
  },
4666
- 0x4a => {
4560
+ 0x4a => { #PH
4667
4561
  Name => 'AFAreaXPosition',
4668
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4562
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4669
4563
  Notes => 'center of AF area in AFImage coordinates',
4670
4564
  Format => 'int16u',
4671
4565
  RawConv => '$val ? $val : undef',
4672
4566
  },
4673
- 0x4c => {
4567
+ 0x4c => { #PH
4674
4568
  Name => 'AFAreaYPosition',
4675
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4569
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4676
4570
  Format => 'int16u',
4677
4571
  RawConv => '$val ? $val : undef',
4678
4572
  },
4679
- 0x4e => {
4573
+ 0x4e => { #PH
4680
4574
  Name => 'AFAreaWidth',
4681
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4575
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4682
4576
  Format => 'int16u',
4683
4577
  Notes => 'size of AF area in AFImage coordinates',
4684
4578
  RawConv => '$val ? $val : undef',
4685
4579
  },
4686
- 0x50 => {
4580
+ 0x50 => { #PH
4687
4581
  Name => 'AFAreaHeight',
4688
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4582
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4689
4583
  Format => 'int16u',
4690
4584
  RawConv => '$val ? $val : undef',
4691
4585
  },
4692
4586
  0x52 => {
4693
4587
  Name => 'ContrastDetectAFInFocus',
4694
- Condition => '$$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} eq "0101"',
4588
+ Condition => '$$self{AFDetectionMethod} == 1', #contrast detect
4695
4589
  PrintConv => { 0 => 'No', 1 => 'Yes' },
4696
4590
  },
4697
4591
  );
4698
4592
 
4593
+ %Image::ExifTool::Nikon::AFInfo2V0200 = (
4594
+ %binaryDataAttrs,
4595
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4596
+ DATAMEMBER => [ 0, 6 ],
4597
+ NOTES => q{
4598
+ AF information for Nikon 1 series cameras: Nikon 1 V1, V2, V3, J1, J2, J3,
4599
+ S1, S2 AW1.
4600
+ },
4601
+ 0 => {
4602
+ Name => 'AFInfo2Version',
4603
+ Format => 'undef[4]',
4604
+ Writable => 0,
4605
+ RawConv => '$$self{AFInfo2Version} = $val',
4606
+ },
4607
+ 5 => {
4608
+ Name => 'AFAreaMode',
4609
+ PrintConv => {
4610
+ 128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
4611
+ 129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
4612
+ 130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
4613
+ 131 => 'Face Priority (41 points)', #PH (1J1,1J3,1S1,1V2,AW1)
4614
+ # 134 - seen for 1V1[PhaseDetectAF=0] (PH)
4615
+ # 135 - seen for 1J2[PhaseDetectAF=4] (PH)
4616
+ },
4617
+ },
4618
+ 6 => {
4619
+ Name => 'PhaseDetectAF', #JD(AutoFocus), PH(PhaseDetectAF)
4620
+ Notes => 'PrimaryAFPoint and AFPointsUsed below are only valid when this is On',
4621
+ RawConv => '$$self{PhaseDetectAF} = $val',
4622
+ PrintConv => {
4623
+ # [observed AFAreaMode values in square brackets for each PhaseDetectAF value]
4624
+ 4 => 'On (73-point)', #PH (1J1[128/129],1J2[128/129/135],1J3/1S1/1V2[128/129/131],1V1[129],AW1[129/131])
4625
+ 5 => 'On (5)', #PH (1S2[128/129], 1J4/1V3[129])
4626
+ 6 => 'On (105-point)', #PH (1J4/1V3[128/130])
4627
+ },
4628
+ },
4629
+ 7 => [
4630
+ { #PH
4631
+ Name => 'PrimaryAFPoint',
4632
+ Condition => '$$self{PhaseDetectAF} == 4',
4633
+ Notes => 'Nikon 1 models with older 135-point AF and 73-point phase-detect AF',
4634
+ PrintConvColumns => 5,
4635
+ PrintConv => {
4636
+ 0 => '(none)',
4637
+ %afPoints135,
4638
+ 1 => 'E8 (Center)', # (add " (Center)" to central point)
4639
+ },
4640
+ },
4641
+ { #PH (NC)
4642
+ Name => 'PrimaryAFPoint',
4643
+ Condition => '$$self{PhaseDetectAF} == 5',
4644
+ Notes => q{
4645
+ Nikon 1 models with newer 135-point AF and 73-point phase-detect AF -- 9
4646
+ rows (B-J) and 15 columns (1-15), inside a grid of 11 rows by 15 columns.
4647
+ The points are numbered sequentially, with F8 at the center
4648
+ },
4649
+ PrintConv => {
4650
+ 0 => '(none)',
4651
+ 82 => 'F8 (Center)',
4652
+ OTHER => sub {
4653
+ my ($val, $inv) = @_;
4654
+ return GetAFPointGrid($val, 15, $inv);
4655
+ },
4656
+ },
4657
+ },
4658
+ { #PH
4659
+ Name => 'PrimaryAFPoint',
4660
+ Condition => '$$self{PhaseDetectAF} == 6',
4661
+ Notes => q{
4662
+ Nikon 1 models with 171-point AF and 105-point phase-detect AF -- 9 rows
4663
+ (B-J) and 19 columns (2-20), inside a grid of 11 rows by 21 columns. The
4664
+ points are numbered sequentially, with F11 at the center
4665
+ },
4666
+ PrintConv => {
4667
+ 0 => '(none)',
4668
+ #22 => 'B2 (Top-left)',
4669
+ #40 => 'B20 (Top-right)',
4670
+ 115 => 'F11 (Center)',
4671
+ #190 => 'J2 (Bottom-left)',
4672
+ #208 => 'J20 (Bottom-right)',
4673
+ OTHER => sub {
4674
+ my ($val, $inv) = @_;
4675
+ return GetAFPointGrid($val, 21, $inv);
4676
+ },
4677
+ },
4678
+ },
4679
+ ],
4680
+ 8 => [
4681
+ { #PH (1AW1,1J1,1J2,1J3,1S1,1V1,1V2)
4682
+ Name => 'AFPointsUsed',
4683
+ Condition => '$$self{PhaseDetectAF} == 4',
4684
+ Notes => q{
4685
+ older models with 135-point AF -- 9 rows (A-I) and 15 columns (1-15).
4686
+ Center point is E8. The odd-numbered columns, columns 2 and 14, and the
4687
+ remaining corner points are not used for 41-point AF mode
4688
+ },
4689
+ Format => 'undef[17]',
4690
+ ValueConv => 'join(" ", unpack("H2"x17, $val))',
4691
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4692
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints135) },
4693
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints135) },
4694
+ },
4695
+ { #PH (1S2)
4696
+ Name => 'AFPointsUsed',
4697
+ Condition => '$$self{PhaseDetectAF} == 5',
4698
+ Notes => q{
4699
+ newer models with 135-point AF -- 9 rows (B-J) and 15 columns (1-15). Center
4700
+ point is F8
4701
+ },
4702
+ Format => 'undef[21]',
4703
+ ValueConv => 'join(" ", unpack("H2"x21, $val))',
4704
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4705
+ PrintConv => sub { PrintAFPointsGrid(shift, 15) },
4706
+ PrintConvInv => sub { PrintAFPointsGridInv(shift, 15, 21) },
4707
+ },
4708
+ { #PH (1J4,1V3)
4709
+ Name => 'AFPointsUsed',
4710
+ Condition => '$$self{PhaseDetectAF} == 6',
4711
+ Notes => q{
4712
+ models with 171-point AF -- 9 rows (B-J) and 19 columns (2-20). Center
4713
+ point is F10
4714
+ },
4715
+ Format => 'undef[29]',
4716
+ ValueConv => 'join(" ", unpack("H2"x29, $val))',
4717
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4718
+ PrintConv => sub { PrintAFPointsGrid(shift, 21) },
4719
+ PrintConvInv => sub { PrintAFPointsGridInv(shift, 21, 29) },
4720
+ },
4721
+ ],
4722
+ );
4723
+
4724
+ %Image::ExifTool::Nikon::AFInfo2V0300 = (
4725
+ %binaryDataAttrs,
4726
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4727
+ DATAMEMBER => [ 0, 4, 6, 7, 46, 48 ],
4728
+ NOTES => q{
4729
+ AF information for Nikon cameras with the Expeed 6 processor: D6, D780, Z5,
4730
+ Z6, Z6ii, Z7, Z7ii, Z50 and Zfc.
4731
+ },
4732
+ 0 => {
4733
+ Name => 'AFInfo2Version',
4734
+ Format => 'undef[4]',
4735
+ Writable => 0,
4736
+ RawConv => '$$self{AFInfo2Version} = $val',
4737
+ },
4738
+ 4 => {
4739
+ Name => 'AFDetectionMethod',
4740
+ RawConv => '$$self{AFDetectionMethod} = $val',
4741
+ PrintConv => \%aFDetectionMethod ,
4742
+ },
4743
+ 5 => [
4744
+ {
4745
+ Name => 'AFAreaMode',
4746
+ Condition => '$$self{AFDetectionMethod} == 0',
4747
+ PrintConv => \%aFAreaModePD, #phase detect
4748
+ },
4749
+ {
4750
+ Name => 'AFAreaMode',
4751
+ PrintConv => \%aFAreaModeCD, #contrast detect
4752
+ },
4753
+ ],
4754
+ 6 => {
4755
+ Name => 'FocusPointSchema',
4756
+ RawConv => '$$self{FocusPointSchema} = $val',
4757
+ Hidden => 1,
4758
+ PrintConv => {
4759
+ 0 => 'Off', # LiveView or manual focus or no focus
4760
+ 1 => '51-point', # (D780) 51 points through the viewfinder, 81/273 points in LiveView
4761
+ 8 => '81-point', # (Z6/Z6ii/Z7/Z7ii/Z30/Z50/Z50ii/Zfc/D780) 81-points refers to the number of auto-area focus points arranged as a 9x9 grid. Number of single-point focus points vary by model.
4762
+ 9 => '105-point', # (D6) arranged as a 15 column x 9 row grid
4763
+ },
4764
+ },
4765
+ 7 => {
4766
+ Name => 'AFCoordinatesAvailable', #0 => 'AFPointsUsed is populated' 1 => 'AFAreaXPosition & AFAreaYPosition are populated'
4767
+ RawConv => '$$self{AFCoordinatesAvailable} = $val',
4768
+ PrintConv => \%noYes ,
4769
+ },
4770
+ 0x0a => [
4771
+ { #JD/PH
4772
+ Name => 'AFPointsUsed',
4773
+ Condition => '$$self{FocusPointSchema} == 1 and $$self{AFCoordinatesAvailable} == 0', #D780 when AFAreaXYPositions are not populated
4774
+ Notes => q{
4775
+ models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
4776
+ point is C6
4777
+ },
4778
+ Format => 'undef[7]',
4779
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
4780
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4781
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51) },
4782
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51) },
4783
+ },{
4784
+ Name => 'AFPointsUsed',
4785
+ Condition => '$$self{FocusPointSchema} == 8 and $$self{AFCoordinatesAvailable} == 0', # Z6/Z6ii/Z7/Z7ii/Z50/Z50ii/Zfc/D780 when AFAreaXYPositions are not populated
4786
+ Notes => q{
4787
+ models with hybrid detect AF have 81 auto-area points -- 9 rows (A-I) and 9 columns (1-9). Center point is E5
4788
+ },
4789
+ Format => 'undef[11]',
4790
+ ValueConv => 'join(" ", unpack("H2"x11, $val))',
4791
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4792
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints81) },
4793
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81) },
4794
+ },{
4795
+ Name => 'AFPointsUsed',
4796
+ Condition => '$$self{FocusPointSchema} == 9 and $$self{AFCoordinatesAvailable} == 0', # D6 focus-point model when AFAreaXYPositions are not populated
4797
+ Format => 'undef[14]',
4798
+ ValueConv => 'join(" ", unpack("H2"x14, $val))',
4799
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4800
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints105) },
4801
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105) },
4802
+ },
4803
+ ],
4804
+ 0x2a => { #PH (Z7)
4805
+ Name => 'AFImageWidth',
4806
+ Format => 'int16u',
4807
+ RawConv => '$val ? $val : undef',
4808
+ },
4809
+ 0x2c => { #PH (Z7)
4810
+ Name => 'AFImageHeight',
4811
+ Format => 'int16u',
4812
+ RawConv => '$val ? $val : undef',
4813
+ },
4814
+ 0x2e => { #PH (Z7)
4815
+ Name => 'AFAreaXPosition',
4816
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4817
+ RawConv => '$$self{AFAreaXPosition} = $val',
4818
+ Format => 'int16u', # (decodes same byte as 0x2f)
4819
+ },
4820
+ 0x2f => [
4821
+ {
4822
+ Name => 'FocusPositionHorizontal', # 209/231 focus point cameras
4823
+ Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaXPosition}', #models Z30, Z50, Zfc
4824
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is an estimate (chosen to cause center point to report 'C')
4825
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 19 ) },
4826
+ },{
4827
+ Name => 'FocusPositionHorizontal', #273/299 focus point cameras
4828
+ Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaXPosition}', #models Z5, Z6, Z6ii, D780
4829
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is an estimate (chosen to cause center point to report 'C')
4830
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 21 ) },
4831
+ },{
4832
+ Name => 'FocusPositionHorizontal', #405/493 focus point cameras
4833
+ Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaXPosition}', #models Z7/Z7ii
4834
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the measured horizontal pixel separation between adjacent points
4835
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ) },
4836
+ },
4837
+ #the only other AFInfoVersion 03xx camera is the D6. It allows the LiveView focus point to positioned anywhere in the frame, rendering this tag somewhat meaningless for that camera
4838
+ ],
4839
+ 0x30 => { #PH (Z7)
4840
+ Name => 'AFAreaYPosition',
4841
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4842
+ RawConv => '$$self{AFAreaYPosition} = $val',
4843
+ Format => 'int16u', # (decodes same byte as 0x31)
4844
+ },
4845
+ 0x31 => [
4846
+ {
4847
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
4848
+ Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaYPosition}', #models Z30, Z50, Zfc
4849
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4850
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
4851
+ },{
4852
+ Name => 'FocusPositionVertical', #273/299 focus point cameras
4853
+ Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaYPosition}', #models Z5, Z6, Z6ii, D780
4854
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4855
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
4856
+ },{
4857
+ Name => 'FocusPositionVertical', #405/493 focus point cameras
4858
+ Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaYPosition}', #models Z7/Z7ii
4859
+ ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
4860
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
4861
+ },
4862
+ ],
4863
+ 0x32 => { #PH
4864
+ Name => 'AFAreaWidth',
4865
+ Format => 'int16u',
4866
+ RawConv => '$val ? $val : undef',
4867
+ },
4868
+ 0x34 => { #PH
4869
+ Name => 'AFAreaHeight',
4870
+ Format => 'int16u',
4871
+ RawConv => '$val ? $val : undef',
4872
+ },
4873
+ 0x38 =>[
4874
+ { #PH/JD
4875
+ Name => 'PrimaryAFPoint',
4876
+ Condition => '$$self{FocusPointSchema} == 1 and $$self{AFCoordinatesAvailable} == 0', #51 focus-point models when AFAreaXYPositions are not populated
4877
+ Notes => q{
4878
+ models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
4879
+ D4, D4S, D300, D300S, D700, D750, D800, D800E, D810, D7100 and D7200
4880
+ },
4881
+ PrintConvColumns => 5,
4882
+ PrintConv => {
4883
+ 0 => '(none)',
4884
+ %afPoints51,
4885
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
4886
+ },
4887
+ },{
4888
+ Name => 'PrimaryAFPoint',
4889
+ Condition => '$$self{FocusPointSchema} == 8 and $$self{AFCoordinatesAvailable} == 0', # Z6/Z6ii/Z7/Z7ii/Z50/Z50ii/Zfc/D780 when AFAreaXYPositions are not populated
4890
+ Notes => q{
4891
+ models with hybrid detect AF have 81 auto-area points -- 9 rows (A-I) and 9 columns (1-9). Center point is E5
4892
+ },
4893
+ PrintConvColumns => 5,
4894
+ PrintConv => {
4895
+ 0 => '(none)',
4896
+ %afPoints81,
4897
+ 1 => 'E5 (Center)', # (add " (Center)" to central point)
4898
+ },
4899
+ },{ #28
4900
+ Name => 'PrimaryAFPoint',
4901
+ Condition => '$$self{FocusPointSchema} == 9 and $$self{AFCoordinatesAvailable} == 0', #153 focus-point models when AFAreaXYPositions are not populated
4902
+ Notes => q{
4903
+ Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
4904
+ },
4905
+ PrintConvColumns => 5,
4906
+ PrintConv => {
4907
+ 0 => '(none)',
4908
+ %afPoints105,
4909
+ 1 => 'D8 (Center)',
4910
+ },
4911
+ },
4912
+ ]
4913
+ );
4914
+
4699
4915
  %Image::ExifTool::Nikon::AFInfo2V0400 = (
4700
4916
  %binaryDataAttrs,
4701
4917
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4702
- DATAMEMBER => [ 0, 5 ],
4918
+ DATAMEMBER => [ 0, 4, 5, 7, 66, 68 ],
4703
4919
  NOTES => q{
4704
4920
  AF information for Nikon cameras with the Expeed 7 processor: The Zf, Z6_3,
4705
4921
  Z8, Z9 and Z50_3.
@@ -4710,7 +4926,12 @@ my %base64coord = (
4710
4926
  Writable => 0,
4711
4927
  RawConv => '$$self{AFInfo2Version} = $val',
4712
4928
  },
4713
- 5 => { #28
4929
+ 4 => {
4930
+ Name => 'AFDetectionMethod',
4931
+ RawConv => '$$self{AFDetectionMethod} = $val',
4932
+ PrintConv => \%aFDetectionMethod ,
4933
+ },
4934
+ 5 => {
4714
4935
  Name => 'AFAreaMode', #reflects the mode active when the shutter is tripped, not the position of the Focus Mode button (which is recorded in MenuSettingsZ9 tag also named AfAreaMode)
4715
4936
  RawConv => '$$self{AFAreaModeUsed} = $val',
4716
4937
  PrintConv => {
@@ -4726,6 +4947,11 @@ my %base64coord = (
4726
4947
  208 => 'Wide (C1/C2)',
4727
4948
  },
4728
4949
  },
4950
+ 7 => {
4951
+ Name => 'AFCoordinatesAvailable', #0 => 'AFPointsUsed is populated' 1 => 'AFAreaXPosition & AFAreaYPosition are populated'
4952
+ RawConv => '$$self{AFCoordinatesAvailable} = $val',
4953
+ PrintConv => \%noYes ,
4954
+ },
4729
4955
  10 => [{
4730
4956
  # valid only for AFAreaModes where the camera selects the focus point (i.e., AutoArea & 3D-Tracking)
4731
4957
  # and the camera has yet to determine a focus target (in these cases tags AFAreaXPosition and AFAreaYPosition will be zeroes)
@@ -4735,59 +4961,83 @@ my %base64coord = (
4735
4961
  Notes => 'either AFPointsUsed or AFAreaX/YPosition will be set, but not both',
4736
4962
  ValueConv => 'join(" ", unpack("H2"x51, $val))',
4737
4963
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4738
- PrintConv => sub { PrintAFPoints(shift, \@afPoints405); },
4739
- PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints405); },
4964
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints405) }, #full-frame sensor, 45MP, auto-area focus point configuration
4965
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints405) },
4740
4966
  },{
4741
4967
  Name => 'AFPointsUsed', # Z6iii and Zf (AFInfo2Version 0401)
4742
4968
  Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and ($$self{AFAreaModeUsed} == 197 or $$self{AFAreaModeUsed} == 207)',
4743
4969
  Format => 'undef[38]',
4744
4970
  ValueConv => 'join(" ", unpack("H2"x38, $val))',
4745
4971
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4746
- PrintConv => sub { PrintAFPoints(shift, \@afPoints299); },
4747
- PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints299); },
4972
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints299) },
4973
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints299) }, #full-frame sensor, 24MP, auto-area focus point configuration
4748
4974
  },{
4749
4975
  Name => 'AFPointsUsed', # Z50ii (AFInfo2Version 0402)
4750
4976
  Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and ($$self{AFAreaModeUsed} == 197 or $$self{AFAreaModeUsed} == 207)',
4751
4977
  Format => 'undef[29]',
4752
4978
  ValueConv => 'join(" ", unpack("H2"x29, $val))',
4753
4979
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4754
- PrintConv => sub { PrintAFPoints(shift, \@afPoints231); },
4755
- PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints231); },
4980
+ PrintConv => sub { PrintAFPoints(shift, \@afPoints231) },
4981
+ PrintConvInv => sub { PrintAFPointsInv(shift, \@afPoints231) }, #crop sensor, 21MP, auto-area focus point configuration
4756
4982
  }],
4757
- 62 => {
4983
+ 0x3e => {
4758
4984
  Name => 'AFImageWidth',
4759
4985
  Format => 'int16u',
4986
+ RawConv => '$val ? $val : undef',
4760
4987
  },
4761
4988
  0x40 => {
4762
4989
  Name => 'AFImageHeight',
4763
4990
  Format => 'int16u',
4991
+ RawConv => '$val ? $val : undef',
4764
4992
  },
4765
4993
  0x42 => { #28
4766
4994
  Name => 'AFAreaXPosition', #top left image corner is the origin
4995
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
4996
+ RawConv => '$$self{AFAreaXPosition} = $val',
4767
4997
  Format => 'int16u', # (decodes same byte as 0x43)
4768
- RawConv => '$val ? $val : undef',
4769
4998
  },
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
- #},
4999
+ 0x43 => [
5000
+ {
5001
+ Name => 'FocusPositionHorizontal', # 209/231 focus point cameras
5002
+ Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and $$self{AFAreaXPosition} != 0', #model Z50ii
5003
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the estimated separation between adjacent points (informed by the measured Z7ii separation)
5004
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 19 ) },
5005
+ },{
5006
+ Name => 'FocusPositionHorizontal', #273/299 focus point cameras
5007
+ Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and $$self{AFAreaXPosition} != 0', #models Z6iii and Zf
5008
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the estimated separation between adjacent points (informed by the measured Z7ii separation)
5009
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 21 ) },
5010
+ },{
5011
+ Name => 'FocusPositionHorizontal', #405/493 focus point cameras
5012
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i and $$self{AFAreaXPosition} != 0', #models Z8 and Z9
5013
+ ValueConv => 'int($$self{AFAreaXPosition} / 260 )', #divisor is the measured horizontal pixel separation between adjacent points
5014
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ) },
5015
+ },
5016
+ ],
4781
5017
  0x44 => { #28
4782
5018
  Name => 'AFAreaYPosition',
5019
+ Condition => '$$self{AFCoordinatesAvailable} == 1', # is field populated?
5020
+ RawConv => '$$self{AFAreaYPosition} = $val',
4783
5021
  Format => 'int16u', # (decodes same byte as 0x45)
4784
- RawConv => '$val ? $val : undef',
4785
5022
  },
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
- #},
5023
+ 0x45 => [
5024
+ {
5025
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
5026
+ Condition => '$$self{Model} =~ /^NIKON Z50_2\b/i and $$self{AFAreaYPosition} != 0', #model Z50ii
5027
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor chosen to cause center point report 'C'
5028
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
5029
+ },{
5030
+ Name => 'FocusPositionVertical', #273/299 focus point cameras
5031
+ Condition => '$$self{Model} =~ /^NIKON (Z6_3|Z f)\b/i and $$self{AFAreaYPosition} != 0', #models Z6iii and Zf
5032
+ ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor chosen to cause center point report 'C'
5033
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
5034
+ },{
5035
+ Name => 'FocusPositionVertical', #405/493 focus point cameras
5036
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i and $$self{AFAreaYPosition} != 0', #models Z8 and Z9
5037
+ ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
5038
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
5039
+ },
5040
+ ],
4791
5041
  0x46 => {
4792
5042
  Name => 'AFAreaWidth',
4793
5043
  Format => 'int16u',
@@ -5603,6 +5853,7 @@ my %nikonFocalConversions = (
5603
5853
  44 => 'Nikkor Z 70-180mm f/2.8', #28
5604
5854
  45 => 'Nikkor Z 600mm f/6.3 VR S', #28
5605
5855
  46 => 'Nikkor Z 135mm f/1.8 S Plena', #28
5856
+ 47 => 'Nikkor Z 35mm f/1.2 S', #28
5606
5857
  48 => 'Nikkor Z 28-400mm f/4-8 VR', #30
5607
5858
  51 => 'Nikkor Z 35mm f/1.4', #28
5608
5859
  52 => 'Nikkor Z 50mm f/1.4', #28
@@ -5672,7 +5923,7 @@ my %nikonFocalConversions = (
5672
5923
  Name => 'LensDriveEnd', # byte contains: 1 at CFD/MOD; 2 at Infinity; 0 otherwise
5673
5924
  Condition => '$$self{LensID} and $$self{LensID} != 0 and $$self{FocusMode} ne "Manual"', #valid for Z-mount lenses in focus modes other than M
5674
5925
  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"}',
5926
+ RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"} } else{ $$self{LensDriveEnd} = "Inf"}',
5676
5927
  Unknown => 1,
5677
5928
  },
5678
5929
  0x58 => { #28
@@ -8915,19 +9166,19 @@ my %nikonFocalConversions = (
8915
9166
  # 0x00 - int32u size of this directory
8916
9167
  0x10 => [
8917
9168
  {
8918
- Name => 'MenuSettingsOffsetZ8',
9169
+ Name => 'MenuSettingsOffsetZ8v1',
8919
9170
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "02.00"',
8920
9171
  Format => 'int32u',
8921
- Notes => 'Firmware versions 1.0.0 and 1.1.0',
9172
+ Notes => 'Firmware versions 1.00 and 1.10',
8922
9173
  SubDirectory => {
8923
- TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8',
9174
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8v1',
8924
9175
  Start => '$dirStart + $val',
8925
9176
  },
8926
9177
  },
8927
9178
  {
8928
9179
  Name => 'MenuSettingsOffsetZ8v2',
8929
9180
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.00"',
8930
- Notes => 'Firmware version 2.0',
9181
+ Notes => 'Firmware version 2.00 and 2.10',
8931
9182
  Format => 'int32u',
8932
9183
  SubDirectory => {
8933
9184
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8v2',
@@ -8956,7 +9207,7 @@ my %nikonFocalConversions = (
8956
9207
  {
8957
9208
  Name => 'MenuSettingsOffsetZ9v3',
8958
9209
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "04.00"',
8959
- Notes => 'Firmware versions 3.0 and v3.10',
9210
+ Notes => 'Firmware versions 3.00 and v3.10',
8960
9211
  Format => 'int32u',
8961
9212
  SubDirectory => {
8962
9213
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v3',
@@ -8965,23 +9216,13 @@ my %nikonFocalConversions = (
8965
9216
  },
8966
9217
  {
8967
9218
  Name => 'MenuSettingsOffsetZ9v4',
8968
- Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "05.01"',
8969
- Notes => 'Firmware versions 4.x and 5.0',
9219
+ Notes => 'Firmware versions 4.00 and higher',
8970
9220
  Format => 'int32u',
8971
9221
  SubDirectory => {
8972
9222
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v4',
8973
9223
  Start => '$dirStart + $val',
8974
9224
  },
8975
9225
  },
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
9226
  ],
8986
9227
  );
8987
9228
 
@@ -9135,7 +9376,7 @@ my %nikonFocalConversions = (
9135
9376
  },
9136
9377
  );
9137
9378
 
9138
- %Image::ExifTool::Nikon::MenuSettingsZ6III = (
9379
+ %Image::ExifTool::Nikon::MenuSettingsZ6III = (
9139
9380
  %binaryDataAttrs,
9140
9381
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9141
9382
  NOTES => 'These tags are used by the Z6III.',
@@ -9322,7 +9563,7 @@ my %nikonFocalConversions = (
9322
9563
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ6III' },
9323
9564
  },
9324
9565
  2300 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9325
- 2302 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9566
+ 2302 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9326
9567
  2308 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5 and Lo1, Lo2, Hi1, Hi2
9327
9568
  2444 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
9328
9569
  2450 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
@@ -9332,7 +9573,7 @@ my %nikonFocalConversions = (
9332
9573
  2496 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9333
9574
  ),
9334
9575
 
9335
- %Image::ExifTool::Nikon::MenuSettingsZ7II = (
9576
+ %Image::ExifTool::Nikon::MenuSettingsZ7II = (
9336
9577
  %binaryDataAttrs,
9337
9578
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9338
9579
  DATAMEMBER => [ 90, 176, 180, 328, 352, 858 ],
@@ -9417,7 +9658,7 @@ my %nikonFocalConversions = (
9417
9658
  PrintConv => \%offOn,
9418
9659
  },
9419
9660
  #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
9420
- 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7},
9661
+ 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7 },
9421
9662
  328 => {
9422
9663
  Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9423
9664
  RawConv => '$$self{FlashControlMode} = $val',
@@ -9493,11 +9734,7 @@ my %nikonFocalConversions = (
9493
9734
  516 => {
9494
9735
  Name => 'MovieISOAutoManualMode',
9495
9736
  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,
9737
+ %isoAutoHiLimitZ7,
9501
9738
  },
9502
9739
  #520 => MovieWhiteBalanceSameAsPhoto
9503
9740
  568 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
@@ -9548,16 +9785,19 @@ my %nikonFocalConversions = (
9548
9785
  #859 => HDMIViewAssist
9549
9786
  );
9550
9787
 
9551
- %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9788
+ %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9552
9789
  %binaryDataAttrs,
9553
9790
  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.',
9791
+ DATAMEMBER => [ 72, 152, 200, 204, 244, 440, 548, 554, 570, 596 ],
9792
+ NOTES => 'These tags are common to all Z8 firmware versions.',
9557
9793
  72 => {
9558
9794
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9559
9795
  PrintConv => \%highFrameRateZ9,
9796
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.10"',
9560
9797
  },
9798
+ #
9799
+ # firmware 2.10 adds 4 bytes somewhere in the range 105-107 (hence the Hook above)
9800
+ #
9561
9801
  152 => {
9562
9802
  Name => 'MultipleExposureMode',
9563
9803
  RawConv => '$$self{MultipleExposureMode} = $val',
@@ -9626,23 +9866,9 @@ my %nikonFocalConversions = (
9626
9866
  286 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9627
9867
  288 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9628
9868
  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
- },
9869
+ 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9870
+ 340 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
9871
+ 342 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
9646
9872
  350 => {
9647
9873
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9648
9874
  ValueConv => '$val / 8',
@@ -9698,24 +9924,10 @@ my %nikonFocalConversions = (
9698
9924
  Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9699
9925
  PrintConv => \%imageAreaZ9b,
9700
9926
  },
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
- },
9927
+ 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9928
+ 742 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
9710
9929
  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
- },
9930
+ 746 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
9719
9931
  820 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9720
9932
  822 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9721
9933
  828 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -9735,14 +9947,26 @@ my %nikonFocalConversions = (
9735
9947
  887 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9736
9948
  888 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9737
9949
  896 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9950
+ );
9951
+
9952
+ %Image::ExifTool::Nikon::MenuSettingsZ8v1 = (
9953
+ %binaryDataAttrs,
9954
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9955
+ NOTES => 'These tags are used by the Z8 firmware 1.00 and 1.10.',
9956
+ IS_SUBDIR => [ 0, 943 ],
9957
+ 0 => {
9958
+ Name => 'MenuSettingsZ8',
9959
+ Format => 'undef[943]',
9960
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8' },
9961
+ },
9738
9962
  943 => {
9739
9963
  Name => 'CustomSettingsZ8',
9740
9964
  Format => 'undef[730]',
9741
9965
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
9742
9966
  },
9743
- 1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9744
- 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9967
+ 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9745
9968
  1690 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9969
+ 1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9746
9970
  1712 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9747
9971
  1716 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
9748
9972
  1718 => { Name => 'NonCPULens2FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
@@ -9764,26 +9988,26 @@ my %nikonFocalConversions = (
9764
9988
  1750 => { Name => 'NonCPULens18FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9765
9989
  1752 => { Name => 'NonCPULens19FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9766
9990
  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},
9991
+ 1756 => { Name => 'NonCPULens1MaxAperture', %nonCPULensApertureZ8 },
9992
+ 1758 => { Name => 'NonCPULens2MaxAperture', %nonCPULensApertureZ8},
9993
+ 1760 => { Name => 'NonCPULens3MaxAperture', %nonCPULensApertureZ8},
9994
+ 1762 => { Name => 'NonCPULens4MaxAperture', %nonCPULensApertureZ8},
9995
+ 1764 => { Name => 'NonCPULens5MaxAperture', %nonCPULensApertureZ8},
9996
+ 1766 => { Name => 'NonCPULens6MaxAperture', %nonCPULensApertureZ8},
9997
+ 1768 => { Name => 'NonCPULens7MaxAperture', %nonCPULensApertureZ8},
9998
+ 1770 => { Name => 'NonCPULens8MaxAperture', %nonCPULensApertureZ8},
9999
+ 1772 => { Name => 'NonCPULens9MaxAperture', %nonCPULensApertureZ8},
10000
+ 1774 => { Name => 'NonCPULens10MaxAperture', %nonCPULensApertureZ8},
10001
+ 1776 => { Name => 'NonCPULens11MaxAperture', %nonCPULensApertureZ8},
10002
+ 1778 => { Name => 'NonCPULens12MaxAperture', %nonCPULensApertureZ8},
10003
+ 1780 => { Name => 'NonCPULens13MaxAperture', %nonCPULensApertureZ8},
10004
+ 1782 => { Name => 'NonCPULens14MaxAperture', %nonCPULensApertureZ8},
10005
+ 1784 => { Name => 'NonCPULens15MaxAperture', %nonCPULensApertureZ8},
10006
+ 1786 => { Name => 'NonCPULens16MaxAperture', %nonCPULensApertureZ8},
10007
+ 1788 => { Name => 'NonCPULens17MaxAperture', %nonCPULensApertureZ8},
10008
+ 1790 => { Name => 'NonCPULens18MaxAperture', %nonCPULensApertureZ8},
10009
+ 1792 => { Name => 'NonCPULens19MaxAperture', %nonCPULensApertureZ8},
10010
+ 1794 => { Name => 'NonCPULens20MaxAperture', %nonCPULensApertureZ8},
9787
10011
  1808 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
9788
10012
  1826 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9789
10013
  1827 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
@@ -9791,201 +10015,26 @@ my %nikonFocalConversions = (
9791
10015
  1890 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
9792
10016
  1899 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
9793
10017
  );
9794
- %Image::ExifTool::Nikon::MenuSettingsZ8v2 = (
10018
+
10019
+ %Image::ExifTool::Nikon::MenuSettingsZ8v2 = (
9795
10020
  %binaryDataAttrs,
9796
10021
  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,
10022
+ DATAMEMBER => [ 0, 2046 ],
10023
+ IS_SUBDIR => [ 0, 943 ],
10024
+ NOTES => 'These tags are used by the Z8 firmware 2.00 and 2.10.',
10025
+ 0 => {
10026
+ Name => 'MenuSettingsZ8',
10027
+ Format => 'undef[943]',
10028
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8' },
10029
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "02.10"',
9962
10030
  },
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
10031
  943 => {
9983
10032
  Name => 'CustomSettingsZ8',
9984
10033
  Format => 'undef[755]',
9985
10034
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
9986
10035
  },
9987
10036
  1698 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9988
- 1700 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10037
+ 1700 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
9989
10038
  1706 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9990
10039
  1728 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9991
10040
  1732 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
@@ -10045,7 +10094,8 @@ my %nikonFocalConversions = (
10045
10094
  2062 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
10046
10095
  2064 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
10047
10096
  );
10048
- %Image::ExifTool::Nikon::MenuSettingsZ9 = (
10097
+
10098
+ %Image::ExifTool::Nikon::MenuSettingsZ9 = (
10049
10099
  %binaryDataAttrs,
10050
10100
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10051
10101
  DATAMEMBER => [ 140, 188, 192, 232, 308, 424, 528, 534, 576 ],
@@ -10096,22 +10146,8 @@ my %nikonFocalConversions = (
10096
10146
  308 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10097
10147
  #310 ImageQuality
10098
10148
  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
- },
10149
+ 324 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10150
+ 326 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10115
10151
  #332 ISOAutoShutterTime - Auto setting 0=> 'Auto (Slowest)', 1 => 'Auto (Slower)', 2=> 'Auto', 3=> 'Auto (Faster)', 4=> 'Auto (Fastest)'
10116
10152
  334 => {
10117
10153
  Name => 'ISOAutoShutterTime', #shutter speed is 2 ** (-$val/24)
@@ -10194,30 +10230,16 @@ my %nikonFocalConversions = (
10194
10230
  RawConv => '$$self{DynamicAFAreaSize} = $val',
10195
10231
  PrintConv => \%dynamicAfAreaModesZ9,
10196
10232
  },
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',
10233
+ 604 => {
10234
+ Name => 'MovieImageArea',
10216
10235
  Unknown => 1,
10217
- ValueConv => '($val-104)/8',
10218
- ValueConvInv => '8 * ($val + 104)',
10219
- PrintConv => \%iSOAutoHiLimitZ7,
10236
+ Mask => 0x01, # without the mask 4 => 'FX', 5 => DX. only the 2nd Z-series field encountered with a mask
10237
+ PrintConv => \%imageAreaZ9b,
10220
10238
  },
10239
+ 614 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
10240
+ 616 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10241
+ 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
10242
+ 620 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10221
10243
  696 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10222
10244
  698 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10223
10245
  704 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10243,7 +10265,7 @@ my %nikonFocalConversions = (
10243
10265
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
10244
10266
  },
10245
10267
  1426 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10246
- 1428 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10268
+ 1428 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10247
10269
  1434 => { Name => 'MonitorBrightness', ValueConv => '$val - 5', Unknown => 1 }, # settings: -5 to +5
10248
10270
  1456 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10249
10271
  1552 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
@@ -10256,7 +10278,7 @@ my %nikonFocalConversions = (
10256
10278
  1645 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
10257
10279
  );
10258
10280
 
10259
- %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
10281
+ %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
10260
10282
  %binaryDataAttrs,
10261
10283
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10262
10284
  DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 596 ],
@@ -10308,22 +10330,8 @@ my %nikonFocalConversions = (
10308
10330
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
10309
10331
  328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10310
10332
  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
- },
10333
+ 344 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10334
+ 346 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10327
10335
  354 => {
10328
10336
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10329
10337
  ValueConv => '$val / 8',
@@ -10402,23 +10410,9 @@ my %nikonFocalConversions = (
10402
10410
  PrintConv => \%imageAreaZ9b,
10403
10411
  },
10404
10412
  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
- },
10413
+ 658 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10413
10414
  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
- },
10415
+ 662 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10422
10416
  736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10423
10417
  738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10424
10418
  744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10445,7 +10439,7 @@ my %nikonFocalConversions = (
10445
10439
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
10446
10440
  },
10447
10441
  1474 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10448
- 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10442
+ 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10449
10443
  1482 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10450
10444
  1504 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10451
10445
  1600 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
@@ -10489,17 +10483,21 @@ my %nikonFocalConversions = (
10489
10483
  #1936 FocusPointDisplayOption3DTrackingColor CSa11-d 0=> 'White', 1= => 'Red'
10490
10484
  );
10491
10485
 
10492
- # firmware version 4.x menu settings (ref 28)
10493
- %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10486
+ # firmware version 4.x/5.x menu settings (ref 28)
10487
+ %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10494
10488
  %binaryDataAttrs,
10495
10489
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10496
- DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10490
+ DATAMEMBER => [ 72, 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10497
10491
  IS_SUBDIR => [ 847 ],
10498
- NOTES => 'These tags are used by the Z9 firmware 4.0.0 and 4.1.0.',
10492
+ NOTES => 'These tags are used by the Z9 firmware 4.00, 4.10, 5.00 and 5.10.',
10499
10493
  72 => {
10500
10494
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10501
10495
  PrintConv => \%highFrameRateZ9,
10496
+ Hook => '$varSize += 4 if $$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.10"',
10502
10497
  },
10498
+ #
10499
+ # Note: Offsets after this are shifted by +4 for firmware 5.1 (see Hook above)
10500
+ #
10503
10501
  154 => {
10504
10502
  Name => 'MultipleExposureMode',
10505
10503
  RawConv => '$$self{MultipleExposureMode} = $val',
@@ -10543,22 +10541,8 @@ my %nikonFocalConversions = (
10543
10541
  328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10544
10542
  #334 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
10545
10543
  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
- },
10544
+ 344 => { Name => 'ISOAutoHiLimit', %isoAutoHiLimitZ7 },
10545
+ 346 => { Name => 'ISOAutoFlashLimit', %isoAutoHiLimitZ7 },
10562
10546
  354 => {
10563
10547
  Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10564
10548
  ValueConv => '$val / 8',
@@ -10640,23 +10624,9 @@ my %nikonFocalConversions = (
10640
10624
  PrintConv => \%imageAreaZ9b,
10641
10625
  },
10642
10626
  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
- },
10627
+ 658 => { Name => 'MovieISOAutoHiLimit', %isoAutoHiLimitZ7 },
10651
10628
  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
- },
10629
+ 662 => { Name => 'MovieISOAutoManualMode', %isoAutoHiLimitZ7 },
10660
10630
  736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
10661
10631
  738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10662
10632
  744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
@@ -10683,7 +10653,7 @@ my %nikonFocalConversions = (
10683
10653
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
10684
10654
  },
10685
10655
  1498 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
10686
- 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
10656
+ 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9, SeparateTable => 'TimeZone' },
10687
10657
  1506 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
10688
10658
  1528 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
10689
10659
  1532 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
@@ -10801,318 +10771,6 @@ my %nikonFocalConversions = (
10801
10771
  2072 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
10802
10772
  );
10803
10773
 
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
10774
  # Flash information (ref JD)
11117
10775
  %Image::ExifTool::Nikon::FlashInfo0100 = (
11118
10776
  %binaryDataAttrs,
@@ -12383,6 +12041,7 @@ my %nikonFocalConversions = (
12383
12041
  Name => 'FirmwareVersion51',
12384
12042
  Format => 'string[8]',
12385
12043
  Writable => 0,
12044
+ ValueConv => 'join ".", $val =~ /../g',
12386
12045
  },
12387
12046
  10 => {
12388
12047
  Name => 'NEFCompression',
@@ -12397,9 +12056,10 @@ my %nikonFocalConversions = (
12397
12056
  %binaryDataAttrs,
12398
12057
  GROUPS => { 0 => 'MakerNotes' },
12399
12058
  0 => {
12400
- Name => 'FirmwareVersion',
12059
+ Name => 'FirmwareVersion56',
12401
12060
  Format => 'string[4]',
12402
12061
  Writable => 0,
12062
+ ValueConv => '$val =~ s/(\d{2})/$1./; $val',
12403
12063
  },
12404
12064
  4 => {
12405
12065
  Name => 'BurstGroupID', #all frames shot within a burst (using CL/CH/C30/C60/C120) will share the same BurstGroupID. Value will be > 0 for all images shot in continuous modes (or via Pixel Shift). 0 for single-frame.
@@ -13323,10 +12983,33 @@ my %nikonFocalConversions = (
13323
12983
  6 => 'High',
13324
12984
  },
13325
12985
  },
13326
- 0x20000b7 => {
12986
+ 0x20000b7 => [{
13327
12987
  Name => 'AFInfo2',
13328
- SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
13329
- },
12988
+ # LiveView-enabled DSLRs introduced starting in 2007 (D3/D300)
12989
+ Condition => '$$valPt =~ /^0100/',
12990
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0100' },
12991
+ },{
12992
+ Name => 'AFInfo2',
12993
+ # All Expeed 5 processor and most Expeed 4 processor models from 2016 - D5, D500, D850, D3400, D3500, D7500 (D5600 is v0100)
12994
+ Condition => '$$valPt =~ /^0101/',
12995
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0101' },
12996
+ },{
12997
+ Name => 'AFInfo2',
12998
+ # Nikon 1 Series cameras
12999
+ Condition => '$$valPt =~ /^020[01]/',
13000
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0200' },
13001
+ },{
13002
+ Name => 'AFInfo2',
13003
+ # Expeed 6 processor models - D6, D780, Z5, Z6, Z7, Z30, Z50, Z6_2, Z7_2 and Zfc
13004
+ Condition => '$$valPt =~ /^030[01]/',
13005
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0300' },
13006
+ },{
13007
+ Name => 'AFInfo2',
13008
+ # Expeed 7 processor models - Z8 & Z9 (AFInfo2Version 0400), Z6iii & Zf (AFInfo2Version 0401)
13009
+ # and Z50ii (AFInfo2Version 0402)
13010
+ Condition => '$$valPt =~ /^040[012]/',
13011
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
13012
+ }],
13330
13013
  # 0x20000c0 - undef[8]
13331
13014
  0x20000c3 => {
13332
13015
  Name => 'BarometerInfo',
@@ -13464,10 +13147,33 @@ my %nikonFocalConversions = (
13464
13147
  },
13465
13148
  AutoFocus => {
13466
13149
  Require => {
13467
- 0 => 'Nikon:PhaseDetectAF',
13468
- 1 => 'Nikon:ContrastDetectAF',
13150
+ 0 => 'Nikon:FocusMode',
13151
+ },
13152
+ ValueConv => '($val[0] =~ /^Manual/i) ? 0 : 1',
13153
+ PrintConv => \%offOn,
13154
+ },
13155
+ PhaseDetectAF => {
13156
+ Require => {
13157
+ 0 => 'Nikon:FocusPointSchema',
13158
+ 1 => 'Nikon:AFDetectionMethod',
13159
+ },
13160
+ ValueConv => '(($val[1]) == 0) ? ($val[0]) : 0', # for backward compatibility, report FocusPointSchema when AFDetectionMethod indicates Phase Detect is on
13161
+ PrintConv => {
13162
+ 0 => 'Off', #contrast detect or hybrid detect
13163
+ 1 => 'On (51-point)', #PH
13164
+ 2 => 'On (11-point)', #PH
13165
+ 3 => 'On (39-point)', #29 (D7000)
13166
+ 7 => 'On (153-point)', #PH (D5/D500/D850)
13167
+ #8 => 'On (81-point)', #38 will not see this value - only available in hybrid detect
13168
+ 9 => 'On (105-point)', #28 (D6)
13169
+ },
13170
+ },
13171
+ ContrastDetectAF => {
13172
+ Require => {
13173
+ 0 => 'Nikon:FocusMode',
13174
+ 1 => 'Nikon:AFDetectionMethod',
13469
13175
  },
13470
- ValueConv => '($val[0] or $val[1]) ? 1 : 0',
13176
+ ValueConv => '(($val[0] !~ /^Manual/i) and ($val[1] == 1)) ? 1 : 0',
13471
13177
  PrintConv => \%offOn,
13472
13178
  },
13473
13179
  );
@@ -13622,7 +13328,7 @@ sub PrintAFPointsGridInv($$$)
13622
13328
  sub PrintAFPointsLeftRight($$)
13623
13329
  {
13624
13330
  my ($col, $ncol) = @_;
13625
- my $center = 1 + ($ncol + 1)/2;
13331
+ my $center = ($ncol + 1) / 2;
13626
13332
  return 'n/a' if $col == 0; #out of focus
13627
13333
  return 'C' if $col == $center;
13628
13334
  return sprintf('%d', $center - $col) . 'L of Center' if $col < $center;
@@ -13636,7 +13342,7 @@ sub PrintAFPointsLeftRight($$)
13636
13342
  sub PrintAFPointsUpDown($$)
13637
13343
  {
13638
13344
  my ($row, $nrow) = @_;
13639
- my $center = 1 + ($nrow + 1)/2;
13345
+ my $center = ($nrow + 1) / 2;
13640
13346
  return 'n/a' if $row == 0; #out of focus
13641
13347
  return 'C' if $row == $center;
13642
13348
  return sprintf('%d', $center - $row) . 'U from Center' if $row < $center;