exiftool_vendored 12.35.0 → 12.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +59 -4
  3. data/bin/MANIFEST +1 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +45 -45
  7. data/bin/exiftool +79 -59
  8. data/bin/lib/File/RandomAccess.pm +1 -1
  9. data/bin/lib/File/RandomAccess.pod +2 -2
  10. data/bin/lib/Image/ExifTool/AES.pm +1 -1
  11. data/bin/lib/Image/ExifTool/AFCP.pm +1 -1
  12. data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
  13. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  14. data/bin/lib/Image/ExifTool/APP12.pm +1 -1
  15. data/bin/lib/Image/ExifTool/ASF.pm +1 -1
  16. data/bin/lib/Image/ExifTool/Apple.pm +1 -1
  17. data/bin/lib/Image/ExifTool/Audible.pm +1 -1
  18. data/bin/lib/Image/ExifTool/BMP.pm +1 -1
  19. data/bin/lib/Image/ExifTool/BPG.pm +1 -1
  20. data/bin/lib/Image/ExifTool/BZZ.pm +1 -1
  21. data/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
  22. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +10 -4
  23. data/bin/lib/Image/ExifTool/CBOR.pm +1 -1
  24. data/bin/lib/Image/ExifTool/Canon.pm +143 -10
  25. data/bin/lib/Image/ExifTool/CanonCustom.pm +13 -3
  26. data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  27. data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
  28. data/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
  29. data/bin/lib/Image/ExifTool/Casio.pm +1 -1
  30. data/bin/lib/Image/ExifTool/Charset.pm +1 -1
  31. data/bin/lib/Image/ExifTool/DICOM.pm +1 -1
  32. data/bin/lib/Image/ExifTool/DJI.pm +1 -1
  33. data/bin/lib/Image/ExifTool/DNG.pm +1 -1
  34. data/bin/lib/Image/ExifTool/DPX.pm +1 -1
  35. data/bin/lib/Image/ExifTool/DV.pm +1 -1
  36. data/bin/lib/Image/ExifTool/DarwinCore.pm +3 -3
  37. data/bin/lib/Image/ExifTool/DjVu.pm +1 -1
  38. data/bin/lib/Image/ExifTool/EXE.pm +1 -1
  39. data/bin/lib/Image/ExifTool/Exif.pm +22 -2
  40. data/bin/lib/Image/ExifTool/FITS.pm +1 -1
  41. data/bin/lib/Image/ExifTool/FLAC.pm +1 -1
  42. data/bin/lib/Image/ExifTool/FLIF.pm +1 -1
  43. data/bin/lib/Image/ExifTool/FLIR.pm +16 -4
  44. data/bin/lib/Image/ExifTool/Fixup.pm +1 -1
  45. data/bin/lib/Image/ExifTool/Flash.pm +1 -1
  46. data/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
  47. data/bin/lib/Image/ExifTool/Font.pm +1 -1
  48. data/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
  49. data/bin/lib/Image/ExifTool/FujiFilm.pm +1 -1
  50. data/bin/lib/Image/ExifTool/GE.pm +1 -1
  51. data/bin/lib/Image/ExifTool/GIF.pm +6 -2
  52. data/bin/lib/Image/ExifTool/GIMP.pm +1 -1
  53. data/bin/lib/Image/ExifTool/GPS.pm +15 -11
  54. data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
  55. data/bin/lib/Image/ExifTool/Geotag.pm +1 -1
  56. data/bin/lib/Image/ExifTool/GoPro.pm +1 -1
  57. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  58. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  59. data/bin/lib/Image/ExifTool/HTML.pm +1 -1
  60. data/bin/lib/Image/ExifTool/HtmlDump.pm +1 -1
  61. data/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  62. data/bin/lib/Image/ExifTool/ID3.pm +1 -1
  63. data/bin/lib/Image/ExifTool/IPTC.pm +1 -1
  64. data/bin/lib/Image/ExifTool/ISO.pm +1 -1
  65. data/bin/lib/Image/ExifTool/ITC.pm +1 -1
  66. data/bin/lib/Image/ExifTool/Import.pm +1 -1
  67. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  68. data/bin/lib/Image/ExifTool/JPEG.pm +6 -2
  69. data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  70. data/bin/lib/Image/ExifTool/JSON.pm +1 -1
  71. data/bin/lib/Image/ExifTool/JVC.pm +1 -1
  72. data/bin/lib/Image/ExifTool/Jpeg2000.pm +4 -1
  73. data/bin/lib/Image/ExifTool/Kodak.pm +1 -1
  74. data/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  75. data/bin/lib/Image/ExifTool/LIF.pm +1 -1
  76. data/bin/lib/Image/ExifTool/LNK.pm +1 -1
  77. data/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
  78. data/bin/lib/Image/ExifTool/Lang/de.pm +1 -1
  79. data/bin/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  80. data/bin/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  81. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  82. data/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
  83. data/bin/lib/Image/ExifTool/Lang/fr.pm +1 -1
  84. data/bin/lib/Image/ExifTool/Lang/it.pm +1 -1
  85. data/bin/lib/Image/ExifTool/Lang/ja.pm +1 -1
  86. data/bin/lib/Image/ExifTool/Lang/ko.pm +1 -1
  87. data/bin/lib/Image/ExifTool/Lang/nl.pm +1 -1
  88. data/bin/lib/Image/ExifTool/Lang/pl.pm +1 -1
  89. data/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
  90. data/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
  91. data/bin/lib/Image/ExifTool/Lang/tr.pm +1 -1
  92. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  93. data/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  94. data/bin/lib/Image/ExifTool/Leaf.pm +1 -1
  95. data/bin/lib/Image/ExifTool/Lytro.pm +1 -1
  96. data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
  97. data/bin/lib/Image/ExifTool/MIE.pm +1 -1
  98. data/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
  99. data/bin/lib/Image/ExifTool/MIFF.pm +1 -1
  100. data/bin/lib/Image/ExifTool/MNG.pm +1 -1
  101. data/bin/lib/Image/ExifTool/MOI.pm +1 -1
  102. data/bin/lib/Image/ExifTool/MPC.pm +1 -1
  103. data/bin/lib/Image/ExifTool/MPEG.pm +1 -1
  104. data/bin/lib/Image/ExifTool/MPF.pm +1 -1
  105. data/bin/lib/Image/ExifTool/MRC.pm +1 -1
  106. data/bin/lib/Image/ExifTool/MWG.pm +1 -1
  107. data/bin/lib/Image/ExifTool/MXF.pm +1 -1
  108. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  109. data/bin/lib/Image/ExifTool/MakerNotes.pm +1 -1
  110. data/bin/lib/Image/ExifTool/Matroska.pm +9 -5
  111. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  112. data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
  113. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  114. data/bin/lib/Image/ExifTool/Motorola.pm +1 -1
  115. data/bin/lib/Image/ExifTool/Nikon.pm +1870 -83
  116. data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
  117. data/bin/lib/Image/ExifTool/NikonCustom.pm +523 -6
  118. data/bin/lib/Image/ExifTool/NikonSettings.pm +150 -87
  119. data/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
  120. data/bin/lib/Image/ExifTool/OOXML.pm +1 -1
  121. data/bin/lib/Image/ExifTool/Ogg.pm +1 -1
  122. data/bin/lib/Image/ExifTool/Olympus.pm +1 -1
  123. data/bin/lib/Image/ExifTool/OpenEXR.pm +5 -3
  124. data/bin/lib/Image/ExifTool/Opus.pm +1 -1
  125. data/bin/lib/Image/ExifTool/Other.pm +1 -1
  126. data/bin/lib/Image/ExifTool/PCX.pm +1 -1
  127. data/bin/lib/Image/ExifTool/PDF.pm +1 -1
  128. data/bin/lib/Image/ExifTool/PGF.pm +1 -1
  129. data/bin/lib/Image/ExifTool/PICT.pm +1 -1
  130. data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
  131. data/bin/lib/Image/ExifTool/PLUS.pm +1 -1
  132. data/bin/lib/Image/ExifTool/PNG.pm +29 -8
  133. data/bin/lib/Image/ExifTool/PPM.pm +1 -1
  134. data/bin/lib/Image/ExifTool/PSP.pm +1 -1
  135. data/bin/lib/Image/ExifTool/Palm.pm +1 -1
  136. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
  137. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
  138. data/bin/lib/Image/ExifTool/Parrot.pm +1 -1
  139. data/bin/lib/Image/ExifTool/Pentax.pm +3 -2
  140. data/bin/lib/Image/ExifTool/PhaseOne.pm +1 -1
  141. data/bin/lib/Image/ExifTool/PhotoCD.pm +1 -1
  142. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  143. data/bin/lib/Image/ExifTool/Photoshop.pm +1 -1
  144. data/bin/lib/Image/ExifTool/PostScript.pm +1 -1
  145. data/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
  146. data/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
  147. data/bin/lib/Image/ExifTool/QuickTime.pm +4 -3
  148. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +40 -4
  149. data/bin/lib/Image/ExifTool/RIFF.pm +1 -1
  150. data/bin/lib/Image/ExifTool/RSRC.pm +1 -1
  151. data/bin/lib/Image/ExifTool/RTF.pm +1 -1
  152. data/bin/lib/Image/ExifTool/Radiance.pm +1 -1
  153. data/bin/lib/Image/ExifTool/Rawzor.pm +1 -1
  154. data/bin/lib/Image/ExifTool/Real.pm +1 -1
  155. data/bin/lib/Image/ExifTool/Reconyx.pm +1 -1
  156. data/bin/lib/Image/ExifTool/Red.pm +1 -1
  157. data/bin/lib/Image/ExifTool/Ricoh.pm +1 -1
  158. data/bin/lib/Image/ExifTool/Samsung.pm +1 -1
  159. data/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
  160. data/bin/lib/Image/ExifTool/Scalado.pm +1 -1
  161. data/bin/lib/Image/ExifTool/Shift.pl +3 -1
  162. data/bin/lib/Image/ExifTool/Shortcuts.pm +1 -1
  163. data/bin/lib/Image/ExifTool/Sigma.pm +1 -1
  164. data/bin/lib/Image/ExifTool/SigmaRaw.pm +1 -1
  165. data/bin/lib/Image/ExifTool/Sony.pm +1 -1
  166. data/bin/lib/Image/ExifTool/SonyIDC.pm +1 -1
  167. data/bin/lib/Image/ExifTool/Stim.pm +1 -1
  168. data/bin/lib/Image/ExifTool/TagInfoXML.pm +11 -6
  169. data/bin/lib/Image/ExifTool/TagLookup.pm +6496 -5895
  170. data/bin/lib/Image/ExifTool/TagNames.pod +1507 -43
  171. data/bin/lib/Image/ExifTool/Text.pm +1 -1
  172. data/bin/lib/Image/ExifTool/Theora.pm +1 -1
  173. data/bin/lib/Image/ExifTool/Torrent.pm +1 -1
  174. data/bin/lib/Image/ExifTool/Unknown.pm +1 -1
  175. data/bin/lib/Image/ExifTool/VCard.pm +1 -1
  176. data/bin/lib/Image/ExifTool/Validate.pm +1 -1
  177. data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
  178. data/bin/lib/Image/ExifTool/WTV.pm +1 -1
  179. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  180. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
  181. data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  182. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  183. data/bin/lib/Image/ExifTool/WritePNG.pl +30 -10
  184. data/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  185. data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -1
  186. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +2 -1
  187. data/bin/lib/Image/ExifTool/WriteXMP.pl +11 -12
  188. data/bin/lib/Image/ExifTool/Writer.pl +12 -8
  189. data/bin/lib/Image/ExifTool/XMP.pm +149 -45
  190. data/bin/lib/Image/ExifTool/XMP2.pl +3 -2
  191. data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
  192. data/bin/lib/Image/ExifTool/ZIP.pm +10 -2
  193. data/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
  194. data/bin/lib/Image/ExifTool/iWork.pm +1 -1
  195. data/bin/lib/Image/ExifTool.pm +24 -10
  196. data/bin/lib/Image/ExifTool.pod +64 -63
  197. data/bin/perl-Image-ExifTool.spec +43 -43
  198. data/lib/exiftool_vendored/version.rb +1 -1
  199. metadata +2 -2
@@ -61,8 +61,9 @@ use vars qw($VERSION %nikonLensIDs %nikonTextEncoding);
61
61
  use Image::ExifTool qw(:DataAccess :Utils);
62
62
  use Image::ExifTool::Exif;
63
63
  use Image::ExifTool::GPS;
64
+ use Image::ExifTool::XMP;
64
65
 
65
- $VERSION = '4.01';
66
+ $VERSION = '4.04';
66
67
 
67
68
  sub LensIDConv($$$);
68
69
  sub ProcessNikonAVI($$$);
@@ -508,6 +509,7 @@ sub GetAFPointGrid($$;$);
508
509
  '77 44 60 98 34 3C 7B 0E' => 'Sigma 80-400mm F4.5-5.6 APO DG D OS',
509
510
  '48 48 68 8E 30 30 4B 02' => 'Sigma APO 100-300mm F4 EX IF HSM',
510
511
  'F3 48 68 8E 30 30 4B 02' => 'Sigma APO 100-300mm F4 EX IF HSM',
512
+ '26 45 68 8E 34 42 1C 02' => 'Sigma 100-300mm F4.5-6.7 DL', #30
511
513
  '48 54 6F 8E 24 24 4B 02' => 'Sigma APO 120-300mm F2.8 EX DG HSM',
512
514
  '7A 54 6E 8E 24 24 4B 02' => 'Sigma APO 120-300mm F2.8 EX DG HSM',
513
515
  'FA 54 6E 8E 24 24 4B 02' => 'Sigma APO 120-300mm F2.8 EX DG HSM', #https://exiftool.org/forum/index.php/topic,2787.0.html
@@ -702,6 +704,7 @@ sub GetAFPointGrid($$;$);
702
704
  #
703
705
  '9A 4C 50 50 14 14 9C 06' => 'Yongnuo YN50mm F1.8N',
704
706
  '9F 48 48 48 24 24 A1 06' => 'Yongnuo YN40mm F2.8N', #30
707
+ '9F 54 68 68 18 18 A2 06' => 'Yongnuo YN100mm F2N', #30
705
708
  #
706
709
  '02 40 44 5C 2C 34 02 00' => 'Exakta AF 35-70mm 1:3.5-4.5 MC',
707
710
  #
@@ -754,6 +757,7 @@ my %flashFirmware = (
754
757
  '5 2' => '5.02 (SB-900)',
755
758
  '6 1' => '6.01 (SB-700)', #https://exiftool.org/forum/index.php/topic,5034.0.html
756
759
  '7 1' => '7.01 (SB-910)', #PH
760
+ '14 3' => '14.03 (SB-5000)', #28
757
761
  OTHER => sub {
758
762
  my ($val, $inv) = @_;
759
763
  return sprintf('%d.%.2d (Unknown model)', split(' ', $val)) unless $inv;
@@ -810,6 +814,124 @@ my %flashControlMode = (
810
814
  0x07 => 'Repeating Flash',
811
815
  );
812
816
 
817
+ my %activeDLightingZ7 = (
818
+ 0 => 'Off',
819
+ 2 => 'Low',
820
+ 3 => 'Normal',
821
+ 4 => 'High',
822
+ 5 => 'Extra High',
823
+ );
824
+
825
+ my %flashControlModeZ7 = (
826
+ 0 => 'TTL',
827
+ 1 => 'Auto External Flash',
828
+ 2 => 'GN (distance priority)',
829
+ 3 => 'Manual',
830
+ 4 => 'Repeating Flash',
831
+ );
832
+
833
+ my %flashRemoteControlZ7 = (
834
+ 0 => 'Group',
835
+ 1 => 'Quick Wireless',
836
+ 2 => 'Remote Repeating',
837
+ );
838
+
839
+ my %flashWirelessOptionZ7 = (
840
+ 0 => 'Off',
841
+ 1 => 'Optical AWL',
842
+ 2 => 'Optical/Radio AWL',
843
+ 3 => 'Radio AWL',
844
+ );
845
+
846
+ my %focusModeZ7 = (
847
+ 0 => 'Manual',
848
+ 1 => 'AF-S',
849
+ 2 => 'AF-C',
850
+ 4 => 'AF-F', # full frame
851
+ );
852
+
853
+ my %infoZSeries = (
854
+ Condition => '$$self{Model} =~ /^NIKON Z (5|50|6|6_2|7|7_2|fc|9)\b/i',
855
+ Notes => 'Z Series cameras thru Decemeber 2021',
856
+ );
857
+ my %iSOAutoHiLimitZ7 = (
858
+ 0 => 'ISO 64',
859
+ 1 => 'ISO 80',
860
+ 2 => 'ISO 100',
861
+ 3 => 'ISO 125',
862
+ 4 => 'ISO 160',
863
+ 5 => 'ISO 200',
864
+ 6 => 'ISO 250',
865
+ 7 => 'ISO 320',
866
+ 8 => 'ISO 400',
867
+ 9 => 'ISO 500',
868
+ 10 => 'ISO 640',
869
+ 11 => 'ISO 800',
870
+ 12 => 'ISO 1000',
871
+ 13 => 'ISO 1250',
872
+ 14 => 'ISO 1600',
873
+ 15 => 'ISO 2000',
874
+ 16 => 'ISO 2500',
875
+ 17 => 'ISO 3200',
876
+ 18 => 'ISO 4000',
877
+ 19 => 'ISO 5000',
878
+ 20 => 'ISO 6400',
879
+ 21 => 'ISO 8000',
880
+ 22 => 'ISO 10000',
881
+ 23 => 'ISO 12800',
882
+ 24 => 'ISO 16000',
883
+ 25 => 'ISO 20000',
884
+ 26 => 'ISO 25600',
885
+ 27 => 'ISO Hi 0.3',
886
+ 28 => 'ISO Hi 0.7',
887
+ 29 => 'ISO Hi 1.0',
888
+ 32 => 'ISO Hi 2.0',
889
+ );
890
+
891
+ my %meteringModeZ7 = (
892
+ 0 => 'Matrix',
893
+ 1 => 'Center',
894
+ 2 => 'Spot',
895
+ 3 => 'Highlight'
896
+ );
897
+
898
+ my %movieFrameRateZ7 = (
899
+ 0 => '120p',
900
+ 1 => '100p',
901
+ 2 => '60p',
902
+ 3 => '50p',
903
+ 4 => '30p',
904
+ 5 => '25p',
905
+ 6 => '24p',
906
+ );
907
+
908
+ my %offLowNormalHighZ7 = (
909
+ 0 => 'Off',
910
+ 1 => 'Low',
911
+ 2 => 'Normal',
912
+ 3 => 'High',
913
+ );
914
+
915
+ my %movieFrameSizeZ9 = (
916
+ 1 => '1920x1080',
917
+ 2 => '3840x2160',
918
+ 3 => '7680x4320',
919
+ );
920
+
921
+ my %subjectDetectionZ9 = (
922
+ 0 => 'Off',
923
+ 1 => 'Auto',
924
+ 2 => 'People',
925
+ 3 => 'Animals',
926
+ 4 => 'Vehicles',
927
+ );
928
+
929
+ my %vRModeZ9 = (
930
+ 0 => 'Off',
931
+ 1 => 'Normal',
932
+ 2 => 'Sport',
933
+ );
934
+
813
935
  my %retouchValues = ( #PH
814
936
  0 => 'None',
815
937
  3 => 'B & W',
@@ -1046,7 +1168,9 @@ my %cropHiSpeed = ( #IB
1046
1168
  10 => '1.3x Movie Crop', #36 (D4/D500)
1047
1169
  11 => 'FX Uncropped',
1048
1170
  12 => 'DX Uncropped',
1049
- 15 => '1.5x Movie Crop', #36 (D4/D500)
1171
+ 13 => '2.8x Movie Crop', #28 (D5/D6) 5584/1936
1172
+ 14 => '1.4x Movie Crop', #28 (D5/D6) 5584/3856
1173
+ 15 => '1.5x Movie Crop', #36 (D4/D500) 5600/3872
1050
1174
  17 => '1:1 Crop',
1051
1175
  OTHER => sub {
1052
1176
  my ($val, $inv, $conv) = @_;
@@ -1058,7 +1182,31 @@ my %cropHiSpeed = ( #IB
1058
1182
  },
1059
1183
  );
1060
1184
 
1185
+ my %flashGroupOptionsMode = (
1186
+ 0 => 'TTL',
1187
+ 1 => 'Manual',
1188
+ 2 => 'Auto',
1189
+ 3 => 'Off',
1190
+ );
1191
+
1192
+ my %nefCompression = ( #28 relocated to MakerNotes_0x51 at offset x'0a (Z9)
1193
+ 1 => 'Lossy (type 1)', # (older models)
1194
+ 2 => 'Uncompressed', #JD - D100 (even though TIFF compression is set!)
1195
+ 3 => 'Lossless',
1196
+ 4 => 'Lossy (type 2)',
1197
+ 5 => 'Striped packed 12 bits', #IB
1198
+ 6 => 'Uncompressed (reduced to 12 bit)', #IB
1199
+ 7 => 'Unpacked 12 bits', #IB (padded to 16)
1200
+ 8 => 'Small', #IB
1201
+ 9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1202
+ 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1203
+ 13 => 'High Efficiency', #28
1204
+ 14 => 'High Efficiency*', #28
1205
+ );
1206
+
1207
+ my %noYes = ( 0 => 'No' , 1 => 'Yes', );
1061
1208
  my %offOn = ( 0 => 'Off', 1 => 'On' );
1209
+ my %onOff = ( 0 => 'On', 1 => 'Off' );
1062
1210
 
1063
1211
  # common attributes for writable BinaryData directories
1064
1212
  my %binaryDataAttrs = (
@@ -1069,6 +1217,20 @@ my %binaryDataAttrs = (
1069
1217
  FIRST_ENTRY => 0,
1070
1218
  );
1071
1219
 
1220
+ my %base64bin = ( ValueConv => 'Image::ExifTool::XMP::DecodeBase64($val)' );
1221
+ my %base64int32u = ( ValueConv => 'my $val=Image::ExifTool::XMP::DecodeBase64($val); unpack("V",$$val)' );
1222
+ my %base64bytes = ( ValueConv => 'my $val=Image::ExifTool::XMP::DecodeBase64($val); join(".",unpack("C*",$$val))' );
1223
+ my %base64coord = (
1224
+ ValueConv => q{
1225
+ my $val=Image::ExifTool::XMP::DecodeBase64($val);
1226
+ my $saveOrder = GetByteOrder();
1227
+ SetByteOrder('II');
1228
+ $val = GetDouble($val,0) + GetDouble($val,8)/60 + GetDouble($val,16)/3600;
1229
+ SetByteOrder($saveOrder);
1230
+ return $val;
1231
+ },
1232
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)',
1233
+ );
1072
1234
  # Nikon maker note tags
1073
1235
  %Image::ExifTool::Nikon::Main = (
1074
1236
  PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikon,
@@ -1465,6 +1627,16 @@ my %binaryDataAttrs = (
1465
1627
  Name => 'ColorTemperatureAuto',
1466
1628
  Writable => 'int16u',
1467
1629
  },
1630
+ 0x0051 => { #28 (Z9)
1631
+ Name => 'MakerNotes0x51',
1632
+ Writable => 'undef',
1633
+ Hidden => 1,
1634
+ Permanent => 0,
1635
+ Flags => [ 'Binary', 'Protected' ],
1636
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MakerNotes0x51' },
1637
+ },
1638
+ #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)
1639
+ #0x005e #28 possibly DiffractionCompensation block? Certainly offset 0x04 within block contains tag DiffractionCompensation
1468
1640
  0x0080 => { Name => 'ImageAdjustment', Writable => 'string' },
1469
1641
  0x0081 => { Name => 'ToneComp', Writable => 'string' }, #2
1470
1642
  0x0082 => { Name => 'AuxiliaryLens', Writable => 'string' },
@@ -1862,7 +2034,7 @@ my %binaryDataAttrs = (
1862
2034
  SubDirectory => {
1863
2035
  TagTable => 'Image::ExifTool::Nikon::ShotInfoD6',
1864
2036
  DecryptStart => 4,
1865
- DecryptLen => 0xc21a + 12,
2037
+ DecryptLen => 0xc292 + 720, # thru decoded parts of Offset 32
1866
2038
  ByteOrder => 'LittleEndian',
1867
2039
  },
1868
2040
  },
@@ -1876,17 +2048,30 @@ my %binaryDataAttrs = (
1876
2048
  ByteOrder => 'BigEndian',
1877
2049
  },
1878
2050
  },
1879
- { # (Z6_2 firmware version 1.00 and Z7_2 firmware versions 1.00 & 1.01, ref 28)
1880
- Condition => '$$valPt =~ /^0800/ or $$valPt =~ /^0803/',
1881
- Name => 'ShotInfoZ7_2',
2051
+ { # (Z6_2 firmware version 1.00 and Z7II firmware versions 1.00 & 1.01, ref 28)
2052
+ # 0800=Z6/Z7 0801=Z50 0802=Z5 0803=Z6II/Z7II 0804=Zfc
2053
+ Condition => '$$valPt =~ /^080[01234]/',
2054
+ Name => 'ShotInfoZ7II',
1882
2055
  SubDirectory => {
1883
- TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7_2',
2056
+ TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7II',
1884
2057
  DecryptStart => 4,
1885
- DecryptLen => 0xce32 + 12,
2058
+ # TODO: eventually set the length dynamically according to actual offsets!
2059
+ DecryptLen => 0xd04e + 860, # thru decoded MenuSettingsZ7II
1886
2060
  ByteOrder => 'LittleEndian',
1887
2061
  },
1888
2062
  },
1889
- { # D7100=0227, Z6/Z7=0800
2063
+ { # (Z9 firmware version 1.00 ref 28)
2064
+ Condition => '$$valPt =~ /^0805/',
2065
+ Name => 'ShotInfoZ9',
2066
+ SubDirectory => {
2067
+ TagTable => 'Image::ExifTool::Nikon::ShotInfoZ9',
2068
+ DecryptStart => 4,
2069
+ # TODO: eventually set the length dynamically according to actual offsets!
2070
+ DecryptLen => 0xec4b + 1646, # decoded thru end of CustomSettingZ9 in Offset26 (+MenuSettingsZ9Offset)
2071
+ ByteOrder => 'LittleEndian',
2072
+ },
2073
+ },
2074
+ { # D7100=0227
1890
2075
  Condition => '$$valPt =~ /^0[28]/',
1891
2076
  Name => 'ShotInfo02xx',
1892
2077
  SubDirectory => {
@@ -1915,18 +2100,8 @@ my %binaryDataAttrs = (
1915
2100
  0x0093 => { #21
1916
2101
  Name => 'NEFCompression',
1917
2102
  Writable => 'int16u',
1918
- PrintConv => {
1919
- 1 => 'Lossy (type 1)', # (older models)
1920
- 2 => 'Uncompressed', #JD - D100 (even though TIFF compression is set!)
1921
- 3 => 'Lossless',
1922
- 4 => 'Lossy (type 2)',
1923
- 5 => 'Striped packed 12 bits', #IB
1924
- 6 => 'Uncompressed (reduced to 12 bit)', #IB
1925
- 7 => 'Unpacked 12 bits', #IB (padded to 16)
1926
- 8 => 'Small', #IB
1927
- 9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1928
- 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1929
- },
2103
+ SeparateTable => 'NEFCompression',
2104
+ PrintConv => \%nefCompression,
1930
2105
  },
1931
2106
  0x0094 => { Name => 'SaturationAdj', Writable => 'int16s' },
1932
2107
  0x0095 => { Name => 'NoiseReduction', Writable => 'string' }, # ("Off" or "FPNR"=long exposure NR)
@@ -2127,7 +2302,7 @@ my %binaryDataAttrs = (
2127
2302
  },
2128
2303
  },
2129
2304
  {
2130
- Condition => '$$valPt =~ /^080[01]/', # Z6/Z7
2305
+ Condition => '$$valPt =~ /^080[012]/', # Z6/Z7/Z9
2131
2306
  Name => 'LensData0800',
2132
2307
  SubDirectory => {
2133
2308
  TagTable => 'Image::ExifTool::Nikon::LensData0800',
@@ -2262,8 +2437,8 @@ my %binaryDataAttrs = (
2262
2437
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::FlashInfo0107' },
2263
2438
  },
2264
2439
  {
2265
- Name => 'FlashInfo0300', # (Z7_2)
2266
- Condition => '$$valPt =~ /^0300/',
2440
+ Name => 'FlashInfo0300', # (Z7II)
2441
+ Condition => '$$valPt =~ /^030[01]/',
2267
2442
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::FlashInfo0300' },
2268
2443
  },
2269
2444
  {
@@ -2336,11 +2511,15 @@ my %binaryDataAttrs = (
2336
2511
  PrintConv => '$self->ConvertDateTime($val)',
2337
2512
  PrintConvInv => '$self->InverseDateTime($val,0)',
2338
2513
  },
2339
- 0x00b7 => { #JD
2514
+ 0x00b7 => [{
2515
+ Name => 'AFInfo2',
2516
+ Condition => '$$self{Model} =~ /^NIKON Z 9\b/i', #AFInfo2Version 0400
2517
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
2518
+ },{ #JD
2340
2519
  Name => 'AFInfo2',
2341
2520
  # (this structure may be byte swapped when rewritten by CaptureNX)
2342
2521
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
2343
- },
2522
+ }],
2344
2523
  0x00b8 => [{ #PH
2345
2524
  Name => 'FileInfo',
2346
2525
  # unfortunately, some newer models write this as little-endian
@@ -2389,6 +2568,10 @@ my %binaryDataAttrs = (
2389
2568
  Flags => [ 'Binary', 'Protected' ],
2390
2569
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::PictureControl' },
2391
2570
  },
2571
+ 0x00bf => {
2572
+ Name => 'SilentPhotography',
2573
+ PrintConv => \%offOn,
2574
+ },
2392
2575
  0x00c3 => {
2393
2576
  Name => 'BarometerInfo',
2394
2577
  SubDirectory => {
@@ -2597,15 +2780,23 @@ my %binaryDataAttrs = (
2597
2780
  },
2598
2781
  },
2599
2782
  # 5 - values: 0, 1 (VR On), 2 (VR Off)
2600
- 6 => {
2783
+ 6 => [{
2784
+ Name => 'VRMode',
2785
+ PrintConv => {
2786
+ 0 => 'Off',
2787
+ 1 => 'Sport',
2788
+ 3 => 'Normal',
2789
+ },
2790
+ %infoZSeries
2791
+ },{
2601
2792
  Name => 'VRMode',
2602
2793
  PrintConv => {
2603
- 0 => 'Normal', # (Z7 gives this value for "off" - PH)
2794
+ 0 => 'Normal',
2604
2795
  1 => 'On (1)', #PH (NC)
2605
2796
  2 => 'Active', # (1J1)
2606
2797
  3 => 'Sport', #PH (Z7)
2607
2798
  },
2608
- },
2799
+ }],
2609
2800
  # 7 - values: 0, 1
2610
2801
  );
2611
2802
 
@@ -3439,6 +3630,10 @@ my %binaryDataAttrs = (
3439
3630
  201 => 'Wide-area AF', #28 (D6)
3440
3631
  202 => 'Face-priority AF', #28 (D6)
3441
3632
  203 => 'Subject-tracking AF', #28 (D6)
3633
+ 204 => 'Dynamic Area (S)', #28 (Z9)
3634
+ 205 => 'Dynamic Area (M)', #28 (Z9)
3635
+ 206 => 'Dynamic Area (L)', #28 (Z9)
3636
+ 207 => '3D-tracking', #28 (Z9)
3442
3637
  },
3443
3638
  },
3444
3639
  ],
@@ -3966,6 +4161,47 @@ my %binaryDataAttrs = (
3966
4161
  },
3967
4162
  );
3968
4163
 
4164
+ %Image::ExifTool::Nikon::AFInfo2V0400 = ( #V0400 related fields begin at x'3c' ( Z9)
4165
+ %binaryDataAttrs,
4166
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4167
+ DATAMEMBER => [ 0 ],
4168
+ 0 => {
4169
+ Name => 'AFInfo2Version',
4170
+ Format => 'undef[4]',
4171
+ Writable => 0,
4172
+ RawConv => '$$self{AFInfo2Version} = $val',
4173
+ },
4174
+ 0x3e => {
4175
+ Name => 'AFImageWidth',
4176
+ Format => 'int16u',
4177
+ },
4178
+ 0x40 => {
4179
+ Name => 'AFImageHeight',
4180
+ Format => 'int16u',
4181
+ },
4182
+ 0x43 => {
4183
+ Name => 'FocusPositionHoriontal',
4184
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ); }, #493 focus points for Z9 fall in a 30x18 grid (some coordinates are not accessible)
4185
+ },
4186
+ 0x45 => {
4187
+ Name => 'FocusPositionVertical',
4188
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ); },
4189
+ },
4190
+ 0x46 => {
4191
+ Name => 'AFAreaWidth',
4192
+ Format => 'int16u',
4193
+ Notes => 'size of AF area in AFImage pixels',
4194
+ RawConv => '$val ? $val : undef',
4195
+ },
4196
+ 0x48 => {
4197
+ Name => 'AFAreaHeight',
4198
+ Format => 'int16u',
4199
+ RawConv => '$val ? $val : undef',
4200
+ }
4201
+ # AFFocusResult is the result of the last AF operation and not necessarily an indication of the state of the of the capture (e.g., the subject may have moved or the image re-framed)
4202
+ #0x4a => { Name => 'AFFocusResult',PrintConv => {0=> "No Focus", 1=>"Focus"} }, #new tag created because Z9 uses a hybrid contrast/phase AF (closest former tag was ContrastDetectAFInFocus).
4203
+ );
4204
+
3969
4205
  # Nikon AF fine-tune information (ref 28)
3970
4206
  %Image::ExifTool::Nikon::AFTune = (
3971
4207
  %binaryDataAttrs,
@@ -4731,6 +4967,7 @@ my %nikonFocalConversions = (
4731
4967
  23 => 'Nikkor Z 14-24mm f/2.8 S', #IB
4732
4968
  24 => 'Nikkor Z MC 105mm f/2.8 VR S', #IB
4733
4969
  27 => 'Nikkor Z MC 50mm f/2.8', #IB
4970
+ 28 => 'Nikkor Z 100-400mm f/4.5-5.6 VR S', #28
4734
4971
  29 => 'Nikkor Z 28mm f/2.8', #IB
4735
4972
  },
4736
4973
  },
@@ -6049,6 +6286,18 @@ my %nikonFocalConversions = (
6049
6286
  3 => 'Rotate 180',
6050
6287
  },
6051
6288
  },
6289
+ 0x0d0 => {
6290
+ Name => 'Interval',
6291
+ # prior version of the d% firmware do not support this tag, nor does the D500 (at least thru firmware 1.3)
6292
+ Condition => '$$self{Model} eq "NIKON D5" and $$self{FirmwareVersion} ge "1.40"',
6293
+ PrintConv => '$val > 0 ? sprintf("%.0f", $val) : ""',
6294
+ },
6295
+ 0x0d4 => {
6296
+ Name => 'IntervalFrame',
6297
+ # prior version of the d% firmware do not support this tag, nor does the D500 (at least thru firmware 1.3)
6298
+ Condition => '$$self{Model} eq "NIKON D5" and $$self{FirmwareVersion} ge "1.40"',
6299
+ PrintConv => '$val > 0 ? sprintf("%.0f", $val) : ""',
6300
+ },
6052
6301
  0x05e2 => {
6053
6302
  Name => 'FlickerReductionIndicator',
6054
6303
  Mask => 0x01,
@@ -6467,7 +6716,7 @@ my %nikonFocalConversions = (
6467
6716
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
6468
6717
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6469
6718
  VARS => { ID_LABEL => 'Index' },
6470
- DATAMEMBER => [ 0x9c, 0xc219 ],
6719
+ DATAMEMBER => [ 0x30, 0x60, 0x9c, 0xa4, 0x75e7, 0x760c, 0x7610, 0xc219, 0xc292, 0xc40e, 0xc412, 0xc4a6, 0xc4be ],
6471
6720
  WRITABLE => 1,
6472
6721
  FIRST_ENTRY => 0,
6473
6722
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -6477,6 +6726,11 @@ my %nikonFocalConversions = (
6477
6726
  Format => 'string[4]',
6478
6727
  Writable => 0,
6479
6728
  },
6729
+ 0x04 => {
6730
+ Name => 'FirmwareVersion',
6731
+ Format => 'string[8]',
6732
+ Writable => 0,
6733
+ },
6480
6734
  0x24 => {
6481
6735
  Name => 'NumberOffsets', # (number of entries in offset table. offsets are from start of ShotInfo data)
6482
6736
  DataMember => 'NumberOffsets',
@@ -6484,6 +6738,22 @@ my %nikonFocalConversions = (
6484
6738
  Writable => 0,
6485
6739
  Hidden => 1,
6486
6740
  },
6741
+ 0x30 => {
6742
+ Name => 'Offset3',
6743
+ DataMember => 'Offset3',
6744
+ Format => 'int32u',
6745
+ Writable => 0,
6746
+ Hidden => 1,
6747
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
6748
+ },
6749
+ 0x60 => {
6750
+ Name => 'Offset15',
6751
+ DataMember => 'Offset15',
6752
+ Format => 'int32u',
6753
+ Writable => 0,
6754
+ Hidden => 1,
6755
+ RawConv => '$$self{Offset15} = $val || 0x10000000; undef', # (ignore if 0)
6756
+ },
6487
6757
  0x9c => {
6488
6758
  Name => 'OrientationOffset',
6489
6759
  DataMember => 'OrientationOffset',
@@ -6492,15 +6762,49 @@ my %nikonFocalConversions = (
6492
6762
  Hidden => 1,
6493
6763
  RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
6494
6764
  },
6495
- ### 0xc21a - OrientationInfo start (D6 firmware 1.00)
6496
- 0xc219 => {
6765
+ 0xa4 => {
6766
+ Name => 'Offset32',
6767
+ DataMember => 'Offset32',
6768
+ Format => 'int32u',
6769
+ Writable => 0,
6770
+ Hidden => 1,
6771
+ RawConv => '$$self{Offset32} = $val || 0x10000000; undef', # (ignore if 0)
6772
+ },
6773
+ ### 0x75e8 - Offset3 info start (D6 firmware 1.33)
6774
+ 0x75e7 => {
6497
6775
  Name => 'Hook1',
6498
6776
  Hidden => 1,
6499
6777
  RawConv => 'undef',
6778
+ # account for variable location of Offset5 data
6779
+ Hook => '$varSize = $$self{Offset3} - 0x75e8',
6780
+ },
6781
+ 0x760c => {
6782
+ Name => 'IntervalShooting',
6783
+ RawConv => '$$self{IntervalShooting} = $val',
6784
+ Format => 'int16u',
6785
+ PrintConv => q{
6786
+ return 'Off' if $val == 0 ;
6787
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); #something like "Interval 1 of 3"
6788
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; #something like "Frame 1 of 3" or blank
6789
+ return "On: $i$f"
6790
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
6791
+ },
6792
+ },
6793
+ 0x7610 => {
6794
+ Name => 'IntervalFrame',
6795
+ RawConv => '$$self{IntervalFrame} = $val',
6796
+ Condition => '$$self{IntervalShooting} > 0',
6797
+ Format => 'int16u',
6798
+ Hidden => 1,
6799
+ },
6800
+ ### 0xc21a - OrientationInfo start (D6 firmware 1.00) (0xc952 for firmware 1.33)
6801
+ 0xc219 => {
6802
+ Name => 'Hook2',
6803
+ Hidden => 1,
6804
+ RawConv => 'undef',
6500
6805
  # account for variable location of OrientationInfo data
6501
6806
  Hook => '$varSize = $$self{OrientationOffset} - 0xc21a',
6502
6807
  },
6503
-
6504
6808
  0xc21a => {
6505
6809
  Name => 'RollAngle',
6506
6810
  Format => 'fixed32u',
@@ -6528,7 +6832,136 @@ my %nikonFocalConversions = (
6528
6832
  PrintConv => 'sprintf("%.1f", $val)',
6529
6833
  PrintConvInv => '$val',
6530
6834
  },
6531
- # note: DecryptLen currently set to 0xc21a + 12
6835
+ ### 0xc9c6 - Offset32 start (D6 firmware 1.33)
6836
+ 0xc292 => {
6837
+ Name => 'Hook3',
6838
+ Hidden => 1,
6839
+ RawConv => 'undef',
6840
+ # account for variable location of data
6841
+ Hook => '$varSize = $$self{Offset32} - 0xc292',
6842
+ },
6843
+ 0xc40e => {
6844
+ Name => 'Intervals',
6845
+ Format => 'int32u',
6846
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
6847
+ Condition => '$$self{IntervalShooting} > 0',
6848
+ },
6849
+ 0xc412 => {
6850
+ Name => 'ShotsPerInterval',
6851
+ Format => 'int32u',
6852
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
6853
+ Condition => '$$self{IntervalShooting} > 0',
6854
+ },
6855
+ 0xc416 => {
6856
+ Name => 'IntervalExposureSmoothing',
6857
+ Condition => '$$self{IntervalShooting} > 0',
6858
+ Format => 'int8u',
6859
+ PrintConv => \%offOn,
6860
+ },
6861
+ 0xc418 => {
6862
+ Name => 'IntervalPriority',
6863
+ Condition => '$$self{IntervalShooting} > 0',
6864
+ Format => 'int8u',
6865
+ PrintConv => \%offOn,
6866
+ },
6867
+ 0xc43a => {
6868
+ Name => 'FocusShiftNumberShots',
6869
+ },
6870
+ 0xc43e => {
6871
+ Name => 'FocusShiftStepWidth',
6872
+ },
6873
+ 0xc442 => {
6874
+ Name => 'FocusShiftInterval',
6875
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
6876
+ },
6877
+ 0xc446 => {
6878
+ Name => 'FocusShiftExposureLock',
6879
+ PrintConv => \%offOn,
6880
+ },
6881
+ #0xc49c => HighISONoiseReduction
6882
+ 0xc4a0 => {
6883
+ Name => 'DiffractionCompensation',
6884
+ Format => 'int8u',
6885
+ PrintConv => \%offOn,
6886
+ },
6887
+ #0xc4a1 => {Name => 'FlickerReductionShooting',}, #redundant with tag in NikonSettings
6888
+ 0xc4a6 => {
6889
+ Name => 'FlashControlMode', #this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
6890
+ RawConv => '$$self{FlashControlMode} = $val',
6891
+ PrintConv => {
6892
+ 0 => 'TTL',
6893
+ 1 => 'Auto External Flash',
6894
+ 2 => 'GN (distance priority)',
6895
+ 3 => 'Manual',
6896
+ 4 => 'Repeating Flash',
6897
+ },
6898
+ },
6899
+ 0xc4ac => {
6900
+ Name => 'FlashGNDistance',
6901
+ Condition => '$$self{FlashControlMode} == 2',
6902
+ Unknown => 1,
6903
+ ValueConv => '$val + 3',
6904
+ PrintConv => \%flashGNDistance,
6905
+ },
6906
+ 0xc4b0 => {
6907
+ 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)
6908
+ Condition => '$$self{FlashControlMode} >= 3',
6909
+ Unknown => 1,
6910
+ ValueConv => '2 ** (-$val/3)',
6911
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
6912
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
6913
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
6914
+ },
6915
+ 0xc4ba => {
6916
+ Name => 'FlashRemoteControl',
6917
+ Unknown => 1,
6918
+ PrintConv => {
6919
+ 0 => 'Group',
6920
+ 1 => 'Quick Wireless',
6921
+ 2 => 'Remote Repeating',
6922
+ },
6923
+ },
6924
+ 0xc4be => {
6925
+ Name => 'FlashMasterControlMode', #tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
6926
+ RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
6927
+ PrintConv => \%flashGroupOptionsMode,
6928
+ },
6929
+ 0xc4c0 => {
6930
+ Name => 'FlashMasterCompensation',
6931
+ Unknown => 1,
6932
+ Format => 'int8s',
6933
+ Condition => '$$self{FlashGroupOptionsMasterMode} != 3', #other than 'Off'
6934
+ ValueConv => '$val/6',
6935
+ ValueConvInv => '6 * $val',
6936
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
6937
+ PrintConvInv => '$val',
6938
+ },
6939
+ 0xc4c4 => {
6940
+ Name => 'FlashMasterOutput',
6941
+ Unknown => 1,
6942
+ Condition => '$$self{FlashGroupOptionsMasterMode} == 1', #only for Mode=M
6943
+ ValueConv => '2 ** (-$val/3)',
6944
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
6945
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
6946
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
6947
+ },
6948
+ 0xc4c6 => {
6949
+ Name => 'FlashWirelessOption',
6950
+ Unknown => 1,
6951
+ PrintConv => {
6952
+ 0 => 'Optical AWL',
6953
+ 1 => 'Off',
6954
+ },
6955
+ },
6956
+ 0xc55c => {
6957
+ Name => 'MovieType',
6958
+ Unknown => 1,
6959
+ PrintConv => {
6960
+ 0 => 'MOV',
6961
+ 1 => 'MP4',
6962
+ },
6963
+ },
6964
+ # note: DecryptLen currently set to 0xc9c6 + 720
6532
6965
  );
6533
6966
 
6534
6967
  # shot information for the D610 firmware 1.00 (encrypted) - ref PH
@@ -7047,9 +7480,7 @@ my %nikonFocalConversions = (
7047
7480
  WRITABLE => 1,
7048
7481
  FIRST_ENTRY => 0,
7049
7482
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7050
- NOTES => q{
7051
- These tags are extracted from encrypted data in images from the D4S.
7052
- },
7483
+ NOTES => 'These tags are extracted from encrypted data in images from the D4S.',
7053
7484
  0x00 => {
7054
7485
  Name => 'ShotInfoVersion',
7055
7486
  Format => 'string[4]',
@@ -7299,7 +7730,7 @@ my %nikonFocalConversions = (
7299
7730
  Format => 'undef[56]',
7300
7731
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsD4' },
7301
7732
  },
7302
- # 0x1978 => { #this decode works, but involves more bits than should be necessary
7733
+ # 0x1978 => { # this decode works, but involves more bits than should be necessary
7303
7734
  # Name => 'ShutterTrigger',
7304
7735
  # Mask => 0xff,
7305
7736
  # PrintConv => {
@@ -7348,17 +7779,19 @@ my %nikonFocalConversions = (
7348
7779
  # note: DecryptLen currently set to 0x3697
7349
7780
  );
7350
7781
 
7351
- # shot information for the Z7_2 firmware 1.00 (encrypted) - ref 28
7352
- %Image::ExifTool::Nikon::ShotInfoZ7_2 = (
7782
+ # shot information for the Z7II firmware 1.00 (encrypted) - ref 28
7783
+ %Image::ExifTool::Nikon::ShotInfoZ7II = (
7353
7784
  PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7354
7785
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7355
7786
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7356
7787
  VARS => { ID_LABEL => 'Index' },
7357
- DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x38, 0x98, 0x7eff, 0xce31 ],
7788
+ DATAMEMBER => [ 0x04, 0x30, 0x38, 0x98, 0xa0, 0x75e7, 0x760c,
7789
+ 0x7610, 0x7eff, 0xce31, 0xcea5, 0xceb6, 0xceb7 ],
7790
+ IS_SUBDIR => [ 0xceb8 ],
7358
7791
  WRITABLE => 1,
7359
7792
  FIRST_ENTRY => 0,
7360
7793
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7361
- NOTES => 'These tags are extracted from encrypted data in images from the Z7_2.',
7794
+ NOTES => 'These tags are extracted from encrypted data in images from the Z7II.',
7362
7795
  0x00 => {
7363
7796
  Name => 'ShotInfoVersion',
7364
7797
  Format => 'string[4]',
@@ -7371,28 +7804,34 @@ my %nikonFocalConversions = (
7371
7804
  Writable => 0,
7372
7805
  RawConv => '$$self{FirmwareVersion} = $val',
7373
7806
  },
7374
- 0x0E => {
7807
+ 0x0e => {
7375
7808
  Name => 'FirmwareVersion2',
7376
7809
  Format => 'string[8]',
7377
7810
  Writable => 0,
7378
- RawConv => '$$self{FirmwareVersion2} = $val',
7379
7811
  Hidden => 1,
7380
7812
  },
7381
7813
  0x18 => {
7382
7814
  Name => 'FirmwareVersion3',
7383
7815
  Format => 'string[8]',
7384
7816
  Writable => 0,
7385
- RawConv => '$$self{FirmwareVersion3} = $val',
7386
7817
  Hidden => 1,
7387
7818
  },
7388
7819
  0x24 => {
7389
- Name => 'NumberOffsets', #number of entries in offset table. offsets are from start of ShotInfo data.
7820
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
7390
7821
  DataMember => 'NumberOffsets',
7391
7822
  Format => 'int32u',
7392
7823
  Writable => 0,
7393
7824
  Hidden => 1,
7394
7825
  },
7395
- 0x38 => { #28
7826
+ 0x30 => {
7827
+ Name => 'Offset3',
7828
+ DataMember => 'Offset3',
7829
+ Format => 'int32u',
7830
+ Writable => 0,
7831
+ Hidden => 1,
7832
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
7833
+ },
7834
+ 0x38 => {
7396
7835
  Name => 'Offset5',
7397
7836
  DataMember => 'Offset5',
7398
7837
  Format => 'int32u',
@@ -7408,20 +7847,54 @@ my %nikonFocalConversions = (
7408
7847
  Hidden => 1,
7409
7848
  RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
7410
7849
  },
7411
-
7412
- ### 0x7f00 - Offset5 info start (Z7_2 firmware 1.30)
7413
- 0x7eff => { #28
7850
+ 0xa0 => {
7851
+ Name => 'Offset31',
7852
+ DataMember => 'Offset31',
7853
+ Format => 'int32u',
7854
+ Writable => 0,
7855
+ Hidden => 1,
7856
+ RawConv => '$$self{Offset31} = $val || 0x10000000; undef', # (ignore if 0)
7857
+ },
7858
+ ### 0x75e8 - Offset3 info start (Z7II firmware 1.30)
7859
+ 0x75e7 => {
7414
7860
  Name => 'Hook1',
7415
7861
  Hidden => 1,
7416
7862
  RawConv => 'undef',
7863
+ # account for variable location of Offset3 data
7864
+ Hook => '$varSize = $$self{Offset3} - 0x75e8',
7865
+ },
7866
+ 0x760c => {
7867
+ Name => 'IntervalShooting',
7868
+ RawConv => '$$self{IntervalShooting} = $val',
7869
+ Format => 'int16u',
7870
+ PrintConv => q{
7871
+ return 'Off' if $val == 0 ;
7872
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); # something like "Interval 1 of 3"
7873
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; # something like "Frame 1 of 3" or blank
7874
+ return "On: $i$f"
7875
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
7876
+ },
7877
+ },
7878
+ 0x7610 => {
7879
+ Name => 'IntervalFrame',
7880
+ RawConv => '$$self{IntervalFrame} = $val',
7881
+ Condition => '$$self{IntervalShooting} > 0',
7882
+ Format => 'int16u',
7883
+ Hidden => 1,
7884
+ },
7885
+ ### 0x7f00 - Offset5 info start (Z7II firmware 1.30)
7886
+ 0x7eff => {
7887
+ Name => 'Hook2',
7888
+ Hidden => 1,
7889
+ RawConv => 'undef',
7417
7890
  # account for variable location of Offset5 data
7418
7891
  Hook => '$varSize = $$self{Offset5} - 0x7f00',
7419
7892
  },
7420
7893
  0x7fa0 => { #28
7421
- 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
7422
- #offset5+160; 128 is neutral; >128 increases Yellow; <128 increases Magenta; increments of 4 result from 1 full unit adjustment on the camera
7423
- #offset5+161 129 is neutral; >129 increases Brightness; <129 decreases Brightness
7424
- #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]
7894
+ 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
7895
+ # offset5+160; 128 is neutral; >128 increases Yellow; <128 increases Magenta; increments of 4 result from 1 full unit adjustment on the camera
7896
+ # offset5+161 128 is neutral; >128 increases Brightness; <128 decreases Brightness
7897
+ # 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]
7425
7898
  Format => 'int8u[2]',
7426
7899
  Condition => '$$self{FirmwareVersion} ge "01.30"',
7427
7900
  PrintConv => q{
@@ -7433,9 +7906,9 @@ my %nikonFocalConversions = (
7433
7906
  return "$color $brightness"
7434
7907
  },
7435
7908
  },
7436
- ### 0xce32 - OrientationInfo start (Z7_2 firmware 1.00)
7909
+ ### 0xce32 - OrientationInfo start (Z7II firmware 1.00)
7437
7910
  0xce31 => {
7438
- Name => 'Hook2',
7911
+ Name => 'Hook3',
7439
7912
  Hidden => 1,
7440
7913
  RawConv => 'undef',
7441
7914
  # account for variable location of OrientationInfo data
@@ -7469,35 +7942,1172 @@ my %nikonFocalConversions = (
7469
7942
  PrintConv => 'sprintf("%.1f", $val)',
7470
7943
  PrintConvInv => '$val',
7471
7944
  },
7472
- #note: DecryptLen currently set to 0xce32 + 12
7945
+ 0xcea5 => {
7946
+ Name => 'Hook4',
7947
+ Hidden => 1,
7948
+ RawConv => 'undef',
7949
+ # account for variable location of Offset31 data
7950
+ Hook => '$varSize = $$self{Offset31} - 0xcea6',
7951
+ },
7952
+ ### 0xcea6 - Offset31 info start (Z7II firmware 1.30)
7953
+ 0xceb6 => {
7954
+ Name => 'MenuSettingsZ7IIOffset',
7955
+ # offset to MenuSettingsZ7II is relative to start of Offset31 block
7956
+ RawConv => '$$self{MenuSettingsZ7IIOffset} = ($val || 0x10000000) + $$self{Offset31}; undef', # (ignore if 0)
7957
+ },
7958
+ 0xceb7 => {
7959
+ Name => 'Hook5',
7960
+ Hidden => 1,
7961
+ RawConv => 'undef',
7962
+ # account for variable location of Offset5 data
7963
+ Hook => '$varSize = $$self{MenuSettingsZ7IIOffset} - 0xceb8',
7964
+ },
7965
+ 0xceb8 => { # (this is 0xd04e for the Z50)
7966
+ Name => 'MenuSettingsZ7II',
7967
+ Format => 'undef[860]',
7968
+ SubDirectory => {
7969
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ7II',
7970
+ },
7971
+ }
7972
+ # note: DecryptLen currently set to 0xd04e + 860 (offset for Z50 is 0xd04e)
7473
7973
  );
7474
7974
 
7475
- # Flash information (ref JD)
7476
- %Image::ExifTool::Nikon::FlashInfo0100 = (
7477
- %binaryDataAttrs,
7478
- DATAMEMBER => [ 9.2, 15, 16 ],
7975
+ # shot information for the Z9 firmware 1.00 (encrypted) - ref 28
7976
+ %Image::ExifTool::Nikon::ShotInfoZ9 = (
7977
+ PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7978
+ WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7979
+ CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7980
+ VARS => { ID_LABEL => 'Index' },
7981
+ DATAMEMBER => [ 0x04, 0x30, 0x38, 0x84, 0x8c, 0x6c6f, 0x6c98,
7982
+ 0x6c9a, 0x7717, 0x7844, 0xeaea, 0xeb6f, 0xeb70 ],
7983
+ IS_SUBDIR => [ 0xec4b ],
7984
+ WRITABLE => 1,
7985
+ FIRST_ENTRY => 0,
7479
7986
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7480
- NOTES => q{
7481
- These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
7482
- D200.
7483
- },
7484
- # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
7485
- 0 => {
7486
- Name => 'FlashInfoVersion',
7987
+ NOTES => 'These tags are extracted from encrypted data in images from the Z9.',
7988
+ 0x00 => {
7989
+ Name => 'ShotInfoVersion',
7487
7990
  Format => 'string[4]',
7488
7991
  Writable => 0,
7489
7992
  },
7490
- 4 => { #PH
7491
- Name => 'FlashSource',
7492
- PrintConv => {
7493
- 0 => 'None',
7494
- 1 => 'External',
7495
- 2 => 'Internal',
7496
- },
7993
+ 0x04 => {
7994
+ Name => 'FirmwareVersion',
7995
+ DataMember => 'FirmwareVersion',
7996
+ Format => 'string[8]',
7997
+ Writable => 0,
7998
+ RawConv => '$$self{FirmwareVersion} = $val',
7497
7999
  },
7498
- # 5 - values: 46,48,50,54,78
7499
- 6 => {
7500
- Format => 'int8u[2]',
8000
+ 0x0e => {
8001
+ Name => 'FirmwareVersion2',
8002
+ Format => 'string[8]',
8003
+ Writable => 0,
8004
+ Hidden => 1,
8005
+ },
8006
+ 0x18 => {
8007
+ Name => 'FirmwareVersion3',
8008
+ Format => 'string[8]',
8009
+ Writable => 0,
8010
+ Hidden => 1,
8011
+ },
8012
+ 0x24 => {
8013
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
8014
+ DataMember => 'NumberOffsets',
8015
+ Format => 'int32u',
8016
+ Writable => 0,
8017
+ Hidden => 1,
8018
+ },
8019
+ 0x30 => {
8020
+ Name => 'Offset3', #offset3 - length 2528 (Z9 firmware 1.0)
8021
+ DataMember => 'Offset3',
8022
+ Format => 'int32u',
8023
+ Writable => 0,
8024
+ Hidden => 1,
8025
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
8026
+ },
8027
+ 0x38 => {
8028
+ Name => 'Offset5', #offset5 - length 2488 (Z9 firmware 1.0)
8029
+ DataMember => 'Offset5',
8030
+ Format => 'int32u',
8031
+ Writable => 0,
8032
+ Hidden => 1,
8033
+ RawConv => '$$self{Offset5} = $val || 0x10000000; undef', # (ignore if 0)
8034
+ },
8035
+ 0x84 => {
8036
+ Name => 'OrientationOffset', #offset24 - length 108 (Z9 firmware 1.0)
8037
+ DataMember => 'OrientationOffset',
8038
+ Format => 'int32u',
8039
+ Writable => 0,
8040
+ Hidden => 1,
8041
+ RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
8042
+ },
8043
+ 0x8c => {
8044
+ Name => 'Offset26', #offset26 - length 1895 (Z9 firmware 1.0)
8045
+ DataMember => 'Offset26',
8046
+ Format => 'int32u',
8047
+ Writable => 0,
8048
+ Hidden => 1,
8049
+ RawConv => '$$self{Offset26} = $val || 0x10000000; undef', # (ignore if 0)
8050
+ },
8051
+ ### 0x6c70 - Offset3 info start (Z9 firmware 1.00)
8052
+ 0x6c6f => {
8053
+ Name => 'Offset3Hook',
8054
+ Hidden => 1,
8055
+ RawConv => 'undef',
8056
+ # account for variable location of Offset3 data
8057
+ Hook => '$varSize = $$self{Offset3} - 0x6c70',
8058
+ },
8059
+ 0x6c98 => {
8060
+ Name => 'IntervalShooting',
8061
+ RawConv => '$$self{IntervalShooting} = $val',
8062
+ Format => 'int16u',
8063
+ PrintConv => q{
8064
+ return 'Off' if $val == 0 ;
8065
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); # something like "Interval 1 of 3"
8066
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; # something like "Frame 1 of 3" or blank
8067
+ return "On: $i$f"
8068
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
8069
+ },
8070
+ },
8071
+ 0x6c9a => {
8072
+ Name => 'IntervalFrame',
8073
+ RawConv => '$$self{IntervalFrame} = $val',
8074
+ Condition => '$$self{IntervalShooting} > 0',
8075
+ Format => 'int16u',
8076
+ Hidden => 1,
8077
+ },
8078
+ ### 0x7718 - Offset5 info start (Z9 firmware 1.00)
8079
+ 0x7717 => {
8080
+ Name => 'Offsset5Hook',
8081
+ Hidden => 1,
8082
+ RawConv => 'undef',
8083
+ # account for variable location of Offset5 data
8084
+ Hook => '$varSize = $$self{Offset5} - 0x7718',
8085
+ },
8086
+ 0x7844 => {
8087
+ Name => 'FocusShiftShooting',
8088
+ RawConv => '$$self{FocusShiftShooting} = $val',
8089
+ PrintConv => q{
8090
+ return 'Off' if $val == 0 ;
8091
+ my $i = sprintf("Frame %.0f of %.0f",$val, $$self{FocusShiftNumberShots}); # something like Frame 1 of 100"
8092
+ return "On: $i"
8093
+ },
8094
+ },
8095
+ ### 0xeaeb - OrientationInfo start (Z9 firmware 1.00)
8096
+ 0xeaea => {
8097
+ Name => 'OrientationHook',
8098
+ Hidden => 1,
8099
+ RawConv => 'undef',
8100
+ # account for variable location of OrientationInfo data
8101
+ Hook => '$varSize = $$self{OrientationOffset} - 0xeaeb',
8102
+ },
8103
+ 0xeaeb => {
8104
+ Name => 'RollAngle',
8105
+ Format => 'fixed32u',
8106
+ Notes => 'converted to degrees of clockwise camera roll',
8107
+ ValueConv => '$val <= 180 ? $val : $val - 360',
8108
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
8109
+ PrintConv => 'sprintf("%.1f", $val)',
8110
+ PrintConvInv => '$val',
8111
+ },
8112
+ 0xeaef => {
8113
+ Name => 'PitchAngle',
8114
+ Format => 'fixed32u',
8115
+ Notes => 'converted to degrees of upward camera tilt',
8116
+ ValueConv => '$val <= 180 ? $val : $val - 360',
8117
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
8118
+ PrintConv => 'sprintf("%.1f", $val)',
8119
+ PrintConvInv => '$val',
8120
+ },
8121
+ 0xeaf3 => {
8122
+ Name => 'YawAngle',
8123
+ Format => 'fixed32u',
8124
+ Notes => 'the camera yaw angle when shooting in portrait orientation',
8125
+ ValueConv => '$val <= 180 ? $val : $val - 360',
8126
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
8127
+ PrintConv => 'sprintf("%.1f", $val)',
8128
+ PrintConvInv => '$val',
8129
+ },
8130
+ ### 0xeb5f - Offset26 info start (Z9 firmware 1.00)
8131
+ 0xeb6f => {
8132
+ Name => 'MenuSettingsZ9Offset',
8133
+ Writable => 0,
8134
+ Hidden => 1,
8135
+ # offset to MenuSettingsZ9 is relative to start of Offset26 block
8136
+ RawConv => '$$self{MenuSettingsZ9Offset} = ($val || 0x10000000) + $$self{Offset26}; undef', # (ignore if 0)
8137
+ },
8138
+ 0xeb70 => {
8139
+ Name => 'Hook5',
8140
+ Hidden => 1,
8141
+ RawConv => 'undef',
8142
+ # account for variable location of menu settings data
8143
+ Hook => '$varSize = $$self{MenuSettingsZ9Offset} - 0xec4b',
8144
+ },
8145
+ 0xec4b => {
8146
+ Name => 'MenuSettingsZ9',
8147
+ Format => 'undef[1646]',
8148
+ SubDirectory => {
8149
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9',
8150
+ },
8151
+ },
8152
+ # note: DecryptLen currently set to 0xec4b + 1646
8153
+ );
8154
+
8155
+ %Image::ExifTool::Nikon::MenuSettingsZ7II = (
8156
+ %binaryDataAttrs,
8157
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8158
+ DATAMEMBER => [ 176, 180, 328, 352, 858 ],
8159
+ NOTES => 'These tags are used by the Z5, Z6, Z7, Z6II, Z7II, Z50 and Zfc.',
8160
+ 160 => {
8161
+ Name => 'IntervalDurationHours',
8162
+ Format => 'int32u',
8163
+ #Condition => '$$self{IntervalShooting} > 0',
8164
+ },
8165
+ 164 => {
8166
+ Name => 'IntervalDurationMinutes',
8167
+ Format => 'int32u',
8168
+ #Condition => '$$self{IntervalShooting} > 0',
8169
+ },
8170
+ 168 => {
8171
+ Name => 'IntervalDurationSeconds',
8172
+ Format => 'int32u',
8173
+ #Condition => '$$self{IntervalShooting} > 0',
8174
+ },
8175
+ 176 => {
8176
+ Name => 'Intervals',
8177
+ Format => 'int32u',
8178
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
8179
+ #Condition => '$$self{IntervalShooting} > 0',
8180
+ },
8181
+ 180 => {
8182
+ Name => 'ShotsPerInterval',
8183
+ Format => 'int32u',
8184
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
8185
+ #Condition => '$$self{IntervalShooting} > 0',
8186
+ },
8187
+ 184 => {
8188
+ Name => 'IntervalExposureSmoothing',
8189
+ #Condition => '$$self{IntervalShooting} > 0',
8190
+ Format => 'int8u',
8191
+ PrintConv => \%offOn,
8192
+ },
8193
+ 186 => {
8194
+ Name => 'IntervalPriority',
8195
+ #Condition => '$$self{IntervalShooting} > 0',
8196
+ Format => 'int8u',
8197
+ PrintConv => \%offOn,
8198
+ },
8199
+ 220 => {
8200
+ Name => 'FocusShiftNumberShots',
8201
+ },
8202
+ 224 => {
8203
+ Name => 'FocusShiftStepWidth',
8204
+ },
8205
+ 228 => {
8206
+ Name => 'FocusShiftInterval',
8207
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
8208
+ },
8209
+ 232 => {
8210
+ Name => 'FocusShiftExposureLock',
8211
+ PrintConv => \%offOn,
8212
+ },
8213
+ #304 => White Balance - Kelvin Temp
8214
+ #312 => ColorSpace
8215
+ #314 => ActiveD-Lighting
8216
+ #318 => HighISONoiseReduction
8217
+ 322 => {
8218
+ Name => 'DiffractionCompensation',
8219
+ Format => 'int8u',
8220
+ PrintConv => \%offOn,
8221
+ },
8222
+ 323 => {
8223
+ Name => 'AutoDistortionControl',
8224
+ Format => 'int8u',
8225
+ PrintConv => \%offOn,
8226
+ },
8227
+ #324 => {Name => 'FlickerReductionShooting',}, # redundant with tag in NikonSettings
8228
+ 326 => {
8229
+ Name => 'NikonMeteringMode',
8230
+ Unknown => 1,
8231
+ PrintConv => {
8232
+ 0 => 'Matrix',
8233
+ 1 => 'Center',
8234
+ 2 => 'Spot',
8235
+ 3 => 'Highlight'
8236
+ },
8237
+ },
8238
+ 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7},
8239
+ 328 => {
8240
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
8241
+ RawConv => '$$self{FlashControlMode} = $val',
8242
+ PrintConv => \%flashControlModeZ7,
8243
+ },
8244
+ 334 => {
8245
+ Name => 'FlashGNDistance',
8246
+ Condition => '$$self{FlashControlMode} == 2',
8247
+ Unknown => 1,
8248
+ ValueConv => '$val + 3',
8249
+ PrintConv => \%flashGNDistance,
8250
+ },
8251
+ 338 => {
8252
+ 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)
8253
+ Condition => '$$self{FlashControlMode} >= 3',
8254
+ Unknown => 1,
8255
+ ValueConv => '2 ** (-$val/3)',
8256
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
8257
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
8258
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8259
+ },
8260
+ 346 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1},
8261
+ 348 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1},
8262
+ 352 => {
8263
+ Name => 'FlashMasterControlMode', # tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
8264
+ RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
8265
+ PrintConv => \%flashGroupOptionsMode,
8266
+ },
8267
+ 354 => {
8268
+ Name => 'FlashMasterCompensation',
8269
+ Format => 'int8s',
8270
+ Condition => '$$self{FlashGroupOptionsMasterMode} != 3', # other than 'Off'
8271
+ Unknown => 1,
8272
+ ValueConv => '$val/6',
8273
+ ValueConvInv => '6 * $val',
8274
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8275
+ PrintConvInv => '$val',
8276
+ },
8277
+ 358 => {
8278
+ Name => 'FlashMasterOutput',
8279
+ Unknown => 1,
8280
+ Condition => '$$self{FlashGroupOptionsMasterMode} == 1', # only for Mode=M
8281
+ ValueConv => '2 ** (-$val/3)',
8282
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
8283
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
8284
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8285
+ },
8286
+ #360 => {Name => 'FlashGroupAControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupACompensation at 362 and FlashGroupAOutput at 368
8287
+ #368 => {Name => 'FlashGroupBControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupBCompensation at 370 and FlashGroupBOutput at 374
8288
+ #376 => {Name => 'FlashGroupCControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupCCompensation at 378 and FlashGroupCOutput at 382
8289
+ #384 => {Name => 'FlashGroupDControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupDCompensation at 386 and FlashGroupDOutput at 390
8290
+ #392 => {Name => 'FlashGroupEControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupECompensation at 394 and FlashGroupEOutput at 398
8291
+ #400 => {Name => 'FlashGroupFControlMode', }, # commented out to reduce output volume - mapping follows FlashMasterControlMode with FlashGroupFCompensation at 402 and FlashGroupFOutput at 406
8292
+ #434 => FocusMode
8293
+ #436 => AFAreaMode
8294
+ #438 => VibrationReduction
8295
+ #442 => BracketSet
8296
+ #444 => BracketProgram
8297
+ #446 => BracketIncrement
8298
+ #463 => SilentPhotography
8299
+ 502 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1},
8300
+ 504 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1},
8301
+ 506 => {
8302
+ Name => 'MovieSlowMotion',
8303
+ Unknown => 1,
8304
+ PrintConv => {
8305
+ 0 => 'Off',
8306
+ 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]
8307
+ 2 => 'On (5x)', # 120p recording with playback @ 24p [1920 x 1080; 20p x 5]
8308
+ },
8309
+ },
8310
+ 510 => {
8311
+ Name => 'MovieType',
8312
+ Unknown => 1,
8313
+ PrintConv => {
8314
+ 0 => 'MOV',
8315
+ 1 => 'MP4',
8316
+ },
8317
+ },
8318
+ #512 => MovieISOAutoHiLimit
8319
+ 516 => {
8320
+ Name => 'MovieISOAutoManualMode',
8321
+ Condition => '$$self{Model} =~ /^NIKON 7/', #ISO ranges vary by model. These mappings are for the Z7 and Z7II
8322
+ Format => 'int16u',
8323
+ Unknown => 1,
8324
+ ValueConv => '($val-104)/8',
8325
+ ValueConvInv => '8 * ($val + 104)',
8326
+ PrintConv => \%iSOAutoHiLimitZ7,
8327
+ },
8328
+ #520 => MovieWhiteBalanceSameAsPhoto
8329
+ 568 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1},
8330
+ 572 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8331
+ 574 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8332
+ 576 => {
8333
+ Name => 'MovieVignetteControlSameAsPhoto',
8334
+ Unknown => 1,
8335
+ PrintConv => \%noYes
8336
+ },
8337
+ 577 => {
8338
+ Name => 'MovieDiffractionCompensation',
8339
+ Unknown => 1,
8340
+ PrintConv => \%offOn
8341
+ },
8342
+ 578 => {
8343
+ Name => 'MovieAutoDistortionControl',
8344
+ Unknown => 1,
8345
+ PrintConv => \%offOn
8346
+ },
8347
+ 584 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1},
8348
+ #586 => MovieAFAreaMode
8349
+ 590 => {
8350
+ Name => 'MovieVibrationReduction',
8351
+ Unknown => 1,
8352
+ PrintConv => {
8353
+ 0 => 'Off',
8354
+ 1 => 'On (Normal)',
8355
+ 2 => 'On (Sport)',
8356
+ },
8357
+ },
8358
+ 591 => {
8359
+ Name => 'MovieVibrationReductionSameAsPhoto',
8360
+ Unknown => 1,
8361
+ PrintConv => \%noYes
8362
+ },
8363
+ #848 => HDMIOutputResolution
8364
+ #850 => HDMIOutputRange
8365
+ #854 => HDMIExternalRecorder
8366
+ #856 => HDMIBitDepth
8367
+ 858 => {
8368
+ 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
8369
+ Condition => '$$self{HDMIBitDepth} and $$self{HDMIBitDepth} == 2', # only for 10 bit
8370
+ RawConv => '$$self{HDMIOutputNLog} = $val',
8371
+ Unknown => 1,
8372
+ PrintConv => \%offOn,
8373
+ },
8374
+ #859 => HDMIViewAssist
8375
+ );
8376
+
8377
+ %Image::ExifTool::Nikon::MenuSettingsZ9 = (
8378
+ %binaryDataAttrs,
8379
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8380
+ DATAMEMBER => [ 140, 188, 192, 232, 424, 534 ],
8381
+ IS_SUBDIR => [ 799 ],
8382
+ NOTES => 'These tags are used by the Z9.',
8383
+ #90 ISO
8384
+ 140 => {
8385
+ Name => 'MultipleExposureMode',
8386
+ RawConv => '$$self{MultipleExposureMode} = $val',
8387
+ PrintConv => {
8388
+ 0 => 'Off',
8389
+ 1 => 'On (Series)',
8390
+ 2 => 'On',
8391
+ },
8392
+ },
8393
+ 142 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0' }, #range 2-9
8394
+ 188 => {
8395
+ Name => 'Intervals',
8396
+ Format => 'int32u',
8397
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
8398
+ Condition => '$$self{IntervalShooting} > 0',
8399
+ },
8400
+ 192 => {
8401
+ Name => 'ShotsPerInterval',
8402
+ Format => 'int32u',
8403
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
8404
+ Condition => '$$self{IntervalShooting} > 0',
8405
+ },
8406
+ #220 NEFCompression 0=> 'Lossless' 1=> 'High Efficiency*' 4=> 'High Efficientcy'
8407
+ 232 => {
8408
+ Name => 'FocusShiftNumberShots', #1-300
8409
+ RawConv => '$$self{FocusShiftNumberShots} = $val',
8410
+ Condition => '$$self{FocusShiftShooting} > 0',
8411
+ },
8412
+ 236 => {
8413
+ Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
8414
+ Condition => '$$self{FocusShiftShooting} > 0',
8415
+ },
8416
+ 240 => {
8417
+ Name => 'FocusShiftInterval',
8418
+ Condition => '$$self{FocusShiftShooting} > 0',
8419
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
8420
+ },
8421
+ 244 => {
8422
+ Name => 'FocusShiftExposureLock',
8423
+ Unknown => 1,
8424
+ PrintConv => \%offOn,
8425
+ Condition => '$$self{FocusShiftShooting} > 0',
8426
+ },
8427
+ 274 => {
8428
+ Name => 'PhotoShootingMenuBank',
8429
+ PrintConv => {
8430
+ 0 => 'A',
8431
+ 1 => 'B',
8432
+ 2 => 'C',
8433
+ 3 => 'D',
8434
+ },
8435
+ },
8436
+ 276 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn, }, #single tag from both Photo & Video menus
8437
+ 308 => {
8438
+ Name => 'PhotoShootingMenuBankImageArea',
8439
+ PrintConv => {
8440
+ 0 => 'FX',
8441
+ 1 => 'DX',
8442
+ 4 => '16:9',
8443
+ 8 => '1:1',
8444
+ },
8445
+ },
8446
+ #310 ImageQuality
8447
+ 322 => { Name => 'AutoISO', PrintConv => \%offOn, },
8448
+ 324 => {
8449
+ Name => 'ISOAutoHiLimit',
8450
+ Format => 'int16u',
8451
+ Unknown => 1,
8452
+ ValueConv => '($val-104)/8',
8453
+ ValueConvInv => '8 * ($val + 104)',
8454
+ PrintConv => \%iSOAutoHiLimitZ7,
8455
+ },
8456
+ 326 => {
8457
+ Name => 'ISOAutoFlashLimit',
8458
+ Format => 'int16u',
8459
+ Unknown => 1,
8460
+ ValueConv => '($val-104)/8',
8461
+ ValueConvInv => '8 * ($val + 104)',
8462
+ PrintConv => \%iSOAutoHiLimitZ7,
8463
+ },
8464
+ #332 ISOAutoShutterTime - Auto setting 0=> 'Auto (Slowest)', 1 => 'Auto (Slower)', 2=> 'Auto', 3=> 'Auto (Faster)', 4=> 'Auto (Fastest)'
8465
+ 334 => {
8466
+ Name => 'ISOAutoShutterTime', #shutter speed is 2 ** (-$val/24)
8467
+ ValueConv => '$val / 8',
8468
+ Format => 'int16s',
8469
+ PrintConv => {
8470
+ -15 => 'Auto', #z9 firmware 1.00 maps both 'Auto' and '30 s' to -15
8471
+ -12 => '15 s',
8472
+ -9 => '8 s',
8473
+ -6 => '4 s',
8474
+ -3 => '2 s',
8475
+ 0 => '1 s',
8476
+ 1 => '1/1.3 s',
8477
+ 2 => '1/1.6 s',
8478
+ 3 => '1/2 s',
8479
+ 4 => '1/2.5 s',
8480
+ 5 => '1/3 s',
8481
+ 6 => '1/4 s',
8482
+ 7 => '1/5 s',
8483
+ 8 => '1/6 s',
8484
+ 9 => '1/8 s',
8485
+ 10 => '1/10 s',
8486
+ 11 => '1/13 s',
8487
+ 12 => '1/15 s',
8488
+ 13 => '1/20 s',
8489
+ 14 => '1/25 s',
8490
+ 15 => '1/30 s',
8491
+ 16 => '1/40 s',
8492
+ 17 => '1/50 s',
8493
+ 18 => '1/60 s',
8494
+ 19 => '1/80 s',
8495
+ 20 => '1/100 s',
8496
+ 21 => '1/120 s',
8497
+ 22 => '1/160 s',
8498
+ 23 => '1/200 s',
8499
+ 24 => '1/250 s',
8500
+ 25 => '1/320 s',
8501
+ 26 => '1/400 s',
8502
+ 27 => '1/500 s',
8503
+ 28 => '1/640 s',
8504
+ 29 => '1/800 s',
8505
+ 30 => '1/1000 s',
8506
+ 31 => '1/1250 s',
8507
+ 32 => '1/1600 s',
8508
+ 33 => '1/2000 s',
8509
+ 34 => '1/2500 s',
8510
+ 35 => '1/3200 s',
8511
+ 36 => '1/4000 s',
8512
+ 37 => '1/5000 s',
8513
+ 37.5 => '1/6000 s',
8514
+ 38 => '1/6400 s',
8515
+ 39 => '1/8000 s',
8516
+ 40 => '1/10000 s',
8517
+ 40.5 => '1/12000 s',
8518
+ 41 => '1/13000 s',
8519
+ 42 => '1/16000 s',
8520
+ },
8521
+ },
8522
+ #336 WhiteBalance
8523
+ #406 PictureControl
8524
+ #408 ColorSpace
8525
+ #410 ActiveD-Lighting
8526
+ #412 => { Name => 'NoiseReduction', PrintConv => \%offOn }, #Long Exposure Noise Reduction
8527
+ #414 HighISONoiseReduction
8528
+ #414 VignetteControl
8529
+ 416 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8530
+ 418 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, #value can be set from both the Photo Shoot Menu and the Video Shooting Menu
8531
+ #419 AutoDistortionControl #value can be set from both the Photo Shoot Menu and the Video Shooting Menu
8532
+ 420 => { Name => 'FlickerReductionShooting', PrintConv => \%offOn },
8533
+ #422 MeteringMode
8534
+ 424 => {
8535
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
8536
+ RawConv => '$$self{FlashControlMode} = $val',
8537
+ PrintConv => \%flashControlModeZ7,
8538
+ },
8539
+ 426 => {
8540
+ Name => 'FlashMasterCompensation',
8541
+ Format => 'int8s',
8542
+ Unknown => 1,
8543
+ ValueConv => '$val/6',
8544
+ ValueConvInv => '6 * $val',
8545
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8546
+ PrintConvInv => '$val',
8547
+ },
8548
+ 430 => {
8549
+ Name => 'FlashGNDistance',
8550
+ Condition => '$$self{FlashControlMode} == 2',
8551
+ Unknown => 1,
8552
+ ValueConv => '$val + 3',
8553
+ PrintConv => \%flashGNDistance,
8554
+ },
8555
+ 434 => {
8556
+ 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)
8557
+ Condition => '$$self{FlashControlMode} >= 3',
8558
+ Unknown => 1,
8559
+ ValueConv => '2 ** (-$val/3)',
8560
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
8561
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
8562
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8563
+ },
8564
+ #442 flash wirelss control 0=> 'Off' 1=> 'CMD'
8565
+ 444 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1},
8566
+ 456 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1},
8567
+ #526 FocusMode
8568
+ #528 AFAreaMode
8569
+ 530 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
8570
+ 534 => {
8571
+ Name => 'BracketSet',
8572
+ RawConv => '$$self{BracketSet} = $val',
8573
+ PrintConv => {
8574
+ 0 => 'AE/Flash',
8575
+ 1 => 'AE',
8576
+ 2 => 'Flash',
8577
+ 3 => 'White Balance',
8578
+ 4 => 'Active-D Lighting',
8579
+ },
8580
+ },
8581
+ 536 => {
8582
+ Name => 'BracketProgram',
8583
+ Condition => '$$self{BracketSet} < 3',
8584
+ Notes => 'AE and/or Flash Bracketing',
8585
+ PrintConv => {
8586
+ 0 => 'Disabled',
8587
+ 2 => '2F',
8588
+ 3 => '3F',
8589
+ 4 => '4F',
8590
+ 5 => '5F',
8591
+ 7 => '7F',
8592
+ 9 => '9F',
8593
+ },
8594
+ },
8595
+ 538 => {
8596
+ Name => 'BracketIncrement',
8597
+ Condition => '$$self{BracketSet} < 3',
8598
+ Notes => 'AE and/or Flash Bracketing',
8599
+ PrintConv => {
8600
+ 0 => '0.3',
8601
+ #1 => '0.5',
8602
+ 2 => '0.7',
8603
+ 3 => '1.0',
8604
+ 4 => '2.0',
8605
+ 5 => '3.0',
8606
+ },
8607
+ },
8608
+ #544 BracketProgram for ADL
8609
+ 556 => {
8610
+ Name => 'SecondarySlotFunction',
8611
+ PrintConv => {
8612
+ 0 => 'Overflow',
8613
+ 1 => 'Backup',
8614
+ 2 => 'NEF Primary + JPG Secondary',
8615
+ 3 => 'JPG Primary + JPG Secondary',
8616
+ },
8617
+ },
8618
+ 572 => { Name => 'DXCropAlert', PrintConv => \%offOn, },
8619
+ 574 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9},
8620
+ 604 => {
8621
+ Name => 'MovieImageArea',
8622
+ Unknown => 1,
8623
+ Mask => 0x01, #without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
8624
+ PrintConv => {
8625
+ 0 => 'FX',
8626
+ 1 => 'DX',
8627
+ },
8628
+ },
8629
+ 614 => {
8630
+ Name => 'MovieType',
8631
+ Unknown => 1,
8632
+ PrintConv => {
8633
+ 1 => 'H.265 8-bit (MP4)',
8634
+ 2 => 'H.265 8-bit (MOV)',
8635
+ 3 => 'H.265 10-bit (MOV)',
8636
+ 4 => 'ProRes 422 HQ 10-bit (MOV)',
8637
+ },
8638
+ },
8639
+ 616 => {
8640
+ Name => 'MovieISOAutoHiLimit',
8641
+ Format => 'int16u',
8642
+ Unknown => 1,
8643
+ ValueConv => '($val-104)/8',
8644
+ ValueConvInv => '8 * ($val + 104)',
8645
+ PrintConv => \%iSOAutoHiLimitZ7,
8646
+ },
8647
+ 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1},
8648
+ 620 => {
8649
+ Name => 'MovieISOAutoManualMode',
8650
+ Format => 'int16u',
8651
+ Unknown => 1,
8652
+ ValueConv => '($val-104)/8',
8653
+ ValueConvInv => '8 * ($val + 104)',
8654
+ PrintConv => \%iSOAutoHiLimitZ7,
8655
+ },
8656
+ 696 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1},
8657
+ 698 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8658
+ 704 => {
8659
+ Name => 'MovieFlickerReduction',
8660
+ PrintConv => {
8661
+ 0 => 'Auto',
8662
+ 1 => '50Hz',
8663
+ 2 => '60Hz',
8664
+ },
8665
+ },
8666
+ 706 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, , Unknown => 1},
8667
+ 708 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1},
8668
+ 710 => {
8669
+ Name => 'MovieAFAreaMode',
8670
+ PrintConv => {
8671
+ 1 => 'Single',
8672
+ 3 => 'Wide (S)',
8673
+ 4 => 'Wide (L)',
8674
+ 6 => 'Auto',
8675
+ 11 => 'Subject Tracking',
8676
+ },
8677
+ },
8678
+ 712 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1},
8679
+ 716 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, #distinct from MoveieVRMode
8680
+ 718 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'On', 2 => 'On' }, Unknown => 1 }, #not sure why the unusal mapping with 2 => 'On'
8681
+ 720 => { Name => 'MicrophoneSensitivity', Unknown => 1}, #1-20
8682
+ 722 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, #distinct from MoveieVRMode
8683
+ 724 => { Name => 'MicrophoneFrequencyResponse', PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
8684
+ 726 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
8685
+ 748 => {
8686
+ Name => 'MovieToneMap',
8687
+ Unknown => 1,
8688
+ PrintConv => {
8689
+ 0 => 'SDR',
8690
+ 1 => 'HLG',
8691
+ 2 => 'N-Log',
8692
+ },
8693
+ },
8694
+ 754 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1},
8695
+ 756 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1},
8696
+ 762 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
8697
+ 763 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
8698
+ 764 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1},
8699
+ 799 => {
8700
+ Name => 'CustomSettingsZ9',
8701
+ Format => 'undef[608]',
8702
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
8703
+ },
8704
+ 1426 => {
8705
+ Name => 'Language',
8706
+ Unknown => 1,
8707
+ PrintConv => {
8708
+ 4 => 'English',
8709
+ 5 => 'Spanish',
8710
+ 7 => 'French',
8711
+ },
8712
+ },
8713
+ 1428 => {
8714
+ Name => 'TimeZone',
8715
+ PrintConv => {
8716
+ 5 => '+09:00 (Tokyo)',
8717
+ 6 => '+08:00 (Beijing, Honk Kong, Sinapore)',
8718
+ 10 => '+05:45 (Kathmandu)',
8719
+ 11 => '+05:30 (New Dehli)',
8720
+ 16 => '+03:00 (Moscow, Nairobi)',
8721
+ 15 => '+02:00 (Athens)',
8722
+ 16 => '+01:00 (Madrid, Paris, Berlin)',
8723
+ 17 => '+02:00 (Athens, Helsinki)',
8724
+ 18 => '+00:00 (London)',
8725
+ 19 => '+00:00', #PH (unknown city)
8726
+ 22 => '-03:00 (Buenos Aires, Sao Paulo)',
8727
+ 24 => '-04:00 (Manaus, Caracas)',
8728
+ 25 => '-05:00 (New York, Toronto, Lima)',
8729
+ 26 => '-06:00 (Chicago, Mexico City)',
8730
+ 27 => '-07:00 (Denver)',
8731
+ 28 => '-08:00 (Los Angeles, Vancouver)',
8732
+ 29 => '-09:00 (Anchorage)',
8733
+ 30 => '-10:00 (Hawaii)',
8734
+ },
8735
+ },
8736
+ 1434 => {Name => 'MonitorBrightness', ValueConv => '$val - 5', Unknown => 1}, # settings: -5 to +5
8737
+ 1456 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
8738
+ 1552 => {
8739
+ Name => 'HDMIOutputResolution',
8740
+ PrintConv => {
8741
+ 0 => 'Auto',
8742
+ 1 => '4320p',
8743
+ 2 => '2160p',
8744
+ 3 => '1080p',
8745
+ #4 => '1080i',
8746
+ 5 => '720p',
8747
+ #6 => '576p',
8748
+ #7 => '480p',
8749
+ },
8750
+ },
8751
+ 1565 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
8752
+ 1572 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
8753
+ 1573 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
8754
+ 1608 => { Name => 'EnergySavingMode', PrintConv =>\%offOn, Unknown => 1 },
8755
+ 1632 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
8756
+ 1636 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
8757
+ 1645 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
8758
+ );
8759
+
8760
+ # Flash information (ref JD)
8761
+ %Image::ExifTool::Nikon::FlashInfo0100 = (
8762
+ %binaryDataAttrs,
8763
+ DATAMEMBER => [ 9.2, 15, 16 ],
8764
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8765
+ NOTES => q{
8766
+ These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
8767
+ D200.
8768
+ },
8769
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8770
+ 0 => {
8771
+ Name => 'FlashInfoVersion',
8772
+ Format => 'string[4]',
8773
+ Writable => 0,
8774
+ },
8775
+ 4 => { #PH
8776
+ Name => 'FlashSource',
8777
+ PrintConv => {
8778
+ 0 => 'None',
8779
+ 1 => 'External',
8780
+ 2 => 'Internal',
8781
+ },
8782
+ },
8783
+ # 5 - values: 46,48,50,54,78
8784
+ 6 => {
8785
+ Format => 'int8u[2]',
8786
+ Name => 'ExternalFlashFirmware',
8787
+ SeparateTable => 'FlashFirmware',
8788
+ PrintConv => \%flashFirmware,
8789
+ },
8790
+ 8 => {
8791
+ Name => 'ExternalFlashFlags',
8792
+ PrintConv => { 0 => '(none)',
8793
+ BITMASK => {
8794
+ 0 => 'Fired', #28
8795
+ 2 => 'Bounce Flash', #PH
8796
+ 4 => 'Wide Flash Adapter',
8797
+ 5 => 'Dome Diffuser', #28
8798
+ },
8799
+ },
8800
+ },
8801
+ 9.1 => {
8802
+ Name => 'FlashCommanderMode',
8803
+ Mask => 0x80,
8804
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8805
+ },
8806
+ 9.2 => {
8807
+ Name => 'FlashControlMode',
8808
+ Mask => 0x7f,
8809
+ DataMember => 'FlashControlMode',
8810
+ RawConv => '$$self{FlashControlMode} = $val',
8811
+ PrintConv => \%flashControlMode,
8812
+ SeparateTable => 'FlashControlMode',
8813
+ },
8814
+ 10 => [
8815
+ {
8816
+ Name => 'FlashOutput',
8817
+ Condition => '$$self{FlashControlMode} >= 0x06',
8818
+ ValueConv => '2 ** (-$val/6)',
8819
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8820
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8821
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8822
+ },
8823
+ {
8824
+ Name => 'FlashCompensation',
8825
+ Format => 'int8s',
8826
+ Priority => 0,
8827
+ ValueConv => '-$val/6',
8828
+ ValueConvInv => '-6 * $val',
8829
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8830
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8831
+ },
8832
+ ],
8833
+ 11 => {
8834
+ Name => 'FlashFocalLength',
8835
+ RawConv => '$val ? $val : undef',
8836
+ PrintConv => '"$val mm"',
8837
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8838
+ },
8839
+ 12 => {
8840
+ Name => 'RepeatingFlashRate',
8841
+ RawConv => '$val ? $val : undef',
8842
+ PrintConv => '"$val Hz"',
8843
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8844
+ },
8845
+ 13 => {
8846
+ Name => 'RepeatingFlashCount',
8847
+ RawConv => '$val ? $val : undef',
8848
+ },
8849
+ 14 => { #PH
8850
+ Name => 'FlashGNDistance',
8851
+ SeparateTable => 1,
8852
+ PrintConv => \%flashGNDistance,
8853
+ },
8854
+ 15 => {
8855
+ Name => 'FlashGroupAControlMode',
8856
+ Mask => 0x0f,
8857
+ DataMember => 'FlashGroupAControlMode',
8858
+ RawConv => '$$self{FlashGroupAControlMode} = $val',
8859
+ PrintConv => \%flashControlMode,
8860
+ SeparateTable => 'FlashControlMode',
8861
+ },
8862
+ 16 => {
8863
+ Name => 'FlashGroupBControlMode',
8864
+ Mask => 0x0f,
8865
+ DataMember => 'FlashGroupBControlMode',
8866
+ RawConv => '$$self{FlashGroupBControlMode} = $val',
8867
+ PrintConv => \%flashControlMode,
8868
+ SeparateTable => 'FlashControlMode',
8869
+ },
8870
+ 17 => [
8871
+ {
8872
+ Name => 'FlashGroupAOutput',
8873
+ Condition => '$$self{FlashGroupAControlMode} >= 0x06',
8874
+ ValueConv => '2 ** (-$val/6)',
8875
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8876
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8877
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8878
+ },
8879
+ {
8880
+ Name => 'FlashGroupACompensation',
8881
+ Format => 'int8s',
8882
+ ValueConv => '-$val/6',
8883
+ ValueConvInv => '-6 * $val',
8884
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8885
+ PrintConvInv => '$val',
8886
+ },
8887
+ ],
8888
+ 18 => [
8889
+ {
8890
+ Name => 'FlashGroupBOutput',
8891
+ Condition => '$$self{FlashGroupBControlMode} >= 0x06',
8892
+ ValueConv => '2 ** (-$val/6)',
8893
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8894
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8895
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8896
+ },
8897
+ {
8898
+ Name => 'FlashGroupBCompensation',
8899
+ Format => 'int8s',
8900
+ ValueConv => '-$val/6',
8901
+ ValueConvInv => '-6 * $val',
8902
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8903
+ PrintConvInv => '$val',
8904
+ },
8905
+ ],
8906
+ );
8907
+
8908
+ # Flash information for D40, D40x, D3 and D300 (ref JD)
8909
+ %Image::ExifTool::Nikon::FlashInfo0102 = (
8910
+ %binaryDataAttrs,
8911
+ DATAMEMBER => [ 9.2, 16.1, 17.1, 17.2 ],
8912
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8913
+ NOTES => q{
8914
+ These tags are used by the D3 (firmware 1.x), D40, D40X, D60 and D300
8915
+ (firmware 1.00).
8916
+ },
8917
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
8918
+ 0 => {
8919
+ Name => 'FlashInfoVersion',
8920
+ Format => 'string[4]',
8921
+ Writable => 0,
8922
+ },
8923
+ 4 => { #PH
8924
+ Name => 'FlashSource',
8925
+ PrintConv => {
8926
+ 0 => 'None',
8927
+ 1 => 'External',
8928
+ 2 => 'Internal',
8929
+ },
8930
+ },
8931
+ # 5 - values: 46,48,50,54,78
8932
+ 6 => {
8933
+ Format => 'int8u[2]',
8934
+ Name => 'ExternalFlashFirmware',
8935
+ SeparateTable => 'FlashFirmware',
8936
+ PrintConv => \%flashFirmware,
8937
+ },
8938
+ 8 => {
8939
+ Name => 'ExternalFlashFlags',
8940
+ PrintConv => { BITMASK => {
8941
+ 0 => 'Fired', #28
8942
+ 2 => 'Bounce Flash', #PH
8943
+ 4 => 'Wide Flash Adapter',
8944
+ 5 => 'Dome Diffuser', #28
8945
+ }},
8946
+ },
8947
+ 9.1 => {
8948
+ Name => 'FlashCommanderMode',
8949
+ Mask => 0x80,
8950
+ PrintConv => { 0 => 'Off', 1 => 'On' },
8951
+ },
8952
+ 9.2 => {
8953
+ Name => 'FlashControlMode',
8954
+ Mask => 0x7f,
8955
+ DataMember => 'FlashControlMode',
8956
+ RawConv => '$$self{FlashControlMode} = $val',
8957
+ PrintConv => \%flashControlMode,
8958
+ SeparateTable => 'FlashControlMode',
8959
+ },
8960
+ 10 => [
8961
+ {
8962
+ Name => 'FlashOutput',
8963
+ Condition => '$$self{FlashControlMode} >= 0x06',
8964
+ ValueConv => '2 ** (-$val/6)',
8965
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
8966
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
8967
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8968
+ },
8969
+ {
8970
+ Name => 'FlashCompensation',
8971
+ # this is the compensation from the camera (0x0012) for "Built-in" FlashType, or
8972
+ # the compensation from the external unit (0x0017) for "Optional" FlashType - PH
8973
+ Format => 'int8s',
8974
+ Priority => 0,
8975
+ ValueConv => '-$val/6',
8976
+ ValueConvInv => '-6 * $val',
8977
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
8978
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8979
+ },
8980
+ ],
8981
+ 12 => {
8982
+ Name => 'FlashFocalLength',
8983
+ RawConv => '$val ? $val : undef',
8984
+ PrintConv => '"$val mm"',
8985
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8986
+ },
8987
+ 13 => {
8988
+ Name => 'RepeatingFlashRate',
8989
+ RawConv => '$val ? $val : undef',
8990
+ PrintConv => '"$val Hz"',
8991
+ PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8992
+ },
8993
+ 14 => {
8994
+ Name => 'RepeatingFlashCount',
8995
+ RawConv => '$val ? $val : undef',
8996
+ },
8997
+ 15 => { #PH
8998
+ Name => 'FlashGNDistance',
8999
+ SeparateTable => 1,
9000
+ PrintConv => \%flashGNDistance,
9001
+ },
9002
+ 16.1 => {
9003
+ Name => 'FlashGroupAControlMode',
9004
+ Mask => 0x0f,
9005
+ Notes => 'note: group A tags may apply to the built-in flash settings for some models',
9006
+ DataMember => 'FlashGroupAControlMode',
9007
+ RawConv => '$$self{FlashGroupAControlMode} = $val',
9008
+ PrintConv => \%flashControlMode,
9009
+ SeparateTable => 'FlashControlMode',
9010
+ },
9011
+ 17.1 => {
9012
+ Name => 'FlashGroupBControlMode',
9013
+ Mask => 0xf0,
9014
+ Notes => 'note: group B tags may apply to group A settings for some models',
9015
+ DataMember => 'FlashGroupBControlMode',
9016
+ RawConv => '$$self{FlashGroupBControlMode} = $val',
9017
+ PrintConv => \%flashControlMode,
9018
+ SeparateTable => 'FlashControlMode',
9019
+ },
9020
+ 17.2 => { #PH
9021
+ Name => 'FlashGroupCControlMode',
9022
+ Mask => 0x0f,
9023
+ Notes => 'note: group C tags may apply to group B settings for some models',
9024
+ DataMember => 'FlashGroupCControlMode',
9025
+ RawConv => '$$self{FlashGroupCControlMode} = $val',
9026
+ PrintConv => \%flashControlMode,
9027
+ SeparateTable => 'FlashControlMode',
9028
+ },
9029
+ 18 => [
9030
+ {
9031
+ Name => 'FlashGroupAOutput',
9032
+ Condition => '$$self{FlashGroupAControlMode} >= 0x06',
9033
+ ValueConv => '2 ** (-$val/6)',
9034
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
9035
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
9036
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
9037
+ },
9038
+ {
9039
+ Name => 'FlashGroupACompensation',
9040
+ Format => 'int8s',
9041
+ ValueConv => '-$val/6',
9042
+ ValueConvInv => '-6 * $val',
9043
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
9044
+ PrintConvInv => '$val',
9045
+ },
9046
+ ],
9047
+ 19 => [
9048
+ {
9049
+ Name => 'FlashGroupBOutput',
9050
+ Condition => '$$self{FlashGroupBControlMode} >= 0x60',
9051
+ ValueConv => '2 ** (-$val/6)',
9052
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
9053
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
9054
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
9055
+ },
9056
+ {
9057
+ Name => 'FlashGroupBCompensation',
9058
+ Format => 'int8s',
9059
+ ValueConv => '-$val/6',
9060
+ ValueConvInv => '-6 * $val',
9061
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
9062
+ PrintConvInv => '$val',
9063
+ },
9064
+ ],
9065
+ 20 => [ #PH
9066
+ {
9067
+ Name => 'FlashGroupCOutput',
9068
+ Condition => '$$self{FlashGroupCControlMode} >= 0x06',
9069
+ ValueConv => '2 ** (-$val/6)',
9070
+ ValueConvInv => '$val>0 ? -6*log($val)/log(2) : 0',
9071
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.0f%%",$val*100)',
9072
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
9073
+ },
9074
+ {
9075
+ Name => 'FlashGroupCCompensation',
9076
+ Format => 'int8s',
9077
+ ValueConv => '-$val/6',
9078
+ ValueConvInv => '-6 * $val',
9079
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
9080
+ PrintConvInv => '$val',
9081
+ },
9082
+ ],
9083
+ );
9084
+
9085
+ # Flash information (ref JD)
9086
+ %Image::ExifTool::Nikon::FlashInfo0100 = (
9087
+ %binaryDataAttrs,
9088
+ DATAMEMBER => [ 9.2, 15, 16 ],
9089
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9090
+ NOTES => q{
9091
+ These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and
9092
+ D200.
9093
+ },
9094
+ # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
9095
+ 0 => {
9096
+ Name => 'FlashInfoVersion',
9097
+ Format => 'string[4]',
9098
+ Writable => 0,
9099
+ },
9100
+ 4 => { #PH
9101
+ Name => 'FlashSource',
9102
+ PrintConv => {
9103
+ 0 => 'None',
9104
+ 1 => 'External',
9105
+ 2 => 'Internal',
9106
+ },
9107
+ },
9108
+ # 5 - values: 46,48,50,54,78
9109
+ 6 => {
9110
+ Format => 'int8u[2]',
7501
9111
  Name => 'ExternalFlashFirmware',
7502
9112
  SeparateTable => 'FlashFirmware',
7503
9113
  PrintConv => \%flashFirmware,
@@ -8366,7 +9976,7 @@ my %nikonFocalConversions = (
8366
9976
  ],
8367
9977
  );
8368
9978
 
8369
- # Flash information for the Z7_2 (ref 28)
9979
+ # Flash information for the Z7II (ref 28)
8370
9980
  # (likey similar to FlashInfo010 and FlashInfo0108 with addition of support for radio controlled units such as the SB-5000?
8371
9981
  %Image::ExifTool::Nikon::FlashInfo0300 = (
8372
9982
  %binaryDataAttrs,
@@ -8390,7 +10000,7 @@ my %nikonFocalConversions = (
8390
10000
  SeparateTable => 'FlashFirmware',
8391
10001
  PrintConv => \%flashFirmware,
8392
10002
  },
8393
- 27 => {
10003
+ 10 => {
8394
10004
  Name => 'FlashCompensation',
8395
10005
  # this is the compensation from the camera (0x0012) for "Built-in" FlashType, or
8396
10006
  # the compensation from the external unit (0x0017) for "Optional" FlashType - PH
@@ -8525,6 +10135,25 @@ my %nikonFocalConversions = (
8525
10135
  },
8526
10136
  );
8527
10137
 
10138
+ # MakerNotes0x51 - compression info for Z9
10139
+ %Image::ExifTool::Nikon::MakerNotes0x51 = (
10140
+ %binaryDataAttrs,
10141
+ DATAMEMBER => [ 0 ],
10142
+ GROUPS => { 0 => 'MakerNotes' },
10143
+ 0 => {
10144
+ Name => 'FirmwareVersion',
10145
+ Format => 'string[8]',
10146
+ Writable => 0,
10147
+ RawConv => '$$self{FirmwareVersion} = $val',
10148
+ },
10149
+ 10 => {
10150
+ Name => 'NEFCompression',
10151
+ Writable => 'int16u',
10152
+ SeparateTable => 'NEFCompression',
10153
+ PrintConv => \%nefCompression,
10154
+ },
10155
+ );
10156
+
8528
10157
  # extra info found in IFD0 of NEF files (ref PH, Z6/Z7)
8529
10158
  %Image::ExifTool::Nikon::NEFInfo = (
8530
10159
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -9299,7 +10928,7 @@ my %nikonFocalConversions = (
9299
10928
  },
9300
10929
  },
9301
10930
  {
9302
- Condition => '$$valPt =~ /^080[01]/', # Z6/Z7
10931
+ Condition => '$$valPt =~ /^080[012]/', # Z6/Z7/Z9
9303
10932
  Name => 'LensData0800',
9304
10933
  SubDirectory => {
9305
10934
  TagTable => 'Image::ExifTool::Nikon::LensData0800',
@@ -9384,6 +11013,98 @@ my %nikonFocalConversions = (
9384
11013
  },
9385
11014
  );
9386
11015
 
11016
+ # Nikon XMP tags written in NKSC metadata
11017
+ %Image::ExifTool::Nikon::ast = (
11018
+ GROUPS => { 0 => 'XMP', 1 => 'XMP-ast', 2 => 'Image' },
11019
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11020
+ NAMESPACE => 'ast',
11021
+ VARS => { NO_ID => 1 },
11022
+ NOTES => 'Tags used by Nikon NX Studio in Nikon NKSC sidecar files and trailers.',
11023
+ about => { },
11024
+ version => { },
11025
+ XMLPackets => {
11026
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::Main' },
11027
+ Encoding => 'Base64',
11028
+ Binary => 1,
11029
+ },
11030
+ IPTC => {
11031
+ SubDirectory => { TagTable => 'Image::ExifTool::IPTC::Main' },
11032
+ Encoding => 'Base64',
11033
+ Binary => 1,
11034
+ },
11035
+ GPSVersionID => { Groups => { 2 => 'Location' }, %base64bytes },
11036
+ GPSLatitudeRef => {
11037
+ Groups => { 2 => 'Location' },
11038
+ %base64int32u,
11039
+ PrintConv => { 0 => 'North', 1 => 'South' }, #PH (NC)
11040
+ },
11041
+ GPSLatitude => { Groups => { 2 => 'Location' }, %base64coord },
11042
+ GPSLongitudeRef => {
11043
+ Groups => { 2 => 'Location' },
11044
+ %base64int32u,
11045
+ PrintConv => { 2 => 'East', 3 => 'West' }, #PH (NC)
11046
+ },
11047
+ GPSLongitude => { Groups => { 2 => 'Location' }, %base64coord },
11048
+ GPSAltitudeRef => {
11049
+ Groups => { 2 => 'Location' },
11050
+ %base64bytes,
11051
+ PrintConv => {
11052
+ 0 => 'Above Sea Level',
11053
+ 1 => 'Below Sea Level',
11054
+ },
11055
+ },
11056
+ GPSAltitude => {
11057
+ Groups => { 2 => 'Location' },
11058
+ ValueConv => q{
11059
+ my $val=Image::ExifTool::XMP::DecodeBase64($val);
11060
+ my $saveOrder = GetByteOrder();
11061
+ SetByteOrder('II');
11062
+ $val = GetDouble($val,0);
11063
+ SetByteOrder($saveOrder);
11064
+ return $val;
11065
+ },
11066
+ PrintConv => '"$val m"',
11067
+ },
11068
+ GPSMapDatum => { },
11069
+ );
11070
+ %Image::ExifTool::Nikon::sdc = (
11071
+ GROUPS => { 0 => 'XMP', 1 => 'XMP-sdc', 2 => 'Image' },
11072
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11073
+ NAMESPACE => 'sdc',
11074
+ VARS => { NO_ID => 1 },
11075
+ about => { },
11076
+ version => { },
11077
+ appversion => { Name => 'AppVersion' },
11078
+ appname => { Name => 'AppName' },
11079
+ );
11080
+ %Image::ExifTool::Nikon::nine = (
11081
+ GROUPS => { 0 => 'XMP', 1 => 'XMP-nine', 2 => 'Image' },
11082
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11083
+ NAMESPACE => 'nine',
11084
+ VARS => { NO_ID => 1 },
11085
+ about => { },
11086
+ version => { },
11087
+ Label => { },
11088
+ Rating => { },
11089
+ Trim => { %base64bin },
11090
+ NineEdits => {
11091
+ SubDirectory => {
11092
+ TagTable => 'Image::ExifTool::Nikon::NineEdits',
11093
+ IgnoreProp => { userData => 1 }, # remove "UserData" from already overly long tag names
11094
+ },
11095
+ Binary => 1,
11096
+ },
11097
+ );
11098
+ %Image::ExifTool::Nikon::NineEdits = (
11099
+ GROUPS => { 0 => 'XML', 1 => 'NineEdits', 2 => 'Image' },
11100
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11101
+ VARS => { NO_ID => 1 },
11102
+ NOTES => 'XML-based tags used to store editing information.',
11103
+ filterParametersBinary => { %base64bin },
11104
+ filterParametersExportExportData => { %base64bin },
11105
+ filterParametersCustomCustomData => { %base64bin },
11106
+ );
11107
+
9387
11108
  # Nikon composite tags
9388
11109
  %Image::ExifTool::Nikon::Composite = (
9389
11110
  GROUPS => { 2 => 'Camera' },
@@ -9575,7 +11296,7 @@ sub PrintAFPointsLeftRight($$)
9575
11296
 
9576
11297
  #------------------------------------------------------------------------------
9577
11298
  # Print conversion for relative Up/Down AF points (ref 28)
9578
- # Inputs: 0) column, 1) number of columns
11299
+ # Inputs: 0) row, 1) number of rows
9579
11300
  # Returns: AF point data as a string (e.g. '2U' or 'C' or '3D')
9580
11301
  sub PrintAFPointsUpDown($$)
9581
11302
  {
@@ -9777,6 +11498,72 @@ sub SerialKey($$)
9777
11498
  return 0x60; # D200 (ref 10), D40X (ref PH), etc
9778
11499
  }
9779
11500
 
11501
+ #------------------------------------------------------------------------------
11502
+ # Extract information from "NIKON APP" trailer (ref PH)
11503
+ # Inputs: 0) ExifTool ref, 1) Optional dirInfo ref for returning trailer info
11504
+ # Returns: true on success
11505
+ sub ProcessNikonApp($;$)
11506
+ {
11507
+ local $_;
11508
+ my ($et, $dirInfo) = @_;
11509
+ my $raf = $$et{RAF};
11510
+ my $offset = $dirInfo ? $$dirInfo{Offset} || 0 : 0;
11511
+ my $buff;
11512
+
11513
+ return 0 unless $raf->Seek(-20-$offset, 2) and $raf->Read($buff, 20) == 20 and
11514
+ substr($buff,-16) eq "\0\0\0\0\0\0/NIKON APP"; # check magic number
11515
+
11516
+ my $verbose = $et->Options('Verbose');
11517
+ my $fileEnd = $raf->Tell();
11518
+ my $trailerLen = unpack('N', $buff);
11519
+ $trailerLen > $fileEnd and $et->Warn('Bad NikonApp trailer size'), return 0;
11520
+ if ($dirInfo) {
11521
+ $$dirInfo{DirLen} = $trailerLen if $dirInfo;
11522
+ $$dirInfo{DataPos} = $fileEnd - $trailerLen;
11523
+ if ($$dirInfo{OutFile}) {
11524
+ if ($$et{DEL_GROUP}{NikonApp}) {
11525
+ ++$$et{CHANGED};
11526
+ # just copy the trailer when writing
11527
+ } elsif ($trailerLen > $fileEnd or not $raf->Seek($$dirInfo{DataPos}, 0) or
11528
+ $raf->Read(${$$dirInfo{OutFile}}, $trailerLen) != $trailerLen)
11529
+ {
11530
+ return 0;
11531
+ } else {
11532
+ return 1;
11533
+ }
11534
+ }
11535
+ $et->DumpTrailer($dirInfo) if $verbose or $$et{HTML_DUMP};
11536
+ }
11537
+ unless ($trailerLen >= 0x40 and $raf->Seek($fileEnd - $trailerLen, 0) and
11538
+ $raf->Read($buff, 0x40) == 0x40 and $buff =~ m(NIKON APP\0))
11539
+ {
11540
+ $et->Warn('Error reading NikonApp trailer');
11541
+ return 0;
11542
+ }
11543
+ $$et{SET_GROUP0} = 'NikonApp';
11544
+ while ($raf->Read($buff, 8) == 8) {
11545
+ my ($id, $len) = unpack('N2', $buff);
11546
+ if ($len & 0x80000000) {
11547
+ $et->Warn('Invalid NikonApp record length');
11548
+ last;
11549
+ }
11550
+ last if $id == 0 and $len == 0;
11551
+ unless ($raf->Read($buff, $len) == $len) {
11552
+ $et->Warn('Truncated NikonApp record');
11553
+ last;
11554
+ }
11555
+ if ($id == 1) {
11556
+ require Image::ExifTool::XMP;
11557
+ Image::ExifTool::XMP::ProcessXMP($et, { DataPt => \$buff });
11558
+ } else { # (haven't seen any other types of records)
11559
+ $et->Warn("Unknown NikonApp record $id");
11560
+ last;
11561
+ }
11562
+ }
11563
+ delete $$et{SET_GROUP0};
11564
+ return 1;
11565
+ }
11566
+
9780
11567
  #------------------------------------------------------------------------------
9781
11568
  # Read Nikon NCTG tags in MOV videos
9782
11569
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
@@ -10118,7 +11905,7 @@ Nikon maker notes in EXIF information.
10118
11905
 
10119
11906
  =head1 AUTHOR
10120
11907
 
10121
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
11908
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
10122
11909
 
10123
11910
  This library is free software; you can redistribute it and/or modify it
10124
11911
  under the same terms as Perl itself.