exiftool_vendored 12.33.0 → 12.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +66 -0
  3. data/bin/META.json +1 -1
  4. data/bin/META.yml +1 -1
  5. data/bin/README +2 -2
  6. data/bin/exiftool +65 -37
  7. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +11 -2
  8. data/bin/lib/Image/ExifTool/Canon.pm +156 -10
  9. data/bin/lib/Image/ExifTool/Charset.pm +2 -0
  10. data/bin/lib/Image/ExifTool/DarwinCore.pm +2 -2
  11. data/bin/lib/Image/ExifTool/Exif.pm +13 -1
  12. data/bin/lib/Image/ExifTool/FLIR.pm +33 -8
  13. data/bin/lib/Image/ExifTool/GIF.pm +5 -1
  14. data/bin/lib/Image/ExifTool/GPS.pm +14 -10
  15. data/bin/lib/Image/ExifTool/ICC_Profile.pm +96 -4
  16. data/bin/lib/Image/ExifTool/Jpeg2000.pm +108 -11
  17. data/bin/lib/Image/ExifTool/Nikon.pm +992 -18
  18. data/bin/lib/Image/ExifTool/NikonCustom.pm +5 -1
  19. data/bin/lib/Image/ExifTool/NikonSettings.pm +135 -71
  20. data/bin/lib/Image/ExifTool/PDF.pm +5 -3
  21. data/bin/lib/Image/ExifTool/PNG.pm +1 -0
  22. data/bin/lib/Image/ExifTool/QuickTime.pm +17 -3
  23. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +26 -1
  24. data/bin/lib/Image/ExifTool/README +4 -0
  25. data/bin/lib/Image/ExifTool/Sony.pm +29 -11
  26. data/bin/lib/Image/ExifTool/TagInfoXML.pm +9 -4
  27. data/bin/lib/Image/ExifTool/TagLookup.pm +6437 -5843
  28. data/bin/lib/Image/ExifTool/TagNames.pod +1292 -46
  29. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +10 -0
  30. data/bin/lib/Image/ExifTool/WriteXMP.pl +10 -11
  31. data/bin/lib/Image/ExifTool/Writer.pl +50 -5
  32. data/bin/lib/Image/ExifTool/XMP.pm +119 -30
  33. data/bin/lib/Image/ExifTool/XMP2.pl +3 -2
  34. data/bin/lib/Image/ExifTool.pm +71 -8
  35. data/bin/lib/Image/ExifTool.pod +9 -1
  36. data/bin/perl-Image-ExifTool.spec +1 -1
  37. data/lib/exiftool_vendored/version.rb +1 -1
  38. metadata +2 -2
@@ -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 = '4.00';
65
+ $VERSION = '4.02';
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',
@@ -1045,7 +1046,9 @@ my %cropHiSpeed = ( #IB
1045
1046
  10 => '1.3x Movie Crop', #36 (D4/D500)
1046
1047
  11 => 'FX Uncropped',
1047
1048
  12 => 'DX Uncropped',
1048
- 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
1049
1052
  17 => '1:1 Crop',
1050
1053
  OTHER => sub {
1051
1054
  my ($val, $inv, $conv) = @_;
@@ -1057,7 +1060,16 @@ my %cropHiSpeed = ( #IB
1057
1060
  },
1058
1061
  );
1059
1062
 
1063
+ my %flashGroupOptionsMode = (
1064
+ 0 => 'TTL',
1065
+ 1 => 'Manual',
1066
+ 2 => 'Auto',
1067
+ 3 => 'Off',
1068
+ );
1069
+
1070
+ my %noYes = ( 0 => 'No' , 1 => 'Yes', );
1060
1071
  my %offOn = ( 0 => 'Off', 1 => 'On' );
1072
+ my %onOff = ( 0 => 'On', 1 => 'Off' );
1061
1073
 
1062
1074
  # common attributes for writable BinaryData directories
1063
1075
  my %binaryDataAttrs = (
@@ -1464,6 +1476,8 @@ my %binaryDataAttrs = (
1464
1476
  Name => 'ColorTemperatureAuto',
1465
1477
  Writable => 'int16u',
1466
1478
  },
1479
+ #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)
1480
+ #0x005e #28 possibly DiffractionCompensation block? Certainly offset 0x04 within block contains tag DiffractionCompensation
1467
1481
  0x0080 => { Name => 'ImageAdjustment', Writable => 'string' },
1468
1482
  0x0081 => { Name => 'ToneComp', Writable => 'string' }, #2
1469
1483
  0x0082 => { Name => 'AuxiliaryLens', Writable => 'string' },
@@ -1861,7 +1875,7 @@ my %binaryDataAttrs = (
1861
1875
  SubDirectory => {
1862
1876
  TagTable => 'Image::ExifTool::Nikon::ShotInfoD6',
1863
1877
  DecryptStart => 4,
1864
- DecryptLen => 0xc21a + 12,
1878
+ DecryptLen => 0xc292 + 720, # thru decoded parts of Offset 32
1865
1879
  ByteOrder => 'LittleEndian',
1866
1880
  },
1867
1881
  },
@@ -1876,12 +1890,13 @@ my %binaryDataAttrs = (
1876
1890
  },
1877
1891
  },
1878
1892
  { # (Z6_2 firmware version 1.00 and Z7_2 firmware versions 1.00 & 1.01, ref 28)
1879
- Condition => '$$valPt =~ /^0800/ or $$valPt =~ /^0803/',
1893
+ # 0800=Z6/Z7 0801=Z50 0802=Z5 0803=Z6II/Z7II 0804=Zfc
1894
+ Condition => '$$valPt =~ /^080[01234]/',
1880
1895
  Name => 'ShotInfoZ7_2',
1881
1896
  SubDirectory => {
1882
1897
  TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7_2',
1883
1898
  DecryptStart => 4,
1884
- DecryptLen => 0xce32 + 12,
1899
+ DecryptLen => 0xcea6 + 1050, # thru decoded parts of Offset31
1885
1900
  ByteOrder => 'LittleEndian',
1886
1901
  },
1887
1902
  },
@@ -2388,6 +2403,10 @@ my %binaryDataAttrs = (
2388
2403
  Flags => [ 'Binary', 'Protected' ],
2389
2404
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::PictureControl' },
2390
2405
  },
2406
+ 0x00bf => {
2407
+ Name => 'SilentPhotography',
2408
+ PrintConv => \%offOn,
2409
+ },
2391
2410
  0x00c3 => {
2392
2411
  Name => 'BarometerInfo',
2393
2412
  SubDirectory => {
@@ -6048,6 +6067,18 @@ my %nikonFocalConversions = (
6048
6067
  3 => 'Rotate 180',
6049
6068
  },
6050
6069
  },
6070
+ 0x0d0 => {
6071
+ Name => 'Interval',
6072
+ # prior version of the d% firmware do not support this tag, nor does the D500 (at least thru firmware 1.3)
6073
+ Condition => '$$self{Model} eq "NIKON D5" and $$self{FirmwareVersion} ge "1.40"',
6074
+ PrintConv => '$val > 0 ? sprintf("%.0f", $val) : ""',
6075
+ },
6076
+ 0x0d4 => {
6077
+ Name => 'IntervalFrame',
6078
+ # prior version of the d% firmware do not support this tag, nor does the D500 (at least thru firmware 1.3)
6079
+ Condition => '$$self{Model} eq "NIKON D5" and $$self{FirmwareVersion} ge "1.40"',
6080
+ PrintConv => '$val > 0 ? sprintf("%.0f", $val) : ""',
6081
+ },
6051
6082
  0x05e2 => {
6052
6083
  Name => 'FlickerReductionIndicator',
6053
6084
  Mask => 0x01,
@@ -6466,7 +6497,7 @@ my %nikonFocalConversions = (
6466
6497
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
6467
6498
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6468
6499
  VARS => { ID_LABEL => 'Index' },
6469
- DATAMEMBER => [ 0x9c, 0xc219 ],
6500
+ DATAMEMBER => [ 0x30, 0x60, 0x9c, 0xa4, 0x75e7, 0x760c, 0x7610, 0xc219, 0xc292, 0xc40e, 0xc412, 0xc4a6, 0xc4be ],
6470
6501
  WRITABLE => 1,
6471
6502
  FIRST_ENTRY => 0,
6472
6503
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -6476,6 +6507,11 @@ my %nikonFocalConversions = (
6476
6507
  Format => 'string[4]',
6477
6508
  Writable => 0,
6478
6509
  },
6510
+ 0x04 => {
6511
+ Name => 'FirmwareVersion',
6512
+ Format => 'string[8]',
6513
+ Writable => 0,
6514
+ },
6479
6515
  0x24 => {
6480
6516
  Name => 'NumberOffsets', # (number of entries in offset table. offsets are from start of ShotInfo data)
6481
6517
  DataMember => 'NumberOffsets',
@@ -6483,6 +6519,22 @@ my %nikonFocalConversions = (
6483
6519
  Writable => 0,
6484
6520
  Hidden => 1,
6485
6521
  },
6522
+ 0x30 => {
6523
+ Name => 'Offset3',
6524
+ DataMember => 'Offset3',
6525
+ Format => 'int32u',
6526
+ Writable => 0,
6527
+ Hidden => 1,
6528
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
6529
+ },
6530
+ 0x60 => {
6531
+ Name => 'Offset15',
6532
+ DataMember => 'Offset15',
6533
+ Format => 'int32u',
6534
+ Writable => 0,
6535
+ Hidden => 1,
6536
+ RawConv => '$$self{Offset15} = $val || 0x10000000; undef', # (ignore if 0)
6537
+ },
6486
6538
  0x9c => {
6487
6539
  Name => 'OrientationOffset',
6488
6540
  DataMember => 'OrientationOffset',
@@ -6491,15 +6543,49 @@ my %nikonFocalConversions = (
6491
6543
  Hidden => 1,
6492
6544
  RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
6493
6545
  },
6494
- ### 0xc21a - OrientationInfo start (D6 firmware 1.00)
6495
- 0xc219 => {
6546
+ 0xa4 => {
6547
+ Name => 'Offset32',
6548
+ DataMember => 'Offset32',
6549
+ Format => 'int32u',
6550
+ Writable => 0,
6551
+ Hidden => 1,
6552
+ RawConv => '$$self{Offset32} = $val || 0x10000000; undef', # (ignore if 0)
6553
+ },
6554
+ ### 0x75e8 - Offset3 info start (D6 firmware 1.33)
6555
+ 0x75e7 => {
6496
6556
  Name => 'Hook1',
6497
6557
  Hidden => 1,
6498
6558
  RawConv => 'undef',
6559
+ # account for variable location of Offset5 data
6560
+ Hook => '$varSize = $$self{Offset3} - 0x75e8',
6561
+ },
6562
+ 0x760c => {
6563
+ Name => 'IntervalShooting',
6564
+ RawConv => '$$self{IntervalShooting} = $val',
6565
+ Format => 'int16u',
6566
+ PrintConv => q{
6567
+ return 'Off' if $val == 0 ;
6568
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); #something like "Interval 1 of 3"
6569
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; #something like "Frame 1 of 3" or blank
6570
+ return "On: $i$f"
6571
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
6572
+ },
6573
+ },
6574
+ 0x7610 => {
6575
+ Name => 'IntervalFrame',
6576
+ RawConv => '$$self{IntervalFrame} = $val',
6577
+ Condition => '$$self{IntervalShooting} > 0',
6578
+ Format => 'int16u',
6579
+ Hidden => 1,
6580
+ },
6581
+ ### 0xc21a - OrientationInfo start (D6 firmware 1.00) (0xc952 for firmware 1.33)
6582
+ 0xc219 => {
6583
+ Name => 'Hook2',
6584
+ Hidden => 1,
6585
+ RawConv => 'undef',
6499
6586
  # account for variable location of OrientationInfo data
6500
6587
  Hook => '$varSize = $$self{OrientationOffset} - 0xc21a',
6501
6588
  },
6502
-
6503
6589
  0xc21a => {
6504
6590
  Name => 'RollAngle',
6505
6591
  Format => 'fixed32u',
@@ -6527,7 +6613,136 @@ my %nikonFocalConversions = (
6527
6613
  PrintConv => 'sprintf("%.1f", $val)',
6528
6614
  PrintConvInv => '$val',
6529
6615
  },
6530
- # note: DecryptLen currently set to 0xc21a + 12
6616
+ ### 0xc9c6 - Offset32 start (D6 firmware 1.33)
6617
+ 0xc292 => {
6618
+ Name => 'Hook3',
6619
+ Hidden => 1,
6620
+ RawConv => 'undef',
6621
+ # account for variable location of data
6622
+ Hook => '$varSize = $$self{Offset32} - 0xc292',
6623
+ },
6624
+ 0xc40e => {
6625
+ Name => 'Intervals',
6626
+ Format => 'int32u',
6627
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
6628
+ Condition => '$$self{IntervalShooting} > 0',
6629
+ },
6630
+ 0xc412 => {
6631
+ Name => 'ShotsPerInterval',
6632
+ Format => 'int32u',
6633
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
6634
+ Condition => '$$self{IntervalShooting} > 0',
6635
+ },
6636
+ 0xc416 => {
6637
+ Name => 'IntervalExposureSmoothing',
6638
+ Condition => '$$self{IntervalShooting} > 0',
6639
+ Format => 'int8u',
6640
+ PrintConv => \%offOn,
6641
+ },
6642
+ 0xc418 => {
6643
+ Name => 'IntervalPriority',
6644
+ Condition => '$$self{IntervalShooting} > 0',
6645
+ Format => 'int8u',
6646
+ PrintConv => \%offOn,
6647
+ },
6648
+ 0xc43a => {
6649
+ Name => 'FocusShiftNumberShots',
6650
+ },
6651
+ 0xc43e => {
6652
+ Name => 'FocusShiftStepWidth',
6653
+ },
6654
+ 0xc442 => {
6655
+ Name => 'FocusShiftInterval',
6656
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
6657
+ },
6658
+ 0xc446 => {
6659
+ Name => 'FocusShiftExposureLock',
6660
+ PrintConv => \%offOn,
6661
+ },
6662
+ #0xc49c => HighISONoiseReduction
6663
+ 0xc4a0 => {
6664
+ Name => 'DiffractionCompensation',
6665
+ Format => 'int8u',
6666
+ PrintConv => \%offOn,
6667
+ },
6668
+ #0xc4a1 => {Name => 'FlickerReductionShooting',}, #redundant with tag in NikonSettings
6669
+ 0xc4a6 => {
6670
+ Name => 'FlashControlMode', #this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
6671
+ RawConv => '$$self{FlashControlMode} = $val',
6672
+ PrintConv => {
6673
+ 0 => 'TTL',
6674
+ 1 => 'Auto External Flash',
6675
+ 2 => 'GN (distance priority)',
6676
+ 3 => 'Manual',
6677
+ 4 => 'Repeating Flash',
6678
+ },
6679
+ },
6680
+ 0xc4ac => {
6681
+ Name => 'FlashGNDistance',
6682
+ Condition => '$$self{FlashControlMode} == 2',
6683
+ Unknown => 1,
6684
+ ValueConv => '$val + 3',
6685
+ PrintConv => \%flashGNDistance,
6686
+ },
6687
+ 0xc4b0 => {
6688
+ 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)
6689
+ Condition => '$$self{FlashControlMode} >= 3',
6690
+ Unknown => 1,
6691
+ ValueConv => '2 ** (-$val/3)',
6692
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
6693
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
6694
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
6695
+ },
6696
+ 0xc4ba => {
6697
+ Name => 'FlashRemoteControl',
6698
+ Unknown => 1,
6699
+ PrintConv => {
6700
+ 0 => 'Group',
6701
+ 1 => 'Quick Wireless',
6702
+ 2 => 'Remote Repeating',
6703
+ },
6704
+ },
6705
+ 0xc4be => {
6706
+ Name => 'FlashMasterControlMode', #tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
6707
+ RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
6708
+ PrintConv => \%flashGroupOptionsMode,
6709
+ },
6710
+ 0xc4c0 => {
6711
+ Name => 'FlashMasterCompensation',
6712
+ Unknown => 1,
6713
+ Format => 'int8s',
6714
+ Condition => '$$self{FlashGroupOptionsMasterMode} != 3', #other than 'Off'
6715
+ ValueConv => '$val/6',
6716
+ ValueConvInv => '6 * $val',
6717
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
6718
+ PrintConvInv => '$val',
6719
+ },
6720
+ 0xc4c4 => {
6721
+ Name => 'FlashMasterOutput',
6722
+ Unknown => 1,
6723
+ Condition => '$$self{FlashGroupOptionsMasterMode} == 1', #only for Mode=M
6724
+ ValueConv => '2 ** (-$val/3)',
6725
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
6726
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
6727
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
6728
+ },
6729
+ 0xc4c6 => {
6730
+ Name => 'FlashWirelessOption',
6731
+ Unknown => 1,
6732
+ PrintConv => {
6733
+ 0 => 'Optical AWL',
6734
+ 1 => 'Off',
6735
+ },
6736
+ },
6737
+ 0xc55c => {
6738
+ Name => 'MovieType',
6739
+ Unknown => 1,
6740
+ PrintConv => {
6741
+ 0 => 'MOV',
6742
+ 1 => 'MP4',
6743
+ },
6744
+ },
6745
+ # note: DecryptLen currently set to 0xc9c6 + 720
6531
6746
  );
6532
6747
 
6533
6748
  # shot information for the D610 firmware 1.00 (encrypted) - ref PH
@@ -7298,7 +7513,7 @@ my %nikonFocalConversions = (
7298
7513
  Format => 'undef[56]',
7299
7514
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsD4' },
7300
7515
  },
7301
- # 0x1978 => { #this decode works, but involves more bits than should be necessary
7516
+ # 0x1978 => { # this decode works, but involves more bits than should be necessary
7302
7517
  # Name => 'ShutterTrigger',
7303
7518
  # Mask => 0xff,
7304
7519
  # PrintConv => {
@@ -7353,7 +7568,9 @@ my %nikonFocalConversions = (
7353
7568
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7354
7569
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7355
7570
  VARS => { ID_LABEL => 'Index' },
7356
- DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x98, 0xce31 ],
7571
+ DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x30, 0x38, 0x98, 0xa0, 0x75e7,
7572
+ 0x760c, 0x7610, 0x7eff, 0xce31, 0xcea5, 0xceb6, 0xceb7 ],
7573
+ IS_SUBDIR => [ 0xceb8 ],
7357
7574
  WRITABLE => 1,
7358
7575
  FIRST_ENTRY => 0,
7359
7576
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -7370,7 +7587,7 @@ my %nikonFocalConversions = (
7370
7587
  Writable => 0,
7371
7588
  RawConv => '$$self{FirmwareVersion} = $val',
7372
7589
  },
7373
- 0x0E => {
7590
+ 0x0e => {
7374
7591
  Name => 'FirmwareVersion2',
7375
7592
  Format => 'string[8]',
7376
7593
  Writable => 0,
@@ -7385,12 +7602,28 @@ my %nikonFocalConversions = (
7385
7602
  Hidden => 1,
7386
7603
  },
7387
7604
  0x24 => {
7388
- Name => 'NumberOffsets', #number of entries in offset table. offsets are from start of ShotInfo data.
7605
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
7389
7606
  DataMember => 'NumberOffsets',
7390
7607
  Format => 'int32u',
7391
7608
  Writable => 0,
7392
7609
  Hidden => 1,
7393
7610
  },
7611
+ 0x30 => {
7612
+ Name => 'Offset3',
7613
+ DataMember => 'Offset3',
7614
+ Format => 'int32u',
7615
+ Writable => 0,
7616
+ Hidden => 1,
7617
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
7618
+ },
7619
+ 0x38 => {
7620
+ Name => 'Offset5',
7621
+ DataMember => 'Offset5',
7622
+ Format => 'int32u',
7623
+ Writable => 0,
7624
+ Hidden => 1,
7625
+ RawConv => '$$self{Offset5} = $val || 0x10000000; undef', # (ignore if 0)
7626
+ },
7394
7627
  0x98 => {
7395
7628
  Name => 'OrientationOffset',
7396
7629
  DataMember => 'OrientationOffset',
@@ -7399,12 +7632,70 @@ my %nikonFocalConversions = (
7399
7632
  Hidden => 1,
7400
7633
  RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
7401
7634
  },
7402
-
7403
- ### 0xce32 - OrientationInfo start (Z7_2 firmware 1.00)
7404
- 0xce31 => {
7635
+ 0xa0 => {
7636
+ Name => 'Offset31',
7637
+ DataMember => 'Offset31',
7638
+ Format => 'int32u',
7639
+ Writable => 0,
7640
+ Hidden => 1,
7641
+ RawConv => '$$self{Offset31} = $val || 0x10000000; undef', # (ignore if 0)
7642
+ },
7643
+ ### 0x75e8 - Offset3 info start (Z7_2 firmware 1.30)
7644
+ 0x75e7 => {
7405
7645
  Name => 'Hook1',
7406
7646
  Hidden => 1,
7407
7647
  RawConv => 'undef',
7648
+ # account for variable location of Offset5 data
7649
+ Hook => '$varSize = $$self{Offset3} - 0x75e8',
7650
+ },
7651
+ 0x760c => {
7652
+ Name => 'IntervalShooting',
7653
+ RawConv => '$$self{IntervalShooting} = $val',
7654
+ Format => 'int16u',
7655
+ PrintConv => q{
7656
+ return 'Off' if $val == 0 ;
7657
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); # something like "Interval 1 of 3"
7658
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; # something like "Frame 1 of 3" or blank
7659
+ return "On: $i$f"
7660
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
7661
+ },
7662
+ },
7663
+ 0x7610 => {
7664
+ Name => 'IntervalFrame',
7665
+ RawConv => '$$self{IntervalFrame} = $val',
7666
+ Condition => '$$self{IntervalShooting} > 0',
7667
+ Format => 'int16u',
7668
+ Hidden => 1,
7669
+ },
7670
+ ### 0x7f00 - Offset5 info start (Z7_2 firmware 1.30)
7671
+ 0x7eff => {
7672
+ Name => 'Hook2',
7673
+ Hidden => 1,
7674
+ RawConv => 'undef',
7675
+ # account for variable location of Offset5 data
7676
+ Hook => '$varSize = $$self{Offset5} - 0x7f00',
7677
+ },
7678
+ 0x7fa0 => { #28
7679
+ 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
7680
+ # offset5+160; 128 is neutral; >128 increases Yellow; <128 increases Magenta; increments of 4 result from 1 full unit adjustment on the camera
7681
+ # offset5+161 128 is neutral; >128 increases Brightness; <128 decreases Brightness
7682
+ # 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]
7683
+ Format => 'int8u[2]',
7684
+ Condition => '$$self{FirmwareVersion} ge "01.30"',
7685
+ PrintConv => q{
7686
+ return 'Off' if $val eq '0 0' or $val eq '255 255';
7687
+ my @v = split ' ', $val;
7688
+ my $brightness = $v[1]==128 ? 'Brightness: Neutral' : sprintf('Brightness: %+.1f',($v[1]-128)/4);
7689
+ my $color = $v[0]==128 ? 'Color: Neutral' : sprintf('%s: %.1f', $v[0]>128 ? 'Yellow' : 'Magenta', abs($v[0]-128)/4);
7690
+ # will return something like: 'Magenta: 1.0 Brightness: Neutral'
7691
+ return "$color $brightness"
7692
+ },
7693
+ },
7694
+ ### 0xce32 - OrientationInfo start (Z7_2 firmware 1.00)
7695
+ 0xce31 => {
7696
+ Name => 'Hook3',
7697
+ Hidden => 1,
7698
+ RawConv => 'undef',
7408
7699
  # account for variable location of OrientationInfo data
7409
7700
  Hook => '$varSize = $$self{OrientationOffset} - 0xce32',
7410
7701
  },
@@ -7436,7 +7727,690 @@ my %nikonFocalConversions = (
7436
7727
  PrintConv => 'sprintf("%.1f", $val)',
7437
7728
  PrintConvInv => '$val',
7438
7729
  },
7439
- #note: DecryptLen currently set to 0xce32 + 12
7730
+ 0xcea5 => {
7731
+ Name => 'Hook4',
7732
+ Hidden => 1,
7733
+ RawConv => 'undef',
7734
+ # account for variable location of Offset31 data
7735
+ Hook => '$varSize = $$self{Offset31} - 0xcea6',
7736
+ },
7737
+ ### 0xcea6 - Offset31 info start (Z7_2 firmware 1.30)
7738
+ 0xceb6 => {
7739
+ Name => 'ZMenuSettingsOffset',
7740
+ # offset to ZMenuSettings is relative to start of Offset31 block
7741
+ RawConv => '$$self{ZMenuSettingsOffset} = ($val || 0x10000000) + $$self{Offset31}; undef', # (ignore if 0)
7742
+ },
7743
+ 0xceb7 => {
7744
+ Name => 'Hook5',
7745
+ Hidden => 1,
7746
+ RawConv => 'undef',
7747
+ # account for variable location of Offset5 data
7748
+ Hook => '$varSize = $$self{ZMenuSettingsOffset} - 0xceb8',
7749
+ },
7750
+ 0xceb8 => {
7751
+ Name => 'ZMenuSettings',
7752
+ SubDirectory => {
7753
+ TagTable => 'Image::ExifTool::Nikon::ZMenuSettings',
7754
+ },
7755
+ }
7756
+ # note: DecryptLen currently set to 0xcea6 + 1050
7757
+ );
7758
+
7759
+ %Image::ExifTool::Nikon::ZMenuSettings = (
7760
+ %binaryDataAttrs,
7761
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7762
+ NOTES => q{
7763
+ These tags are used by the Z5 Z6 Z7 Z6II Z7II Z50 Zfc
7764
+ },
7765
+ DATAMEMBER => [ 0xb0, 0xb4, 0x148, 0x160, 0x35a ],
7766
+ 160 => {
7767
+ Name => 'IntervalDurationHours',
7768
+ Format => 'int32u',
7769
+ Condition => '$$self{IntervalShooting} > 0',
7770
+ },
7771
+ 164 => {
7772
+ Name => 'IntervalDurationMinutes',
7773
+ Format => 'int32u',
7774
+ Condition => '$$self{IntervalShooting} > 0',
7775
+ },
7776
+ 168 => {
7777
+ Name => 'IntervalDurationSeconds',
7778
+ Format => 'int32u',
7779
+ Condition => '$$self{IntervalShooting} > 0',
7780
+ },
7781
+ 176 => {
7782
+ Name => 'Intervals',
7783
+ Format => 'int32u',
7784
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
7785
+ Condition => '$$self{IntervalShooting} > 0',
7786
+ },
7787
+ 180 => {
7788
+ Name => 'ShotsPerInterval',
7789
+ Format => 'int32u',
7790
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
7791
+ Condition => '$$self{IntervalShooting} > 0',
7792
+ },
7793
+ 184 => {
7794
+ Name => 'IntervalExposureSmoothing',
7795
+ Condition => '$$self{IntervalShooting} > 0',
7796
+ Format => 'int8u',
7797
+ PrintConv => \%offOn,
7798
+ },
7799
+ 186 => {
7800
+ Name => 'IntervalPriority',
7801
+ Condition => '$$self{IntervalShooting} > 0',
7802
+ Format => 'int8u',
7803
+ PrintConv => \%offOn,
7804
+ },
7805
+ 220 => {
7806
+ Name => 'FocusShiftNumberShots',
7807
+ },
7808
+ 224 => {
7809
+ Name => 'FocusShiftStepWidth',
7810
+ },
7811
+ 228 => {
7812
+ Name => 'FocusShiftInterval',
7813
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
7814
+ },
7815
+ 232 => {
7816
+ Name => 'FocusShiftExposureLock',
7817
+ PrintConv => \%offOn,
7818
+ },
7819
+ #304 => White Balance - Kelvin Temp
7820
+ #312 => ColorSpace
7821
+ #314 => ActiveD-Lighting
7822
+ #318 => HighISONoiseReduction
7823
+ 322 => {
7824
+ Name => 'DiffractionCompensation',
7825
+ Format => 'int8u',
7826
+ PrintConv => \%offOn,
7827
+ },
7828
+ 323 => {
7829
+ Name => 'AutoDistortionControl',
7830
+ Format => 'int8u',
7831
+ PrintConv => \%offOn,
7832
+ },
7833
+ #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
7834
+ 326 => {
7835
+ Name => 'NikonMeteringMode',
7836
+ Unknown => 1,
7837
+ PrintConv => {
7838
+ 0 => 'Matrix',
7839
+ 1 => 'Center',
7840
+ 2 => 'Spot',
7841
+ 3 => 'Highlight'
7842
+ },
7843
+ },
7844
+ 328 => {
7845
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
7846
+ RawConv => '$$self{FlashControlMode} = $val',
7847
+ PrintConv => {
7848
+ 0 => 'TTL',
7849
+ 1 => 'Auto External Flash',
7850
+ 2 => 'GN (distance priority)',
7851
+ 3 => 'Manual',
7852
+ 4 => 'Repeating Flash',
7853
+ },
7854
+ },
7855
+ 334 => {
7856
+ Name => 'FlashGNDistance',
7857
+ Condition => '$$self{FlashControlMode} == 2',
7858
+ Unknown => 1,
7859
+ ValueConv => '$val + 3',
7860
+ PrintConv => \%flashGNDistance,
7861
+ },
7862
+ 338 => {
7863
+ 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)
7864
+ Condition => '$$self{FlashControlMode} >= 3',
7865
+ Unknown => 1,
7866
+ ValueConv => '2 ** (-$val/3)',
7867
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
7868
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
7869
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7870
+ },
7871
+ 346 => {
7872
+ Name => 'FlashWirelessOption', # also found in FlashInfoUnknown at offset 0x23 (with different mappings)
7873
+ Unknown => 1,
7874
+ PrintConv => {
7875
+ 0 => 'Off',
7876
+ 1 => 'Optical AWL',
7877
+ 2 => 'Optical/Radio AWL',
7878
+ 3 => 'Radio AWL'
7879
+ },
7880
+ },
7881
+ 348 => {
7882
+ Name => 'FlashRemoteControl', # also found in FlashInfoUnknown at offset 0x1e (with different mappings)
7883
+ Unknown => 1,
7884
+ PrintConv => {
7885
+ 0 => 'Group',
7886
+ 1 => 'Quick Wireless',
7887
+ 2 => 'Remote Repeating',
7888
+ },
7889
+ },
7890
+ 352 => {
7891
+ Name => 'FlashMasterControlMode', # tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
7892
+ RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
7893
+ PrintConv => \%flashGroupOptionsMode,
7894
+ },
7895
+ 354 => {
7896
+ Name => 'FlashMasterCompensation',
7897
+ Format => 'int8s',
7898
+ Condition => '$$self{FlashGroupOptionsMasterMode} != 3', # other than 'Off'
7899
+ Unknown => 1,
7900
+ ValueConv => '$val/6',
7901
+ ValueConvInv => '6 * $val',
7902
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
7903
+ PrintConvInv => '$val',
7904
+ },
7905
+ 358 => {
7906
+ Name => 'FlashMasterOutput',
7907
+ Unknown => 1,
7908
+ Condition => '$$self{FlashGroupOptionsMasterMode} == 1', # only for Mode=M
7909
+ ValueConv => '2 ** (-$val/3)',
7910
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
7911
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
7912
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7913
+ },
7914
+ #360 => {Name => 'FlashGroupAControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupACompensation at 362 and FlashGroupAOutput at 368
7915
+ #368 => {Name => 'FlashGroupBControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupBCompensation at 370 and FlashGroupBOutput at 374
7916
+ #376 => {Name => 'FlashGroupCControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupCCompensation at 378 and FlashGroupCOutput at 382
7917
+ #384 => {Name => 'FlashGroupDControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupDCompensation at 386 and FlashGroupDOutput at 390
7918
+ #392 => {Name => 'FlashGroupEControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupECompensation at 394 and FlashGroupEOutput at 398
7919
+ #400 => {Name => 'FlashGroupFControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupFCompensation at 402 and FlashGroupFOutput at 406
7920
+ #434 => FocusMode
7921
+ #436 => AFAreaMode
7922
+ #438 => VibrationReduction
7923
+ #442 => BracketSet
7924
+ #444 => BracketProgram
7925
+ #446 => BracketIncrement
7926
+ #463 => SilentPhotography
7927
+ 502 => {
7928
+ Name => 'MovieFrameSize', # may want to rename or suppress the movie menu settings - potentially confusing for still photographers
7929
+ Unknown => 1,
7930
+ PrintConv => {
7931
+ 1 => '1920x1080',
7932
+ 2 => '3840x2160',
7933
+ },
7934
+ },
7935
+ 504 => {
7936
+ Name => 'MovieFrameRate',
7937
+ Unknown => 1,
7938
+ PrintConv => {
7939
+ 0 => '120p',
7940
+ 1 => '100p',
7941
+ 2 => '60p',
7942
+ 3 => '50p',
7943
+ 4 => '30p',
7944
+ 5 => '25p',
7945
+ 6 => '24p',
7946
+ },
7947
+ },
7948
+ 506 => {
7949
+ Name => 'MovieSlowMotion',
7950
+ Unknown => 1,
7951
+ PrintConv => {
7952
+ 0 => 'Off',
7953
+ 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]
7954
+ 2 => 'On (5x)', # 120p recording with playback @ 24p [1920 x 1080; 20p x 5]
7955
+ },
7956
+ },
7957
+ 510 => {
7958
+ Name => 'MovieType',
7959
+ Unknown => 1,
7960
+ PrintConv => {
7961
+ 0 => 'MOV',
7962
+ 1 => 'MP4',
7963
+ },
7964
+ },
7965
+ #512 => MovieISOAutoHiLimit
7966
+ 516 => {
7967
+ Name => 'MovieISOAutoManualMode',
7968
+ Condition => '$$self{Model} =~ /^NIKON 7/', #ISO ranges vary by model. These mappings are for the Z7 and Z7II
7969
+ Format => 'int16u',
7970
+ Unknown => 1,
7971
+ ValueConv => '($val-104)/8',
7972
+ PrintConv => {
7973
+ 0 => 'ISO 64',
7974
+ 1 => 'ISO 80',
7975
+ 2 => 'ISO 100',
7976
+ 3 => 'ISO 125',
7977
+ 4 => 'ISO 160',
7978
+ 5 => 'ISO 200',
7979
+ 6 => 'ISO 250',
7980
+ 7 => 'ISO 320',
7981
+ 8 => 'ISO 400',
7982
+ 9 => 'ISO 500',
7983
+ 10 => 'ISO 640',
7984
+ 11 => 'ISO 800',
7985
+ 12 => 'ISO 1000',
7986
+ 13 => 'ISO 1250',
7987
+ 14 => 'ISO 1600',
7988
+ 15 => 'ISO 2000',
7989
+ 16 => 'ISO 2500',
7990
+ 17 => 'ISO 3200',
7991
+ 18 => 'ISO 4000',
7992
+ 19 => 'ISO 5000',
7993
+ 20 => 'ISO 6400',
7994
+ 21 => 'ISO 8000',
7995
+ 22 => 'ISO 10000',
7996
+ 23 => 'ISO 12800',
7997
+ 24 => 'ISO 16000',
7998
+ 25 => 'ISO 20000',
7999
+ 26 => 'ISO 25600',
8000
+ 27 => 'ISO Hi 0.3',
8001
+ 28 => 'ISO Hi 0.7',
8002
+ 29 => 'ISO Hi 1.0',
8003
+ 32 => 'ISO Hi 2.0',
8004
+ },
8005
+ },
8006
+ #520 => MovieWhiteBalanceSameAsPhoto
8007
+ 568 => {
8008
+ Name => 'MovieActiveD-Lighting',
8009
+ Unknown => 1,
8010
+ PrintConv => {
8011
+ 0 => 'Off',
8012
+ 2 => 'Low',
8013
+ 3 => 'Normal',
8014
+ 4 => 'High',
8015
+ 5 => 'Extra High',
8016
+ },
8017
+ },
8018
+ 572 => {
8019
+ Name => 'MovieHighISONoiseReduction',
8020
+ Unknown => 1,
8021
+ PrintConv => {
8022
+ 0 => 'Off',
8023
+ 1 => 'Low',
8024
+ 2 => 'Normal',
8025
+ 3 => 'High',
8026
+ },
8027
+ },
8028
+ 574=> {
8029
+ Name => 'MovieVignetteControl',
8030
+ Unknown => 1,
8031
+ PrintConv => {
8032
+ 0 => 'Off',
8033
+ 1 => 'Low',
8034
+ 2 => 'Normal',
8035
+ 3 => 'High',
8036
+ },
8037
+ },
8038
+ 576 => {
8039
+ Name => 'MovieVignetteControlSameAsPhoto',
8040
+ Unknown => 1,
8041
+ PrintConv => \%noYes
8042
+ },
8043
+ 5771 => {
8044
+ Name => 'MovieDiffrationCompensation',
8045
+ Unknown => 1,
8046
+ PrintConv => \%offOn
8047
+ },
8048
+ 578 => {
8049
+ Name => 'MovieAutoDistortionControl',
8050
+ Unknown => 1,
8051
+ PrintConv => \%offOn
8052
+ },
8053
+ 584 => {
8054
+ Name => 'MovieFocusMode',
8055
+ Unknown => 1,
8056
+ PrintConv => {
8057
+ 0 => 'Manual',
8058
+ 1 => 'AF-S',
8059
+ 2 => 'AF-C',
8060
+ 4 => 'AF-F', # full frame
8061
+ },
8062
+ },
8063
+ #586 => MovieAFAreaMode
8064
+ 590 => {
8065
+ Name => 'MovieVibrationReduction',
8066
+ Unknown => 1,
8067
+ PrintConv => {
8068
+ 0 => 'Off',
8069
+ 1 => 'On (Normal)',
8070
+ 2 => 'On (Sport)',
8071
+ },
8072
+ },
8073
+ 591 => {
8074
+ Name => 'MovieVibrationReductionSameAsPhoto',
8075
+ Unknown => 1,
8076
+ PrintConv => \%noYes
8077
+ },
8078
+ #848 => HDMIOutputResolution
8079
+ #850 => HDMIOutputRange
8080
+ #854 => HDMIExternalRecorder
8081
+ #856 => HDMIBitDepth
8082
+ 858 => {
8083
+ 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
8084
+ Condition => '$$self{HDMIBitDepth} and $$self{HDMIBitDepth} == 2', # only for 10 bit
8085
+ RawConv => '$$self{HDMIOutputNLog} = $val',
8086
+ Unknown => 1,
8087
+ PrintConv => \%offOn,
8088
+ },
8089
+ #859 => HDMIViewAssist
8090
+ );
8091
+ # Flash information (ref JD)
8092
+ %Image::ExifTool::Nikon::FlashInfo0100 = (
8093
+ %binaryDataAttrs,
8094
+ DATAMEMBER => [ 9.2, 15, 16 ],
8095
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8096
+ NOTES => q{
8097
+ These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
8098
+ D200.
8099
+ },
8100
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8101
+ 0 => {
8102
+ Name => 'FlashInfoVersion',
8103
+ Format => 'string[4]',
8104
+ Writable => 0,
8105
+ },
8106
+ 4 => { #PH
8107
+ Name => 'FlashSource',
8108
+ PrintConv => {
8109
+ 0 => 'None',
8110
+ 1 => 'External',
8111
+ 2 => 'Internal',
8112
+ },
8113
+ },
8114
+ # 5 - values: 46,48,50,54,78
8115
+ 6 => {
8116
+ Format => 'int8u[2]',
8117
+ Name => 'ExternalFlashFirmware',
8118
+ SeparateTable => 'FlashFirmware',
8119
+ PrintConv => \%flashFirmware,
8120
+ },
8121
+ 8 => {
8122
+ Name => 'ExternalFlashFlags',
8123
+ PrintConv => { 0 => '(none)',
8124
+ BITMASK => {
8125
+ 0 => 'Fired', #28
8126
+ 2 => 'Bounce Flash', #PH
8127
+ 4 => 'Wide Flash Adapter',
8128
+ 5 => 'Dome Diffuser', #28
8129
+ },
8130
+ },
8131
+ },
8132
+ 9.1 => {
8133
+ Name => 'FlashCommanderMode',
8134
+ Mask => 0x80,
8135
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8136
+ },
8137
+ 9.2 => {
8138
+ Name => 'FlashControlMode',
8139
+ Mask => 0x7f,
8140
+ DataMember => 'FlashControlMode',
8141
+ RawConv => '$$self{FlashControlMode} = $val',
8142
+ PrintConv => \%flashControlMode,
8143
+ SeparateTable => 'FlashControlMode',
8144
+ },
8145
+ 10 => [
8146
+ {
8147
+ Name => 'FlashOutput',
8148
+ Condition => '$$self{FlashControlMode} >= 0x06',
8149
+ ValueConv => '2 ** (-$val/6)',
8150
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8151
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8152
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8153
+ },
8154
+ {
8155
+ Name => 'FlashCompensation',
8156
+ Format => 'int8s',
8157
+ Priority => 0,
8158
+ ValueConv => '-$val/6',
8159
+ ValueConvInv => '-6 * $val',
8160
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8161
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8162
+ },
8163
+ ],
8164
+ 11 => {
8165
+ Name => 'FlashFocalLength',
8166
+ RawConv => '$val ? $val : undef',
8167
+ PrintConv => '"$val mm"',
8168
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8169
+ },
8170
+ 12 => {
8171
+ Name => 'RepeatingFlashRate',
8172
+ RawConv => '$val ? $val : undef',
8173
+ PrintConv => '"$val Hz"',
8174
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8175
+ },
8176
+ 13 => {
8177
+ Name => 'RepeatingFlashCount',
8178
+ RawConv => '$val ? $val : undef',
8179
+ },
8180
+ 14 => { #PH
8181
+ Name => 'FlashGNDistance',
8182
+ SeparateTable => 1,
8183
+ PrintConv => \%flashGNDistance,
8184
+ },
8185
+ 15 => {
8186
+ Name => 'FlashGroupAControlMode',
8187
+ Mask => 0x0f,
8188
+ DataMember => 'FlashGroupAControlMode',
8189
+ RawConv => '$$self{FlashGroupAControlMode} = $val',
8190
+ PrintConv => \%flashControlMode,
8191
+ SeparateTable => 'FlashControlMode',
8192
+ },
8193
+ 16 => {
8194
+ Name => 'FlashGroupBControlMode',
8195
+ Mask => 0x0f,
8196
+ DataMember => 'FlashGroupBControlMode',
8197
+ RawConv => '$$self{FlashGroupBControlMode} = $val',
8198
+ PrintConv => \%flashControlMode,
8199
+ SeparateTable => 'FlashControlMode',
8200
+ },
8201
+ 17 => [
8202
+ {
8203
+ Name => 'FlashGroupAOutput',
8204
+ Condition => '$$self{FlashGroupAControlMode} >= 0x06',
8205
+ ValueConv => '2 ** (-$val/6)',
8206
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8207
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8208
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8209
+ },
8210
+ {
8211
+ Name => 'FlashGroupACompensation',
8212
+ Format => 'int8s',
8213
+ ValueConv => '-$val/6',
8214
+ ValueConvInv => '-6 * $val',
8215
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8216
+ PrintConvInv => '$val',
8217
+ },
8218
+ ],
8219
+ 18 => [
8220
+ {
8221
+ Name => 'FlashGroupBOutput',
8222
+ Condition => '$$self{FlashGroupBControlMode} >= 0x06',
8223
+ ValueConv => '2 ** (-$val/6)',
8224
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8225
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8226
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8227
+ },
8228
+ {
8229
+ Name => 'FlashGroupBCompensation',
8230
+ Format => 'int8s',
8231
+ ValueConv => '-$val/6',
8232
+ ValueConvInv => '-6 * $val',
8233
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8234
+ PrintConvInv => '$val',
8235
+ },
8236
+ ],
8237
+ );
8238
+
8239
+ # Flash information for D40, D40x, D3 and D300 (ref JD)
8240
+ %Image::ExifTool::Nikon::FlashInfo0102 = (
8241
+ %binaryDataAttrs,
8242
+ DATAMEMBER => [ 9.2, 16.1, 17.1, 17.2 ],
8243
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8244
+ NOTES => q{
8245
+ These tags are used by the D3 (firmware 1.x), D40, D40X, D60 and D300
8246
+ (firmware 1.00).
8247
+ },
8248
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8249
+ 0 => {
8250
+ Name => 'FlashInfoVersion',
8251
+ Format => 'string[4]',
8252
+ Writable => 0,
8253
+ },
8254
+ 4 => { #PH
8255
+ Name => 'FlashSource',
8256
+ PrintConv => {
8257
+ 0 => 'None',
8258
+ 1 => 'External',
8259
+ 2 => 'Internal',
8260
+ },
8261
+ },
8262
+ # 5 - values: 46,48,50,54,78
8263
+ 6 => {
8264
+ Format => 'int8u[2]',
8265
+ Name => 'ExternalFlashFirmware',
8266
+ SeparateTable => 'FlashFirmware',
8267
+ PrintConv => \%flashFirmware,
8268
+ },
8269
+ 8 => {
8270
+ Name => 'ExternalFlashFlags',
8271
+ PrintConv => { BITMASK => {
8272
+ 0 => 'Fired', #28
8273
+ 2 => 'Bounce Flash', #PH
8274
+ 4 => 'Wide Flash Adapter',
8275
+ 5 => 'Dome Diffuser', #28
8276
+ }},
8277
+ },
8278
+ 9.1 => {
8279
+ Name => 'FlashCommanderMode',
8280
+ Mask => 0x80,
8281
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8282
+ },
8283
+ 9.2 => {
8284
+ Name => 'FlashControlMode',
8285
+ Mask => 0x7f,
8286
+ DataMember => 'FlashControlMode',
8287
+ RawConv => '$$self{FlashControlMode} = $val',
8288
+ PrintConv => \%flashControlMode,
8289
+ SeparateTable => 'FlashControlMode',
8290
+ },
8291
+ 10 => [
8292
+ {
8293
+ Name => 'FlashOutput',
8294
+ Condition => '$$self{FlashControlMode} >= 0x06',
8295
+ ValueConv => '2 ** (-$val/6)',
8296
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8297
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8298
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8299
+ },
8300
+ {
8301
+ Name => 'FlashCompensation',
8302
+ # this is the compensation from the camera (0x0012) for "Built-in" FlashType, or
8303
+ # the compensation from the external unit (0x0017) for "Optional" FlashType - PH
8304
+ Format => 'int8s',
8305
+ Priority => 0,
8306
+ ValueConv => '-$val/6',
8307
+ ValueConvInv => '-6 * $val',
8308
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8309
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8310
+ },
8311
+ ],
8312
+ 12 => {
8313
+ Name => 'FlashFocalLength',
8314
+ RawConv => '$val ? $val : undef',
8315
+ PrintConv => '"$val mm"',
8316
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8317
+ },
8318
+ 13 => {
8319
+ Name => 'RepeatingFlashRate',
8320
+ RawConv => '$val ? $val : undef',
8321
+ PrintConv => '"$val Hz"',
8322
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8323
+ },
8324
+ 14 => {
8325
+ Name => 'RepeatingFlashCount',
8326
+ RawConv => '$val ? $val : undef',
8327
+ },
8328
+ 15 => { #PH
8329
+ Name => 'FlashGNDistance',
8330
+ SeparateTable => 1,
8331
+ PrintConv => \%flashGNDistance,
8332
+ },
8333
+ 16.1 => {
8334
+ Name => 'FlashGroupAControlMode',
8335
+ Mask => 0x0f,
8336
+ Notes => 'note: group A tags may apply to the built-in flash settings for some models',
8337
+ DataMember => 'FlashGroupAControlMode',
8338
+ RawConv => '$$self{FlashGroupAControlMode} = $val',
8339
+ PrintConv => \%flashControlMode,
8340
+ SeparateTable => 'FlashControlMode',
8341
+ },
8342
+ 17.1 => {
8343
+ Name => 'FlashGroupBControlMode',
8344
+ Mask => 0xf0,
8345
+ Notes => 'note: group B tags may apply to group A settings for some models',
8346
+ DataMember => 'FlashGroupBControlMode',
8347
+ RawConv => '$$self{FlashGroupBControlMode} = $val',
8348
+ PrintConv => \%flashControlMode,
8349
+ SeparateTable => 'FlashControlMode',
8350
+ },
8351
+ 17.2 => { #PH
8352
+ Name => 'FlashGroupCControlMode',
8353
+ Mask => 0x0f,
8354
+ Notes => 'note: group C tags may apply to group B settings for some models',
8355
+ DataMember => 'FlashGroupCControlMode',
8356
+ RawConv => '$$self{FlashGroupCControlMode} = $val',
8357
+ PrintConv => \%flashControlMode,
8358
+ SeparateTable => 'FlashControlMode',
8359
+ },
8360
+ 18 => [
8361
+ {
8362
+ Name => 'FlashGroupAOutput',
8363
+ Condition => '$$self{FlashGroupAControlMode} >= 0x06',
8364
+ ValueConv => '2 ** (-$val/6)',
8365
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8366
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8367
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8368
+ },
8369
+ {
8370
+ Name => 'FlashGroupACompensation',
8371
+ Format => 'int8s',
8372
+ ValueConv => '-$val/6',
8373
+ ValueConvInv => '-6 * $val',
8374
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8375
+ PrintConvInv => '$val',
8376
+ },
8377
+ ],
8378
+ 19 => [
8379
+ {
8380
+ Name => 'FlashGroupBOutput',
8381
+ Condition => '$$self{FlashGroupBControlMode} >= 0x60',
8382
+ ValueConv => '2 ** (-$val/6)',
8383
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8384
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8385
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8386
+ },
8387
+ {
8388
+ Name => 'FlashGroupBCompensation',
8389
+ Format => 'int8s',
8390
+ ValueConv => '-$val/6',
8391
+ ValueConvInv => '-6 * $val',
8392
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8393
+ PrintConvInv => '$val',
8394
+ },
8395
+ ],
8396
+ 20 => [ #PH
8397
+ {
8398
+ Name => 'FlashGroupCOutput',
8399
+ Condition => '$$self{FlashGroupCControlMode} >= 0x06',
8400
+ ValueConv => '2 ** (-$val/6)',
8401
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8402
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8403
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8404
+ },
8405
+ {
8406
+ Name => 'FlashGroupCCompensation',
8407
+ Format => 'int8s',
8408
+ ValueConv => '-$val/6',
8409
+ ValueConvInv => '-6 * $val',
8410
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8411
+ PrintConvInv => '$val',
8412
+ },
8413
+ ],
7440
8414
  );
7441
8415
 
7442
8416
  # Flash information (ref JD)