exiftool_vendored 13.14.0 → 13.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -65,7 +65,7 @@ use Image::ExifTool::Exif;
65
65
  use Image::ExifTool::GPS;
66
66
  use Image::ExifTool::XMP;
67
67
 
68
- $VERSION = '4.40';
68
+ $VERSION = '4.41';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -3118,7 +3118,6 @@ my %base64coord = (
3118
3118
  Condition => '$$valPt =~ /^040[012]/',
3119
3119
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
3120
3120
  },{ #JD
3121
- # (expeed 5 processor cameras are version 0101, expeed 6 are version 03xx)
3122
3121
  Name => 'AFInfo2',
3123
3122
  # (this structure may be byte swapped when rewritten by CaptureNX)
3124
3123
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
@@ -4161,7 +4160,6 @@ my %base64coord = (
4161
4160
  DATAMEMBER => [ 0, 4, 6 ],
4162
4161
  NOTES => "These tags are written by Nikon DSLR's which have the live view feature.",
4163
4162
  0 => {
4164
- # (expeed 5 processor cameras are version 0101, expeed 6 are version 03xx)
4165
4163
  Name => 'AFInfo2Version',
4166
4164
  Format => 'undef[4]',
4167
4165
  Writable => 0,
@@ -5712,6 +5710,8 @@ my %nikonFocalConversions = (
5712
5710
  45 => 'Nikkor Z 600mm f/6.3 VR S', #28
5713
5711
  46 => 'Nikkor Z 135mm f/1.8 S Plena', #28
5714
5712
  48 => 'Nikkor Z 28-400mm f/4-8 VR', #30
5713
+ 51 => 'Nikkor Z 35mm f/1.4', #28
5714
+ 52 => 'Nikkor Z 50mm f/1.4', #28
5715
5715
  2305 => 'Laowa FFII 10mm F2.8 C&D Dreamer', #30
5716
5716
  32768 => 'Nikkor Z 400mm f/2.8 TC VR S TC-1.4x', #28
5717
5717
  32769 => 'Nikkor Z 600mm f/4 TC VR S TC-1.4x', #28
@@ -9071,13 +9071,23 @@ my %nikonFocalConversions = (
9071
9071
  },
9072
9072
  {
9073
9073
  Name => 'MenuSettingsOffsetZ9v4',
9074
- Notes => 'Firmware versions 4.0 and later',
9074
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "05.01"',
9075
+ Notes => 'Firmware versions 4.x and 5.0',
9075
9076
  Format => 'int32u',
9076
9077
  SubDirectory => {
9077
9078
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v4',
9078
9079
  Start => '$dirStart + $val',
9079
9080
  },
9080
9081
  },
9082
+ {
9083
+ Name => 'MenuSettingsOffsetZ9v4',
9084
+ Notes => 'Firmware versions 4.x and 5.0',
9085
+ Format => 'int32u',
9086
+ SubDirectory => {
9087
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v5',
9088
+ Start => '$dirStart + $val',
9089
+ },
9090
+ },
9081
9091
  ],
9082
9092
  );
9083
9093
 
@@ -10585,12 +10595,13 @@ my %nikonFocalConversions = (
10585
10595
  #1936 FocusPointDisplayOption3DTrackingColor CSa11-d 0=> 'White', 1= => 'Red'
10586
10596
  );
10587
10597
 
10598
+ # firmware version 4.x menu settings (ref 28)
10588
10599
  %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
10589
10600
  %binaryDataAttrs,
10590
10601
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10591
10602
  DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
10592
10603
  IS_SUBDIR => [ 847 ],
10593
- NOTES => 'These tags are used by the Z9 firmware 4.0.0 and 4.1.0',
10604
+ NOTES => 'These tags are used by the Z9 firmware 4.0.0 and 4.1.0.',
10594
10605
  72 => {
10595
10606
  Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10596
10607
  PrintConv => \%highFrameRateZ9,
@@ -10896,6 +10907,318 @@ my %nikonFocalConversions = (
10896
10907
  2072 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
10897
10908
  );
10898
10909
 
10910
+ # menu settings for the Z9 with firmware version 5.1 (ref 28)
10911
+ %Image::ExifTool::Nikon::MenuSettingsZ9v5 = (
10912
+ %binaryDataAttrs,
10913
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10914
+ DATAMEMBER => [ 158, 208, 212, 252, 332, 448, 552, 558, 574, 600 ],
10915
+ IS_SUBDIR => [ 851 ],
10916
+ NOTES => 'These tags are used by the Z9 firmware 5.1.',
10917
+ 72 => {
10918
+ Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
10919
+ PrintConv => \%highFrameRateZ9,
10920
+ },
10921
+ 158 => {
10922
+ Name => 'MultipleExposureMode',
10923
+ RawConv => '$$self{MultipleExposureMode} = $val',
10924
+ PrintConv => \%multipleExposureModeZ9,
10925
+ },
10926
+ 160 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
10927
+ 208 => {
10928
+ Name => 'Intervals',
10929
+ Format => 'int32u',
10930
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
10931
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
10932
+ },
10933
+ 212 => {
10934
+ Name => 'ShotsPerInterval',
10935
+ Format => 'int32u',
10936
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
10937
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
10938
+ },
10939
+ 252 => {
10940
+ Name => 'FocusShiftNumberShots', #1-300
10941
+ RawConv => '$$self{FocusShiftNumberShots} = $val',
10942
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10943
+ },
10944
+ 256 => {
10945
+ Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
10946
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10947
+ },
10948
+ 260 => {
10949
+ Name => 'FocusShiftInterval',
10950
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10951
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
10952
+ },
10953
+ 264 => {
10954
+ Name => 'FocusShiftExposureLock',
10955
+ Unknown => 1,
10956
+ PrintConv => \%offOn,
10957
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
10958
+ },
10959
+ 294 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
10960
+ 296 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
10961
+ 332 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
10962
+ #338 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
10963
+ 346 => { Name => 'AutoISO', PrintConv => \%offOn },
10964
+ 348 => {
10965
+ Name => 'ISOAutoHiLimit',
10966
+ Format => 'int16u',
10967
+ Unknown => 1,
10968
+ ValueConv => '($val-104)/8',
10969
+ ValueConvInv => '8 * ($val + 104)',
10970
+ PrintConv => \%iSOAutoHiLimitZ7,
10971
+ },
10972
+ 350 => {
10973
+ Name => 'ISOAutoFlashLimit',
10974
+ Format => 'int16u',
10975
+ Unknown => 1,
10976
+ ValueConv => '($val-104)/8',
10977
+ ValueConvInv => '8 * ($val + 104)',
10978
+ PrintConv => \%iSOAutoHiLimitZ7,
10979
+ },
10980
+ 358 => {
10981
+ Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
10982
+ ValueConv => '$val / 8',
10983
+ Format => 'int16s',
10984
+ PrintConv => \%iSOAutoShutterTimeZ9,
10985
+ },
10986
+ 440 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
10987
+ 442 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
10988
+ 444 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
10989
+ 448 => {
10990
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
10991
+ RawConv => '$$self{FlashControlMode} = $val',
10992
+ PrintConv => \%flashControlModeZ7,
10993
+ },
10994
+ 450 => {
10995
+ Name => 'FlashMasterCompensation',
10996
+ Format => 'int8s',
10997
+ Unknown => 1,
10998
+ ValueConv => '$val/6',
10999
+ ValueConvInv => '6 * $val',
11000
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
11001
+ PrintConvInv => '$val',
11002
+ },
11003
+ 454 => {
11004
+ Name => 'FlashGNDistance',
11005
+ Condition => '$$self{FlashControlMode} == 2',
11006
+ Unknown => 1,
11007
+ ValueConv => '$val + 3',
11008
+ PrintConv => \%flashGNDistance,
11009
+ },
11010
+ 458 => {
11011
+ 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)
11012
+ Condition => '$$self{FlashControlMode} >= 3',
11013
+ Unknown => 1,
11014
+ ValueConv => '2 ** (-$val/3)',
11015
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
11016
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
11017
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
11018
+ },
11019
+ #466 flash wireless control 0=> 'Off' 1=> 'Optical AWL'
11020
+ #468 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
11021
+ #480 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
11022
+ 552 => { Name => 'AFAreaMode', RawConv => '$$self{AFAreaMode} = $val', PrintConv => \%aFAreaModeZ9},
11023
+ 554 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
11024
+ 558 => {
11025
+ Name => 'BracketSet',
11026
+ RawConv => '$$self{BracketSet} = $val',
11027
+ PrintConv => \%bracketSetZ9,
11028
+ },
11029
+ 560 => {
11030
+ Name => 'BracketProgram',
11031
+ Condition => '$$self{BracketSet} < 3',
11032
+ Notes => 'AE and/or Flash Bracketing',
11033
+ PrintConv => \%bracketProgramZ9,
11034
+ },
11035
+ 562 => {
11036
+ Name => 'BracketIncrement',
11037
+ Condition => '$$self{BracketSet} < 3',
11038
+ Notes => 'AE and/or Flash Bracketing',
11039
+ PrintConv => \%bracketIncrementZ9,
11040
+ },
11041
+ 574 => { Name => 'HDR', RawConv => '$$self{HDR} = $val', PrintConv => \%multipleExposureModeZ9 },
11042
+ 580 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
11043
+ 586 => { Name => 'HDRLevel', Condition => '$$self{HDR} ne 0', PrintConv => \%hdrLevelZ8 },
11044
+ 590 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
11045
+ 596 => { Name => 'DXCropAlert', PrintConv => \%offOn },
11046
+ 598 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
11047
+ 600 => {
11048
+ Name => 'DynamicAFAreaSize',
11049
+ Condition => '$$self{AFAreaMode} == 2',
11050
+ RawConv => '$$self{DynamicAFAreaSize} = $val',
11051
+ PrintConv => \%dynamicAfAreaModesZ9,
11052
+ },
11053
+ 640 => { Name => 'HighFrequencyFlickerReduction', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
11054
+ 650 => {
11055
+ Name => 'MovieImageArea',
11056
+ Unknown => 1,
11057
+ Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
11058
+ PrintConv => \%imageAreaZ9b,
11059
+ },
11060
+ 660 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
11061
+ 662 => {
11062
+ Name => 'MovieISOAutoHiLimit',
11063
+ Format => 'int16u',
11064
+ Unknown => 1,
11065
+ ValueConv => '($val-104)/8',
11066
+ ValueConvInv => '8 * ($val + 104)',
11067
+ PrintConv => \%iSOAutoHiLimitZ7,
11068
+ },
11069
+ 664 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
11070
+ 666 => {
11071
+ Name => 'MovieISOAutoManualMode',
11072
+ Format => 'int16u',
11073
+ Unknown => 1,
11074
+ ValueConv => '($val-104)/8',
11075
+ ValueConvInv => '8 * ($val + 104)',
11076
+ PrintConv => \%iSOAutoHiLimitZ7,
11077
+ },
11078
+ 740 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
11079
+ 742 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
11080
+ 748 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
11081
+ 750 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
11082
+ 752 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
11083
+ 754 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
11084
+ 756 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
11085
+ 760 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
11086
+ 762 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
11087
+ 764 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
11088
+ 766 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
11089
+ 768 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
11090
+ 770 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
11091
+ 792 => { Name => 'MovieToneMap', PrintConv => \%movieToneMapZ9, Unknown => 1 },
11092
+ 798 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
11093
+ 800 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
11094
+ 806 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
11095
+ 807 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
11096
+ 808 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
11097
+ 816 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
11098
+ 851 => {
11099
+ Name => 'CustomSettingsZ9v4',
11100
+ Format => 'undef[632]',
11101
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9v4' },
11102
+ },
11103
+ 1502 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
11104
+ 1504 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
11105
+ 1510 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
11106
+ 1532 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
11107
+ 1536 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
11108
+ 1540 => { Name => 'NonCPULens2FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11109
+ 1542 => { Name => 'NonCPULens3FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11110
+ 1548 => { Name => 'NonCPULens4FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11111
+ 1552 => { Name => 'NonCPULens5FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11112
+ 1556 => { Name => 'NonCPULens6FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11113
+ 1560 => { Name => 'NonCPULens7FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11114
+ 1564 => { Name => 'NonCPULens8FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11115
+ 1568 => { Name => 'NonCPULens9FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11116
+ 1572 => { Name => 'NonCPULens10FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11117
+ 1576 => { Name => 'NonCPULens11FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11118
+ 1580 => { Name => 'NonCPULens12FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11119
+ 1584 => { Name => 'NonCPULens13FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11120
+ 1588 => { Name => 'NonCPULens14FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11121
+ 1592 => { Name => 'NonCPULens15FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11122
+ 1596 => { Name => 'NonCPULens16FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11123
+ 1600 => { Name => 'NonCPULens17FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11124
+ 1604 => { Name => 'NonCPULens18FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11125
+ 1608 => { Name => 'NonCPULens19FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11126
+ 1612 => { Name => 'NonCPULens20FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
11127
+ 1616 => { Name => 'NonCPULens1MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1}, #non-CPU aperture interface, values and storage differ from the Z8
11128
+ 1620 => { Name => 'NonCPULens2MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11129
+ 1624 => { Name => 'NonCPULens3MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11130
+ 1628 => { Name => 'NonCPULens4MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11131
+ 1632 => { Name => 'NonCPULens5MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11132
+ 1636 => { Name => 'NonCPULens6MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11133
+ 1640 => { Name => 'NonCPULens7MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11134
+ 1644 => { Name => 'NonCPULens8MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11135
+ 1648 => { Name => 'NonCPULens9MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11136
+ 1652 => { Name => 'NonCPULens10MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11137
+ 1656 => { Name => 'NonCPULens11MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11138
+ 1660 => { Name => 'NonCPULens12MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11139
+ 1664 => { Name => 'NonCPULens13MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11140
+ 1668 => { Name => 'NonCPULens14MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11141
+ 1672 => { Name => 'NonCPULens15MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11142
+ 1676 => { Name => 'NonCPULens16MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11143
+ 1680 => { Name => 'NonCPULens17MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11144
+ 1684 => { Name => 'NonCPULens18MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11145
+ 1688 => { Name => 'NonCPULens19MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11146
+ 1692 => { Name => 'NonCPULens20MaxAperture', Format => 'int16s', PrintConv => 'sprintf("f/%.1f",$val/100)', Unknown => 1},
11147
+ 1708 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
11148
+ 1721 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
11149
+ 1728 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
11150
+ 1729 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
11151
+ 1764 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
11152
+ 1788 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
11153
+ 1792 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
11154
+ 1801 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
11155
+ 1866 => {
11156
+ Name => 'AutoCapturePreset',
11157
+ PrintConv => {
11158
+ 0 => '1',
11159
+ 1 => '2',
11160
+ 2 => '3',
11161
+ 3 => '4',
11162
+ 4 => '5',
11163
+ },
11164
+ },
11165
+ 1868 => {
11166
+ Name => 'FocusShiftAutoReset',
11167
+ Unknown => 1,
11168
+ PrintConv => \%offOn,
11169
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
11170
+ },
11171
+ 1926 => { #CSd4-a
11172
+ Name => 'PreReleaseBurstLength',
11173
+ PrintConv => {
11174
+ 0 => 'None',
11175
+ 1 => '0.3 Sec',
11176
+ 2 => '0.5 Sec',
11177
+ 3 => '1 Sec',
11178
+ },
11179
+ },
11180
+ 1928 => { #CSd4-b
11181
+ Name => 'PostReleaseBurstLength',
11182
+ PrintConv => {
11183
+ 0 => '1 Sec',
11184
+ 1 => '2 Sec',
11185
+ 2 => '3 Sec',
11186
+ 3 => 'Max',
11187
+ },
11188
+ },
11189
+ 1942 => { Name => 'VerticalISOButton', %buttonsZ9}, #CSf2
11190
+ 1944 => { Name => 'ExposureCompensationButton', %buttonsZ9}, #CSf2
11191
+ 1946 => { Name => 'ISOButton', %buttonsZ9}, #CSf2
11192
+ 2006 => { Name => 'ViewModeShowEffectsOfSettings', PrintConv => { 0=>'Always', 1=> 'Only When Flash Not Used'}, Unknown => 1 }, #CSd9-a
11193
+ 2008 => { Name => 'DispButton', %buttonsZ9}, #CSf2
11194
+ 2052 => { #CSd6
11195
+ Name => 'ExposureDelay',
11196
+ Format => 'fixed32u',
11197
+ PrintConv => '$val ? sprintf("%.1f sec",$val/1000) : "Off"',
11198
+ },
11199
+ 2056 => { #CSf2-m3
11200
+ Name => 'CommandDialFrameAdvanceZoom',
11201
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11202
+ PrintConv => \%dialsFrameAdvanceZoomPositionZ9,
11203
+ Unknown => 1
11204
+ },
11205
+ 2058 => { #CSf2-n3
11206
+ Name => 'SubCommandDialFrameAdvanceZoom',
11207
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11208
+ PrintConv => \%dialsFrameAdvanceZoomPositionZ9,
11209
+ Unknown => 1
11210
+ },
11211
+ 2060 => { Name => 'PlaybackButton', %buttonsZ9}, #CSf2
11212
+ 2062 => { Name => 'WBButton', %buttonsZ9}, #CSf2
11213
+ 2064 => { Name => 'BracketButton', %buttonsZ9}, #CSf2
11214
+ 2066 => { Name => 'FlashModeButton', %buttonsZ9}, #CSf2
11215
+ 2068 => { Name => 'LensFunc1ButtonPlaybackMode', %buttonsZ9}, #CSf2
11216
+ 2070 => { Name => 'LensFunc2ButtonPlaybackMode', %buttonsZ9}, #CSf2
11217
+ 2072 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
11218
+ 2074 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
11219
+ 2076 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
11220
+ );
11221
+
10899
11222
  # Flash information (ref JD)
10900
11223
  %Image::ExifTool::Nikon::FlashInfo0100 = (
10901
11224
  %binaryDataAttrs,
@@ -12231,7 +12554,6 @@ my %nikonFocalConversions = (
12231
12554
  3 => 'On (Required)',
12232
12555
  },
12233
12556
  },
12234
- #0x10 Degree of radial distortion correction polynomial? (always 4? - decodes for the first 3 coefficients follow, the 4th at 0x2c/0x30 seems to always be 0)
12235
12557
  0x14 => {
12236
12558
  Name => 'RadialDistortionCoefficient1',
12237
12559
  Format => 'rational64s',
@@ -112,7 +112,7 @@ $VERSION = '1.26';
112
112
  113 => 'Power Zoom +',
113
113
  114 => 'Power Zoom -',
114
114
  115 => 'Delete',
115
- 116 => 'Pixel Shift Shooting',
115
+ 116 => 'Pixel Shift Shooting', #Z8 (Z9 fw 5.1 maps as 'Save and Load Power Zoom Position')
116
116
  117 => 'Cycle AF-area Mode',
117
117
  118 => 'Raw Processing (Current)', #118-131 are Playback Retouch options
118
118
  119 => 'Raw Processing (Multiple)',
@@ -37,7 +37,7 @@ use vars qw($VERSION %leicaLensTypes);
37
37
  use Image::ExifTool qw(:DataAccess :Utils);
38
38
  use Image::ExifTool::Exif;
39
39
 
40
- $VERSION = '2.23';
40
+ $VERSION = '2.24';
41
41
 
42
42
  sub ProcessLeicaLEIC($$$);
43
43
  sub WhiteBalanceConv($;$$);
@@ -1464,6 +1464,12 @@ my %shootingMode = (
1464
1464
  5 => 'Animal Eye/Body',
1465
1465
  6 => 'Car',
1466
1466
  7 => 'Motorcycle',
1467
+ 8 => 'Car (main part priority)',
1468
+ 9 => 'Motorcycle (helmet priority)',
1469
+ 10 => 'Train',
1470
+ 11 => 'Train (main part priority)',
1471
+ 12 => 'Airplane',
1472
+ 13 => 'Airplane (nose priority)',
1467
1473
  }
1468
1474
  },
1469
1475
  0xee => { #PH (DC-GH6)
@@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
48
48
  use Image::ExifTool::Exif;
49
49
  use Image::ExifTool::GPS;
50
50
 
51
- $VERSION = '3.09';
51
+ $VERSION = '3.11';
52
52
 
53
53
  sub ProcessMOV($$;$);
54
54
  sub ProcessKeys($$$);
@@ -3522,7 +3522,11 @@ my %userDefined = (
3522
3522
  #
3523
3523
  '----' => {
3524
3524
  Name => 'iTunesInfo',
3525
- SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::iTunesInfo' },
3525
+ Deletable => 1, # (deletable via 'iTunes' group)
3526
+ SubDirectory => {
3527
+ TagTable => 'Image::ExifTool::QuickTime::iTunesInfo',
3528
+ DirName => 'iTunes', # (necessary for group 'iTunes' delete)
3529
+ },
3526
3530
  },
3527
3531
  aART => { Name => 'AlbumArtist', Groups => { 2 => 'Author' } },
3528
3532
  covr => { Name => 'CoverArt', Groups => { 2 => 'Preview' }, Binary => 1 },
@@ -8776,24 +8780,28 @@ sub UnpackLang($;$)
8776
8780
  # Get language code string given QuickTime language and country codes
8777
8781
  # Inputs: 0) numerical language code, 1) numerical country code, 2) no defaults
8778
8782
  # Returns: language code string (ie. "fra-FR") or undef for default language
8783
+ # ex) 0x15c7 0x0000 is 'eng' with no country (ie. returns 'und' unless $noDef)
8784
+ # 0x15c7 0x5553 is 'eng-US'
8785
+ # 0x1a41 0x4652 is 'fra-FR'
8786
+ # 0x55c4 is 'und'
8779
8787
  sub GetLangCode($;$$)
8780
8788
  {
8781
8789
  my ($lang, $ctry, $noDef) = @_;
8782
8790
  # ignore country ('ctry') and language lists ('lang') for now
8783
8791
  undef $ctry if $ctry and $ctry <= 255;
8784
8792
  undef $lang if $lang and $lang <= 255;
8785
- $lang = UnpackLang($lang, $noDef);
8793
+ my $langCode = UnpackLang($lang, $noDef);
8786
8794
  # add country code if specified
8787
8795
  if ($ctry) {
8788
8796
  $ctry = unpack('a2',pack('n',$ctry)); # unpack as ISO 3166-1
8789
8797
  # treat 'ZZ' like a default country (see ref 12)
8790
8798
  undef $ctry if $ctry eq 'ZZ';
8791
8799
  if ($ctry and $ctry =~ /^[A-Z]{2}$/) {
8792
- $lang or $lang = 'und';
8793
- $lang .= "-$ctry";
8800
+ $langCode or $langCode = UnpackLang($lang,1) || 'und';
8801
+ $langCode .= "-$ctry";
8794
8802
  }
8795
8803
  }
8796
- return $lang;
8804
+ return $langCode;
8797
8805
  }
8798
8806
 
8799
8807
  #------------------------------------------------------------------------------
@@ -9659,6 +9667,43 @@ sub ProcessMetaKeys($$$)
9659
9667
  return 1;
9660
9668
  }
9661
9669
 
9670
+ #------------------------------------------------------------------------------
9671
+ # Identify trailers at specified offset from end of file
9672
+ # Inputs: 0) RAF reference, 1) Offset from end of file
9673
+ # Returns: Array ref to first trailer in linked list: 0) name of trailer,
9674
+ # 1) absolute offset to start of this trailer, 2) trailer length,
9675
+ # 3) ref to next trailer. Or undef if no trailer found, or error string on error
9676
+ # - file position is returned to its original location
9677
+ sub IdentifyTrailers($)
9678
+ {
9679
+ my $raf = shift;
9680
+ my ($trailer, $nextTrail, $buff, $type, $len);
9681
+ my $pos = $raf->Tell();
9682
+ my $offset = 0; # positive offset back from end of file
9683
+ while ($raf->Seek(-40-$offset, 2) and $raf->Read($buff, 40) == 40) {
9684
+ if (substr($buff, 8) eq '8db42d694ccc418790edff439fe026bf') {
9685
+ ($type, $len) = ('Insta360', unpack('V',$buff));
9686
+ } elsif ($buff =~ /\&\&\&\&(.{4})$/) {
9687
+ ($type, $len) = ('LigoGPS', Get32u(\$buff, 36));
9688
+ } elsif ($buff =~ /~\0\x04\0zmie~\0\0\x06.{4}([\x10\x18])(\x04)$/s or
9689
+ $buff =~ /~\0\x04\0zmie~\0\0\x0a.{8}([\x10\x18])(\x08)$/s)
9690
+ {
9691
+ my $oldOrder = GetByteOrder();
9692
+ SetByteOrder($1 eq "\x10" ? 'MM' : 'II');
9693
+ $type = 'MIE';
9694
+ $len = ($2 eq "\x04") ? Get32u(\$buff, 34) : Get64u(\$buff, 30);
9695
+ SetByteOrder($oldOrder);
9696
+ } else {
9697
+ last;
9698
+ }
9699
+ $trailer = [ $type , $raf->Tell() - $len, $len, $nextTrail ];
9700
+ $nextTrail = $trailer;
9701
+ $offset += $len;
9702
+ }
9703
+ $raf->Seek($pos,0) or return 'Seek error';
9704
+ return $trailer;
9705
+ }
9706
+
9662
9707
  #------------------------------------------------------------------------------
9663
9708
  # Process a QuickTime atom
9664
9709
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) optional tag table ref
@@ -9706,17 +9751,10 @@ sub ProcessMOV($$;$)
9706
9751
  }
9707
9752
  ($size, $tag) = unpack('Na4', $buff);
9708
9753
  my $fast = $$et{OPTIONS}{FastScan} || 0;
9709
- # check for Insta360 or LIGOGPSINFO trailer
9754
+ # check for Insta360, LIGOGPSINFO or MIE trailer
9710
9755
  if ($topLevel and not $fast) {
9711
- my $pos = $raf->Tell();
9712
- if ($raf->Seek(-40, 2) and $raf->Read($buff, 40) == 40) {
9713
- if (substr($buff, 8) eq '8db42d694ccc418790edff439fe026bf') {
9714
- $trailer = [ 'Insta360', $raf->Tell() - unpack('V',$buff) ];
9715
- } elsif ($buff =~ /\&\&\&\&(.{4})$/) {
9716
- $trailer = [ 'LigoGPS', $raf->Tell() - Get32u(\$buff, 36) ];
9717
- }
9718
- }
9719
- $raf->Seek($pos,0) or return 0;
9756
+ $trailer = IdentifyTrailers($raf);
9757
+ $trailer and not ref $trailer and $et->Warn($trailer), return 0;
9720
9758
  }
9721
9759
  if ($dataPt) {
9722
9760
  $verbose and $et->VerboseDir($$dirInfo{DirName});
@@ -10314,7 +10352,7 @@ ItemID: foreach $id (reverse sort { $a <=> $b } keys %$items) {
10314
10352
  last if $dirEnd and $dataPos >= $dirEnd; # (note: ignores last value if 0 bytes)
10315
10353
  $lastPos = $raf->Tell() + $dirBase;
10316
10354
  if ($trailer and $lastPos >= $$trailer[1]) {
10317
- $et->Warn(sprintf('%s trailer at offset 0x%x', @$trailer), 1);
10355
+ $et->Warn(sprintf('%s trailer at offset 0x%x (%d bytes)', @$trailer[0..2]), 1);
10318
10356
  last;
10319
10357
  }
10320
10358
  $raf->Read($buff, 8) == 8 or last;
@@ -10365,11 +10403,12 @@ QTLang: foreach $tag (@{$$et{QTLang}}) {
10365
10403
  # process item information now that we are done processing its 'meta' container
10366
10404
  HandleItemInfo($et) if $topLevel or $dirID eq 'meta';
10367
10405
 
10368
- # process LigoGPS trailer now if it exists and we haven't already processed it
10369
- if ($trailer and $$trailer[0] eq 'LigoGPS' and $lastPos <= $$trailer[1] and
10370
- $raf->Seek($$trailer[1]) and $raf->Read($buff, 8) == 8 and $buff =~ /skip$/)
10371
- {
10372
- if ($ee) {
10406
+ # process linked list of trailers
10407
+ for (; $trailer; $trailer=$$trailer[3]) {
10408
+ next if $lastPos > $$trailer[1]; # skip if we have already processed this as an atom
10409
+ last unless $raf->Seek($$trailer[1], 0);
10410
+ if ($$trailer[0] eq 'LigoGPS' and $raf->Read($buff, 8) == 8 and $buff =~ /skip$/) {
10411
+ $ee or $et->Warn('Use the ExtractEmbedded option to decode timed GPS',3), next;
10373
10412
  my $len = Get32u(\$buff, 0) - 16;
10374
10413
  if ($len > 0 and $raf->Read($buff, $len) == $len and $buff =~ /^LIGOGPSINFO\0/) {
10375
10414
  my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
@@ -10378,8 +10417,14 @@ QTLang: foreach $tag (@{$$et{QTLang}}) {
10378
10417
  } else {
10379
10418
  $et->Warn('Unrecognized data in LigoGPS trailer');
10380
10419
  }
10381
- } else {
10382
- $et->Warn('Use the ExtractEmbedded option to decode timed GPS',3);
10420
+ } elsif ($$trailer[0] eq 'Insta360' and $ee) {
10421
+ # process Insta360 trailer if it exists
10422
+ $raf->Seek(0, 2) or $et->Warn('Seek error'), last;
10423
+ my $offset = $raf->Tell() - $$trailer[1] - $$trailer[2];
10424
+ ProcessInsta360($et, { RAF => $raf, DirName => $$trailer[0], Offset => $offset });
10425
+ } elsif ($$trailer[0] eq 'MIE') {
10426
+ require Image::ExifTool::MIE;
10427
+ Image::ExifTool::MIE::ProcessMIE($et, { RAF => $raf, DirName => 'MIE', Trailer => 1 });
10383
10428
  }
10384
10429
  }
10385
10430
  # brute force scan for metadata embedded in media data