exiftool_vendored 12.36.0 → 12.37.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.01';
65
+ $VERSION = '4.02';
66
66
 
67
67
  sub LensIDConv($$$);
68
68
  sub ProcessNikonAVI($$$);
@@ -1890,7 +1890,8 @@ my %binaryDataAttrs = (
1890
1890
  },
1891
1891
  },
1892
1892
  { # (Z6_2 firmware version 1.00 and Z7_2 firmware versions 1.00 & 1.01, ref 28)
1893
- Condition => '$$valPt =~ /^0800/ or $$valPt =~ /^0803/',
1893
+ # 0800=Z6/Z7 0801=Z50 0802=Z5 0803=Z6II/Z7II 0804=Zfc
1894
+ Condition => '$$valPt =~ /^080[01234]/',
1894
1895
  Name => 'ShotInfoZ7_2',
1895
1896
  SubDirectory => {
1896
1897
  TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7_2',
@@ -7567,8 +7568,9 @@ my %nikonFocalConversions = (
7567
7568
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7568
7569
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7569
7570
  VARS => { ID_LABEL => 'Index' },
7570
- DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x30, 0x38, 0x98, 0xa0, 0x75e7, 0x760c, 0x7610, 0x7eff,
7571
- 0xce31, 0xcea5, 0xd00e, 0xd012, 0xd0a6, 0xd0be, 0xd2b8 ],
7571
+ DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x30, 0x38, 0x98, 0xa0, 0x75e7,
7572
+ 0x760c, 0x7610, 0x7eff, 0xce31, 0xcea5, 0xceb6, 0xceb7 ],
7573
+ IS_SUBDIR => [ 0xceb8 ],
7572
7574
  WRITABLE => 1,
7573
7575
  FIRST_ENTRY => 0,
7574
7576
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -7585,7 +7587,7 @@ my %nikonFocalConversions = (
7585
7587
  Writable => 0,
7586
7588
  RawConv => '$$self{FirmwareVersion} = $val',
7587
7589
  },
7588
- 0x0E => {
7590
+ 0x0e => {
7589
7591
  Name => 'FirmwareVersion2',
7590
7592
  Format => 'string[8]',
7591
7593
  Writable => 0,
@@ -7725,83 +7727,111 @@ my %nikonFocalConversions = (
7725
7727
  PrintConv => 'sprintf("%.1f", $val)',
7726
7728
  PrintConvInv => '$val',
7727
7729
  },
7728
- ### 0xcea6 - Offset31 info start (Z7_2 firmware 1.30) -- seems to include items from the Settings, Photo Shooting and Movie Shooting Menus. Some tags are duplicated in NikonSettings, otherr tags are only found in one block or the other. Further investigation required as to why the split.
7729
7730
  0xcea5 => {
7730
7731
  Name => 'Hook4',
7731
7732
  Hidden => 1,
7732
7733
  RawConv => 'undef',
7733
- # account for variable location of Offset5 data
7734
+ # account for variable location of Offset31 data
7734
7735
  Hook => '$varSize = $$self{Offset31} - 0xcea6',
7735
7736
  },
7736
- 0xcffe => {
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 => {
7737
7767
  Name => 'IntervalDurationHours',
7738
7768
  Format => 'int32u',
7739
7769
  Condition => '$$self{IntervalShooting} > 0',
7740
7770
  },
7741
- 0xd002 => {
7771
+ 164 => {
7742
7772
  Name => 'IntervalDurationMinutes',
7743
7773
  Format => 'int32u',
7744
7774
  Condition => '$$self{IntervalShooting} > 0',
7745
7775
  },
7746
- 0xd006 => {
7776
+ 168 => {
7747
7777
  Name => 'IntervalDurationSeconds',
7748
7778
  Format => 'int32u',
7749
7779
  Condition => '$$self{IntervalShooting} > 0',
7750
7780
  },
7751
- 0xd00e => {
7781
+ 176 => {
7752
7782
  Name => 'Intervals',
7753
7783
  Format => 'int32u',
7754
7784
  RawConv => '$$self{IntervalShootingIntervals} = $val',
7755
7785
  Condition => '$$self{IntervalShooting} > 0',
7756
7786
  },
7757
- 0xd012 => {
7787
+ 180 => {
7758
7788
  Name => 'ShotsPerInterval',
7759
7789
  Format => 'int32u',
7760
7790
  RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
7761
7791
  Condition => '$$self{IntervalShooting} > 0',
7762
7792
  },
7763
- 0xd016 => {
7793
+ 184 => {
7764
7794
  Name => 'IntervalExposureSmoothing',
7765
7795
  Condition => '$$self{IntervalShooting} > 0',
7766
7796
  Format => 'int8u',
7767
7797
  PrintConv => \%offOn,
7768
7798
  },
7769
- 0xd018 => {
7799
+ 186 => {
7770
7800
  Name => 'IntervalPriority',
7771
7801
  Condition => '$$self{IntervalShooting} > 0',
7772
7802
  Format => 'int8u',
7773
7803
  PrintConv => \%offOn,
7774
7804
  },
7775
- 0xd03a => {
7805
+ 220 => {
7776
7806
  Name => 'FocusShiftNumberShots',
7777
7807
  },
7778
- 0xd03e => {
7808
+ 224 => {
7779
7809
  Name => 'FocusShiftStepWidth',
7780
7810
  },
7781
- 0xd042 => {
7811
+ 228 => {
7782
7812
  Name => 'FocusShiftInterval',
7783
7813
  PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
7784
7814
  },
7785
- 0xd046 => {
7815
+ 232 => {
7786
7816
  Name => 'FocusShiftExposureLock',
7787
7817
  PrintConv => \%offOn,
7788
7818
  },
7789
- #0xd08e => White Balance - Kelvin Temp
7790
- #0xd096 => ColorSpace
7791
- #0xd098 => ActiveD-Lighting
7792
- #0xd09c => HighISONoiseReduction
7793
- 0xd0a0 => {
7819
+ #304 => White Balance - Kelvin Temp
7820
+ #312 => ColorSpace
7821
+ #314 => ActiveD-Lighting
7822
+ #318 => HighISONoiseReduction
7823
+ 322 => {
7794
7824
  Name => 'DiffractionCompensation',
7795
7825
  Format => 'int8u',
7796
7826
  PrintConv => \%offOn,
7797
7827
  },
7798
- 0xd0a1 => {
7828
+ 323 => {
7799
7829
  Name => 'AutoDistortionControl',
7800
7830
  Format => 'int8u',
7801
7831
  PrintConv => \%offOn,
7802
7832
  },
7803
- #0xd0a2 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
7804
- 0xd0a4 => {
7833
+ #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
7834
+ 326 => {
7805
7835
  Name => 'NikonMeteringMode',
7806
7836
  Unknown => 1,
7807
7837
  PrintConv => {
@@ -7811,7 +7841,7 @@ my %nikonFocalConversions = (
7811
7841
  3 => 'Highlight'
7812
7842
  },
7813
7843
  },
7814
- 0xd0a6 => {
7844
+ 328 => {
7815
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
7816
7846
  RawConv => '$$self{FlashControlMode} = $val',
7817
7847
  PrintConv => {
@@ -7822,14 +7852,14 @@ my %nikonFocalConversions = (
7822
7852
  4 => 'Repeating Flash',
7823
7853
  },
7824
7854
  },
7825
- 0xd0ac => {
7855
+ 334 => {
7826
7856
  Name => 'FlashGNDistance',
7827
7857
  Condition => '$$self{FlashControlMode} == 2',
7828
7858
  Unknown => 1,
7829
7859
  ValueConv => '$val + 3',
7830
7860
  PrintConv => \%flashGNDistance,
7831
7861
  },
7832
- 0xd0b0 => {
7862
+ 338 => {
7833
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)
7834
7864
  Condition => '$$self{FlashControlMode} >= 3',
7835
7865
  Unknown => 1,
@@ -7838,7 +7868,7 @@ my %nikonFocalConversions = (
7838
7868
  PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
7839
7869
  PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7840
7870
  },
7841
- 0xd0b8 => {
7871
+ 346 => {
7842
7872
  Name => 'FlashWirelessOption', # also found in FlashInfoUnknown at offset 0x23 (with different mappings)
7843
7873
  Unknown => 1,
7844
7874
  PrintConv => {
@@ -7848,7 +7878,7 @@ my %nikonFocalConversions = (
7848
7878
  3 => 'Radio AWL'
7849
7879
  },
7850
7880
  },
7851
- 0xd0ba => {
7881
+ 348 => {
7852
7882
  Name => 'FlashRemoteControl', # also found in FlashInfoUnknown at offset 0x1e (with different mappings)
7853
7883
  Unknown => 1,
7854
7884
  PrintConv => {
@@ -7857,12 +7887,12 @@ my %nikonFocalConversions = (
7857
7887
  2 => 'Remote Repeating',
7858
7888
  },
7859
7889
  },
7860
- 0xd0be => {
7890
+ 352 => {
7861
7891
  Name => 'FlashMasterControlMode', # tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
7862
7892
  RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
7863
7893
  PrintConv => \%flashGroupOptionsMode,
7864
7894
  },
7865
- 0xd0c0 => {
7895
+ 354 => {
7866
7896
  Name => 'FlashMasterCompensation',
7867
7897
  Format => 'int8s',
7868
7898
  Condition => '$$self{FlashGroupOptionsMasterMode} != 3', # other than 'Off'
@@ -7872,7 +7902,7 @@ my %nikonFocalConversions = (
7872
7902
  PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
7873
7903
  PrintConvInv => '$val',
7874
7904
  },
7875
- 0xd0c4 => {
7905
+ 358 => {
7876
7906
  Name => 'FlashMasterOutput',
7877
7907
  Unknown => 1,
7878
7908
  Condition => '$$self{FlashGroupOptionsMasterMode} == 1', # only for Mode=M
@@ -7881,21 +7911,20 @@ my %nikonFocalConversions = (
7881
7911
  PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
7882
7912
  PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7883
7913
  },
7884
- #0xd0c6 => {Name => 'FlashGroupAControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupACompensation at 0xd0c8 and FlashGroupAOutput at 0xd0cc
7885
- #0xd0ce => {Name => 'FlashGroupBControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupBCompensation at 0xd0d0 and FlashGroupBOutput at 0xd0d4
7886
- #0xd0d6 => {Name => 'FlashGroupCControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupCCompensation at 0xd0d8 and FlashGroupCOutput at 0xd0dc
7887
- #0xd0de => {Name => 'FlashGroupDControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupDCompensation at 0xd0e0 and FlashGroupDOutput at 0xd0e4
7888
- #0xd0e6 => {Name => 'FlashGroupEControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupECompensation at 0xd0e8 and FlashGroupEOutput at 0xd0ec
7889
- #0xd0ee => {Name => 'FlashGroupFControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupFCompensation at 0xd0f0 and FlashGroupFOutput at 0xd0f4
7890
- #0xd09e => VignetteControl
7891
- #0xd110 => FocusMode
7892
- #0xd112 => AFAreaMode
7893
- #0xd114 => VibrationReduction
7894
- #0xd118 => BracketSet
7895
- #0xd11a => BracketProgram
7896
- #0xd11c => BracketIncrement
7897
- #0xd12d => SilentPhotography
7898
- 0xd154 => {
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 => {
7899
7928
  Name => 'MovieFrameSize', # may want to rename or suppress the movie menu settings - potentially confusing for still photographers
7900
7929
  Unknown => 1,
7901
7930
  PrintConv => {
@@ -7903,7 +7932,7 @@ my %nikonFocalConversions = (
7903
7932
  2 => '3840x2160',
7904
7933
  },
7905
7934
  },
7906
- 0xd156 => {
7935
+ 504 => {
7907
7936
  Name => 'MovieFrameRate',
7908
7937
  Unknown => 1,
7909
7938
  PrintConv => {
@@ -7916,7 +7945,7 @@ my %nikonFocalConversions = (
7916
7945
  6 => '24p',
7917
7946
  },
7918
7947
  },
7919
- 0xd158 => {
7948
+ 506 => {
7920
7949
  Name => 'MovieSlowMotion',
7921
7950
  Unknown => 1,
7922
7951
  PrintConv => {
@@ -7925,7 +7954,7 @@ my %nikonFocalConversions = (
7925
7954
  2 => 'On (5x)', # 120p recording with playback @ 24p [1920 x 1080; 20p x 5]
7926
7955
  },
7927
7956
  },
7928
- 0xd15c => {
7957
+ 510 => {
7929
7958
  Name => 'MovieType',
7930
7959
  Unknown => 1,
7931
7960
  PrintConv => {
@@ -7933,9 +7962,10 @@ my %nikonFocalConversions = (
7933
7962
  1 => 'MP4',
7934
7963
  },
7935
7964
  },
7936
- #0xd15e => MovieISOAutoHiLimit
7937
- 0xd162 => {
7965
+ #512 => MovieISOAutoHiLimit
7966
+ 516 => {
7938
7967
  Name => 'MovieISOAutoManualMode',
7968
+ Condition => '$$self{Model} =~ /^NIKON 7/', #ISO ranges vary by model. These mappings are for the Z7 and Z7II
7939
7969
  Format => 'int16u',
7940
7970
  Unknown => 1,
7941
7971
  ValueConv => '($val-104)/8',
@@ -7973,8 +8003,8 @@ my %nikonFocalConversions = (
7973
8003
  32 => 'ISO Hi 2.0',
7974
8004
  },
7975
8005
  },
7976
- #0xd166 => MovieWhiteBalanceSameAsPhoto
7977
- 0xd196 => {
8006
+ #520 => MovieWhiteBalanceSameAsPhoto
8007
+ 568 => {
7978
8008
  Name => 'MovieActiveD-Lighting',
7979
8009
  Unknown => 1,
7980
8010
  PrintConv => {
@@ -7985,7 +8015,7 @@ my %nikonFocalConversions = (
7985
8015
  5 => 'Extra High',
7986
8016
  },
7987
8017
  },
7988
- 0xd19a => {
8018
+ 572 => {
7989
8019
  Name => 'MovieHighISONoiseReduction',
7990
8020
  Unknown => 1,
7991
8021
  PrintConv => {
@@ -7995,7 +8025,7 @@ my %nikonFocalConversions = (
7995
8025
  3 => 'High',
7996
8026
  },
7997
8027
  },
7998
- 0xd19c => {
8028
+ 574=> {
7999
8029
  Name => 'MovieVignetteControl',
8000
8030
  Unknown => 1,
8001
8031
  PrintConv => {
@@ -8005,22 +8035,22 @@ my %nikonFocalConversions = (
8005
8035
  3 => 'High',
8006
8036
  },
8007
8037
  },
8008
- 0xd19e => {
8038
+ 576 => {
8009
8039
  Name => 'MovieVignetteControlSameAsPhoto',
8010
8040
  Unknown => 1,
8011
8041
  PrintConv => \%noYes
8012
8042
  },
8013
- 0xd19f => {
8043
+ 5771 => {
8014
8044
  Name => 'MovieDiffrationCompensation',
8015
8045
  Unknown => 1,
8016
8046
  PrintConv => \%offOn
8017
8047
  },
8018
- 0xd1a0 => {
8048
+ 578 => {
8019
8049
  Name => 'MovieAutoDistortionControl',
8020
8050
  Unknown => 1,
8021
8051
  PrintConv => \%offOn
8022
8052
  },
8023
- 0xd1a6 => {
8053
+ 584 => {
8024
8054
  Name => 'MovieFocusMode',
8025
8055
  Unknown => 1,
8026
8056
  PrintConv => {
@@ -8030,8 +8060,8 @@ my %nikonFocalConversions = (
8030
8060
  4 => 'AF-F', # full frame
8031
8061
  },
8032
8062
  },
8033
- #0xd1a8 => MovieAFAreaMode
8034
- 0xd1aa => {
8063
+ #586 => MovieAFAreaMode
8064
+ 590 => {
8035
8065
  Name => 'MovieVibrationReduction',
8036
8066
  Unknown => 1,
8037
8067
  PrintConv => {
@@ -8040,24 +8070,347 @@ my %nikonFocalConversions = (
8040
8070
  2 => 'On (Sport)',
8041
8071
  },
8042
8072
  },
8043
- 0xd1ad => {
8073
+ 591 => {
8044
8074
  Name => 'MovieVibrationReductionSameAsPhoto',
8045
8075
  Unknown => 1,
8046
8076
  PrintConv => \%noYes
8047
8077
  },
8048
- #0xd2ae => HDMIOutputResolution
8049
- #0xd2b0 => HDMIOutputRange
8050
- #0xd2b4 => HDMIExternalRecorder
8051
- #0xd2b6 => HDMIBitDepth
8052
- 0xd2b8 => {
8078
+ #848 => HDMIOutputResolution
8079
+ #850 => HDMIOutputRange
8080
+ #854 => HDMIExternalRecorder
8081
+ #856 => HDMIBitDepth
8082
+ 858 => {
8053
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
8054
8084
  Condition => '$$self{HDMIBitDepth} and $$self{HDMIBitDepth} == 2', # only for 10 bit
8055
8085
  RawConv => '$$self{HDMIOutputNLog} = $val',
8056
8086
  Unknown => 1,
8057
8087
  PrintConv => \%offOn,
8058
8088
  },
8059
- #0xd2b9 => HDMIViewAssist
8060
- # note: DecryptLen currently set to 0xcea6 + 1050
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
+ ],
8061
8414
  );
8062
8415
 
8063
8416
  # Flash information (ref JD)