exiftool-vendored.exe 12.30.0 → 12.38.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 (52) hide show
  1. package/bin/exiftool_files/Changes +129 -3
  2. package/bin/exiftool_files/README +2 -2
  3. package/bin/exiftool_files/arg_files/xmp2exif.args +2 -1
  4. package/bin/exiftool_files/config_files/example.config +1 -1
  5. package/bin/exiftool_files/exiftool.pl +100 -58
  6. package/bin/exiftool_files/fmt_files/gpx.fmt +1 -1
  7. package/bin/exiftool_files/fmt_files/gpx_wpt.fmt +1 -1
  8. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +13 -3
  9. package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +331 -0
  10. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +175 -12
  11. package/bin/exiftool_files/lib/Image/ExifTool/CanonCustom.pm +12 -2
  12. package/bin/exiftool_files/lib/Image/ExifTool/Charset.pm +2 -0
  13. package/bin/exiftool_files/lib/Image/ExifTool/DPX.pm +13 -2
  14. package/bin/exiftool_files/lib/Image/ExifTool/DarwinCore.pm +2 -2
  15. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +109 -3
  16. package/bin/exiftool_files/lib/Image/ExifTool/FLIR.pm +33 -8
  17. package/bin/exiftool_files/lib/Image/ExifTool/GIF.pm +5 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +14 -10
  19. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +13 -2
  20. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +16 -1
  21. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +96 -4
  22. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +7 -3
  23. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +154 -24
  24. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +27 -12
  25. package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +2 -2
  26. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +1204 -96
  27. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +5 -1
  28. package/bin/exiftool_files/lib/Image/ExifTool/NikonSettings.pm +135 -71
  29. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +5 -1
  30. package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +4 -2
  31. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +11 -12
  32. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +4 -1
  33. package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +2 -2
  34. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +2 -1
  35. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +69 -10
  36. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +141 -111
  37. package/bin/exiftool_files/lib/Image/ExifTool/README +9 -2
  38. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +56 -13
  39. package/bin/exiftool_files/lib/Image/ExifTool/TagInfoXML.pm +9 -4
  40. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +6473 -5827
  41. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +1401 -54
  42. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -0
  43. package/bin/exiftool_files/lib/Image/ExifTool/WritePNG.pl +2 -0
  44. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +10 -0
  45. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +10 -11
  46. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +50 -5
  47. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +125 -31
  48. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +3 -1
  49. package/bin/exiftool_files/lib/Image/ExifTool/XMPStruct.pl +3 -1
  50. package/bin/exiftool_files/lib/Image/ExifTool.pm +8931 -8864
  51. package/bin/exiftool_files/lib/Image/ExifTool.pod +21 -13
  52. package/package.json +3 -3
@@ -62,7 +62,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
62
62
  use Image::ExifTool::Exif;
63
63
  use Image::ExifTool::GPS;
64
64
 
65
- $VERSION = '3.99';
65
+ $VERSION = '4.03';
66
66
 
67
67
  sub LensIDConv($$$);
68
68
  sub ProcessNikonAVI($$$);
@@ -404,6 +404,7 @@ sub GetAFPointGrid($$;$);
404
404
  '48 38 1F 37 34 3C 4B 06' => 'Sigma 12-24mm F4.5-5.6 EX DG Aspherical HSM',
405
405
  'F0 38 1F 37 34 3C 4B 06' => 'Sigma 12-24mm F4.5-5.6 EX DG Aspherical HSM',
406
406
  '96 38 1F 37 34 3C 4B 06' => 'Sigma 12-24mm F4.5-5.6 II DG HSM', #Jurgen Sahlberg
407
+ 'CA 3C 1F 37 30 30 4B 46' => 'Sigma 12-24mm F4 DG HSM | A', #github issue#101
407
408
  'C1 48 24 37 24 24 4B 46' => 'Sigma 14-24mm F2.8 DG HSM | A', #30
408
409
  '26 40 27 3F 2C 34 1C 02' => 'Sigma 15-30mm F3.5-4.5 EX DG Aspherical DF',
409
410
  '48 48 2B 44 24 30 4B 06' => 'Sigma 17-35mm F2.8-4 EX DG Aspherical HSM',
@@ -598,6 +599,7 @@ sub GetAFPointGrid($$;$);
598
599
  '00 48 5C 8E 30 3C 00 06' => 'Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17NII)', #JD
599
600
  'F1 47 5C 8E 30 3C DF 0E' => 'Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)',
600
601
  'CF 47 5C 8E 31 3D DF 0E' => 'Tamron SP 70-300mm f/4-5.6 Di VC USD (A030)', #forum9773
602
+ 'CC 44 68 98 34 41 DF 0E' => 'Tamron 100-400mm f/4.5-6.3 Di VC USD', #30
601
603
  'EB 40 76 A6 38 40 DF 0E' => 'Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)',
602
604
  'E3 40 76 A6 38 40 DF 4E' => 'Tamron SP 150-600mm f/5-6.3 Di VC USD G2', #30
603
605
  '20 3C 80 98 3D 3D 1E 02' => 'Tamron AF 200-400mm f/5.6 LD IF (75D)',
@@ -1044,7 +1046,9 @@ my %cropHiSpeed = ( #IB
1044
1046
  10 => '1.3x Movie Crop', #36 (D4/D500)
1045
1047
  11 => 'FX Uncropped',
1046
1048
  12 => 'DX Uncropped',
1047
- 15 => '1.5x Movie Crop', #36 (D4/D500)
1049
+ 13 => '2.8x Movie Crop', #28 (D5/D6) 5584/1936
1050
+ 14 => '1.4x Movie Crop', #28 (D5/D6) 5584/3856
1051
+ 15 => '1.5x Movie Crop', #36 (D4/D500) 5600/3872
1048
1052
  17 => '1:1 Crop',
1049
1053
  OTHER => sub {
1050
1054
  my ($val, $inv, $conv) = @_;
@@ -1056,7 +1060,31 @@ my %cropHiSpeed = ( #IB
1056
1060
  },
1057
1061
  );
1058
1062
 
1063
+ my %flashGroupOptionsMode = (
1064
+ 0 => 'TTL',
1065
+ 1 => 'Manual',
1066
+ 2 => 'Auto',
1067
+ 3 => 'Off',
1068
+ );
1069
+
1070
+ my %nefCompression = ( #28 relocated to MakerNotes_0x51 at offset x'0a (Z9)
1071
+ 1 => 'Lossy (type 1)', # (older models)
1072
+ 2 => 'Uncompressed', #JD - D100 (even though TIFF compression is set!)
1073
+ 3 => 'Lossless',
1074
+ 4 => 'Lossy (type 2)',
1075
+ 5 => 'Striped packed 12 bits', #IB
1076
+ 6 => 'Uncompressed (reduced to 12 bit)', #IB
1077
+ 7 => 'Unpacked 12 bits', #IB (padded to 16)
1078
+ 8 => 'Small', #IB
1079
+ 9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1080
+ 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1081
+ 13 => 'High Efficiency', #28
1082
+ 14 => 'High Efficiency*', #28
1083
+ );
1084
+
1085
+ my %noYes = ( 0 => 'No' , 1 => 'Yes', );
1059
1086
  my %offOn = ( 0 => 'Off', 1 => 'On' );
1087
+ my %onOff = ( 0 => 'On', 1 => 'Off' );
1060
1088
 
1061
1089
  # common attributes for writable BinaryData directories
1062
1090
  my %binaryDataAttrs = (
@@ -1463,6 +1491,16 @@ my %binaryDataAttrs = (
1463
1491
  Name => 'ColorTemperatureAuto',
1464
1492
  Writable => 'int16u',
1465
1493
  },
1494
+ 0x0051 => { #28 (Z9)
1495
+ Name => 'MakerNotes0x51',
1496
+ Writable => 'undef',
1497
+ Hidden => 1,
1498
+ Permanent => 0,
1499
+ Flags => [ 'Binary', 'Protected' ],
1500
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MakerNotes0x51' },
1501
+ },
1502
+ #0x0053 #28 possibly a secondary DistortionControl block (in addition to DistortInfo)? Certainly offset 0x04 within block contains tag AutoDistortionControl for Z72 and D6 (1=>On; 2=> Off)
1503
+ #0x005e #28 possibly DiffractionCompensation block? Certainly offset 0x04 within block contains tag DiffractionCompensation
1466
1504
  0x0080 => { Name => 'ImageAdjustment', Writable => 'string' },
1467
1505
  0x0081 => { Name => 'ToneComp', Writable => 'string' }, #2
1468
1506
  0x0082 => { Name => 'AuxiliaryLens', Writable => 'string' },
@@ -1860,7 +1898,7 @@ my %binaryDataAttrs = (
1860
1898
  SubDirectory => {
1861
1899
  TagTable => 'Image::ExifTool::Nikon::ShotInfoD6',
1862
1900
  DecryptStart => 4,
1863
- DecryptLen => 0xc21a + 12,
1901
+ DecryptLen => 0xc292 + 720, # thru decoded parts of Offset 32
1864
1902
  ByteOrder => 'LittleEndian',
1865
1903
  },
1866
1904
  },
@@ -1875,12 +1913,23 @@ my %binaryDataAttrs = (
1875
1913
  },
1876
1914
  },
1877
1915
  { # (Z6_2 firmware version 1.00 and Z7_2 firmware versions 1.00 & 1.01, ref 28)
1878
- Condition => '$$valPt =~ /^0800/ or $$valPt =~ /^0803/',
1916
+ # 0800=Z6/Z7 0801=Z50 0802=Z5 0803=Z6II/Z7II 0804=Zfc
1917
+ Condition => '$$valPt =~ /^080[01234]/',
1879
1918
  Name => 'ShotInfoZ7_2',
1880
1919
  SubDirectory => {
1881
1920
  TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7_2',
1882
1921
  DecryptStart => 4,
1883
- DecryptLen => 0xce32 + 12,
1922
+ DecryptLen => 0xcea6 + 1050, # thru decoded parts of Offset31
1923
+ ByteOrder => 'LittleEndian',
1924
+ },
1925
+ },
1926
+ { # (Z9 firmware version 1.00 ref 28)
1927
+ Condition => '$$valPt =~ /^0805/',
1928
+ Name => 'ShotInfoZ9',
1929
+ SubDirectory => {
1930
+ TagTable => 'Image::ExifTool::Nikon::ShotInfoZ9',
1931
+ DecryptStart => 4,
1932
+ DecryptLen => 0xeb5b + 1050, # thru decoded parts of Offset27
1884
1933
  ByteOrder => 'LittleEndian',
1885
1934
  },
1886
1935
  },
@@ -1913,18 +1962,8 @@ my %binaryDataAttrs = (
1913
1962
  0x0093 => { #21
1914
1963
  Name => 'NEFCompression',
1915
1964
  Writable => 'int16u',
1916
- PrintConv => {
1917
- 1 => 'Lossy (type 1)', # (older models)
1918
- 2 => 'Uncompressed', #JD - D100 (even though TIFF compression is set!)
1919
- 3 => 'Lossless',
1920
- 4 => 'Lossy (type 2)',
1921
- 5 => 'Striped packed 12 bits', #IB
1922
- 6 => 'Uncompressed (reduced to 12 bit)', #IB
1923
- 7 => 'Unpacked 12 bits', #IB (padded to 16)
1924
- 8 => 'Small', #IB
1925
- 9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1926
- 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1927
- },
1965
+ SeparateTable => 'NEFCompression',
1966
+ PrintConv => \%nefCompression,
1928
1967
  },
1929
1968
  0x0094 => { Name => 'SaturationAdj', Writable => 'int16s' },
1930
1969
  0x0095 => { Name => 'NoiseReduction', Writable => 'string' }, # ("Off" or "FPNR"=long exposure NR)
@@ -2387,6 +2426,10 @@ my %binaryDataAttrs = (
2387
2426
  Flags => [ 'Binary', 'Protected' ],
2388
2427
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::PictureControl' },
2389
2428
  },
2429
+ 0x00bf => {
2430
+ Name => 'SilentPhotography',
2431
+ PrintConv => \%offOn,
2432
+ },
2390
2433
  0x00c3 => {
2391
2434
  Name => 'BarometerInfo',
2392
2435
  SubDirectory => {
@@ -6047,6 +6090,18 @@ my %nikonFocalConversions = (
6047
6090
  3 => 'Rotate 180',
6048
6091
  },
6049
6092
  },
6093
+ 0x0d0 => {
6094
+ Name => 'Interval',
6095
+ # prior version of the d% firmware do not support this tag, nor does the D500 (at least thru firmware 1.3)
6096
+ Condition => '$$self{Model} eq "NIKON D5" and $$self{FirmwareVersion} ge "1.40"',
6097
+ PrintConv => '$val > 0 ? sprintf("%.0f", $val) : ""',
6098
+ },
6099
+ 0x0d4 => {
6100
+ Name => 'IntervalFrame',
6101
+ # prior version of the d% firmware do not support this tag, nor does the D500 (at least thru firmware 1.3)
6102
+ Condition => '$$self{Model} eq "NIKON D5" and $$self{FirmwareVersion} ge "1.40"',
6103
+ PrintConv => '$val > 0 ? sprintf("%.0f", $val) : ""',
6104
+ },
6050
6105
  0x05e2 => {
6051
6106
  Name => 'FlickerReductionIndicator',
6052
6107
  Mask => 0x01,
@@ -6465,7 +6520,7 @@ my %nikonFocalConversions = (
6465
6520
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
6466
6521
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6467
6522
  VARS => { ID_LABEL => 'Index' },
6468
- DATAMEMBER => [ 0x9c, 0xc219 ],
6523
+ DATAMEMBER => [ 0x30, 0x60, 0x9c, 0xa4, 0x75e7, 0x760c, 0x7610, 0xc219, 0xc292, 0xc40e, 0xc412, 0xc4a6, 0xc4be ],
6469
6524
  WRITABLE => 1,
6470
6525
  FIRST_ENTRY => 0,
6471
6526
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -6475,6 +6530,11 @@ my %nikonFocalConversions = (
6475
6530
  Format => 'string[4]',
6476
6531
  Writable => 0,
6477
6532
  },
6533
+ 0x04 => {
6534
+ Name => 'FirmwareVersion',
6535
+ Format => 'string[8]',
6536
+ Writable => 0,
6537
+ },
6478
6538
  0x24 => {
6479
6539
  Name => 'NumberOffsets', # (number of entries in offset table. offsets are from start of ShotInfo data)
6480
6540
  DataMember => 'NumberOffsets',
@@ -6482,6 +6542,22 @@ my %nikonFocalConversions = (
6482
6542
  Writable => 0,
6483
6543
  Hidden => 1,
6484
6544
  },
6545
+ 0x30 => {
6546
+ Name => 'Offset3',
6547
+ DataMember => 'Offset3',
6548
+ Format => 'int32u',
6549
+ Writable => 0,
6550
+ Hidden => 1,
6551
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
6552
+ },
6553
+ 0x60 => {
6554
+ Name => 'Offset15',
6555
+ DataMember => 'Offset15',
6556
+ Format => 'int32u',
6557
+ Writable => 0,
6558
+ Hidden => 1,
6559
+ RawConv => '$$self{Offset15} = $val || 0x10000000; undef', # (ignore if 0)
6560
+ },
6485
6561
  0x9c => {
6486
6562
  Name => 'OrientationOffset',
6487
6563
  DataMember => 'OrientationOffset',
@@ -6490,15 +6566,49 @@ my %nikonFocalConversions = (
6490
6566
  Hidden => 1,
6491
6567
  RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
6492
6568
  },
6493
- ### 0xc21a - OrientationInfo start (D6 firmware 1.00)
6494
- 0xc219 => {
6569
+ 0xa4 => {
6570
+ Name => 'Offset32',
6571
+ DataMember => 'Offset32',
6572
+ Format => 'int32u',
6573
+ Writable => 0,
6574
+ Hidden => 1,
6575
+ RawConv => '$$self{Offset32} = $val || 0x10000000; undef', # (ignore if 0)
6576
+ },
6577
+ ### 0x75e8 - Offset3 info start (D6 firmware 1.33)
6578
+ 0x75e7 => {
6495
6579
  Name => 'Hook1',
6496
6580
  Hidden => 1,
6497
6581
  RawConv => 'undef',
6582
+ # account for variable location of Offset5 data
6583
+ Hook => '$varSize = $$self{Offset3} - 0x75e8',
6584
+ },
6585
+ 0x760c => {
6586
+ Name => 'IntervalShooting',
6587
+ RawConv => '$$self{IntervalShooting} = $val',
6588
+ Format => 'int16u',
6589
+ PrintConv => q{
6590
+ return 'Off' if $val == 0 ;
6591
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); #something like "Interval 1 of 3"
6592
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; #something like "Frame 1 of 3" or blank
6593
+ return "On: $i$f"
6594
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
6595
+ },
6596
+ },
6597
+ 0x7610 => {
6598
+ Name => 'IntervalFrame',
6599
+ RawConv => '$$self{IntervalFrame} = $val',
6600
+ Condition => '$$self{IntervalShooting} > 0',
6601
+ Format => 'int16u',
6602
+ Hidden => 1,
6603
+ },
6604
+ ### 0xc21a - OrientationInfo start (D6 firmware 1.00) (0xc952 for firmware 1.33)
6605
+ 0xc219 => {
6606
+ Name => 'Hook2',
6607
+ Hidden => 1,
6608
+ RawConv => 'undef',
6498
6609
  # account for variable location of OrientationInfo data
6499
6610
  Hook => '$varSize = $$self{OrientationOffset} - 0xc21a',
6500
6611
  },
6501
-
6502
6612
  0xc21a => {
6503
6613
  Name => 'RollAngle',
6504
6614
  Format => 'fixed32u',
@@ -6526,7 +6636,136 @@ my %nikonFocalConversions = (
6526
6636
  PrintConv => 'sprintf("%.1f", $val)',
6527
6637
  PrintConvInv => '$val',
6528
6638
  },
6529
- # note: DecryptLen currently set to 0xc21a + 12
6639
+ ### 0xc9c6 - Offset32 start (D6 firmware 1.33)
6640
+ 0xc292 => {
6641
+ Name => 'Hook3',
6642
+ Hidden => 1,
6643
+ RawConv => 'undef',
6644
+ # account for variable location of data
6645
+ Hook => '$varSize = $$self{Offset32} - 0xc292',
6646
+ },
6647
+ 0xc40e => {
6648
+ Name => 'Intervals',
6649
+ Format => 'int32u',
6650
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
6651
+ Condition => '$$self{IntervalShooting} > 0',
6652
+ },
6653
+ 0xc412 => {
6654
+ Name => 'ShotsPerInterval',
6655
+ Format => 'int32u',
6656
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
6657
+ Condition => '$$self{IntervalShooting} > 0',
6658
+ },
6659
+ 0xc416 => {
6660
+ Name => 'IntervalExposureSmoothing',
6661
+ Condition => '$$self{IntervalShooting} > 0',
6662
+ Format => 'int8u',
6663
+ PrintConv => \%offOn,
6664
+ },
6665
+ 0xc418 => {
6666
+ Name => 'IntervalPriority',
6667
+ Condition => '$$self{IntervalShooting} > 0',
6668
+ Format => 'int8u',
6669
+ PrintConv => \%offOn,
6670
+ },
6671
+ 0xc43a => {
6672
+ Name => 'FocusShiftNumberShots',
6673
+ },
6674
+ 0xc43e => {
6675
+ Name => 'FocusShiftStepWidth',
6676
+ },
6677
+ 0xc442 => {
6678
+ Name => 'FocusShiftInterval',
6679
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
6680
+ },
6681
+ 0xc446 => {
6682
+ Name => 'FocusShiftExposureLock',
6683
+ PrintConv => \%offOn,
6684
+ },
6685
+ #0xc49c => HighISONoiseReduction
6686
+ 0xc4a0 => {
6687
+ Name => 'DiffractionCompensation',
6688
+ Format => 'int8u',
6689
+ PrintConv => \%offOn,
6690
+ },
6691
+ #0xc4a1 => {Name => 'FlickerReductionShooting',}, #redundant with tag in NikonSettings
6692
+ 0xc4a6 => {
6693
+ Name => 'FlashControlMode', #this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
6694
+ RawConv => '$$self{FlashControlMode} = $val',
6695
+ PrintConv => {
6696
+ 0 => 'TTL',
6697
+ 1 => 'Auto External Flash',
6698
+ 2 => 'GN (distance priority)',
6699
+ 3 => 'Manual',
6700
+ 4 => 'Repeating Flash',
6701
+ },
6702
+ },
6703
+ 0xc4ac => {
6704
+ Name => 'FlashGNDistance',
6705
+ Condition => '$$self{FlashControlMode} == 2',
6706
+ Unknown => 1,
6707
+ ValueConv => '$val + 3',
6708
+ PrintConv => \%flashGNDistance,
6709
+ },
6710
+ 0xc4b0 => {
6711
+ 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)
6712
+ Condition => '$$self{FlashControlMode} >= 3',
6713
+ Unknown => 1,
6714
+ ValueConv => '2 ** (-$val/3)',
6715
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
6716
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
6717
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
6718
+ },
6719
+ 0xc4ba => {
6720
+ Name => 'FlashRemoteControl',
6721
+ Unknown => 1,
6722
+ PrintConv => {
6723
+ 0 => 'Group',
6724
+ 1 => 'Quick Wireless',
6725
+ 2 => 'Remote Repeating',
6726
+ },
6727
+ },
6728
+ 0xc4be => {
6729
+ Name => 'FlashMasterControlMode', #tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
6730
+ RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
6731
+ PrintConv => \%flashGroupOptionsMode,
6732
+ },
6733
+ 0xc4c0 => {
6734
+ Name => 'FlashMasterCompensation',
6735
+ Unknown => 1,
6736
+ Format => 'int8s',
6737
+ Condition => '$$self{FlashGroupOptionsMasterMode} != 3', #other than 'Off'
6738
+ ValueConv => '$val/6',
6739
+ ValueConvInv => '6 * $val',
6740
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
6741
+ PrintConvInv => '$val',
6742
+ },
6743
+ 0xc4c4 => {
6744
+ Name => 'FlashMasterOutput',
6745
+ Unknown => 1,
6746
+ Condition => '$$self{FlashGroupOptionsMasterMode} == 1', #only for Mode=M
6747
+ ValueConv => '2 ** (-$val/3)',
6748
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
6749
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
6750
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
6751
+ },
6752
+ 0xc4c6 => {
6753
+ Name => 'FlashWirelessOption',
6754
+ Unknown => 1,
6755
+ PrintConv => {
6756
+ 0 => 'Optical AWL',
6757
+ 1 => 'Off',
6758
+ },
6759
+ },
6760
+ 0xc55c => {
6761
+ Name => 'MovieType',
6762
+ Unknown => 1,
6763
+ PrintConv => {
6764
+ 0 => 'MOV',
6765
+ 1 => 'MP4',
6766
+ },
6767
+ },
6768
+ # note: DecryptLen currently set to 0xc9c6 + 720
6530
6769
  );
6531
6770
 
6532
6771
  # shot information for the D610 firmware 1.00 (encrypted) - ref PH
@@ -7297,7 +7536,7 @@ my %nikonFocalConversions = (
7297
7536
  Format => 'undef[56]',
7298
7537
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsD4' },
7299
7538
  },
7300
- # 0x1978 => { #this decode works, but involves more bits than should be necessary
7539
+ # 0x1978 => { # this decode works, but involves more bits than should be necessary
7301
7540
  # Name => 'ShutterTrigger',
7302
7541
  # Mask => 0xff,
7303
7542
  # PrintConv => {
@@ -7352,7 +7591,9 @@ my %nikonFocalConversions = (
7352
7591
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7353
7592
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7354
7593
  VARS => { ID_LABEL => 'Index' },
7355
- DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x98, 0xce31 ],
7594
+ DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x30, 0x38, 0x98, 0xa0, 0x75e7,
7595
+ 0x760c, 0x7610, 0x7eff, 0xce31, 0xcea5, 0xceb6, 0xceb7 ],
7596
+ IS_SUBDIR => [ 0xceb8 ],
7356
7597
  WRITABLE => 1,
7357
7598
  FIRST_ENTRY => 0,
7358
7599
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -7369,7 +7610,7 @@ my %nikonFocalConversions = (
7369
7610
  Writable => 0,
7370
7611
  RawConv => '$$self{FirmwareVersion} = $val',
7371
7612
  },
7372
- 0x0E => {
7613
+ 0x0e => {
7373
7614
  Name => 'FirmwareVersion2',
7374
7615
  Format => 'string[8]',
7375
7616
  Writable => 0,
@@ -7384,12 +7625,28 @@ my %nikonFocalConversions = (
7384
7625
  Hidden => 1,
7385
7626
  },
7386
7627
  0x24 => {
7387
- Name => 'NumberOffsets', #number of entries in offset table. offsets are from start of ShotInfo data.
7628
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
7388
7629
  DataMember => 'NumberOffsets',
7389
7630
  Format => 'int32u',
7390
7631
  Writable => 0,
7391
7632
  Hidden => 1,
7392
7633
  },
7634
+ 0x30 => {
7635
+ Name => 'Offset3',
7636
+ DataMember => 'Offset3',
7637
+ Format => 'int32u',
7638
+ Writable => 0,
7639
+ Hidden => 1,
7640
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
7641
+ },
7642
+ 0x38 => {
7643
+ Name => 'Offset5',
7644
+ DataMember => 'Offset5',
7645
+ Format => 'int32u',
7646
+ Writable => 0,
7647
+ Hidden => 1,
7648
+ RawConv => '$$self{Offset5} = $val || 0x10000000; undef', # (ignore if 0)
7649
+ },
7393
7650
  0x98 => {
7394
7651
  Name => 'OrientationOffset',
7395
7652
  DataMember => 'OrientationOffset',
@@ -7398,12 +7655,70 @@ my %nikonFocalConversions = (
7398
7655
  Hidden => 1,
7399
7656
  RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
7400
7657
  },
7401
-
7402
- ### 0xce32 - OrientationInfo start (Z7_2 firmware 1.00)
7403
- 0xce31 => {
7658
+ 0xa0 => {
7659
+ Name => 'Offset31',
7660
+ DataMember => 'Offset31',
7661
+ Format => 'int32u',
7662
+ Writable => 0,
7663
+ Hidden => 1,
7664
+ RawConv => '$$self{Offset31} = $val || 0x10000000; undef', # (ignore if 0)
7665
+ },
7666
+ ### 0x75e8 - Offset3 info start (Z7_2 firmware 1.30)
7667
+ 0x75e7 => {
7404
7668
  Name => 'Hook1',
7405
7669
  Hidden => 1,
7406
7670
  RawConv => 'undef',
7671
+ # account for variable location of Offset5 data
7672
+ Hook => '$varSize = $$self{Offset3} - 0x75e8',
7673
+ },
7674
+ 0x760c => {
7675
+ Name => 'IntervalShooting',
7676
+ RawConv => '$$self{IntervalShooting} = $val',
7677
+ Format => 'int16u',
7678
+ PrintConv => q{
7679
+ return 'Off' if $val == 0 ;
7680
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); # something like "Interval 1 of 3"
7681
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; # something like "Frame 1 of 3" or blank
7682
+ return "On: $i$f"
7683
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
7684
+ },
7685
+ },
7686
+ 0x7610 => {
7687
+ Name => 'IntervalFrame',
7688
+ RawConv => '$$self{IntervalFrame} = $val',
7689
+ Condition => '$$self{IntervalShooting} > 0',
7690
+ Format => 'int16u',
7691
+ Hidden => 1,
7692
+ },
7693
+ ### 0x7f00 - Offset5 info start (Z7_2 firmware 1.30)
7694
+ 0x7eff => {
7695
+ Name => 'Hook2',
7696
+ Hidden => 1,
7697
+ RawConv => 'undef',
7698
+ # account for variable location of Offset5 data
7699
+ Hook => '$varSize = $$self{Offset5} - 0x7f00',
7700
+ },
7701
+ 0x7fa0 => { #28
7702
+ Name => 'PortraitImpressionBalance', # will be 0 for firmware 1.21 and earlier; firmware 1.30 onward: will be set by Photo Shooting Menu entry Portrait Impression Balance
7703
+ # offset5+160; 128 is neutral; >128 increases Yellow; <128 increases Magenta; increments of 4 result from 1 full unit adjustment on the camera
7704
+ # offset5+161 128 is neutral; >128 increases Brightness; <128 decreases Brightness
7705
+ # with firmware 1.30 when 'Off' is selected in the Shooting menu, offsets 160 & 161 will contain 255. Selecting Mode 1,2, or 3 will populate offsets 160 & 161 with values in the range [116,141]
7706
+ Format => 'int8u[2]',
7707
+ Condition => '$$self{FirmwareVersion} ge "01.30"',
7708
+ PrintConv => q{
7709
+ return 'Off' if $val eq '0 0' or $val eq '255 255';
7710
+ my @v = split ' ', $val;
7711
+ my $brightness = $v[1]==128 ? 'Brightness: Neutral' : sprintf('Brightness: %+.1f',($v[1]-128)/4);
7712
+ my $color = $v[0]==128 ? 'Color: Neutral' : sprintf('%s: %.1f', $v[0]>128 ? 'Yellow' : 'Magenta', abs($v[0]-128)/4);
7713
+ # will return something like: 'Magenta: 1.0 Brightness: Neutral'
7714
+ return "$color $brightness"
7715
+ },
7716
+ },
7717
+ ### 0xce32 - OrientationInfo start (Z7_2 firmware 1.00)
7718
+ 0xce31 => {
7719
+ Name => 'Hook3',
7720
+ Hidden => 1,
7721
+ RawConv => 'undef',
7407
7722
  # account for variable location of OrientationInfo data
7408
7723
  Hook => '$varSize = $$self{OrientationOffset} - 0xce32',
7409
7724
  },
@@ -7435,84 +7750,858 @@ my %nikonFocalConversions = (
7435
7750
  PrintConv => 'sprintf("%.1f", $val)',
7436
7751
  PrintConvInv => '$val',
7437
7752
  },
7438
- #note: DecryptLen currently set to 0xce32 + 12
7753
+ 0xcea5 => {
7754
+ Name => 'Hook4',
7755
+ Hidden => 1,
7756
+ RawConv => 'undef',
7757
+ # account for variable location of Offset31 data
7758
+ Hook => '$varSize = $$self{Offset31} - 0xcea6',
7759
+ },
7760
+ ### 0xcea6 - Offset31 info start (Z7_2 firmware 1.30)
7761
+ 0xceb6 => {
7762
+ Name => 'ZMenuSettingsOffset',
7763
+ # offset to ZMenuSettings is relative to start of Offset31 block
7764
+ RawConv => '$$self{ZMenuSettingsOffset} = ($val || 0x10000000) + $$self{Offset31}; undef', # (ignore if 0)
7765
+ },
7766
+ 0xceb7 => {
7767
+ Name => 'Hook5',
7768
+ Hidden => 1,
7769
+ RawConv => 'undef',
7770
+ # account for variable location of Offset5 data
7771
+ Hook => '$varSize = $$self{ZMenuSettingsOffset} - 0xceb8',
7772
+ },
7773
+ 0xceb8 => {
7774
+ Name => 'ZMenuSettings',
7775
+ SubDirectory => {
7776
+ TagTable => 'Image::ExifTool::Nikon::ZMenuSettings',
7777
+ },
7778
+ }
7779
+ # note: DecryptLen currently set to 0xcea6 + 1050
7439
7780
  );
7440
7781
 
7441
- # Flash information (ref JD)
7442
- %Image::ExifTool::Nikon::FlashInfo0100 = (
7443
- %binaryDataAttrs,
7444
- DATAMEMBER => [ 9.2, 15, 16 ],
7782
+ # shot information for the Z9 firmware 1.00 (encrypted) - ref 28
7783
+ %Image::ExifTool::Nikon::ShotInfoZ9 = (
7784
+ PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7785
+ WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7786
+ CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7787
+ VARS => { ID_LABEL => 'Index' },
7788
+ DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x84, 0xeaea],
7789
+ WRITABLE => 1,
7790
+ FIRST_ENTRY => 0,
7445
7791
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7446
- NOTES => q{
7447
- These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
7448
- D200.
7449
- },
7450
- # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
7451
- 0 => {
7452
- Name => 'FlashInfoVersion',
7792
+ NOTES => 'These tags are extracted from encrypted data in images from the Z9.',
7793
+ 0x00 => {
7794
+ Name => 'ShotInfoVersion',
7453
7795
  Format => 'string[4]',
7454
7796
  Writable => 0,
7455
7797
  },
7456
- 4 => { #PH
7457
- Name => 'FlashSource',
7458
- PrintConv => {
7459
- 0 => 'None',
7460
- 1 => 'External',
7461
- 2 => 'Internal',
7462
- },
7798
+ 0x04 => {
7799
+ Name => 'FirmwareVersion',
7800
+ DataMember => 'FirmwareVersion',
7801
+ Format => 'string[8]',
7802
+ Writable => 0,
7803
+ RawConv => '$$self{FirmwareVersion} = $val',
7463
7804
  },
7464
- # 5 - values: 46,48,50,54,78
7465
- 6 => {
7466
- Format => 'int8u[2]',
7467
- Name => 'ExternalFlashFirmware',
7468
- SeparateTable => 'FlashFirmware',
7469
- PrintConv => \%flashFirmware,
7805
+ 0x0e => {
7806
+ Name => 'FirmwareVersion2',
7807
+ Format => 'string[8]',
7808
+ Writable => 0,
7809
+ RawConv => '$$self{FirmwareVersion2} = $val',
7810
+ Hidden => 1,
7470
7811
  },
7471
- 8 => {
7472
- Name => 'ExternalFlashFlags',
7473
- PrintConv => { 0 => '(none)',
7474
- BITMASK => {
7475
- 0 => 'Fired', #28
7476
- 2 => 'Bounce Flash', #PH
7477
- 4 => 'Wide Flash Adapter',
7478
- 5 => 'Dome Diffuser', #28
7479
- },
7480
- },
7812
+ 0x18 => {
7813
+ Name => 'FirmwareVersion3',
7814
+ Format => 'string[8]',
7815
+ Writable => 0,
7816
+ RawConv => '$$self{FirmwareVersion3} = $val',
7817
+ Hidden => 1,
7481
7818
  },
7482
- 9.1 => {
7483
- Name => 'FlashCommanderMode',
7484
- Mask => 0x80,
7485
- PrintConv => { 0 => 'Off', 1 => 'On' },
7819
+ 0x24 => {
7820
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
7821
+ DataMember => 'NumberOffsets',
7822
+ Format => 'int32u',
7823
+ Writable => 0,
7824
+ Hidden => 1,
7486
7825
  },
7487
- 9.2 => {
7488
- Name => 'FlashControlMode',
7489
- Mask => 0x7f,
7490
- DataMember => 'FlashControlMode',
7491
- RawConv => '$$self{FlashControlMode} = $val',
7492
- PrintConv => \%flashControlMode,
7493
- SeparateTable => 'FlashControlMode',
7826
+ 0x84 => {
7827
+ Name => 'OrientationOffset', #offset24 - length 108
7828
+ DataMember => 'OrientationOffset',
7829
+ Format => 'int32u',
7830
+ Writable => 0,
7831
+ Hidden => 1,
7832
+ RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
7494
7833
  },
7495
- 10 => [
7496
- {
7497
- Name => 'FlashOutput',
7498
- Condition => '$$self{FlashControlMode} >= 0x06',
7499
- ValueConv => '2 ** (-$val/6)',
7500
- ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
7501
- PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
7502
- PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7503
- },
7504
- {
7505
- Name => 'FlashCompensation',
7506
- Format => 'int8s',
7507
- Priority => 0,
7508
- ValueConv => '-$val/6',
7509
- ValueConvInv => '-6 * $val',
7510
- PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
7511
- PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
7512
- },
7513
- ],
7514
- 11 => {
7515
- Name => 'FlashFocalLength',
7834
+ ### 0xce32 - OrientationInfo start (Z9 firmware 1.00)
7835
+ 0xeaea => {
7836
+ Name => 'Hook1',
7837
+ Hidden => 1,
7838
+ RawConv => 'undef',
7839
+ # account for variable location of OrientationInfo data
7840
+ Hook => '$varSize = $$self{OrientationOffset} - 0xeaeb',
7841
+ },
7842
+
7843
+ 0xeaeb => {
7844
+ Name => 'RollAngle',
7845
+ Format => 'fixed32u',
7846
+ Notes => 'converted to degrees of clockwise camera roll',
7847
+ ValueConv => '$val <= 180 ? $val : $val - 360',
7848
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
7849
+ PrintConv => 'sprintf("%.1f", $val)',
7850
+ PrintConvInv => '$val',
7851
+ },
7852
+ 0xeaef => {
7853
+ Name => 'PitchAngle',
7854
+ Format => 'fixed32u',
7855
+ Notes => 'converted to degrees of upward camera tilt',
7856
+ ValueConv => '$val <= 180 ? $val : $val - 360',
7857
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
7858
+ PrintConv => 'sprintf("%.1f", $val)',
7859
+ PrintConvInv => '$val',
7860
+ },
7861
+ 0xeaf3 => {
7862
+ Name => 'YawAngle',
7863
+ Format => 'fixed32u',
7864
+ Notes => 'the camera yaw angle when shooting in portrait orientation',
7865
+ ValueConv => '$val <= 180 ? $val : $val - 360',
7866
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
7867
+ PrintConv => 'sprintf("%.1f", $val)',
7868
+ PrintConvInv => '$val',
7869
+ },
7870
+ # note: DecryptLen currently set to 0xeb5b + 1050
7871
+ );
7872
+
7873
+ %Image::ExifTool::Nikon::ZMenuSettings = (
7874
+ %binaryDataAttrs,
7875
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7876
+ NOTES => q{
7877
+ These tags are used by the Z5 Z6 Z7 Z6II Z7II Z50 Zfc
7878
+ },
7879
+ DATAMEMBER => [ 0xb0, 0xb4, 0x148, 0x160, 0x35a ],
7880
+ 160 => {
7881
+ Name => 'IntervalDurationHours',
7882
+ Format => 'int32u',
7883
+ Condition => '$$self{IntervalShooting} > 0',
7884
+ },
7885
+ 164 => {
7886
+ Name => 'IntervalDurationMinutes',
7887
+ Format => 'int32u',
7888
+ Condition => '$$self{IntervalShooting} > 0',
7889
+ },
7890
+ 168 => {
7891
+ Name => 'IntervalDurationSeconds',
7892
+ Format => 'int32u',
7893
+ Condition => '$$self{IntervalShooting} > 0',
7894
+ },
7895
+ 176 => {
7896
+ Name => 'Intervals',
7897
+ Format => 'int32u',
7898
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
7899
+ Condition => '$$self{IntervalShooting} > 0',
7900
+ },
7901
+ 180 => {
7902
+ Name => 'ShotsPerInterval',
7903
+ Format => 'int32u',
7904
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
7905
+ Condition => '$$self{IntervalShooting} > 0',
7906
+ },
7907
+ 184 => {
7908
+ Name => 'IntervalExposureSmoothing',
7909
+ Condition => '$$self{IntervalShooting} > 0',
7910
+ Format => 'int8u',
7911
+ PrintConv => \%offOn,
7912
+ },
7913
+ 186 => {
7914
+ Name => 'IntervalPriority',
7915
+ Condition => '$$self{IntervalShooting} > 0',
7916
+ Format => 'int8u',
7917
+ PrintConv => \%offOn,
7918
+ },
7919
+ 220 => {
7920
+ Name => 'FocusShiftNumberShots',
7921
+ },
7922
+ 224 => {
7923
+ Name => 'FocusShiftStepWidth',
7924
+ },
7925
+ 228 => {
7926
+ Name => 'FocusShiftInterval',
7927
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
7928
+ },
7929
+ 232 => {
7930
+ Name => 'FocusShiftExposureLock',
7931
+ PrintConv => \%offOn,
7932
+ },
7933
+ #304 => White Balance - Kelvin Temp
7934
+ #312 => ColorSpace
7935
+ #314 => ActiveD-Lighting
7936
+ #318 => HighISONoiseReduction
7937
+ 322 => {
7938
+ Name => 'DiffractionCompensation',
7939
+ Format => 'int8u',
7940
+ PrintConv => \%offOn,
7941
+ },
7942
+ 323 => {
7943
+ Name => 'AutoDistortionControl',
7944
+ Format => 'int8u',
7945
+ PrintConv => \%offOn,
7946
+ },
7947
+ #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
7948
+ 326 => {
7949
+ Name => 'NikonMeteringMode',
7950
+ Unknown => 1,
7951
+ PrintConv => {
7952
+ 0 => 'Matrix',
7953
+ 1 => 'Center',
7954
+ 2 => 'Spot',
7955
+ 3 => 'Highlight'
7956
+ },
7957
+ },
7958
+ 328 => {
7959
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
7960
+ RawConv => '$$self{FlashControlMode} = $val',
7961
+ PrintConv => {
7962
+ 0 => 'TTL',
7963
+ 1 => 'Auto External Flash',
7964
+ 2 => 'GN (distance priority)',
7965
+ 3 => 'Manual',
7966
+ 4 => 'Repeating Flash',
7967
+ },
7968
+ },
7969
+ 334 => {
7970
+ Name => 'FlashGNDistance',
7971
+ Condition => '$$self{FlashControlMode} == 2',
7972
+ Unknown => 1,
7973
+ ValueConv => '$val + 3',
7974
+ PrintConv => \%flashGNDistance,
7975
+ },
7976
+ 338 => {
7977
+ 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)
7978
+ Condition => '$$self{FlashControlMode} >= 3',
7979
+ Unknown => 1,
7980
+ ValueConv => '2 ** (-$val/3)',
7981
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
7982
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
7983
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7984
+ },
7985
+ 346 => {
7986
+ Name => 'FlashWirelessOption', # also found in FlashInfoUnknown at offset 0x23 (with different mappings)
7987
+ Unknown => 1,
7988
+ PrintConv => {
7989
+ 0 => 'Off',
7990
+ 1 => 'Optical AWL',
7991
+ 2 => 'Optical/Radio AWL',
7992
+ 3 => 'Radio AWL'
7993
+ },
7994
+ },
7995
+ 348 => {
7996
+ Name => 'FlashRemoteControl', # also found in FlashInfoUnknown at offset 0x1e (with different mappings)
7997
+ Unknown => 1,
7998
+ PrintConv => {
7999
+ 0 => 'Group',
8000
+ 1 => 'Quick Wireless',
8001
+ 2 => 'Remote Repeating',
8002
+ },
8003
+ },
8004
+ 352 => {
8005
+ Name => 'FlashMasterControlMode', # tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
8006
+ RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
8007
+ PrintConv => \%flashGroupOptionsMode,
8008
+ },
8009
+ 354 => {
8010
+ Name => 'FlashMasterCompensation',
8011
+ Format => 'int8s',
8012
+ Condition => '$$self{FlashGroupOptionsMasterMode} != 3', # other than 'Off'
8013
+ Unknown => 1,
8014
+ ValueConv => '$val/6',
8015
+ ValueConvInv => '6 * $val',
8016
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8017
+ PrintConvInv => '$val',
8018
+ },
8019
+ 358 => {
8020
+ Name => 'FlashMasterOutput',
8021
+ Unknown => 1,
8022
+ Condition => '$$self{FlashGroupOptionsMasterMode} == 1', # only for Mode=M
8023
+ ValueConv => '2 ** (-$val/3)',
8024
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
8025
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
8026
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8027
+ },
8028
+ #360 => {Name => 'FlashGroupAControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupACompensation at 362 and FlashGroupAOutput at 368
8029
+ #368 => {Name => 'FlashGroupBControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupBCompensation at 370 and FlashGroupBOutput at 374
8030
+ #376 => {Name => 'FlashGroupCControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupCCompensation at 378 and FlashGroupCOutput at 382
8031
+ #384 => {Name => 'FlashGroupDControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupDCompensation at 386 and FlashGroupDOutput at 390
8032
+ #392 => {Name => 'FlashGroupEControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupECompensation at 394 and FlashGroupEOutput at 398
8033
+ #400 => {Name => 'FlashGroupFControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupFCompensation at 402 and FlashGroupFOutput at 406
8034
+ #434 => FocusMode
8035
+ #436 => AFAreaMode
8036
+ #438 => VibrationReduction
8037
+ #442 => BracketSet
8038
+ #444 => BracketProgram
8039
+ #446 => BracketIncrement
8040
+ #463 => SilentPhotography
8041
+ 502 => {
8042
+ Name => 'MovieFrameSize', # may want to rename or suppress the movie menu settings - potentially confusing for still photographers
8043
+ Unknown => 1,
8044
+ PrintConv => {
8045
+ 1 => '1920x1080',
8046
+ 2 => '3840x2160',
8047
+ },
8048
+ },
8049
+ 504 => {
8050
+ Name => 'MovieFrameRate',
8051
+ Unknown => 1,
8052
+ PrintConv => {
8053
+ 0 => '120p',
8054
+ 1 => '100p',
8055
+ 2 => '60p',
8056
+ 3 => '50p',
8057
+ 4 => '30p',
8058
+ 5 => '25p',
8059
+ 6 => '24p',
8060
+ },
8061
+ },
8062
+ 506 => {
8063
+ Name => 'MovieSlowMotion',
8064
+ Unknown => 1,
8065
+ PrintConv => {
8066
+ 0 => 'Off',
8067
+ 1 => 'On (4x)', # 120p recording with playback @ 30p [1920 x 1080; 30p x 4] or 100p recording with playback @ 25p [1920 x 1080; 25p x 4]
8068
+ 2 => 'On (5x)', # 120p recording with playback @ 24p [1920 x 1080; 20p x 5]
8069
+ },
8070
+ },
8071
+ 510 => {
8072
+ Name => 'MovieType',
8073
+ Unknown => 1,
8074
+ PrintConv => {
8075
+ 0 => 'MOV',
8076
+ 1 => 'MP4',
8077
+ },
8078
+ },
8079
+ #512 => MovieISOAutoHiLimit
8080
+ 516 => {
8081
+ Name => 'MovieISOAutoManualMode',
8082
+ Condition => '$$self{Model} =~ /^NIKON 7/', #ISO ranges vary by model. These mappings are for the Z7 and Z7II
8083
+ Format => 'int16u',
8084
+ Unknown => 1,
8085
+ ValueConv => '($val-104)/8',
8086
+ PrintConv => {
8087
+ 0 => 'ISO 64',
8088
+ 1 => 'ISO 80',
8089
+ 2 => 'ISO 100',
8090
+ 3 => 'ISO 125',
8091
+ 4 => 'ISO 160',
8092
+ 5 => 'ISO 200',
8093
+ 6 => 'ISO 250',
8094
+ 7 => 'ISO 320',
8095
+ 8 => 'ISO 400',
8096
+ 9 => 'ISO 500',
8097
+ 10 => 'ISO 640',
8098
+ 11 => 'ISO 800',
8099
+ 12 => 'ISO 1000',
8100
+ 13 => 'ISO 1250',
8101
+ 14 => 'ISO 1600',
8102
+ 15 => 'ISO 2000',
8103
+ 16 => 'ISO 2500',
8104
+ 17 => 'ISO 3200',
8105
+ 18 => 'ISO 4000',
8106
+ 19 => 'ISO 5000',
8107
+ 20 => 'ISO 6400',
8108
+ 21 => 'ISO 8000',
8109
+ 22 => 'ISO 10000',
8110
+ 23 => 'ISO 12800',
8111
+ 24 => 'ISO 16000',
8112
+ 25 => 'ISO 20000',
8113
+ 26 => 'ISO 25600',
8114
+ 27 => 'ISO Hi 0.3',
8115
+ 28 => 'ISO Hi 0.7',
8116
+ 29 => 'ISO Hi 1.0',
8117
+ 32 => 'ISO Hi 2.0',
8118
+ },
8119
+ },
8120
+ #520 => MovieWhiteBalanceSameAsPhoto
8121
+ 568 => {
8122
+ Name => 'MovieActiveD-Lighting',
8123
+ Unknown => 1,
8124
+ PrintConv => {
8125
+ 0 => 'Off',
8126
+ 2 => 'Low',
8127
+ 3 => 'Normal',
8128
+ 4 => 'High',
8129
+ 5 => 'Extra High',
8130
+ },
8131
+ },
8132
+ 572 => {
8133
+ Name => 'MovieHighISONoiseReduction',
8134
+ Unknown => 1,
8135
+ PrintConv => {
8136
+ 0 => 'Off',
8137
+ 1 => 'Low',
8138
+ 2 => 'Normal',
8139
+ 3 => 'High',
8140
+ },
8141
+ },
8142
+ 574=> {
8143
+ Name => 'MovieVignetteControl',
8144
+ Unknown => 1,
8145
+ PrintConv => {
8146
+ 0 => 'Off',
8147
+ 1 => 'Low',
8148
+ 2 => 'Normal',
8149
+ 3 => 'High',
8150
+ },
8151
+ },
8152
+ 576 => {
8153
+ Name => 'MovieVignetteControlSameAsPhoto',
8154
+ Unknown => 1,
8155
+ PrintConv => \%noYes
8156
+ },
8157
+ 577 => {
8158
+ Name => 'MovieDiffractionCompensation',
8159
+ Unknown => 1,
8160
+ PrintConv => \%offOn
8161
+ },
8162
+ 578 => {
8163
+ Name => 'MovieAutoDistortionControl',
8164
+ Unknown => 1,
8165
+ PrintConv => \%offOn
8166
+ },
8167
+ 584 => {
8168
+ Name => 'MovieFocusMode',
8169
+ Unknown => 1,
8170
+ PrintConv => {
8171
+ 0 => 'Manual',
8172
+ 1 => 'AF-S',
8173
+ 2 => 'AF-C',
8174
+ 4 => 'AF-F', # full frame
8175
+ },
8176
+ },
8177
+ #586 => MovieAFAreaMode
8178
+ 590 => {
8179
+ Name => 'MovieVibrationReduction',
8180
+ Unknown => 1,
8181
+ PrintConv => {
8182
+ 0 => 'Off',
8183
+ 1 => 'On (Normal)',
8184
+ 2 => 'On (Sport)',
8185
+ },
8186
+ },
8187
+ 591 => {
8188
+ Name => 'MovieVibrationReductionSameAsPhoto',
8189
+ Unknown => 1,
8190
+ PrintConv => \%noYes
8191
+ },
8192
+ #848 => HDMIOutputResolution
8193
+ #850 => HDMIOutputRange
8194
+ #854 => HDMIExternalRecorder
8195
+ #856 => HDMIBitDepth
8196
+ 858 => {
8197
+ Name => 'HDMIOutputN-Log', # one of the choices under SettingsMenu/HDMI/Advanced. Curiously,the HDR/HLC output option which is controlled by the same sub-menu is decoded thru NikonSettings
8198
+ Condition => '$$self{HDMIBitDepth} and $$self{HDMIBitDepth} == 2', # only for 10 bit
8199
+ RawConv => '$$self{HDMIOutputNLog} = $val',
8200
+ Unknown => 1,
8201
+ PrintConv => \%offOn,
8202
+ },
8203
+ #859 => HDMIViewAssist
8204
+ );
8205
+ # Flash information (ref JD)
8206
+ %Image::ExifTool::Nikon::FlashInfo0100 = (
8207
+ %binaryDataAttrs,
8208
+ DATAMEMBER => [ 9.2, 15, 16 ],
8209
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8210
+ NOTES => q{
8211
+ These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
8212
+ D200.
8213
+ },
8214
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8215
+ 0 => {
8216
+ Name => 'FlashInfoVersion',
8217
+ Format => 'string[4]',
8218
+ Writable => 0,
8219
+ },
8220
+ 4 => { #PH
8221
+ Name => 'FlashSource',
8222
+ PrintConv => {
8223
+ 0 => 'None',
8224
+ 1 => 'External',
8225
+ 2 => 'Internal',
8226
+ },
8227
+ },
8228
+ # 5 - values: 46,48,50,54,78
8229
+ 6 => {
8230
+ Format => 'int8u[2]',
8231
+ Name => 'ExternalFlashFirmware',
8232
+ SeparateTable => 'FlashFirmware',
8233
+ PrintConv => \%flashFirmware,
8234
+ },
8235
+ 8 => {
8236
+ Name => 'ExternalFlashFlags',
8237
+ PrintConv => { 0 => '(none)',
8238
+ BITMASK => {
8239
+ 0 => 'Fired', #28
8240
+ 2 => 'Bounce Flash', #PH
8241
+ 4 => 'Wide Flash Adapter',
8242
+ 5 => 'Dome Diffuser', #28
8243
+ },
8244
+ },
8245
+ },
8246
+ 9.1 => {
8247
+ Name => 'FlashCommanderMode',
8248
+ Mask => 0x80,
8249
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8250
+ },
8251
+ 9.2 => {
8252
+ Name => 'FlashControlMode',
8253
+ Mask => 0x7f,
8254
+ DataMember => 'FlashControlMode',
8255
+ RawConv => '$$self{FlashControlMode} = $val',
8256
+ PrintConv => \%flashControlMode,
8257
+ SeparateTable => 'FlashControlMode',
8258
+ },
8259
+ 10 => [
8260
+ {
8261
+ Name => 'FlashOutput',
8262
+ Condition => '$$self{FlashControlMode} >= 0x06',
8263
+ ValueConv => '2 ** (-$val/6)',
8264
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8265
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8266
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8267
+ },
8268
+ {
8269
+ Name => 'FlashCompensation',
8270
+ Format => 'int8s',
8271
+ Priority => 0,
8272
+ ValueConv => '-$val/6',
8273
+ ValueConvInv => '-6 * $val',
8274
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8275
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8276
+ },
8277
+ ],
8278
+ 11 => {
8279
+ Name => 'FlashFocalLength',
8280
+ RawConv => '$val ? $val : undef',
8281
+ PrintConv => '"$val mm"',
8282
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8283
+ },
8284
+ 12 => {
8285
+ Name => 'RepeatingFlashRate',
8286
+ RawConv => '$val ? $val : undef',
8287
+ PrintConv => '"$val Hz"',
8288
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8289
+ },
8290
+ 13 => {
8291
+ Name => 'RepeatingFlashCount',
8292
+ RawConv => '$val ? $val : undef',
8293
+ },
8294
+ 14 => { #PH
8295
+ Name => 'FlashGNDistance',
8296
+ SeparateTable => 1,
8297
+ PrintConv => \%flashGNDistance,
8298
+ },
8299
+ 15 => {
8300
+ Name => 'FlashGroupAControlMode',
8301
+ Mask => 0x0f,
8302
+ DataMember => 'FlashGroupAControlMode',
8303
+ RawConv => '$$self{FlashGroupAControlMode} = $val',
8304
+ PrintConv => \%flashControlMode,
8305
+ SeparateTable => 'FlashControlMode',
8306
+ },
8307
+ 16 => {
8308
+ Name => 'FlashGroupBControlMode',
8309
+ Mask => 0x0f,
8310
+ DataMember => 'FlashGroupBControlMode',
8311
+ RawConv => '$$self{FlashGroupBControlMode} = $val',
8312
+ PrintConv => \%flashControlMode,
8313
+ SeparateTable => 'FlashControlMode',
8314
+ },
8315
+ 17 => [
8316
+ {
8317
+ Name => 'FlashGroupAOutput',
8318
+ Condition => '$$self{FlashGroupAControlMode} >= 0x06',
8319
+ ValueConv => '2 ** (-$val/6)',
8320
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8321
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8322
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8323
+ },
8324
+ {
8325
+ Name => 'FlashGroupACompensation',
8326
+ Format => 'int8s',
8327
+ ValueConv => '-$val/6',
8328
+ ValueConvInv => '-6 * $val',
8329
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8330
+ PrintConvInv => '$val',
8331
+ },
8332
+ ],
8333
+ 18 => [
8334
+ {
8335
+ Name => 'FlashGroupBOutput',
8336
+ Condition => '$$self{FlashGroupBControlMode} >= 0x06',
8337
+ ValueConv => '2 ** (-$val/6)',
8338
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8339
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8340
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8341
+ },
8342
+ {
8343
+ Name => 'FlashGroupBCompensation',
8344
+ Format => 'int8s',
8345
+ ValueConv => '-$val/6',
8346
+ ValueConvInv => '-6 * $val',
8347
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8348
+ PrintConvInv => '$val',
8349
+ },
8350
+ ],
8351
+ );
8352
+
8353
+ # Flash information for D40, D40x, D3 and D300 (ref JD)
8354
+ %Image::ExifTool::Nikon::FlashInfo0102 = (
8355
+ %binaryDataAttrs,
8356
+ DATAMEMBER => [ 9.2, 16.1, 17.1, 17.2 ],
8357
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8358
+ NOTES => q{
8359
+ These tags are used by the D3 (firmware 1.x), D40, D40X, D60 and D300
8360
+ (firmware 1.00).
8361
+ },
8362
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8363
+ 0 => {
8364
+ Name => 'FlashInfoVersion',
8365
+ Format => 'string[4]',
8366
+ Writable => 0,
8367
+ },
8368
+ 4 => { #PH
8369
+ Name => 'FlashSource',
8370
+ PrintConv => {
8371
+ 0 => 'None',
8372
+ 1 => 'External',
8373
+ 2 => 'Internal',
8374
+ },
8375
+ },
8376
+ # 5 - values: 46,48,50,54,78
8377
+ 6 => {
8378
+ Format => 'int8u[2]',
8379
+ Name => 'ExternalFlashFirmware',
8380
+ SeparateTable => 'FlashFirmware',
8381
+ PrintConv => \%flashFirmware,
8382
+ },
8383
+ 8 => {
8384
+ Name => 'ExternalFlashFlags',
8385
+ PrintConv => { BITMASK => {
8386
+ 0 => 'Fired', #28
8387
+ 2 => 'Bounce Flash', #PH
8388
+ 4 => 'Wide Flash Adapter',
8389
+ 5 => 'Dome Diffuser', #28
8390
+ }},
8391
+ },
8392
+ 9.1 => {
8393
+ Name => 'FlashCommanderMode',
8394
+ Mask => 0x80,
8395
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8396
+ },
8397
+ 9.2 => {
8398
+ Name => 'FlashControlMode',
8399
+ Mask => 0x7f,
8400
+ DataMember => 'FlashControlMode',
8401
+ RawConv => '$$self{FlashControlMode} = $val',
8402
+ PrintConv => \%flashControlMode,
8403
+ SeparateTable => 'FlashControlMode',
8404
+ },
8405
+ 10 => [
8406
+ {
8407
+ Name => 'FlashOutput',
8408
+ Condition => '$$self{FlashControlMode} >= 0x06',
8409
+ ValueConv => '2 ** (-$val/6)',
8410
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8411
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8412
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8413
+ },
8414
+ {
8415
+ Name => 'FlashCompensation',
8416
+ # this is the compensation from the camera (0x0012) for "Built-in" FlashType, or
8417
+ # the compensation from the external unit (0x0017) for "Optional" FlashType - PH
8418
+ Format => 'int8s',
8419
+ Priority => 0,
8420
+ ValueConv => '-$val/6',
8421
+ ValueConvInv => '-6 * $val',
8422
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8423
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8424
+ },
8425
+ ],
8426
+ 12 => {
8427
+ Name => 'FlashFocalLength',
8428
+ RawConv => '$val ? $val : undef',
8429
+ PrintConv => '"$val mm"',
8430
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8431
+ },
8432
+ 13 => {
8433
+ Name => 'RepeatingFlashRate',
8434
+ RawConv => '$val ? $val : undef',
8435
+ PrintConv => '"$val Hz"',
8436
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8437
+ },
8438
+ 14 => {
8439
+ Name => 'RepeatingFlashCount',
8440
+ RawConv => '$val ? $val : undef',
8441
+ },
8442
+ 15 => { #PH
8443
+ Name => 'FlashGNDistance',
8444
+ SeparateTable => 1,
8445
+ PrintConv => \%flashGNDistance,
8446
+ },
8447
+ 16.1 => {
8448
+ Name => 'FlashGroupAControlMode',
8449
+ Mask => 0x0f,
8450
+ Notes => 'note: group A tags may apply to the built-in flash settings for some models',
8451
+ DataMember => 'FlashGroupAControlMode',
8452
+ RawConv => '$$self{FlashGroupAControlMode} = $val',
8453
+ PrintConv => \%flashControlMode,
8454
+ SeparateTable => 'FlashControlMode',
8455
+ },
8456
+ 17.1 => {
8457
+ Name => 'FlashGroupBControlMode',
8458
+ Mask => 0xf0,
8459
+ Notes => 'note: group B tags may apply to group A settings for some models',
8460
+ DataMember => 'FlashGroupBControlMode',
8461
+ RawConv => '$$self{FlashGroupBControlMode} = $val',
8462
+ PrintConv => \%flashControlMode,
8463
+ SeparateTable => 'FlashControlMode',
8464
+ },
8465
+ 17.2 => { #PH
8466
+ Name => 'FlashGroupCControlMode',
8467
+ Mask => 0x0f,
8468
+ Notes => 'note: group C tags may apply to group B settings for some models',
8469
+ DataMember => 'FlashGroupCControlMode',
8470
+ RawConv => '$$self{FlashGroupCControlMode} = $val',
8471
+ PrintConv => \%flashControlMode,
8472
+ SeparateTable => 'FlashControlMode',
8473
+ },
8474
+ 18 => [
8475
+ {
8476
+ Name => 'FlashGroupAOutput',
8477
+ Condition => '$$self{FlashGroupAControlMode} >= 0x06',
8478
+ ValueConv => '2 ** (-$val/6)',
8479
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8480
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8481
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8482
+ },
8483
+ {
8484
+ Name => 'FlashGroupACompensation',
8485
+ Format => 'int8s',
8486
+ ValueConv => '-$val/6',
8487
+ ValueConvInv => '-6 * $val',
8488
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8489
+ PrintConvInv => '$val',
8490
+ },
8491
+ ],
8492
+ 19 => [
8493
+ {
8494
+ Name => 'FlashGroupBOutput',
8495
+ Condition => '$$self{FlashGroupBControlMode} >= 0x60',
8496
+ ValueConv => '2 ** (-$val/6)',
8497
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8498
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8499
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8500
+ },
8501
+ {
8502
+ Name => 'FlashGroupBCompensation',
8503
+ Format => 'int8s',
8504
+ ValueConv => '-$val/6',
8505
+ ValueConvInv => '-6 * $val',
8506
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8507
+ PrintConvInv => '$val',
8508
+ },
8509
+ ],
8510
+ 20 => [ #PH
8511
+ {
8512
+ Name => 'FlashGroupCOutput',
8513
+ Condition => '$$self{FlashGroupCControlMode} >= 0x06',
8514
+ ValueConv => '2 ** (-$val/6)',
8515
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8516
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8517
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8518
+ },
8519
+ {
8520
+ Name => 'FlashGroupCCompensation',
8521
+ Format => 'int8s',
8522
+ ValueConv => '-$val/6',
8523
+ ValueConvInv => '-6 * $val',
8524
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8525
+ PrintConvInv => '$val',
8526
+ },
8527
+ ],
8528
+ );
8529
+
8530
+ # Flash information (ref JD)
8531
+ %Image::ExifTool::Nikon::FlashInfo0100 = (
8532
+ %binaryDataAttrs,
8533
+ DATAMEMBER => [ 9.2, 15, 16 ],
8534
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8535
+ NOTES => q{
8536
+ These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
8537
+ D200.
8538
+ },
8539
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8540
+ 0 => {
8541
+ Name => 'FlashInfoVersion',
8542
+ Format => 'string[4]',
8543
+ Writable => 0,
8544
+ },
8545
+ 4 => { #PH
8546
+ Name => 'FlashSource',
8547
+ PrintConv => {
8548
+ 0 => 'None',
8549
+ 1 => 'External',
8550
+ 2 => 'Internal',
8551
+ },
8552
+ },
8553
+ # 5 - values: 46,48,50,54,78
8554
+ 6 => {
8555
+ Format => 'int8u[2]',
8556
+ Name => 'ExternalFlashFirmware',
8557
+ SeparateTable => 'FlashFirmware',
8558
+ PrintConv => \%flashFirmware,
8559
+ },
8560
+ 8 => {
8561
+ Name => 'ExternalFlashFlags',
8562
+ PrintConv => { 0 => '(none)',
8563
+ BITMASK => {
8564
+ 0 => 'Fired', #28
8565
+ 2 => 'Bounce Flash', #PH
8566
+ 4 => 'Wide Flash Adapter',
8567
+ 5 => 'Dome Diffuser', #28
8568
+ },
8569
+ },
8570
+ },
8571
+ 9.1 => {
8572
+ Name => 'FlashCommanderMode',
8573
+ Mask => 0x80,
8574
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8575
+ },
8576
+ 9.2 => {
8577
+ Name => 'FlashControlMode',
8578
+ Mask => 0x7f,
8579
+ DataMember => 'FlashControlMode',
8580
+ RawConv => '$$self{FlashControlMode} = $val',
8581
+ PrintConv => \%flashControlMode,
8582
+ SeparateTable => 'FlashControlMode',
8583
+ },
8584
+ 10 => [
8585
+ {
8586
+ Name => 'FlashOutput',
8587
+ Condition => '$$self{FlashControlMode} >= 0x06',
8588
+ ValueConv => '2 ** (-$val/6)',
8589
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8590
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8591
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8592
+ },
8593
+ {
8594
+ Name => 'FlashCompensation',
8595
+ Format => 'int8s',
8596
+ Priority => 0,
8597
+ ValueConv => '-$val/6',
8598
+ ValueConvInv => '-6 * $val',
8599
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8600
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8601
+ },
8602
+ ],
8603
+ 11 => {
8604
+ Name => 'FlashFocalLength',
7516
8605
  RawConv => '$val ? $val : undef',
7517
8606
  PrintConv => '"$val mm"',
7518
8607
  PrintConvInv => '$val=~/(\d+)/; $1 || 0',
@@ -8491,6 +9580,25 @@ my %nikonFocalConversions = (
8491
9580
  },
8492
9581
  );
8493
9582
 
9583
+ # MakerNotes0x51 - compression info for Z9
9584
+ %Image::ExifTool::Nikon::MakerNotes0x51 = (
9585
+ %binaryDataAttrs,
9586
+ DATAMEMBER => [ 0 ],
9587
+ GROUPS => { 0 => 'MakerNotes' },
9588
+ 0 => {
9589
+ Name => 'FirmwareVersion',
9590
+ Format => 'string[8]',
9591
+ Writable => 0,
9592
+ RawConv => '$$self{FirmwareVersion} = $val',
9593
+ },
9594
+ 10 => {
9595
+ Name => 'NEFCompression',
9596
+ Writable => 'int16u',
9597
+ SeparateTable => 'NEFCompression',
9598
+ PrintConv => \%nefCompression,
9599
+ },
9600
+ );
9601
+
8494
9602
  # extra info found in IFD0 of NEF files (ref PH, Z6/Z7)
8495
9603
  %Image::ExifTool::Nikon::NEFInfo = (
8496
9604
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },