exiftool-vendored.pl 12.62.0 → 12.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/bin/Changes +76 -1
  2. package/bin/MANIFEST +4 -0
  3. package/bin/META.json +5 -3
  4. package/bin/META.yml +5 -3
  5. package/bin/Makefile.PL +7 -1
  6. package/bin/README +50 -46
  7. package/bin/config_files/guano.config +161 -0
  8. package/bin/exiftool +108 -75
  9. package/bin/lib/Image/ExifTool/7Z.pm +793 -0
  10. package/bin/lib/Image/ExifTool/Apple.pm +14 -7
  11. package/bin/lib/Image/ExifTool/BigTIFF.pm +8 -1
  12. package/bin/lib/Image/ExifTool/Canon.pm +4 -1
  13. package/bin/lib/Image/ExifTool/CanonRaw.pm +4 -4
  14. package/bin/lib/Image/ExifTool/CanonVRD.pm +4 -1
  15. package/bin/lib/Image/ExifTool/Exif.pm +31 -14
  16. package/bin/lib/Image/ExifTool/FlashPix.pm +8 -2
  17. package/bin/lib/Image/ExifTool/FujiFilm.pm +3 -3
  18. package/bin/lib/Image/ExifTool/GPS.pm +5 -2
  19. package/bin/lib/Image/ExifTool/Geotag.pm +4 -1
  20. package/bin/lib/Image/ExifTool/Jpeg2000.pm +226 -28
  21. package/bin/lib/Image/ExifTool/Lang/fr.pm +1467 -202
  22. package/bin/lib/Image/ExifTool/MPF.pm +2 -1
  23. package/bin/lib/Image/ExifTool/Matroska.pm +16 -1
  24. package/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  25. package/bin/lib/Image/ExifTool/Nikon.pm +939 -31
  26. package/bin/lib/Image/ExifTool/NikonCustom.pm +874 -63
  27. package/bin/lib/Image/ExifTool/PDF.pm +23 -5
  28. package/bin/lib/Image/ExifTool/PLIST.pm +8 -1
  29. package/bin/lib/Image/ExifTool/PNG.pm +6 -6
  30. package/bin/lib/Image/ExifTool/PhaseOne.pm +5 -5
  31. package/bin/lib/Image/ExifTool/QuickTime.pm +91 -30
  32. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +20 -19
  33. package/bin/lib/Image/ExifTool/README +2 -2
  34. package/bin/lib/Image/ExifTool/RIFF.pm +11 -9
  35. package/bin/lib/Image/ExifTool/Samsung.pm +227 -227
  36. package/bin/lib/Image/ExifTool/Shortcuts.pm +2 -1
  37. package/bin/lib/Image/ExifTool/SigmaRaw.pm +4 -4
  38. package/bin/lib/Image/ExifTool/Sony.pm +229 -30
  39. package/bin/lib/Image/ExifTool/TagLookup.pm +4757 -4633
  40. package/bin/lib/Image/ExifTool/TagNames.pod +706 -18
  41. package/bin/lib/Image/ExifTool/Validate.pm +17 -1
  42. package/bin/lib/Image/ExifTool/WriteExif.pl +9 -7
  43. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +21 -9
  44. package/bin/lib/Image/ExifTool/WriteXMP.pl +2 -2
  45. package/bin/lib/Image/ExifTool/Writer.pl +35 -12
  46. package/bin/lib/Image/ExifTool/XMP.pm +14 -2
  47. package/bin/lib/Image/ExifTool/XMP2.pl +32 -0
  48. package/bin/lib/Image/ExifTool/XMPStruct.pl +96 -28
  49. package/bin/lib/Image/ExifTool/ZIP.pm +5 -5
  50. package/bin/lib/Image/ExifTool.pm +176 -128
  51. package/bin/lib/Image/ExifTool.pod +109 -53
  52. package/bin/perl-Image-ExifTool.spec +44 -44
  53. package/bin/pp_build_exe.args +7 -4
  54. package/package.json +3 -3
@@ -60,11 +60,12 @@ package Image::ExifTool::Nikon;
60
60
  use strict;
61
61
  use vars qw($VERSION %nikonLensIDs %nikonTextEncoding);
62
62
  use Image::ExifTool qw(:DataAccess :Utils);
63
+ use Image::ExifTool::NikonCustom qw(%buttonsZ9);
63
64
  use Image::ExifTool::Exif;
64
65
  use Image::ExifTool::GPS;
65
66
  use Image::ExifTool::XMP;
66
67
 
67
- $VERSION = '4.22';
68
+ $VERSION = '4.24';
68
69
 
69
70
  sub LensIDConv($$$);
70
71
  sub ProcessNikonAVI($$$);
@@ -855,11 +856,17 @@ my %banksZ9 = (
855
856
 
856
857
  my %bracketIncrementZ9 = (
857
858
  0 => '0.3',
858
- #1 => '0.5',
859
+ 1 => '0.5',
859
860
  2 => '0.7',
860
861
  3 => '1.0',
861
862
  4 => '2.0',
862
863
  5 => '3.0',
864
+ 6 => '1.3',
865
+ 7 => '1.5',
866
+ 8 => '1.7',
867
+ 9 => '2.3',
868
+ 10 => '2.5',
869
+ 11 => '2.7',
863
870
  );
864
871
 
865
872
  my %bracketSetZ9 = (
@@ -925,6 +932,14 @@ my %hDMIOutputResolutionZ9 = (
925
932
  #7 => '480p',
926
933
  );
927
934
 
935
+ my %hdrLevelZ8 = (
936
+ 0 => 'Auto',
937
+ 1 => 'Extra High',
938
+ 2 => 'High',
939
+ 3 => 'Normal',
940
+ 4 => 'Low',
941
+ );
942
+
928
943
  my %highFrameRateZ9 = (
929
944
  0 => 'Off',
930
945
  1 => 'CH',
@@ -946,9 +961,10 @@ my %imageAreaZ9b = (
946
961
  );
947
962
 
948
963
  my %infoZSeries = (
949
- Condition => '$$self{Model} =~ /^NIKON Z (5|50|6|6_2|7|7_2|fc|9)\b/i',
950
- Notes => 'Z Series cameras thru December 2021',
964
+ Condition => '$$self{Model} =~ /^NIKON Z (30|5|50|6|6_2|7|7_2|8|fc|9)\b/i',
965
+ Notes => 'Z Series cameras thru July 2023',
951
966
  );
967
+
952
968
  my %iSOAutoHiLimitZ7 = (
953
969
  0 => 'ISO 64',
954
970
  1 => 'ISO 80',
@@ -1111,6 +1127,32 @@ my %multipleExposureModeZ9 = (
1111
1127
  2 => 'On (Series)',
1112
1128
  );
1113
1129
 
1130
+ my %nonCPULensApertureZ8 = ( # 2**(val/6) rounded - non-CPU aperture interface, values and storage differ from the Z8
1131
+ 12 => 'f/1.2',
1132
+ 24 => 'f/1.4',
1133
+ 40 => 'f/1.8',
1134
+ 48 => 'f/2.0',
1135
+ 64 => 'f/2.5',
1136
+ 72 => 'f/2.8',
1137
+ 84 => 'f/3.3',
1138
+ 88 => 'f/3.5',
1139
+ 96 => 'f/4.0',
1140
+ 104 => 'f/4.5',
1141
+ 112 => 'f/5.0',
1142
+ 120 => 'f/5.6',
1143
+ 128 => 'f/6.3',
1144
+ 136 => 'f/7.1',
1145
+ 144 => 'f/8',
1146
+ 156 => 'f/9.5',
1147
+ 168 => 'f/11',
1148
+ 180 => 'f/13',
1149
+ 188 => 'f/15',
1150
+ 192 => 'f/16',
1151
+ 204 => 'f/19',
1152
+ 216 => 'f/22',
1153
+ 313 => 'N/A', #camera menu shows "--" indicating value has not been set for the lens
1154
+ );
1155
+
1114
1156
  my %offLowNormalHighZ7 = (
1115
1157
  0 => 'Off',
1116
1158
  1 => 'Low',
@@ -1118,6 +1160,13 @@ my %offLowNormalHighZ7 = (
1118
1160
  3 => 'High',
1119
1161
  );
1120
1162
 
1163
+ my %portraitImpressionBalanceZ8 = (
1164
+ 0 => 'Off',
1165
+ 1 => 'Mode 1',
1166
+ 2 => 'Mode 2',
1167
+ 3 => 'Mode 3',
1168
+ );
1169
+
1121
1170
  my %releaseModeZ7 = (
1122
1171
  0 => 'Continuous Low',
1123
1172
  1 => 'Continuous High',
@@ -1139,6 +1188,7 @@ my %subjectDetectionZ9 = (
1139
1188
  2 => 'People',
1140
1189
  3 => 'Animals',
1141
1190
  4 => 'Vehicles',
1191
+ 6 => 'Airplanes',
1142
1192
  );
1143
1193
 
1144
1194
  my %timeZoneZ9 = (
@@ -1397,6 +1447,66 @@ my %afPoints81 = (
1397
1447
  17 => 'H6', 34 => 'G7', 51 => 'F8', 68 => 'A9',
1398
1448
  );
1399
1449
 
1450
+ # AF point indices for models with 493 focus points, eg. Z8/Z9 (ref 28)
1451
+ # - Auto Area AF uses 15 of the 17 rows (A-Q) and 27 of the 29 columns (1-27), center is H14 (405 of the 493 focus points can be used by Auto-area AF)
1452
+ #
1453
+ my %afPoints493 = (
1454
+ 1 => 'A1', 28 => 'B1', 55 => 'C1', 82 => 'D1', 109 => 'E1', 136 => 'F1', 163 => 'G1', 190 => 'H1',
1455
+ 2 => 'A2', 29 => 'B2', 56 => 'C2', 83 => 'D2', 110 => 'E2', 137 => 'F2', 164 => 'G2', 191 => 'H2',
1456
+ 3 => 'A3', 30 => 'B3', 57 => 'C3', 84 => 'D3', 111 => 'E3', 138 => 'F3', 165 => 'G3', 192 => 'H3',
1457
+ 4 => 'A4', 31 => 'B4', 58 => 'C4', 85 => 'D4', 112 => 'E4', 139 => 'F4', 166 => 'G4', 193 => 'H4',
1458
+ 5 => 'A5', 32 => 'B5', 59 => 'C5', 86 => 'D5', 113 => 'E5', 140 => 'F5', 167 => 'G5', 194 => 'H5',
1459
+ 6 => 'A6', 33 => 'B6', 60 => 'C6', 87 => 'D6', 114 => 'E6', 141 => 'F6', 168 => 'G6', 195 => 'H6',
1460
+ 7 => 'A7', 34 => 'B7', 61 => 'C7', 88 => 'D7', 115 => 'E7', 142 => 'F7', 169 => 'G7', 196 => 'H7',
1461
+ 8 => 'A8', 35 => 'B8', 62 => 'C8', 89 => 'D8', 116 => 'E8', 143 => 'F8', 170 => 'G8', 197 => 'H8',
1462
+ 9 => 'A9', 36 => 'B9', 63 => 'C9', 90 => 'D9', 117 => 'E9', 144 => 'F9', 171 => 'G9', 198 => 'H9',
1463
+ 10 => 'A10', 37 => 'B10', 64 => 'C10', 91 => 'D10', 118 => 'E10', 145 => 'F10', 172 => 'G10', 199 => 'H10',
1464
+ 11 => 'A11', 38 => 'B11' , 65 => 'C11', 92 => 'D11', 119 => 'E11', 146 => 'F11', 173 => 'G11', 200 => 'H11',
1465
+ 12 => 'A12', 39 => 'B12' , 66 => 'C12', 93 => 'D12', 120 => 'E12', 147 => 'F12', 174 => 'G12', 201 => 'H12',
1466
+ 13 => 'A13', 40 => 'B13' , 67 => 'C13', 94 => 'D13', 121 => 'E13', 148 => 'F13', 175 => 'G13', 202 => 'H13',
1467
+ 14 => 'A14', 41 => 'B14' , 68 => 'C14', 95 => 'D14', 122 => 'E14', 149 => 'F14', 176 => 'G14', 203 => 'H14',
1468
+ 15 => 'A15', 42 => 'B15', 69 => 'C15', 96 => 'D15', 123 => 'E15', 150 => 'F15', 177 => 'G15', 204 => 'H15',
1469
+ 16 => 'A16', 43 => 'B16' , 70 => 'C16', 97 => 'D16', 124 => 'E16', 151 => 'F16', 178 => 'G16', 205 => 'H16',
1470
+ 17 => 'A17', 44 => 'B17', 71 => 'C17', 98 => 'D17', 125 => 'E17', 152 => 'F17', 179 => 'G17', 206 => 'H17',
1471
+ 18 => 'A18', 45 => 'B18', 72 => 'C18', 99 => 'D18', 126 => 'E18', 153 => 'F18', 180 => 'G18', 207 => 'H18',
1472
+ 19 => 'A19', 46 => 'B19', 73 => 'C19', 100 => 'D19', 127 => 'E19', 154 => 'F19', 181 => 'G19', 208 => 'H19',
1473
+ 20 => 'A20', 47 => 'B20', 74 => 'C20', 101 => 'D20', 128 => 'E20', 155 => 'F20', 182 => 'G20', 209 => 'H20',
1474
+ 21 => 'A21', 48 => 'B21', 75 => 'C21', 102 => 'D21', 129 => 'E21', 156 => 'F21', 183 => 'G21', 210 => 'H21',
1475
+ 22 => 'A22', 49 => 'B22', 76 => 'C22', 103 => 'D22', 130 => 'E22', 157 => 'F22', 184 => 'G22', 211 => 'H22',
1476
+ 23 => 'A23', 50 => 'B23', 77 => 'C23', 104 => 'D23', 131 => 'E23', 158 => 'F23', 185 => 'G23', 212 => 'H23',
1477
+ 24 => 'A24', 51 => 'B24', 78 => 'C24', 105 => 'D24', 132 => 'E24', 159 => 'F24', 186 => 'G24', 213 => 'H24',
1478
+ 25 => 'A25', 52 => 'B25', 79 => 'C25', 106 => 'D25', 133 => 'E25', 160 => 'F25', 187 => 'G25', 214 => 'H25',
1479
+ 26 => 'A26', 53 => 'B26', 80 => 'C26', 107 => 'D26', 134 => 'E26', 161 => 'F26', 188 => 'G26', 215 => 'H26',
1480
+ 27 => 'A27', 54 => 'B27', 81 => 'C27', 108 => 'D27', 135 => 'E27', 162 => 'F27', 189 => 'G27', 216 => 'H27',
1481
+
1482
+ 217 => 'I1', 244 => 'J1', 271 => 'K1', 298 => 'L1', 325 => 'M1', 352 => 'N1', 379 => 'O1',
1483
+ 218 => 'I2', 245 => 'J2', 272 => 'K2', 299 => 'L2', 326 => 'M2', 353 => 'N2', 380 => 'O2',
1484
+ 219 => 'I3', 246 => 'J3', 273 => 'K3', 300 => 'L3', 327 => 'M3', 354 => 'N3', 381 => 'O3',
1485
+ 220 => 'I4', 247 => 'J4', 274 => 'K4', 301 => 'L4', 328 => 'M4', 355 => 'N4', 382 => 'O4',
1486
+ 221 => 'I5', 248 => 'J5', 275 => 'K5', 302 => 'L5', 329 => 'M5', 356 => 'N5', 383 => 'O5',
1487
+ 222 => 'I6', 249 => 'J6', 276 => 'K6', 303 => 'L6', 330 => 'M6', 357 => 'N6', 384 => 'O6',
1488
+ 223 => 'I7', 250 => 'J7', 277 => 'K7', 304 => 'L7', 331 => 'M7', 358 => 'N7', 385 => 'O7',
1489
+ 224 => 'I8', 251 => 'J8', 278 => 'K8', 305 => 'L8', 332 => 'M8', 359 => 'N8', 386 => 'O8',
1490
+ 225 => 'I9', 252 => 'J9', 279 => 'K9', 306 => 'L9', 333 => 'M9', 360 => 'N9', 387 => 'O9',
1491
+ 226 => 'I10', 253 => 'J10', 280 => 'K10', 307 => 'L10', 334 => 'M10', 361 => 'N10', 388 => 'O10',
1492
+ 227 => 'I11', 254 => 'J11', 281 => 'K11', 308 => 'L11', 335 => 'M11', 362 => 'N11', 389 => 'O11',
1493
+ 228 => 'I12', 255 => 'J12', 282 => 'K12', 309 => 'L12', 336 => 'M12', 363 => 'N12', 390 => 'O12',
1494
+ 229 => 'I13', 256 => 'J13', 283 => 'K13', 310 => 'L13', 337 => 'M13', 364 => 'N13', 391 => 'O13',
1495
+ 230 => 'I14', 257 => 'J14', 284 => 'K14', 311 => 'L14', 338 => 'M14', 365 => 'N14', 392 => 'O14',
1496
+ 231 => 'I15', 258 => 'J15', 285 => 'K15', 312 => 'L15', 339 => 'M15', 366 => 'N15', 393 => 'O15',
1497
+ 232 => 'I16', 259 => 'J16', 286 => 'K16', 313 => 'L16', 340 => 'M16', 367 => 'N16', 394 => 'O16',
1498
+ 233 => 'I17', 260 => 'J17', 287 => 'K17', 314 => 'L17', 341 => 'M17', 368 => 'N17', 395 => 'O17',
1499
+ 234 => 'I18', 261 => 'J18', 288 => 'K18', 315 => 'L18', 342 => 'M18', 369 => 'N18', 396 => 'O18',
1500
+ 235 => 'I19', 262 => 'J19', 289 => 'K19', 316 => 'L19', 343 => 'M19', 370 => 'N19', 397 => 'O19',
1501
+ 236 => 'I20', 263 => 'J20', 290 => 'K20', 317 => 'L20', 344 => 'M20', 371 => 'N20', 398 => 'O20',
1502
+ 237 => 'I21', 264 => 'J21', 291 => 'K21', 318 => 'L21', 345 => 'M21', 372 => 'N21', 399 => 'O21',
1503
+ 238 => 'I22', 265 => 'J22', 292 => 'K22', 319 => 'L22', 346 => 'M22', 373 => 'N22', 400 => 'O22',
1504
+ 239 => 'I23', 266 => 'J23', 293 => 'K23', 320 => 'L23', 347 => 'M23', 374 => 'N23', 401 => 'O23',
1505
+ 240 => 'I24', 267 => 'J24', 294 => 'K24', 321 => 'L24', 348 => 'M24', 375 => 'N24', 402 => 'O24',
1506
+ 241 => 'I25', 268 => 'J25', 295 => 'K25', 322 => 'L25', 349 => 'M25', 376 => 'N25', 403 => 'O25',
1507
+ 242 => 'I26', 269 => 'J26', 296 => 'K26', 323 => 'L26', 350 => 'M26', 377 => 'N26', 404 => 'O26',
1508
+ 243 => 'I27', 270 => 'J27', 297 => 'K27', 324 => 'L27', 351 => 'M27', 378 => 'N27', 405 => 'O27',
1509
+ );
1400
1510
  my %cropHiSpeed = ( #IB
1401
1511
  0 => 'Off',
1402
1512
  1 => '1.3x Crop', # (1.3x Crop, Large)
@@ -1523,6 +1633,7 @@ my %base64coord = (
1523
1633
  0x0006 => { Name => 'Sharpness', Writable => 'string' },
1524
1634
  0x0007 => {
1525
1635
  Name => 'FocusMode',
1636
+ RawConv => '$$self{FocusMode} = $val',
1526
1637
  Writable => 'string',
1527
1638
  },
1528
1639
  # FlashSetting (better named FlashSyncMode, ref 28) values:
@@ -1714,6 +1825,7 @@ my %base64coord = (
1714
1825
  PrintConv => {
1715
1826
  1 => 'sRGB',
1716
1827
  2 => 'Adobe RGB',
1828
+ 4 => 'BT.2100', #observed on Z8 with Tone Mode set to HLG
1717
1829
  },
1718
1830
  },
1719
1831
  0x001f => { #PH
@@ -1969,6 +2081,7 @@ my %base64coord = (
1969
2081
  0 => 'Did Not Fire',
1970
2082
  1 => 'Fired, Manual', #14
1971
2083
  3 => 'Not Ready', #28
2084
+ #5 observed on Z9 firing remote SB-5000 via WR-R11a optical awl
1972
2085
  7 => 'Fired, External', #14
1973
2086
  8 => 'Fired, Commander Mode',
1974
2087
  9 => 'Fired, TTL Mode',
@@ -2309,6 +2422,15 @@ my %base64coord = (
2309
2422
  ByteOrder => 'LittleEndian',
2310
2423
  },
2311
2424
  },
2425
+ { # (Z8 firmware version 1.00 ref 28)
2426
+ Condition => '$$valPt =~ /^0806/',
2427
+ Name => 'ShotInfoZ8',
2428
+ SubDirectory => {
2429
+ TagTable => 'Image::ExifTool::Nikon::ShotInfoZ8',
2430
+ DecryptStart => 4,
2431
+ ByteOrder => 'LittleEndian',
2432
+ },
2433
+ },
2312
2434
  { # (Z9 firmware version 1.00 ref 28)
2313
2435
  Condition => '$$valPt =~ /^0805/',
2314
2436
  Name => 'ShotInfoZ9',
@@ -2759,7 +2881,7 @@ my %base64coord = (
2759
2881
  },
2760
2882
  0x00b7 => [{
2761
2883
  Name => 'AFInfo2',
2762
- Condition => '$$self{Model} =~ /^NIKON Z 9\b/i', #AFInfo2Version 0400
2884
+ Condition => '$$self{Model} =~ /^NIKON (Z 8|Z 9)\b/i', #AFInfo2Version 0400
2763
2885
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
2764
2886
  },{ #JD
2765
2887
  Name => 'AFInfo2',
@@ -3888,6 +4010,7 @@ my %base64coord = (
3888
4010
  205 => 'Dynamic Area (M)', #28 (Z9)
3889
4011
  206 => 'Dynamic Area (L)', #28 (Z9)
3890
4012
  207 => '3D-tracking', #28 (Z9)
4013
+ 208 => 'Wide-Area (C1/C2)', #28 (Z8, Z9)
3891
4014
  },
3892
4015
  },
3893
4016
  ],
@@ -4469,6 +4592,15 @@ my %base64coord = (
4469
4592
  208 => 'Wide (C1/C2)',
4470
4593
  },
4471
4594
  },
4595
+ 10 => {
4596
+ Name => 'AFPointsUsed',
4597
+ Condition => '$$self{AFAreaMode} == 6', #only valid for Auto AF Area mode. Other modes handled via AFAreaXPosition/AFAreaYPosition
4598
+ Format => 'undef[51]',
4599
+ ValueConv => 'join(" ", unpack("H2"x51, $val))',
4600
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
4601
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints493); },
4602
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints493); },
4603
+ },
4472
4604
  0x3e => {
4473
4605
  Name => 'AFImageWidth',
4474
4606
  Format => 'int16u',
@@ -5165,7 +5297,7 @@ my %nikonFocalConversions = (
5165
5297
  %binaryDataAttrs,
5166
5298
  NOTES => 'Tags found in the encrypted LensData from cameras such as the Z6 and Z7.',
5167
5299
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
5168
- DATAMEMBER => [ 0x03, 0x2f, 0x35, 0x4c, 0x56 ],
5300
+ DATAMEMBER => [ 0x03, 0x2f, 0x35, 0x4c, 0x56, 0x58 ],
5169
5301
  0x00 => {
5170
5302
  Name => 'LensDataVersion',
5171
5303
  Format => 'string[4]',
@@ -5345,7 +5477,7 @@ my %nikonFocalConversions = (
5345
5477
  0x4c => { #28
5346
5478
  Name => 'FocusDistanceRangeWidth', #reflects the number of discrete absolute lens positions that are mapped to the reported FocusDistance. Will be 1 near CFD reflecting very narrow focus distance bands (i.e., quite accurate). Near Infinity will be something like 32. Note: 0 at infinity.
5347
5479
  Format => 'int8u',
5348
- Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5480
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1 and $$self{FocusMode} ne "Manual"',
5349
5481
  RawConv => '$$self{FocusDistanceRangeWidth} = $val',
5350
5482
  Unknown => 1,
5351
5483
  },
@@ -5354,19 +5486,26 @@ my %nikonFocalConversions = (
5354
5486
  Format => 'int16u',
5355
5487
  Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5356
5488
  RawConv => '$val = $val/256', # 1st byte is the fractional component. This byte was not previously considered in the legacy calculation (which only used the 2nd byte). When 2nd byte < 80; distance is < 1 meter
5357
- ValueConv => '0.01 * 10**($val/40)', # in m
5358
- ValueConvInv => '$val>0 ? 40*log($val*100)/log(10) : 0',
5489
+ ValueConv => '2**(($val-80)/12)', # in m #slighly more accurate than the legacy calcualtion of '0.01 * 10**($val/40)'. Tested at all focus positions using the 105mm,70-200mm & 600mm
5490
+ ValueConvInv => '$val>0 ? log(12*($val+80)/log(2) : 0', #was '$val>0 ? 40*log($val*100)/log(10) : 0'
5359
5491
  PrintConv => q{
5360
- (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) ? "Inf" : $val < 1 ? $val < 0.35 ? sprintf("%.4f m", $val): sprintf("%.3f m", $val): sprintf("%.2f m", $val), #distances less than 35mm are quite accurate with increasingly less precision past 1m
5492
+ (defined $$self{FocusStepsFromInfinity} and not $$self{FocusStepsFromInfinity}) ? "Inf" : $val < 1 ? $val < 0.35 ? sprintf("%.4f m", $val): sprintf("%.3f m", $val): sprintf("%.2f m", $val), #distances less than 35mm are quite accurate with increasingly less precision past 1m
5361
5493
  },
5362
5494
  },
5363
- 0x56 => { #28
5495
+ 0x56 => { #28 #not valif for focus mode M
5364
5496
  Name => 'LensDriveEnd', # byte contains: 1 at CFD/MOD; 2 at Infinity; 0 otherwise
5365
- Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5497
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1 and $$self{FocusMode} ne "Manual"',
5366
5498
  Format => 'int8u',
5367
5499
  RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"}; } else{ $$self{LensDriveEnd} = "Inf"}',
5368
5500
  Unknown => 1,
5369
5501
  },
5502
+ 0x58 => { #28
5503
+ Name => 'FocusStepsFromInfinity',
5504
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1', #valid for both AF and manual focus modes
5505
+ Format => 'int8u',
5506
+ RawConv => '$$self{FocusStepsFromInfinity} = $val', # 0 at Infinity, otherwise a small positive number monotonically increasing towards CFD.
5507
+ Unknown => 1,
5508
+ },
5370
5509
  0x5a => { #28
5371
5510
  Name => 'LensPositionAbsolute', # <=0 at infinity. Typical value at CFD might be 58000. Only valid for Z-mount lenses.
5372
5511
  Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
@@ -8149,6 +8288,75 @@ my %nikonFocalConversions = (
8149
8288
  },
8150
8289
  );
8151
8290
 
8291
+ # shot information for the Z8 firmware 1.00 (encrypted) - ref 28
8292
+ %Image::ExifTool::Nikon::ShotInfoZ8 = (
8293
+ PROCESS_PROC => \&ProcessNikonEncrypted,
8294
+ WRITE_PROC => \&ProcessNikonEncrypted,
8295
+ CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8296
+ VARS => { ID_LABEL => 'Index', NIKON_OFFSETS => 0x24 },
8297
+ DATAMEMBER => [ 0x04 ],
8298
+ IS_SUBDIR => [ 0x30, 0x84, 0x8c ],
8299
+ WRITABLE => 1,
8300
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8301
+ NOTES => 'These tags are extracted from encrypted data in images from the Z8.',
8302
+ 0x00 => {
8303
+ Name => 'ShotInfoVersion',
8304
+ Format => 'string[4]',
8305
+ Writable => 0,
8306
+ },
8307
+ 0x04 => {
8308
+ Name => 'FirmwareVersion',
8309
+ DataMember => 'FirmwareVersion',
8310
+ Format => 'string[8]',
8311
+ Writable => 0,
8312
+ RawConv => '$$self{FirmwareVersion} = $val',
8313
+ },
8314
+ 0x0e => {
8315
+ Name => 'FirmwareVersion2',
8316
+ Format => 'string[8]',
8317
+ Writable => 0,
8318
+ Hidden => 1,
8319
+ },
8320
+ 0x18 => {
8321
+ Name => 'FirmwareVersion3',
8322
+ Format => 'string[8]',
8323
+ Writable => 0,
8324
+ Hidden => 1,
8325
+ },
8326
+ 0x24 => {
8327
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
8328
+ Format => 'int32u',
8329
+ Writable => 0,
8330
+ Hidden => 1,
8331
+ },
8332
+ # subdirectories, referenced by offsets (not processed if offset is zero)
8333
+ 0x30 => {
8334
+ Name => 'SequenceOffset',
8335
+ Format => 'int32u',
8336
+ SubDirectory => {
8337
+ TagTable => 'Image::ExifTool::Nikon::SeqInfoZ9',
8338
+ Start => '$val',
8339
+ },
8340
+ },
8341
+ 0x84 => {
8342
+ Name => 'OrientOffset',
8343
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8344
+ Format => 'int32u',
8345
+ SubDirectory => {
8346
+ TagTable => 'Image::ExifTool::Nikon::OrientationInfo',
8347
+ Start => '$val',
8348
+ },
8349
+ },
8350
+ 0x8c => {
8351
+ Name => 'MenuOffset',
8352
+ Format => 'int32u',
8353
+ SubDirectory => {
8354
+ TagTable => 'Image::ExifTool::Nikon::MenuInfoZ8',
8355
+ Start => '$val',
8356
+ },
8357
+ },
8358
+ );
8359
+
8152
8360
  # shot information for the Z9 firmware 1.00 (encrypted) - ref 28
8153
8361
  %Image::ExifTool::Nikon::ShotInfoZ9 = (
8154
8362
  PROCESS_PROC => \&ProcessNikonEncrypted,
@@ -8156,7 +8364,7 @@ my %nikonFocalConversions = (
8156
8364
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8157
8365
  VARS => { ID_LABEL => 'Index', NIKON_OFFSETS => 0x24 },
8158
8366
  DATAMEMBER => [ 0x04 ],
8159
- IS_SUBDIR => [ 0x30, 0x58, 0x84, 0x8c ],
8367
+ IS_SUBDIR => [ 0x30, 0x58, 0x80, 0x84, 0x8c ],
8160
8368
  WRITABLE => 1,
8161
8369
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8162
8370
  NOTES => 'These tags are extracted from encrypted data in images from the Z9.',
@@ -8200,14 +8408,25 @@ my %nikonFocalConversions = (
8200
8408
  },
8201
8409
  },
8202
8410
  0x58 => {
8203
- Name => 'Offset13', #offset13 - length x'8f80 (Z9 firmware 3.01 NEF), using currently for a few foucs related tags. Might be premature to give the offset a more meaningful name at this point.
8411
+ Name => 'Offset13', #offset13 - length x'8f80 (Z9 firmware 3.01 NEF), using currently for a few focus related tags. Might be premature to give the offset a more meaningful name at this point.
8204
8412
  Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "03.01"',
8205
8413
  Format => 'int32u',
8414
+ AlwaysDecrypt => 1, # (necessary because FirmwareVersion is extracted after decryption time)
8206
8415
  SubDirectory => {
8207
8416
  TagTable => 'Image::ExifTool::Nikon::Offset13InfoZ9',
8208
8417
  Start => '$val',
8209
8418
  },
8210
8419
  },
8420
+ 0x80 => {
8421
+ Name => 'AutoCaptureOffset',
8422
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "04.00"',
8423
+ Format => 'int32u',
8424
+ AlwaysDecrypt => 1, # (necessary because FirmwareVersion is extracted after decryption time)
8425
+ SubDirectory => {
8426
+ TagTable => 'Image::ExifTool::Nikon::AutoCaptureInfo',
8427
+ Start => '$val',
8428
+ },
8429
+ },
8211
8430
  0x84 => {
8212
8431
  Name => 'OrientOffset',
8213
8432
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
@@ -8232,6 +8451,8 @@ my %nikonFocalConversions = (
8232
8451
  %binaryDataAttrs,
8233
8452
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8234
8453
  DATAMEMBER => [ 0x20, 0x28, 0x2a ],
8454
+ #0x0019 => HDRFrame # For JPG 0=> Not HDR; 1=> file is the blended exposure. For raw files: 0=> Not from an HDR capture sequence; otherwise frame number in the HDR capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8455
+ #0x001A => MultipleExposureFrame # For JPG 0=> Not a multiple exposure; 1=> file is the blended exposure. For raw files: 0=> Not a multiple exposure capture; otherwise frame number in the capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8235
8456
  0x0020 => {
8236
8457
  Name => 'FocusShiftShooting',
8237
8458
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
@@ -8409,6 +8630,24 @@ my %nikonFocalConversions = (
8409
8630
  },
8410
8631
  );
8411
8632
 
8633
+ %Image::ExifTool::Nikon::MenuInfoZ8 = (
8634
+ %binaryDataAttrs,
8635
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8636
+ IS_SUBDIR => [ 0x10 ],
8637
+ # 0x00 - int32u size of this directory
8638
+ 0x10 => [
8639
+ {
8640
+ Name => 'MenuSettingsOffsetZ8',
8641
+ Format => 'int32u',
8642
+ Notes => 'Firmware versions 1.0.0',
8643
+ SubDirectory => {
8644
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ8',
8645
+ Start => '$dirStart + $val',
8646
+ },
8647
+ },
8648
+ ],
8649
+ );
8650
+
8412
8651
  %Image::ExifTool::Nikon::MenuInfoZ9 = (
8413
8652
  %binaryDataAttrs,
8414
8653
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -8427,16 +8666,144 @@ my %nikonFocalConversions = (
8427
8666
  },
8428
8667
  {
8429
8668
  Name => 'MenuSettingsOffsetZ9v3',
8430
- Notes => 'Firmware versions 3.0 and later',
8669
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "04.00"',
8670
+ Notes => 'Firmware versions 3.0 and v3.10',
8431
8671
  Format => 'int32u',
8432
8672
  SubDirectory => {
8433
8673
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v3',
8434
8674
  Start => '$dirStart + $val',
8435
8675
  },
8436
8676
  },
8677
+ {
8678
+ Name => 'MenuSettingsOffsetZ9v4',
8679
+ Notes => 'Firmware versions 4.0 and later',
8680
+ Format => 'int32u',
8681
+ SubDirectory => {
8682
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v4',
8683
+ Start => '$dirStart + $val',
8684
+ },
8685
+ },
8437
8686
  ],
8438
8687
  );
8439
8688
 
8689
+ %Image::ExifTool::Nikon::AutoCaptureInfo = (
8690
+ %binaryDataAttrs,
8691
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8692
+ DATAMEMBER => [ 0 ],
8693
+ 0 => {
8694
+ Name => 'AutoCapturedFrame',
8695
+ RawConv => '$$self{AutoCapturedFrame} = $val',
8696
+ PrintConv => {
8697
+ 0 => 'No',
8698
+ 5 => 'Yes',
8699
+ },
8700
+ },
8701
+ 1 => {
8702
+ Name => 'AutoCaptureCriteria',
8703
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8704
+ PrintConv => q[
8705
+ $_ = '';
8706
+ return $_ . Image::ExifTool::DecodeBits($val,
8707
+ {
8708
+ 0 => 'Distance',
8709
+ 1 => 'Motion',
8710
+ 2 => 'Subject Detection',
8711
+ });
8712
+ ],
8713
+ },
8714
+ # offsets 3-52 contain a bitmap of the focus points enabled when AutoArea is the AF-Area Mode. 0=> disabled, 1=> enabled. Focus points are in a grid with dimensions 25x15.
8715
+ 55 => {
8716
+ Name => 'AutoCaptureRecordingTime',
8717
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8718
+ PrintConv => {
8719
+ 0 => '1 Sec',
8720
+ 1 => '3 Sec',
8721
+ 2 => '5 Sec',
8722
+ #3 => '',
8723
+ 4 => '30 Sec',
8724
+ 5 => 'No Limit',
8725
+ 6 => '2 Sec',
8726
+ 7 => '10 Sec',
8727
+ 8 => '20 Sec',
8728
+ 9 => '1 Min',
8729
+ 10 => '3 Min',
8730
+ 11 => '5 Min',
8731
+ 12 => '10 Min',
8732
+ 13 => '30 Min',
8733
+ },
8734
+ },
8735
+ 56 => {
8736
+ Name => 'AutoCaptureWaitTime',
8737
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8738
+ PrintConv => {
8739
+ 0 => 'No Wait',
8740
+ 1 => '10 Sec',
8741
+ 2 => '30 Sec',
8742
+ 3 => '1 Min',
8743
+ 4 => '5 Min',
8744
+ 5 => '10 Min',
8745
+ 6 => '30 Min',
8746
+ 7 => '1 Sec',
8747
+ 8 => '2 Sec',
8748
+ 9 => '3 Sec',
8749
+ 10 => '5 Sec',
8750
+ 11 => '20 Sec',
8751
+ 12 => '3 Min',
8752
+ },
8753
+ },
8754
+ 74 => {
8755
+ Name => 'AutoCaptureDistanceFar',
8756
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8757
+ PrintConv => 'sprintf("%.1f m", $val/10)',
8758
+ },
8759
+ 78 => {
8760
+ Name => 'AutoCaptureDistanceNear',
8761
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8762
+ PrintConv => 'sprintf("%.1f m", $val/10)',
8763
+ },
8764
+ 95 => {
8765
+ Name => 'AutoCaptureCriteriaMotionDirection',
8766
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8767
+ PrintConv => q[
8768
+ return 'All' if $val eq 255;
8769
+ $_ = '';
8770
+ return $_ . Image::ExifTool::DecodeBits($val,
8771
+ {
8772
+ 0 => 'Top Left',
8773
+ 1 => 'Top Right',
8774
+ 2 => 'Bottom Left',
8775
+ 3 => 'Bottom Right',
8776
+ 4 => 'Left',
8777
+ 5 => 'Right',
8778
+ 6 => 'Top Center',
8779
+ 7 => 'Bottom Center',
8780
+ });
8781
+ ],
8782
+ },
8783
+ 99 => {
8784
+ Name => 'AutoCaptureCriteriaMotionSpeed', #1-5
8785
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8786
+ },
8787
+ 100 => {
8788
+ Name => 'AutoCaptureCriteriaMotionSize', #1-5
8789
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8790
+ },
8791
+ 105 => {
8792
+ Name => 'AutoCaptureCriteriaSubjectSize', #1-5
8793
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8794
+ },
8795
+ 106 => {
8796
+ Name => 'AutoCaptureCriteriaSubjectType',
8797
+ Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
8798
+ PrintConv => {
8799
+ 0 => 'Auto (all)',
8800
+ 1 => 'People',
8801
+ 2 => 'Animals',
8802
+ 3 => 'Vehicle'
8803
+ },
8804
+ },
8805
+ );
8806
+
8440
8807
  %Image::ExifTool::Nikon::OrientationInfo = (
8441
8808
  %binaryDataAttrs,
8442
8809
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -8703,10 +9070,253 @@ my %nikonFocalConversions = (
8703
9070
  #859 => HDMIViewAssist
8704
9071
  );
8705
9072
 
9073
+ %Image::ExifTool::Nikon::MenuSettingsZ8 = (
9074
+ %binaryDataAttrs,
9075
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9076
+ DATAMEMBER => [ 152, 200, 204, 244, 440, 548, 554, 570, 596 ],
9077
+ IS_SUBDIR => [ 943 ],
9078
+ NOTES => 'These tags are used by the Z8 firmware 1.00.',
9079
+ 72 => {
9080
+ Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9081
+ PrintConv => \%highFrameRateZ9,
9082
+ },
9083
+ 152 => {
9084
+ Name => 'MultipleExposureMode',
9085
+ RawConv => '$$self{MultipleExposureMode} = $val',
9086
+ PrintConv => \%multipleExposureModeZ9,
9087
+ },
9088
+ 154 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
9089
+ 184 => {
9090
+ Name => 'IntervalDurationHours',
9091
+ Format => 'int32u',
9092
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9093
+ },
9094
+ 188 => {
9095
+ Name => 'IntervalDurationMinutes',
9096
+ Format => 'int32u',
9097
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9098
+ },
9099
+ 192 => {
9100
+ Name => 'IntervalDurationSeconds',
9101
+ Format => 'int32u',
9102
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9103
+ },
9104
+ 200 => {
9105
+ Name => 'Intervals',
9106
+ Format => 'int32u',
9107
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
9108
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9109
+ },
9110
+ 204 => {
9111
+ Name => 'ShotsPerInterval',
9112
+ Format => 'int32u',
9113
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
9114
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9115
+ },
9116
+ 208 => {
9117
+ Name => 'IntervalExposureSmoothing',
9118
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9119
+ Format => 'int8u',
9120
+ PrintConv => \%offOn,
9121
+ },
9122
+ 210 => {
9123
+ Name => 'IntervalPriority',
9124
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0',
9125
+ Format => 'int8u',
9126
+ PrintConv => \%offOn,
9127
+ },
9128
+ 244 => {
9129
+ Name => 'FocusShiftNumberShots', #1-300
9130
+ RawConv => '$$self{FocusShiftNumberShots} = $val',
9131
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9132
+ },
9133
+ 248 => {
9134
+ Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
9135
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9136
+ },
9137
+ 252 => {
9138
+ Name => 'FocusShiftInterval',
9139
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9140
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
9141
+ },
9142
+ 256 => {
9143
+ Name => 'FocusShiftExposureLock',
9144
+ Unknown => 1,
9145
+ PrintConv => \%offOn,
9146
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9147
+ },
9148
+ 286 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9149
+ 288 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9150
+ 324 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9151
+ 338 => { Name => 'AutoISO', PrintConv => \%offOn },
9152
+ 340 => {
9153
+ Name => 'ISOAutoHiLimit',
9154
+ Format => 'int16u',
9155
+ Unknown => 1,
9156
+ ValueConv => '($val-104)/8',
9157
+ ValueConvInv => '8 * ($val + 104)',
9158
+ PrintConv => \%iSOAutoHiLimitZ7,
9159
+ },
9160
+ 342 => {
9161
+ Name => 'ISOAutoFlashLimit',
9162
+ Format => 'int16u',
9163
+ Unknown => 1,
9164
+ ValueConv => '($val-104)/8',
9165
+ ValueConvInv => '8 * ($val + 104)',
9166
+ PrintConv => \%iSOAutoHiLimitZ7,
9167
+ },
9168
+ 350 => {
9169
+ Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9170
+ ValueConv => '$val / 8',
9171
+ Format => 'int16s',
9172
+ PrintConv => \%iSOAutoShutterTimeZ9,
9173
+ },
9174
+ 432 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9175
+ 434 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
9176
+ 436 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
9177
+ 440 => {
9178
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9179
+ RawConv => '$$self{FlashControlMode} = $val',
9180
+ PrintConv => \%flashControlModeZ7,
9181
+ },
9182
+ 548 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
9183
+ 550 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
9184
+ 554 => {
9185
+ Name => 'BracketSet',
9186
+ RawConv => '$$self{BracketSet} = $val',
9187
+ PrintConv => \%bracketSetZ9,
9188
+ },
9189
+ 556 => {
9190
+ Name => 'BracketProgram',
9191
+ Condition => '$$self{BracketSet} < 3',
9192
+ Notes => 'AE and/or Flash Bracketing',
9193
+ PrintConv => \%bracketProgramZ9,
9194
+ },
9195
+ 558 => {
9196
+ Name => 'BracketIncrement',
9197
+ Condition => '$$self{BracketSet} < 3',
9198
+ Notes => 'AE and/or Flash Bracketing',
9199
+ PrintConv => \%bracketIncrementZ9,
9200
+ },
9201
+ 570 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
9202
+ #572 HDRSaveRaw 0=> No; 1=> Yes
9203
+ 576 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
9204
+ 582 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
9205
+ 586 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
9206
+ 592 => { Name => 'DXCropAlert', PrintConv => \%offOn },
9207
+ 594 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
9208
+ 596 => {
9209
+ Name => 'DynamicAFAreaSize',
9210
+ Condition => '$$self{AFAreaMode} == 2',
9211
+ RawConv => '$$self{DynamicAFAreaSize} = $val',
9212
+ PrintConv => \%dynamicAfAreaModesZ9,
9213
+ },
9214
+ 618 => { Name => 'ToneMap', PrintConv => { 0 => 'SDR', 1 => 'HLG' }, Unknown => 1 },
9215
+ 622 => { Name => 'PortraitImpressionBalance', PrintConv => \%portraitImpressionBalanceZ8 },
9216
+ 636 => { Name => 'HighFrequencyFlickerReductionShooting', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
9217
+ 730 => {
9218
+ Name => 'MovieImageArea',
9219
+ Unknown => 1,
9220
+ Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9221
+ PrintConv => \%imageAreaZ9b,
9222
+ },
9223
+ 740 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9224
+ 742 => {
9225
+ Name => 'MovieISOAutoHiLimit',
9226
+ Format => 'int16u',
9227
+ Unknown => 1,
9228
+ ValueConv => '($val-104)/8',
9229
+ ValueConvInv => '8 * ($val + 104)',
9230
+ PrintConv => \%iSOAutoHiLimitZ7,
9231
+ },
9232
+ 744 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
9233
+ 746 => {
9234
+ Name => 'MovieISOAutoManualMode',
9235
+ Format => 'int16u',
9236
+ Unknown => 1,
9237
+ ValueConv => '($val-104)/8',
9238
+ ValueConvInv => '8 * ($val + 104)',
9239
+ PrintConv => \%iSOAutoHiLimitZ7,
9240
+ },
9241
+ 820 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9242
+ 822 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9243
+ 828 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
9244
+ 830 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
9245
+ 832 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
9246
+ 834 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
9247
+ 836 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
9248
+ 840 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9249
+ 842 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
9250
+ 844 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
9251
+ 846 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9252
+ 848 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
9253
+ 850 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
9254
+ 882 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
9255
+ 884 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
9256
+ 886 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
9257
+ 887 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9258
+ 888 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9259
+ 896 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9260
+ 943 => {
9261
+ Name => 'CustomSettingsZ8',
9262
+ Format => 'undef[730]',
9263
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ8' },
9264
+ },
9265
+ 1682 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9266
+ 1684 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9267
+ 1690 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9268
+ 1712 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9269
+ 1716 => { Name => 'NonCPULens1FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
9270
+ 1718 => { Name => 'NonCPULens2FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9271
+ 1720 => { Name => 'NonCPULens3FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9272
+ 1722 => { Name => 'NonCPULens4FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9273
+ 1724 => { Name => 'NonCPULens5FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9274
+ 1726 => { Name => 'NonCPULens6FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9275
+ 1728 => { Name => 'NonCPULens7FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9276
+ 1730 => { Name => 'NonCPULens8FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9277
+ 1732 => { Name => 'NonCPULens9FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9278
+ 1734 => { Name => 'NonCPULens10FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9279
+ 1736 => { Name => 'NonCPULens11FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9280
+ 1738 => { Name => 'NonCPULens12FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9281
+ 1740 => { Name => 'NonCPULens13FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9282
+ 1742 => { Name => 'NonCPULens14FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9283
+ 1744 => { Name => 'NonCPULens15FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9284
+ 1746 => { Name => 'NonCPULens16FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9285
+ 1748 => { Name => 'NonCPULens17FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9286
+ 1750 => { Name => 'NonCPULens18FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9287
+ 1752 => { Name => 'NonCPULens19FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9288
+ 1754 => { Name => 'NonCPULens20FocalLength', Format => 'int16u', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9289
+ 1756 => { Name => 'NonCPULens1MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9290
+ 1758 => { Name => 'NonCPULens2MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9291
+ 1760 => { Name => 'NonCPULens3MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9292
+ 1762 => { Name => 'NonCPULens4MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9293
+ 1764 => { Name => 'NonCPULens5MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9294
+ 1766 => { Name => 'NonCPULens6MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9295
+ 1768 => { Name => 'NonCPULens7MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9296
+ 1770 => { Name => 'NonCPULens8MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9297
+ 1772 => { Name => 'NonCPULens9MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9298
+ 1774 => { Name => 'NonCPULens10MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9299
+ 1776 => { Name => 'NonCPULens11MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9300
+ 1778 => { Name => 'NonCPULens12MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9301
+ 1780 => { Name => 'NonCPULens13MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9302
+ 1782 => { Name => 'NonCPULens14MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9303
+ 1784 => { Name => 'NonCPULens15MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9304
+ 1786 => { Name => 'NonCPULens16MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9305
+ 1788 => { Name => 'NonCPULens17MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9306
+ 1790 => { Name => 'NonCPULens18MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9307
+ 1792 => { Name => 'NonCPULens19MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9308
+ 1794 => { Name => 'NonCPULens20MaxAperture', Format => 'int16u', PrintConv => \%nonCPULensApertureZ8, Unknown => 1},
9309
+ 1808 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
9310
+ 1826 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9311
+ 1827 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
9312
+ 1862 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
9313
+ 1890 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
9314
+ 1899 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
9315
+ );
8706
9316
  %Image::ExifTool::Nikon::MenuSettingsZ9 = (
8707
9317
  %binaryDataAttrs,
8708
9318
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8709
- DATAMEMBER => [ 140, 188, 192, 232, 424, 534, 576 ],
9319
+ DATAMEMBER => [ 140, 188, 192, 232, 424, 528, 534, 576 ],
8710
9320
  IS_SUBDIR => [ 799 ],
8711
9321
  NOTES => 'These tags are used by the Z9.',
8712
9322
  #90 ISO
@@ -8720,13 +9330,13 @@ my %nikonFocalConversions = (
8720
9330
  Name => 'Intervals',
8721
9331
  Format => 'int32u',
8722
9332
  RawConv => '$$self{IntervalShootingIntervals} = $val',
8723
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9333
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
8724
9334
  },
8725
9335
  192 => {
8726
9336
  Name => 'ShotsPerInterval',
8727
9337
  Format => 'int32u',
8728
9338
  RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
8729
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9339
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
8730
9340
  },
8731
9341
  #220 NEFCompression 0=> 'Lossless' 1=> 'High Efficiency*' 4=> 'High Efficientcy'
8732
9342
  232 => {
@@ -8823,7 +9433,7 @@ my %nikonFocalConversions = (
8823
9433
  444 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
8824
9434
  456 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
8825
9435
  #526 FocusMode
8826
- 528 => { Name => 'AFAreaMode',PrintConv => \%aFAreaModeZ9 },
9436
+ 528 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
8827
9437
  530 => { Name => 'VRMode', PrintConv => \%vRModeZ9 },
8828
9438
  534 => {
8829
9439
  Name => 'BracketSet',
@@ -8848,7 +9458,7 @@ my %nikonFocalConversions = (
8848
9458
  574 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
8849
9459
  576 => {
8850
9460
  Name => 'DynamicAFAreaSize',
8851
- Condition => '$$self{AFAraMode} = 2',
9461
+ Condition => '$$self{AFAreaMode} == 2',
8852
9462
  RawConv => '$$self{DynamicAFAreaSize} = $val',
8853
9463
  PrintConv => \%dynamicAfAreaModesZ9,
8854
9464
  },
@@ -8917,7 +9527,7 @@ my %nikonFocalConversions = (
8917
9527
  %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
8918
9528
  %binaryDataAttrs,
8919
9529
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8920
- DATAMEMBER => [ 154, 204, 208, 248, 444, 554, 596 ],
9530
+ DATAMEMBER => [ 154, 204, 208, 248, 444, 548, 554, 596 ],
8921
9531
  IS_SUBDIR => [ 847 ],
8922
9532
  NOTES => 'These tags are used by the Z9 firmware 3.00.',
8923
9533
  72 => {
@@ -8934,13 +9544,13 @@ my %nikonFocalConversions = (
8934
9544
  Name => 'Intervals',
8935
9545
  Format => 'int32u',
8936
9546
  RawConv => '$$self{IntervalShootingIntervals} = $val',
8937
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9547
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
8938
9548
  },
8939
9549
  208 => {
8940
9550
  Name => 'ShotsPerInterval',
8941
9551
  Format => 'int32u',
8942
9552
  RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
8943
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9553
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
8944
9554
  },
8945
9555
  248 => {
8946
9556
  Name => 'FocusShiftNumberShots', #1-300
@@ -9024,7 +9634,7 @@ my %nikonFocalConversions = (
9024
9634
  #462 flash wireless control 0=> 'Off' 1=> 'Optical AWL'
9025
9635
  #464 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
9026
9636
  #476 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
9027
- 548 => { Name => 'AFAreaMode', PrintConv => \%aFAreaModeZ9},
9637
+ 548 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
9028
9638
  550 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
9029
9639
  554 => {
9030
9640
  Name => 'BracketSet',
@@ -9048,7 +9658,7 @@ my %nikonFocalConversions = (
9048
9658
  594 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
9049
9659
  596 => {
9050
9660
  Name => 'DynamicAFAreaSize',
9051
- Condition => '$$self{AFAraMode} = 2',
9661
+ Condition => '$$self{AFAreaMode} == 2',
9052
9662
  RawConv => '$$self{DynamicAFAreaSize} = $val',
9053
9663
  PrintConv => \%dynamicAfAreaModesZ9,
9054
9664
  },
@@ -9147,6 +9757,304 @@ my %nikonFocalConversions = (
9147
9757
  #1936 FocusPointDisplayOption3DTrackingColor CSa11-d 0=> 'White', 1= => 'Red'
9148
9758
  );
9149
9759
 
9760
+ %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
9761
+ %binaryDataAttrs,
9762
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9763
+ DATAMEMBER => [ 154, 204, 208, 248, 444, 548, 554, 570, 596 ],
9764
+ IS_SUBDIR => [ 847 ],
9765
+ NOTES => 'These tags are used by the Z9 firmware 3.00.',
9766
+ 72 => {
9767
+ Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9768
+ PrintConv => \%highFrameRateZ9,
9769
+ },
9770
+ 154 => {
9771
+ Name => 'MultipleExposureMode',
9772
+ RawConv => '$$self{MultipleExposureMode} = $val',
9773
+ PrintConv => \%multipleExposureModeZ9,
9774
+ },
9775
+ 156 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
9776
+ 204 => {
9777
+ Name => 'Intervals',
9778
+ Format => 'int32u',
9779
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
9780
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
9781
+ },
9782
+ 208 => {
9783
+ Name => 'ShotsPerInterval',
9784
+ Format => 'int32u',
9785
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
9786
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
9787
+ },
9788
+ 248 => {
9789
+ Name => 'FocusShiftNumberShots', #1-300
9790
+ RawConv => '$$self{FocusShiftNumberShots} = $val',
9791
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9792
+ },
9793
+ 252 => {
9794
+ Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
9795
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9796
+ },
9797
+ 256 => {
9798
+ Name => 'FocusShiftInterval',
9799
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9800
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
9801
+ },
9802
+ 260 => {
9803
+ Name => 'FocusShiftExposureLock',
9804
+ Unknown => 1,
9805
+ PrintConv => \%offOn,
9806
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9807
+ },
9808
+ 290 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9809
+ 292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9810
+ 328 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9811
+ 342 => { Name => 'AutoISO', PrintConv => \%offOn },
9812
+ 344 => {
9813
+ Name => 'ISOAutoHiLimit',
9814
+ Format => 'int16u',
9815
+ Unknown => 1,
9816
+ ValueConv => '($val-104)/8',
9817
+ ValueConvInv => '8 * ($val + 104)',
9818
+ PrintConv => \%iSOAutoHiLimitZ7,
9819
+ },
9820
+ 346 => {
9821
+ Name => 'ISOAutoFlashLimit',
9822
+ Format => 'int16u',
9823
+ Unknown => 1,
9824
+ ValueConv => '($val-104)/8',
9825
+ ValueConvInv => '8 * ($val + 104)',
9826
+ PrintConv => \%iSOAutoHiLimitZ7,
9827
+ },
9828
+ 354 => {
9829
+ Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9830
+ ValueConv => '$val / 8',
9831
+ Format => 'int16s',
9832
+ PrintConv => \%iSOAutoShutterTimeZ9,
9833
+ },
9834
+ 436 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9835
+ 438 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
9836
+ 440 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
9837
+ 444 => {
9838
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9839
+ RawConv => '$$self{FlashControlMode} = $val',
9840
+ PrintConv => \%flashControlModeZ7,
9841
+ },
9842
+ 446 => {
9843
+ Name => 'FlashMasterCompensation',
9844
+ Format => 'int8s',
9845
+ Unknown => 1,
9846
+ ValueConv => '$val/6',
9847
+ ValueConvInv => '6 * $val',
9848
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
9849
+ PrintConvInv => '$val',
9850
+ },
9851
+ 450 => {
9852
+ Name => 'FlashGNDistance',
9853
+ Condition => '$$self{FlashControlMode} == 2',
9854
+ Unknown => 1,
9855
+ ValueConv => '$val + 3',
9856
+ PrintConv => \%flashGNDistance,
9857
+ },
9858
+ 454 => {
9859
+ 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)
9860
+ Condition => '$$self{FlashControlMode} >= 3',
9861
+ Unknown => 1,
9862
+ ValueConv => '2 ** (-$val/3)',
9863
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
9864
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
9865
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
9866
+ },
9867
+ #462 flash wireless control 0=> 'Off' 1=> 'Optical AWL'
9868
+ #464 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
9869
+ #476 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
9870
+ 548 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
9871
+ 550 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
9872
+ 554 => {
9873
+ Name => 'BracketSet',
9874
+ RawConv => '$$self{BracketSet} = $val',
9875
+ PrintConv => \%bracketSetZ9,
9876
+ },
9877
+ 556 => {
9878
+ Name => 'BracketProgram',
9879
+ Condition => '$$self{BracketSet} < 3',
9880
+ Notes => 'AE and/or Flash Bracketing',
9881
+ PrintConv => \%bracketProgramZ9,
9882
+ },
9883
+ 558 => {
9884
+ Name => 'BracketIncrement',
9885
+ Condition => '$$self{BracketSet} < 3',
9886
+ Notes => 'AE and/or Flash Bracketing',
9887
+ PrintConv => \%bracketIncrementZ9,
9888
+ },
9889
+ 570 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
9890
+ 576 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
9891
+ 582 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
9892
+ 586 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
9893
+ 592 => { Name => 'DXCropAlert', PrintConv => \%offOn },
9894
+ 594 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
9895
+ 596 => {
9896
+ Name => 'DynamicAFAreaSize',
9897
+ Condition => '$$self{AFAreaMode} == 2',
9898
+ RawConv => '$$self{DynamicAFAreaSize} = $val',
9899
+ PrintConv => \%dynamicAfAreaModesZ9,
9900
+ },
9901
+ 636 => { Name => 'HighFrequencyFlickerReductionShooting', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
9902
+ 646 => {
9903
+ Name => 'MovieImageArea',
9904
+ Unknown => 1,
9905
+ Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9906
+ PrintConv => \%imageAreaZ9b,
9907
+ },
9908
+ 656 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9909
+ 658 => {
9910
+ Name => 'MovieISOAutoHiLimit',
9911
+ Format => 'int16u',
9912
+ Unknown => 1,
9913
+ ValueConv => '($val-104)/8',
9914
+ ValueConvInv => '8 * ($val + 104)',
9915
+ PrintConv => \%iSOAutoHiLimitZ7,
9916
+ },
9917
+ 660 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
9918
+ 662 => {
9919
+ Name => 'MovieISOAutoManualMode',
9920
+ Format => 'int16u',
9921
+ Unknown => 1,
9922
+ ValueConv => '($val-104)/8',
9923
+ ValueConvInv => '8 * ($val + 104)',
9924
+ PrintConv => \%iSOAutoHiLimitZ7,
9925
+ },
9926
+ 736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9927
+ 738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9928
+ 744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
9929
+ 746 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
9930
+ 748 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
9931
+ 750 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
9932
+ 752 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
9933
+ 756 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9934
+ 758 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
9935
+ 760 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
9936
+ 762 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9937
+ 764 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
9938
+ 766 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
9939
+ 788 => { Name => 'MovieToneMap', PrintConv => \%movieToneMapZ9, Unknown => 1 },
9940
+ 794 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
9941
+ 796 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
9942
+ 802 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
9943
+ 803 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9944
+ 804 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9945
+ 812 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9946
+ 847 => {
9947
+ Name => 'CustomSettingsZ9v4',
9948
+ Format => 'undef[632]',
9949
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
9950
+ },
9951
+ 1498 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9952
+ 1500 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9953
+ 1506 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9954
+ 1528 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9955
+ 1532 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
9956
+ 1536 => { Name => 'NonCPULens2FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9957
+ 1540 => { Name => 'NonCPULens3FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9958
+ 1544 => { Name => 'NonCPULens4FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9959
+ 1548 => { Name => 'NonCPULens5FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9960
+ 1552 => { Name => 'NonCPULens6FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9961
+ 1556 => { Name => 'NonCPULens7FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9962
+ 1560 => { Name => 'NonCPULens8FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9963
+ 1564 => { Name => 'NonCPULens9FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9964
+ 1568 => { Name => 'NonCPULens10FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9965
+ 1572 => { Name => 'NonCPULens11FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9966
+ 1576 => { Name => 'NonCPULens12FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9967
+ 1580 => { Name => 'NonCPULens13FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9968
+ 1584 => { Name => 'NonCPULens14FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9969
+ 1588 => { Name => 'NonCPULens15FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9970
+ 1592 => { Name => 'NonCPULens16FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9971
+ 1596 => { Name => 'NonCPULens17FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9972
+ 1600 => { Name => 'NonCPULens18FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9973
+ 1604 => { Name => 'NonCPULens19FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9974
+ 1608 => { Name => 'NonCPULens20FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9975
+ 1612 => { Name => 'NonCPULens1MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1}, #non-CPU aperture interface, values and storage differ from the Z8
9976
+ 1616 => { Name => 'NonCPULens2MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9977
+ 1620 => { Name => 'NonCPULens3MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9978
+ 1624 => { Name => 'NonCPULens4MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9979
+ 1628 => { Name => 'NonCPULens5MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9980
+ 1632 => { Name => 'NonCPULens6MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9981
+ 1636 => { Name => 'NonCPULens7MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9982
+ 1640 => { Name => 'NonCPULens8MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9983
+ 1644 => { Name => 'NonCPULens9MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9984
+ 1648 => { Name => 'NonCPULens10MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9985
+ 1652 => { Name => 'NonCPULens11MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9986
+ 1656 => { Name => 'NonCPULens12MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9987
+ 1660 => { Name => 'NonCPULens13MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9988
+ 1664 => { Name => 'NonCPULens14MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9989
+ 1668 => { Name => 'NonCPULens15MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9990
+ 1672 => { Name => 'NonCPULens16MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9991
+ 1676 => { Name => 'NonCPULens17MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9992
+ 1680 => { Name => 'NonCPULens18MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9993
+ 1684 => { Name => 'NonCPULens19MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9994
+ 1688 => { Name => 'NonCPULens20MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
9995
+ 1704 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
9996
+ 1717 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
9997
+ 1724 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9998
+ 1725 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
9999
+ 1760 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
10000
+ 1784 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
10001
+ 1788 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
10002
+ 1797 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
10003
+ 1862 => {
10004
+ Name => 'AutoCapturePreset',
10005
+ PrintConv => {
10006
+ 0 => '1',
10007
+ 1 => '2',
10008
+ 2 => '3',
10009
+ 3 => '4',
10010
+ 4 => '5',
10011
+ },
10012
+ },
10013
+ 1864 => {
10014
+ Name => 'FocusShiftAutoReset',
10015
+ Unknown => 1,
10016
+ PrintConv => \%offOn,
10017
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10018
+ },
10019
+ 1922 => { #CSd4-a
10020
+ Name => 'PreReleaseBurstLength',
10021
+ PrintConv => {
10022
+ 0 => 'None',
10023
+ 1 => '0.3 Sec',
10024
+ 2 => '0.5 Sec',
10025
+ 3 => '1 Sec',
10026
+ },
10027
+ },
10028
+ 1924 => { #CSd4-b
10029
+ Name => 'PostReleaseBurstLength',
10030
+ PrintConv => {
10031
+ 0 => '1 Sec',
10032
+ 1 => '2 Sec',
10033
+ 2 => '3 Sec',
10034
+ 3 => 'Max',
10035
+ },
10036
+ },
10037
+ 1938 => { Name => 'VerticalISOButton', %buttonsZ9}, #CSf2
10038
+ 1940 => { Name => 'ExposureCompensationButton', %buttonsZ9}, #CSf2
10039
+ 1942 => { Name => 'ISOButton', %buttonsZ9}, #CSf2
10040
+ 2002 => { Name => 'ViewModeShowEffectsOfSettings', PrintConv => { 0=>'Always', 1=> 'Only When Flash Not Used'}, Unknown => 1 }, #CSd9-a
10041
+ 2004 => { Name => 'DispButton', %buttonsZ9}, #CSf2
10042
+ 2048 => { #CSd6
10043
+ Name => 'ExposureDelay',
10044
+ Format => 'fixed32u',
10045
+ PrintConv => '$val ? sprintf("%.1f sec",$val/1000) : "Off"',
10046
+ },
10047
+ 2056 => { Name => 'PlaybackButton', %buttonsZ9}, #CSf2
10048
+ 2058 => { Name => 'WBButton', %buttonsZ9}, #CSf2
10049
+ 2060 => { Name => 'BracketButton', %buttonsZ9}, #CSf2
10050
+ 2062 => { Name => 'FlashModeButton', %buttonsZ9}, #CSf2
10051
+ 2064 => { Name => 'LensFunc1ButtonPlaybackMode', %buttonsZ9}, #CSf2
10052
+ 2066 => { Name => 'LensFunc2ButtonPlaybackMode', %buttonsZ9}, #CSf2
10053
+ 2068 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
10054
+ 2070 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
10055
+ 2072 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
10056
+ );
10057
+
9150
10058
  # Flash information (ref JD)
9151
10059
  %Image::ExifTool::Nikon::FlashInfo0100 = (
9152
10060
  %binaryDataAttrs,
@@ -10409,16 +11317,14 @@ my %nikonFocalConversions = (
10409
11317
  },
10410
11318
  );
10411
11319
 
10412
- # MakerNotes0x51 - compression info for Z9
11320
+ # MakerNotes0x51 - compression info for Z8 and Z9
10413
11321
  %Image::ExifTool::Nikon::MakerNotes0x51 = (
10414
11322
  %binaryDataAttrs,
10415
- DATAMEMBER => [ 0 ],
10416
11323
  GROUPS => { 0 => 'MakerNotes' },
10417
11324
  0 => {
10418
- Name => 'FirmwareVersion',
11325
+ Name => 'FirmwareVersion51',
10419
11326
  Format => 'string[8]',
10420
11327
  Writable => 0,
10421
- RawConv => '$$self{FirmwareVersion} = $val',
10422
11328
  },
10423
11329
  10 => {
10424
11330
  Name => 'NEFCompression',
@@ -12069,8 +12975,10 @@ sub PrepareNikonOffsets($$$$$)
12069
12975
  for ($i=0; $i<@sorted-1; ++$i) {
12070
12976
  my $pos = $sorted[$i][0];
12071
12977
  my $len = $sorted[$i+1][1] - $sorted[$i][1];
12072
- # set DirLen in SubDirectory entry
12073
12978
  my $tagInfo = $$tagTablePtr{$pos};
12979
+ $tagInfo = $et->GetTagInfo($tagTablePtr, $pos) if $tagInfo and
12980
+ not (ref $tagInfo eq 'HASH' and $$tagInfo{AlwaysDecrypt});
12981
+ # set DirLen in SubDirectory entry
12074
12982
  my $subdir;
12075
12983
  $$subdir{DirLen} = $len if ref $tagInfo eq 'HASH' and defined($subdir=$$tagInfo{SubDirectory});
12076
12984
  if ($decryptMode) {
@@ -12082,7 +12990,7 @@ sub PrepareNikonOffsets($$$$$)
12082
12990
  if ($subdir and $$subdir{KnownEnd}) {
12083
12991
  $n = $$subdir{KnownEnd};
12084
12992
  if ($n > $len) {
12085
- $et->Warn("Data too short for $$tagInfo{Name}",1);
12993
+ $et->Warn("Data too short for $$tagInfo{Name}",1) unless $$tagInfo{AlwaysDecrypt};
12086
12994
  $n = $len;
12087
12995
  }
12088
12996
  }