exiftool_vendored 12.37.0 → 12.41.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +73 -0
  3. data/bin/MANIFEST +2 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +45 -45
  7. data/bin/arg_files/exif2xmp.args +5 -0
  8. data/bin/arg_files/xmp2exif.args +6 -0
  9. data/bin/config_files/acdsee.config +6 -6
  10. data/bin/config_files/photoshop_paths.config +30 -7
  11. data/bin/config_files/picasa_faces.config +1 -1
  12. data/bin/config_files/pix4d.config +2 -2
  13. data/bin/config_files/tiff_version.config +2 -2
  14. data/bin/exiftool +100 -67
  15. data/bin/lib/File/RandomAccess.pm +1 -1
  16. data/bin/lib/File/RandomAccess.pod +2 -2
  17. data/bin/lib/Image/ExifTool/AES.pm +1 -1
  18. data/bin/lib/Image/ExifTool/AFCP.pm +1 -1
  19. data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
  20. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  21. data/bin/lib/Image/ExifTool/APP12.pm +1 -1
  22. data/bin/lib/Image/ExifTool/ASF.pm +1 -1
  23. data/bin/lib/Image/ExifTool/Apple.pm +1 -1
  24. data/bin/lib/Image/ExifTool/Audible.pm +1 -1
  25. data/bin/lib/Image/ExifTool/BMP.pm +1 -1
  26. data/bin/lib/Image/ExifTool/BPG.pm +1 -1
  27. data/bin/lib/Image/ExifTool/BZZ.pm +1 -1
  28. data/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
  29. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +6 -4
  30. data/bin/lib/Image/ExifTool/CBOR.pm +1 -1
  31. data/bin/lib/Image/ExifTool/Canon.pm +79 -5
  32. data/bin/lib/Image/ExifTool/CanonCustom.pm +13 -3
  33. data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  34. data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
  35. data/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
  36. data/bin/lib/Image/ExifTool/Casio.pm +1 -1
  37. data/bin/lib/Image/ExifTool/Charset.pm +1 -1
  38. data/bin/lib/Image/ExifTool/DICOM.pm +1 -1
  39. data/bin/lib/Image/ExifTool/DJI.pm +1 -1
  40. data/bin/lib/Image/ExifTool/DNG.pm +1 -1
  41. data/bin/lib/Image/ExifTool/DPX.pm +1 -1
  42. data/bin/lib/Image/ExifTool/DV.pm +1 -1
  43. data/bin/lib/Image/ExifTool/DarwinCore.pm +1 -1
  44. data/bin/lib/Image/ExifTool/DjVu.pm +1 -1
  45. data/bin/lib/Image/ExifTool/EXE.pm +1 -1
  46. data/bin/lib/Image/ExifTool/Exif.pm +53 -21
  47. data/bin/lib/Image/ExifTool/FITS.pm +1 -1
  48. data/bin/lib/Image/ExifTool/FLAC.pm +1 -1
  49. data/bin/lib/Image/ExifTool/FLIF.pm +1 -1
  50. data/bin/lib/Image/ExifTool/FLIR.pm +16 -4
  51. data/bin/lib/Image/ExifTool/Fixup.pm +1 -1
  52. data/bin/lib/Image/ExifTool/Flash.pm +1 -1
  53. data/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
  54. data/bin/lib/Image/ExifTool/Font.pm +1 -1
  55. data/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
  56. data/bin/lib/Image/ExifTool/FujiFilm.pm +1 -1
  57. data/bin/lib/Image/ExifTool/GE.pm +1 -1
  58. data/bin/lib/Image/ExifTool/GIF.pm +1 -1
  59. data/bin/lib/Image/ExifTool/GIMP.pm +1 -1
  60. data/bin/lib/Image/ExifTool/GPS.pm +1 -1
  61. data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
  62. data/bin/lib/Image/ExifTool/Geotag.pm +4 -3
  63. data/bin/lib/Image/ExifTool/GoPro.pm +1 -1
  64. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  65. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  66. data/bin/lib/Image/ExifTool/HTML.pm +1 -1
  67. data/bin/lib/Image/ExifTool/HtmlDump.pm +1 -1
  68. data/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  69. data/bin/lib/Image/ExifTool/ID3.pm +1 -1
  70. data/bin/lib/Image/ExifTool/IPTC.pm +1 -1
  71. data/bin/lib/Image/ExifTool/ISO.pm +1 -1
  72. data/bin/lib/Image/ExifTool/ITC.pm +1 -1
  73. data/bin/lib/Image/ExifTool/Import.pm +1 -1
  74. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  75. data/bin/lib/Image/ExifTool/JPEG.pm +6 -2
  76. data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  77. data/bin/lib/Image/ExifTool/JSON.pm +1 -1
  78. data/bin/lib/Image/ExifTool/JVC.pm +1 -1
  79. data/bin/lib/Image/ExifTool/Jpeg2000.pm +1 -1
  80. data/bin/lib/Image/ExifTool/Kodak.pm +1 -1
  81. data/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  82. data/bin/lib/Image/ExifTool/LIF.pm +1 -1
  83. data/bin/lib/Image/ExifTool/LNK.pm +1 -1
  84. data/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
  85. data/bin/lib/Image/ExifTool/Lang/de.pm +1 -1
  86. data/bin/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  87. data/bin/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  88. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  89. data/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
  90. data/bin/lib/Image/ExifTool/Lang/fr.pm +1 -1
  91. data/bin/lib/Image/ExifTool/Lang/it.pm +1 -1
  92. data/bin/lib/Image/ExifTool/Lang/ja.pm +1 -1
  93. data/bin/lib/Image/ExifTool/Lang/ko.pm +1 -1
  94. data/bin/lib/Image/ExifTool/Lang/nl.pm +1 -1
  95. data/bin/lib/Image/ExifTool/Lang/pl.pm +1 -1
  96. data/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
  97. data/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
  98. data/bin/lib/Image/ExifTool/Lang/tr.pm +1 -1
  99. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  100. data/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  101. data/bin/lib/Image/ExifTool/Leaf.pm +1 -1
  102. data/bin/lib/Image/ExifTool/Lytro.pm +1 -1
  103. data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
  104. data/bin/lib/Image/ExifTool/MIE.pm +1 -1
  105. data/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
  106. data/bin/lib/Image/ExifTool/MIFF.pm +1 -1
  107. data/bin/lib/Image/ExifTool/MNG.pm +1 -1
  108. data/bin/lib/Image/ExifTool/MOI.pm +1 -1
  109. data/bin/lib/Image/ExifTool/MPC.pm +1 -1
  110. data/bin/lib/Image/ExifTool/MPEG.pm +1 -1
  111. data/bin/lib/Image/ExifTool/MPF.pm +1 -1
  112. data/bin/lib/Image/ExifTool/MRC.pm +1 -1
  113. data/bin/lib/Image/ExifTool/MWG.pm +1 -1
  114. data/bin/lib/Image/ExifTool/MXF.pm +1 -1
  115. data/bin/lib/Image/ExifTool/MacOS.pm +10 -10
  116. data/bin/lib/Image/ExifTool/MakerNotes.pm +13 -2
  117. data/bin/lib/Image/ExifTool/Matroska.pm +9 -5
  118. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  119. data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
  120. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  121. data/bin/lib/Image/ExifTool/Motorola.pm +1 -1
  122. data/bin/lib/Image/ExifTool/Nikon.pm +1062 -189
  123. data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
  124. data/bin/lib/Image/ExifTool/NikonCustom.pm +519 -6
  125. data/bin/lib/Image/ExifTool/NikonSettings.pm +17 -18
  126. data/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
  127. data/bin/lib/Image/ExifTool/OOXML.pm +1 -1
  128. data/bin/lib/Image/ExifTool/Ogg.pm +1 -1
  129. data/bin/lib/Image/ExifTool/Olympus.pm +8 -7
  130. data/bin/lib/Image/ExifTool/OpenEXR.pm +5 -3
  131. data/bin/lib/Image/ExifTool/Opus.pm +1 -1
  132. data/bin/lib/Image/ExifTool/Other.pm +1 -1
  133. data/bin/lib/Image/ExifTool/PCX.pm +1 -1
  134. data/bin/lib/Image/ExifTool/PDF.pm +1 -1
  135. data/bin/lib/Image/ExifTool/PGF.pm +1 -1
  136. data/bin/lib/Image/ExifTool/PICT.pm +1 -1
  137. data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
  138. data/bin/lib/Image/ExifTool/PLUS.pm +1 -1
  139. data/bin/lib/Image/ExifTool/PNG.pm +28 -8
  140. data/bin/lib/Image/ExifTool/PPM.pm +1 -1
  141. data/bin/lib/Image/ExifTool/PSP.pm +1 -1
  142. data/bin/lib/Image/ExifTool/Palm.pm +1 -1
  143. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
  144. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
  145. data/bin/lib/Image/ExifTool/Parrot.pm +1 -1
  146. data/bin/lib/Image/ExifTool/Pentax.pm +3 -2
  147. data/bin/lib/Image/ExifTool/PhaseOne.pm +1 -1
  148. data/bin/lib/Image/ExifTool/PhotoCD.pm +1 -1
  149. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  150. data/bin/lib/Image/ExifTool/Photoshop.pm +1 -1
  151. data/bin/lib/Image/ExifTool/PostScript.pm +1 -1
  152. data/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
  153. data/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
  154. data/bin/lib/Image/ExifTool/QuickTime.pm +10 -6
  155. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +16 -5
  156. data/bin/lib/Image/ExifTool/RIFF.pm +1 -1
  157. data/bin/lib/Image/ExifTool/RSRC.pm +1 -1
  158. data/bin/lib/Image/ExifTool/RTF.pm +1 -1
  159. data/bin/lib/Image/ExifTool/Radiance.pm +1 -1
  160. data/bin/lib/Image/ExifTool/Rawzor.pm +1 -1
  161. data/bin/lib/Image/ExifTool/Real.pm +1 -1
  162. data/bin/lib/Image/ExifTool/Reconyx.pm +1 -1
  163. data/bin/lib/Image/ExifTool/Red.pm +1 -1
  164. data/bin/lib/Image/ExifTool/Ricoh.pm +1 -1
  165. data/bin/lib/Image/ExifTool/Samsung.pm +6 -2
  166. data/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
  167. data/bin/lib/Image/ExifTool/Scalado.pm +1 -1
  168. data/bin/lib/Image/ExifTool/Shift.pl +3 -1
  169. data/bin/lib/Image/ExifTool/Shortcuts.pm +3 -2
  170. data/bin/lib/Image/ExifTool/Sigma.pm +1 -1
  171. data/bin/lib/Image/ExifTool/SigmaRaw.pm +1 -1
  172. data/bin/lib/Image/ExifTool/Sony.pm +11 -5
  173. data/bin/lib/Image/ExifTool/SonyIDC.pm +1 -1
  174. data/bin/lib/Image/ExifTool/Stim.pm +1 -1
  175. data/bin/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  176. data/bin/lib/Image/ExifTool/TagLookup.pm +6385 -6290
  177. data/bin/lib/Image/ExifTool/TagNames.pod +361 -22
  178. data/bin/lib/Image/ExifTool/Text.pm +1 -1
  179. data/bin/lib/Image/ExifTool/Theora.pm +1 -1
  180. data/bin/lib/Image/ExifTool/Torrent.pm +1 -1
  181. data/bin/lib/Image/ExifTool/Unknown.pm +1 -1
  182. data/bin/lib/Image/ExifTool/VCard.pm +1 -1
  183. data/bin/lib/Image/ExifTool/Validate.pm +1 -1
  184. data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
  185. data/bin/lib/Image/ExifTool/WTV.pm +1 -1
  186. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  187. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
  188. data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  189. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  190. data/bin/lib/Image/ExifTool/WritePNG.pl +30 -10
  191. data/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  192. data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -1
  193. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +9 -4
  194. data/bin/lib/Image/ExifTool/WriteXMP.pl +3 -1
  195. data/bin/lib/Image/ExifTool/Writer.pl +6 -5
  196. data/bin/lib/Image/ExifTool/XMP.pm +51 -25
  197. data/bin/lib/Image/ExifTool/XMP2.pl +3 -2
  198. data/bin/lib/Image/ExifTool/XMPStruct.pl +22 -8
  199. data/bin/lib/Image/ExifTool/ZIP.pm +10 -2
  200. data/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
  201. data/bin/lib/Image/ExifTool/iWork.pm +1 -1
  202. data/bin/lib/Image/ExifTool.pm +23 -6
  203. data/bin/lib/Image/ExifTool.pod +71 -69
  204. data/bin/perl-Image-ExifTool.spec +43 -43
  205. data/lib/exiftool_vendored/version.rb +1 -1
  206. 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.02';
66
+ $VERSION = '4.05';
66
67
 
67
68
  sub LensIDConv($$$);
68
69
  sub ProcessNikonAVI($$$);
@@ -436,6 +437,7 @@ sub GetAFPointGrid($$;$);
436
437
  'A5 40 2D 88 2C 40 4B 0E' => 'Sigma 18-250mm F3.5-6.3 DC OS HSM',
437
438
  # LensFStops varies with FocalLength for this lens (ref 2):
438
439
  '92 2C 2D 88 2C 40 4B 0E' => 'Sigma 18-250mm F3.5-6.3 DC Macro OS HSM', #2
440
+ '87 2C 2D 8E 2C 40 4B 0E' => 'Sigma 18-300mm F3.5-6.3 DC Macro HSM', #30
439
441
  # '92 2C 2D 88 2C 40 4B 0E' (250mm)
440
442
  # '92 2B 2D 88 2C 40 4B 0E' (210mm)
441
443
  # '92 2C 2D 88 2C 40 4B 0E' (185mm)
@@ -494,6 +496,7 @@ sub GetAFPointGrid($$;$);
494
496
  '7A 48 5C 80 24 24 4B 06' => 'Sigma 70-200mm F2.8 EX APO DG Macro HSM II',
495
497
  'EE 48 5C 80 24 24 4B 06' => 'Sigma 70-200mm F2.8 EX APO DG Macro HSM II', #JD
496
498
  '9C 48 5C 80 24 24 4B 0E' => 'Sigma 70-200mm F2.8 EX DG OS HSM', #Rolando Ruzic
499
+ 'BB 48 5C 80 24 24 4B 4E' => 'Sigma 70-200mm F2.8 DG OS HSM | S', #forum13207
497
500
  '02 46 5C 82 25 25 02 00' => 'Sigma 70-210mm F2.8 APO', #JD
498
501
  '02 40 5C 82 2C 35 02 00' => 'Sigma APO 70-210mm F3.5-4.5',
499
502
  '26 3C 5C 82 30 3C 1C 02' => 'Sigma 70-210mm F4-5.6 UC-II',
@@ -508,6 +511,7 @@ sub GetAFPointGrid($$;$);
508
511
  '77 44 60 98 34 3C 7B 0E' => 'Sigma 80-400mm F4.5-5.6 APO DG D OS',
509
512
  '48 48 68 8E 30 30 4B 02' => 'Sigma APO 100-300mm F4 EX IF HSM',
510
513
  'F3 48 68 8E 30 30 4B 02' => 'Sigma APO 100-300mm F4 EX IF HSM',
514
+ '26 45 68 8E 34 42 1C 02' => 'Sigma 100-300mm F4.5-6.7 DL', #30
511
515
  '48 54 6F 8E 24 24 4B 02' => 'Sigma APO 120-300mm F2.8 EX DG HSM',
512
516
  '7A 54 6E 8E 24 24 4B 02' => 'Sigma APO 120-300mm F2.8 EX DG HSM',
513
517
  '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 +706,7 @@ sub GetAFPointGrid($$;$);
702
706
  #
703
707
  '9A 4C 50 50 14 14 9C 06' => 'Yongnuo YN50mm F1.8N',
704
708
  '9F 48 48 48 24 24 A1 06' => 'Yongnuo YN40mm F2.8N', #30
709
+ '9F 54 68 68 18 18 A2 06' => 'Yongnuo YN100mm F2N', #30
705
710
  #
706
711
  '02 40 44 5C 2C 34 02 00' => 'Exakta AF 35-70mm 1:3.5-4.5 MC',
707
712
  #
@@ -754,6 +759,7 @@ my %flashFirmware = (
754
759
  '5 2' => '5.02 (SB-900)',
755
760
  '6 1' => '6.01 (SB-700)', #https://exiftool.org/forum/index.php/topic,5034.0.html
756
761
  '7 1' => '7.01 (SB-910)', #PH
762
+ '14 3' => '14.03 (SB-5000)', #28
757
763
  OTHER => sub {
758
764
  my ($val, $inv) = @_;
759
765
  return sprintf('%d.%.2d (Unknown model)', split(' ', $val)) unless $inv;
@@ -810,6 +816,124 @@ my %flashControlMode = (
810
816
  0x07 => 'Repeating Flash',
811
817
  );
812
818
 
819
+ my %activeDLightingZ7 = (
820
+ 0 => 'Off',
821
+ 2 => 'Low',
822
+ 3 => 'Normal',
823
+ 4 => 'High',
824
+ 5 => 'Extra High',
825
+ );
826
+
827
+ my %flashControlModeZ7 = (
828
+ 0 => 'TTL',
829
+ 1 => 'Auto External Flash',
830
+ 2 => 'GN (distance priority)',
831
+ 3 => 'Manual',
832
+ 4 => 'Repeating Flash',
833
+ );
834
+
835
+ my %flashRemoteControlZ7 = (
836
+ 0 => 'Group',
837
+ 1 => 'Quick Wireless',
838
+ 2 => 'Remote Repeating',
839
+ );
840
+
841
+ my %flashWirelessOptionZ7 = (
842
+ 0 => 'Off',
843
+ 1 => 'Optical AWL',
844
+ 2 => 'Optical/Radio AWL',
845
+ 3 => 'Radio AWL',
846
+ );
847
+
848
+ my %focusModeZ7 = (
849
+ 0 => 'Manual',
850
+ 1 => 'AF-S',
851
+ 2 => 'AF-C',
852
+ 4 => 'AF-F', # full frame
853
+ );
854
+
855
+ my %infoZSeries = (
856
+ Condition => '$$self{Model} =~ /^NIKON Z (5|50|6|6_2|7|7_2|fc|9)\b/i',
857
+ Notes => 'Z Series cameras thru Decemeber 2021',
858
+ );
859
+ my %iSOAutoHiLimitZ7 = (
860
+ 0 => 'ISO 64',
861
+ 1 => 'ISO 80',
862
+ 2 => 'ISO 100',
863
+ 3 => 'ISO 125',
864
+ 4 => 'ISO 160',
865
+ 5 => 'ISO 200',
866
+ 6 => 'ISO 250',
867
+ 7 => 'ISO 320',
868
+ 8 => 'ISO 400',
869
+ 9 => 'ISO 500',
870
+ 10 => 'ISO 640',
871
+ 11 => 'ISO 800',
872
+ 12 => 'ISO 1000',
873
+ 13 => 'ISO 1250',
874
+ 14 => 'ISO 1600',
875
+ 15 => 'ISO 2000',
876
+ 16 => 'ISO 2500',
877
+ 17 => 'ISO 3200',
878
+ 18 => 'ISO 4000',
879
+ 19 => 'ISO 5000',
880
+ 20 => 'ISO 6400',
881
+ 21 => 'ISO 8000',
882
+ 22 => 'ISO 10000',
883
+ 23 => 'ISO 12800',
884
+ 24 => 'ISO 16000',
885
+ 25 => 'ISO 20000',
886
+ 26 => 'ISO 25600',
887
+ 27 => 'ISO Hi 0.3',
888
+ 28 => 'ISO Hi 0.7',
889
+ 29 => 'ISO Hi 1.0',
890
+ 32 => 'ISO Hi 2.0',
891
+ );
892
+
893
+ my %meteringModeZ7 = (
894
+ 0 => 'Matrix',
895
+ 1 => 'Center',
896
+ 2 => 'Spot',
897
+ 3 => 'Highlight'
898
+ );
899
+
900
+ my %movieFrameRateZ7 = (
901
+ 0 => '120p',
902
+ 1 => '100p',
903
+ 2 => '60p',
904
+ 3 => '50p',
905
+ 4 => '30p',
906
+ 5 => '25p',
907
+ 6 => '24p',
908
+ );
909
+
910
+ my %offLowNormalHighZ7 = (
911
+ 0 => 'Off',
912
+ 1 => 'Low',
913
+ 2 => 'Normal',
914
+ 3 => 'High',
915
+ );
916
+
917
+ my %movieFrameSizeZ9 = (
918
+ 1 => '1920x1080',
919
+ 2 => '3840x2160',
920
+ 3 => '7680x4320',
921
+ );
922
+
923
+ my %subjectDetectionZ9 = (
924
+ 0 => 'Off',
925
+ 1 => 'Auto',
926
+ 2 => 'People',
927
+ 3 => 'Animals',
928
+ 4 => 'Vehicles',
929
+ );
930
+
931
+ my %vRModeZ9 = (
932
+ 0 => 'Off',
933
+ 1 => 'Normal',
934
+ 2 => 'Sport',
935
+ );
936
+
813
937
  my %retouchValues = ( #PH
814
938
  0 => 'None',
815
939
  3 => 'B & W',
@@ -1067,6 +1191,21 @@ my %flashGroupOptionsMode = (
1067
1191
  3 => 'Off',
1068
1192
  );
1069
1193
 
1194
+ my %nefCompression = ( #28 relocated to MakerNotes_0x51 at offset x'0a (Z9)
1195
+ 1 => 'Lossy (type 1)', # (older models)
1196
+ 2 => 'Uncompressed', #JD - D100 (even though TIFF compression is set!)
1197
+ 3 => 'Lossless',
1198
+ 4 => 'Lossy (type 2)',
1199
+ 5 => 'Striped packed 12 bits', #IB
1200
+ 6 => 'Uncompressed (reduced to 12 bit)', #IB
1201
+ 7 => 'Unpacked 12 bits', #IB (padded to 16)
1202
+ 8 => 'Small', #IB
1203
+ 9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1204
+ 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1205
+ 13 => 'High Efficiency', #28
1206
+ 14 => 'High Efficiency*', #28
1207
+ );
1208
+
1070
1209
  my %noYes = ( 0 => 'No' , 1 => 'Yes', );
1071
1210
  my %offOn = ( 0 => 'Off', 1 => 'On' );
1072
1211
  my %onOff = ( 0 => 'On', 1 => 'Off' );
@@ -1080,6 +1219,30 @@ my %binaryDataAttrs = (
1080
1219
  FIRST_ENTRY => 0,
1081
1220
  );
1082
1221
 
1222
+ my %base64bin = ( ValueConv => 'Image::ExifTool::XMP::DecodeBase64($val)' );
1223
+ my %base64int32u = ( ValueConv => 'my $val=Image::ExifTool::XMP::DecodeBase64($val); unpack("V",$$val)' );
1224
+ my %base64bytes = ( ValueConv => 'my $val=Image::ExifTool::XMP::DecodeBase64($val); join(".",unpack("C*",$$val))' );
1225
+ my %base64double = (
1226
+ ValueConv => q{
1227
+ my $val=Image::ExifTool::XMP::DecodeBase64($val);
1228
+ my $saveOrder = GetByteOrder();
1229
+ SetByteOrder('II');
1230
+ $val = GetDouble($val,0);
1231
+ SetByteOrder($saveOrder);
1232
+ return $val;
1233
+ },
1234
+ );
1235
+ my %base64coord = (
1236
+ ValueConv => q{
1237
+ my $val=Image::ExifTool::XMP::DecodeBase64($val);
1238
+ my $saveOrder = GetByteOrder();
1239
+ SetByteOrder('II');
1240
+ $val = GetDouble($val,0) + GetDouble($val,8)/60 + GetDouble($val,16)/3600;
1241
+ SetByteOrder($saveOrder);
1242
+ return $val;
1243
+ },
1244
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)',
1245
+ );
1083
1246
  # Nikon maker note tags
1084
1247
  %Image::ExifTool::Nikon::Main = (
1085
1248
  PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikon,
@@ -1476,6 +1639,14 @@ my %binaryDataAttrs = (
1476
1639
  Name => 'ColorTemperatureAuto',
1477
1640
  Writable => 'int16u',
1478
1641
  },
1642
+ 0x0051 => { #28 (Z9)
1643
+ Name => 'MakerNotes0x51',
1644
+ Writable => 'undef',
1645
+ Hidden => 1,
1646
+ Permanent => 0,
1647
+ Flags => [ 'Binary', 'Protected' ],
1648
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::MakerNotes0x51' },
1649
+ },
1479
1650
  #0x0053 #28 possibly a secondary DistortionControl block (in addition to DistortInfo)? Certainly offset 0x04 within block contains tag AutoDistortionControl for Z72 and D6 (1=>On; 2=> Off)
1480
1651
  #0x005e #28 possibly DiffractionCompensation block? Certainly offset 0x04 within block contains tag DiffractionCompensation
1481
1652
  0x0080 => { Name => 'ImageAdjustment', Writable => 'string' },
@@ -1889,18 +2060,30 @@ my %binaryDataAttrs = (
1889
2060
  ByteOrder => 'BigEndian',
1890
2061
  },
1891
2062
  },
1892
- { # (Z6_2 firmware version 1.00 and Z7_2 firmware versions 1.00 & 1.01, ref 28)
2063
+ { # (Z6_2 firmware version 1.00 and Z7II firmware versions 1.00 & 1.01, ref 28)
1893
2064
  # 0800=Z6/Z7 0801=Z50 0802=Z5 0803=Z6II/Z7II 0804=Zfc
1894
2065
  Condition => '$$valPt =~ /^080[01234]/',
1895
- Name => 'ShotInfoZ7_2',
2066
+ Name => 'ShotInfoZ7II',
2067
+ SubDirectory => {
2068
+ TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7II',
2069
+ DecryptStart => 4,
2070
+ # TODO: eventually set the length dynamically according to actual offsets!
2071
+ DecryptLen => 0xd04e + 860, # thru decoded MenuSettingsZ7II
2072
+ ByteOrder => 'LittleEndian',
2073
+ },
2074
+ },
2075
+ { # (Z9 firmware version 1.00 ref 28)
2076
+ Condition => '$$valPt =~ /^0805/',
2077
+ Name => 'ShotInfoZ9',
1896
2078
  SubDirectory => {
1897
- TagTable => 'Image::ExifTool::Nikon::ShotInfoZ7_2',
2079
+ TagTable => 'Image::ExifTool::Nikon::ShotInfoZ9',
1898
2080
  DecryptStart => 4,
1899
- DecryptLen => 0xcea6 + 1050, # thru decoded parts of Offset31
2081
+ # TODO: eventually set the length dynamically according to actual offsets!
2082
+ DecryptLen => 0xec4b + 1646, # decoded thru end of CustomSettingZ9 in Offset26 (+MenuSettingsZ9Offset)
1900
2083
  ByteOrder => 'LittleEndian',
1901
2084
  },
1902
2085
  },
1903
- { # D7100=0227, Z6/Z7=0800
2086
+ { # D7100=0227
1904
2087
  Condition => '$$valPt =~ /^0[28]/',
1905
2088
  Name => 'ShotInfo02xx',
1906
2089
  SubDirectory => {
@@ -1929,18 +2112,8 @@ my %binaryDataAttrs = (
1929
2112
  0x0093 => { #21
1930
2113
  Name => 'NEFCompression',
1931
2114
  Writable => 'int16u',
1932
- PrintConv => {
1933
- 1 => 'Lossy (type 1)', # (older models)
1934
- 2 => 'Uncompressed', #JD - D100 (even though TIFF compression is set!)
1935
- 3 => 'Lossless',
1936
- 4 => 'Lossy (type 2)',
1937
- 5 => 'Striped packed 12 bits', #IB
1938
- 6 => 'Uncompressed (reduced to 12 bit)', #IB
1939
- 7 => 'Unpacked 12 bits', #IB (padded to 16)
1940
- 8 => 'Small', #IB
1941
- 9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1942
- 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1943
- },
2115
+ SeparateTable => 'NEFCompression',
2116
+ PrintConv => \%nefCompression,
1944
2117
  },
1945
2118
  0x0094 => { Name => 'SaturationAdj', Writable => 'int16s' },
1946
2119
  0x0095 => { Name => 'NoiseReduction', Writable => 'string' }, # ("Off" or "FPNR"=long exposure NR)
@@ -2141,7 +2314,7 @@ my %binaryDataAttrs = (
2141
2314
  },
2142
2315
  },
2143
2316
  {
2144
- Condition => '$$valPt =~ /^080[01]/', # Z6/Z7
2317
+ Condition => '$$valPt =~ /^080[012]/', # Z6/Z7/Z9
2145
2318
  Name => 'LensData0800',
2146
2319
  SubDirectory => {
2147
2320
  TagTable => 'Image::ExifTool::Nikon::LensData0800',
@@ -2276,8 +2449,8 @@ my %binaryDataAttrs = (
2276
2449
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::FlashInfo0107' },
2277
2450
  },
2278
2451
  {
2279
- Name => 'FlashInfo0300', # (Z7_2)
2280
- Condition => '$$valPt =~ /^0300/',
2452
+ Name => 'FlashInfo0300', # (Z7II)
2453
+ Condition => '$$valPt =~ /^030[01]/',
2281
2454
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::FlashInfo0300' },
2282
2455
  },
2283
2456
  {
@@ -2350,11 +2523,15 @@ my %binaryDataAttrs = (
2350
2523
  PrintConv => '$self->ConvertDateTime($val)',
2351
2524
  PrintConvInv => '$self->InverseDateTime($val,0)',
2352
2525
  },
2353
- 0x00b7 => { #JD
2526
+ 0x00b7 => [{
2527
+ Name => 'AFInfo2',
2528
+ Condition => '$$self{Model} =~ /^NIKON Z 9\b/i', #AFInfo2Version 0400
2529
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2V0400' },
2530
+ },{ #JD
2354
2531
  Name => 'AFInfo2',
2355
2532
  # (this structure may be byte swapped when rewritten by CaptureNX)
2356
2533
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::AFInfo2' },
2357
- },
2534
+ }],
2358
2535
  0x00b8 => [{ #PH
2359
2536
  Name => 'FileInfo',
2360
2537
  # unfortunately, some newer models write this as little-endian
@@ -2615,15 +2792,23 @@ my %binaryDataAttrs = (
2615
2792
  },
2616
2793
  },
2617
2794
  # 5 - values: 0, 1 (VR On), 2 (VR Off)
2618
- 6 => {
2795
+ 6 => [{
2619
2796
  Name => 'VRMode',
2620
2797
  PrintConv => {
2621
- 0 => 'Normal', # (Z7 gives this value for "off" - PH)
2798
+ 0 => 'Off',
2799
+ 1 => 'Sport',
2800
+ 3 => 'Normal',
2801
+ },
2802
+ %infoZSeries
2803
+ },{
2804
+ Name => 'VRMode',
2805
+ PrintConv => {
2806
+ 0 => 'Normal',
2622
2807
  1 => 'On (1)', #PH (NC)
2623
2808
  2 => 'Active', # (1J1)
2624
2809
  3 => 'Sport', #PH (Z7)
2625
2810
  },
2626
- },
2811
+ }],
2627
2812
  # 7 - values: 0, 1
2628
2813
  );
2629
2814
 
@@ -3457,6 +3642,10 @@ my %binaryDataAttrs = (
3457
3642
  201 => 'Wide-area AF', #28 (D6)
3458
3643
  202 => 'Face-priority AF', #28 (D6)
3459
3644
  203 => 'Subject-tracking AF', #28 (D6)
3645
+ 204 => 'Dynamic Area (S)', #28 (Z9)
3646
+ 205 => 'Dynamic Area (M)', #28 (Z9)
3647
+ 206 => 'Dynamic Area (L)', #28 (Z9)
3648
+ 207 => '3D-tracking', #28 (Z9)
3460
3649
  },
3461
3650
  },
3462
3651
  ],
@@ -3984,6 +4173,47 @@ my %binaryDataAttrs = (
3984
4173
  },
3985
4174
  );
3986
4175
 
4176
+ %Image::ExifTool::Nikon::AFInfo2V0400 = ( #V0400 related fields begin at x'3c' ( Z9)
4177
+ %binaryDataAttrs,
4178
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4179
+ DATAMEMBER => [ 0 ],
4180
+ 0 => {
4181
+ Name => 'AFInfo2Version',
4182
+ Format => 'undef[4]',
4183
+ Writable => 0,
4184
+ RawConv => '$$self{AFInfo2Version} = $val',
4185
+ },
4186
+ 0x3e => {
4187
+ Name => 'AFImageWidth',
4188
+ Format => 'int16u',
4189
+ },
4190
+ 0x40 => {
4191
+ Name => 'AFImageHeight',
4192
+ Format => 'int16u',
4193
+ },
4194
+ 0x43 => {
4195
+ Name => 'FocusPositionHorizontal',
4196
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ); }, #493 focus points for Z9 fall in a 30x18 grid (some coordinates are not accessible)
4197
+ },
4198
+ 0x45 => {
4199
+ Name => 'FocusPositionVertical',
4200
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ); },
4201
+ },
4202
+ 0x46 => {
4203
+ Name => 'AFAreaWidth',
4204
+ Format => 'int16u',
4205
+ Notes => 'size of AF area in AFImage pixels',
4206
+ RawConv => '$val ? $val : undef',
4207
+ },
4208
+ 0x48 => {
4209
+ Name => 'AFAreaHeight',
4210
+ Format => 'int16u',
4211
+ RawConv => '$val ? $val : undef',
4212
+ }
4213
+ # 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)
4214
+ #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).
4215
+ );
4216
+
3987
4217
  # Nikon AF fine-tune information (ref 28)
3988
4218
  %Image::ExifTool::Nikon::AFTune = (
3989
4219
  %binaryDataAttrs,
@@ -4749,6 +4979,7 @@ my %nikonFocalConversions = (
4749
4979
  23 => 'Nikkor Z 14-24mm f/2.8 S', #IB
4750
4980
  24 => 'Nikkor Z MC 105mm f/2.8 VR S', #IB
4751
4981
  27 => 'Nikkor Z MC 50mm f/2.8', #IB
4982
+ 28 => 'Nikkor Z 100-400mm f/4.5-5.6 VR S', #28
4752
4983
  29 => 'Nikkor Z 28mm f/2.8', #IB
4753
4984
  },
4754
4985
  },
@@ -7261,9 +7492,7 @@ my %nikonFocalConversions = (
7261
7492
  WRITABLE => 1,
7262
7493
  FIRST_ENTRY => 0,
7263
7494
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7264
- NOTES => q{
7265
- These tags are extracted from encrypted data in images from the D4S.
7266
- },
7495
+ NOTES => 'These tags are extracted from encrypted data in images from the D4S.',
7267
7496
  0x00 => {
7268
7497
  Name => 'ShotInfoVersion',
7269
7498
  Format => 'string[4]',
@@ -7562,19 +7791,19 @@ my %nikonFocalConversions = (
7562
7791
  # note: DecryptLen currently set to 0x3697
7563
7792
  );
7564
7793
 
7565
- # shot information for the Z7_2 firmware 1.00 (encrypted) - ref 28
7566
- %Image::ExifTool::Nikon::ShotInfoZ7_2 = (
7794
+ # shot information for the Z7II firmware 1.00 (encrypted) - ref 28
7795
+ %Image::ExifTool::Nikon::ShotInfoZ7II = (
7567
7796
  PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7568
7797
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7569
7798
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7570
7799
  VARS => { ID_LABEL => 'Index' },
7571
- DATAMEMBER => [ 0x04, 0x0e, 0x18, 0x30, 0x38, 0x98, 0xa0, 0x75e7,
7572
- 0x760c, 0x7610, 0x7eff, 0xce31, 0xcea5, 0xceb6, 0xceb7 ],
7800
+ DATAMEMBER => [ 0x04, 0x30, 0x38, 0x98, 0xa0, 0x75e7, 0x760c,
7801
+ 0x7610, 0x7eff, 0xce31, 0xcea5, 0xceb6, 0xceb7 ],
7573
7802
  IS_SUBDIR => [ 0xceb8 ],
7574
7803
  WRITABLE => 1,
7575
7804
  FIRST_ENTRY => 0,
7576
7805
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7577
- NOTES => 'These tags are extracted from encrypted data in images from the Z7_2.',
7806
+ NOTES => 'These tags are extracted from encrypted data in images from the Z7II.',
7578
7807
  0x00 => {
7579
7808
  Name => 'ShotInfoVersion',
7580
7809
  Format => 'string[4]',
@@ -7591,14 +7820,12 @@ my %nikonFocalConversions = (
7591
7820
  Name => 'FirmwareVersion2',
7592
7821
  Format => 'string[8]',
7593
7822
  Writable => 0,
7594
- RawConv => '$$self{FirmwareVersion2} = $val',
7595
7823
  Hidden => 1,
7596
7824
  },
7597
7825
  0x18 => {
7598
7826
  Name => 'FirmwareVersion3',
7599
7827
  Format => 'string[8]',
7600
7828
  Writable => 0,
7601
- RawConv => '$$self{FirmwareVersion3} = $val',
7602
7829
  Hidden => 1,
7603
7830
  },
7604
7831
  0x24 => {
@@ -7640,12 +7867,12 @@ my %nikonFocalConversions = (
7640
7867
  Hidden => 1,
7641
7868
  RawConv => '$$self{Offset31} = $val || 0x10000000; undef', # (ignore if 0)
7642
7869
  },
7643
- ### 0x75e8 - Offset3 info start (Z7_2 firmware 1.30)
7870
+ ### 0x75e8 - Offset3 info start (Z7II firmware 1.30)
7644
7871
  0x75e7 => {
7645
7872
  Name => 'Hook1',
7646
7873
  Hidden => 1,
7647
7874
  RawConv => 'undef',
7648
- # account for variable location of Offset5 data
7875
+ # account for variable location of Offset3 data
7649
7876
  Hook => '$varSize = $$self{Offset3} - 0x75e8',
7650
7877
  },
7651
7878
  0x760c => {
@@ -7667,7 +7894,7 @@ my %nikonFocalConversions = (
7667
7894
  Format => 'int16u',
7668
7895
  Hidden => 1,
7669
7896
  },
7670
- ### 0x7f00 - Offset5 info start (Z7_2 firmware 1.30)
7897
+ ### 0x7f00 - Offset5 info start (Z7II firmware 1.30)
7671
7898
  0x7eff => {
7672
7899
  Name => 'Hook2',
7673
7900
  Hidden => 1,
@@ -7691,7 +7918,7 @@ my %nikonFocalConversions = (
7691
7918
  return "$color $brightness"
7692
7919
  },
7693
7920
  },
7694
- ### 0xce32 - OrientationInfo start (Z7_2 firmware 1.00)
7921
+ ### 0xce32 - OrientationInfo start (Z7II firmware 1.00)
7695
7922
  0xce31 => {
7696
7923
  Name => 'Hook3',
7697
7924
  Hidden => 1,
@@ -7734,71 +7961,250 @@ my %nikonFocalConversions = (
7734
7961
  # account for variable location of Offset31 data
7735
7962
  Hook => '$varSize = $$self{Offset31} - 0xcea6',
7736
7963
  },
7737
- ### 0xcea6 - Offset31 info start (Z7_2 firmware 1.30)
7964
+ ### 0xcea6 - Offset31 info start (Z7II firmware 1.30)
7738
7965
  0xceb6 => {
7739
- Name => 'ZMenuSettingsOffset',
7740
- # offset to ZMenuSettings is relative to start of Offset31 block
7741
- RawConv => '$$self{ZMenuSettingsOffset} = ($val || 0x10000000) + $$self{Offset31}; undef', # (ignore if 0)
7966
+ Name => 'MenuSettingsZ7IIOffset',
7967
+ # offset to MenuSettingsZ7II is relative to start of Offset31 block
7968
+ RawConv => '$$self{MenuSettingsZ7IIOffset} = ($val || 0x10000000) + $$self{Offset31}; undef', # (ignore if 0)
7742
7969
  },
7743
7970
  0xceb7 => {
7744
7971
  Name => 'Hook5',
7745
7972
  Hidden => 1,
7746
7973
  RawConv => 'undef',
7747
7974
  # account for variable location of Offset5 data
7748
- Hook => '$varSize = $$self{ZMenuSettingsOffset} - 0xceb8',
7975
+ Hook => '$varSize = $$self{MenuSettingsZ7IIOffset} - 0xceb8',
7749
7976
  },
7750
- 0xceb8 => {
7751
- Name => 'ZMenuSettings',
7977
+ 0xceb8 => { # (this is 0xd04e for the Z50)
7978
+ Name => 'MenuSettingsZ7II',
7979
+ Format => 'undef[860]',
7752
7980
  SubDirectory => {
7753
- TagTable => 'Image::ExifTool::Nikon::ZMenuSettings',
7981
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ7II',
7754
7982
  },
7755
7983
  }
7756
- # note: DecryptLen currently set to 0xcea6 + 1050
7984
+ # note: DecryptLen currently set to 0xd04e + 860 (offset for Z50 is 0xd04e)
7757
7985
  );
7758
7986
 
7759
- %Image::ExifTool::Nikon::ZMenuSettings = (
7760
- %binaryDataAttrs,
7987
+ # shot information for the Z9 firmware 1.00 (encrypted) - ref 28
7988
+ %Image::ExifTool::Nikon::ShotInfoZ9 = (
7989
+ PROCESS_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7990
+ WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
7991
+ CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7992
+ VARS => { ID_LABEL => 'Index' },
7993
+ DATAMEMBER => [ 0x04, 0x30, 0x38, 0x84, 0x8c, 0x6c6f, 0x6c98,
7994
+ 0x6c9a, 0x7717, 0x7844, 0xeaea, 0xeb6f, 0xeb70 ],
7995
+ IS_SUBDIR => [ 0xec4b ],
7996
+ WRITABLE => 1,
7997
+ FIRST_ENTRY => 0,
7761
7998
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7762
- NOTES => q{
7763
- These tags are used by the Z5 Z6 Z7 Z6II Z7II Z50 Zfc
7999
+ NOTES => 'These tags are extracted from encrypted data in images from the Z9.',
8000
+ 0x00 => {
8001
+ Name => 'ShotInfoVersion',
8002
+ Format => 'string[4]',
8003
+ Writable => 0,
7764
8004
  },
7765
- DATAMEMBER => [ 0xb0, 0xb4, 0x148, 0x160, 0x35a ],
8005
+ 0x04 => {
8006
+ Name => 'FirmwareVersion',
8007
+ DataMember => 'FirmwareVersion',
8008
+ Format => 'string[8]',
8009
+ Writable => 0,
8010
+ RawConv => '$$self{FirmwareVersion} = $val',
8011
+ },
8012
+ 0x0e => {
8013
+ Name => 'FirmwareVersion2',
8014
+ Format => 'string[8]',
8015
+ Writable => 0,
8016
+ Hidden => 1,
8017
+ },
8018
+ 0x18 => {
8019
+ Name => 'FirmwareVersion3',
8020
+ Format => 'string[8]',
8021
+ Writable => 0,
8022
+ Hidden => 1,
8023
+ },
8024
+ 0x24 => {
8025
+ Name => 'NumberOffsets', # number of entries in offset table. offsets are from start of ShotInfo data.
8026
+ DataMember => 'NumberOffsets',
8027
+ Format => 'int32u',
8028
+ Writable => 0,
8029
+ Hidden => 1,
8030
+ },
8031
+ 0x30 => {
8032
+ Name => 'Offset3', #offset3 - length 2528 (Z9 firmware 1.0)
8033
+ DataMember => 'Offset3',
8034
+ Format => 'int32u',
8035
+ Writable => 0,
8036
+ Hidden => 1,
8037
+ RawConv => '$$self{Offset3} = $val || 0x10000000; undef', # (ignore if 0)
8038
+ },
8039
+ 0x38 => {
8040
+ Name => 'Offset5', #offset5 - length 2488 (Z9 firmware 1.0)
8041
+ DataMember => 'Offset5',
8042
+ Format => 'int32u',
8043
+ Writable => 0,
8044
+ Hidden => 1,
8045
+ RawConv => '$$self{Offset5} = $val || 0x10000000; undef', # (ignore if 0)
8046
+ },
8047
+ 0x84 => {
8048
+ Name => 'OrientationOffset', #offset24 - length 108 (Z9 firmware 1.0)
8049
+ DataMember => 'OrientationOffset',
8050
+ Format => 'int32u',
8051
+ Writable => 0,
8052
+ Hidden => 1,
8053
+ RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef', # (ignore if 0)
8054
+ },
8055
+ 0x8c => {
8056
+ Name => 'Offset26', #offset26 - length 1895 (Z9 firmware 1.0)
8057
+ DataMember => 'Offset26',
8058
+ Format => 'int32u',
8059
+ Writable => 0,
8060
+ Hidden => 1,
8061
+ RawConv => '$$self{Offset26} = $val || 0x10000000; undef', # (ignore if 0)
8062
+ },
8063
+ ### 0x6c70 - Offset3 info start (Z9 firmware 1.00)
8064
+ 0x6c6f => {
8065
+ Name => 'Offset3Hook',
8066
+ Hidden => 1,
8067
+ RawConv => 'undef',
8068
+ # account for variable location of Offset3 data
8069
+ Hook => '$varSize = $$self{Offset3} - 0x6c70',
8070
+ },
8071
+ 0x6c98 => {
8072
+ Name => 'IntervalShooting',
8073
+ RawConv => '$$self{IntervalShooting} = $val',
8074
+ Format => 'int16u',
8075
+ PrintConv => q{
8076
+ return 'Off' if $val == 0 ;
8077
+ my $i = sprintf("Interval %.0f of %.0f",$val, $$self{IntervalShootingIntervals}); # something like "Interval 1 of 3"
8078
+ my $f = $$self{IntervalShootingShotsPerInterval} > 1 ? sprintf(" Frame %.0f of %.0f",$$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}): '' ; # something like "Frame 1 of 3" or blank
8079
+ return "On: $i$f"
8080
+ #$val == 0 ? 'Off' : sprintf("On: Interval %.0f of %.0f Frame %.0f of %.0f",$val, $$self{IntervalShootingIntervals}, $$self{IntervalFrame}, $$self{IntervalShootingShotsPerInterval}),
8081
+ },
8082
+ },
8083
+ 0x6c9a => {
8084
+ Name => 'IntervalFrame',
8085
+ RawConv => '$$self{IntervalFrame} = $val',
8086
+ Condition => '$$self{IntervalShooting} > 0',
8087
+ Format => 'int16u',
8088
+ Hidden => 1,
8089
+ },
8090
+ ### 0x7718 - Offset5 info start (Z9 firmware 1.00)
8091
+ 0x7717 => {
8092
+ Name => 'Offsset5Hook',
8093
+ Hidden => 1,
8094
+ RawConv => 'undef',
8095
+ # account for variable location of Offset5 data
8096
+ Hook => '$varSize = $$self{Offset5} - 0x7718',
8097
+ },
8098
+ 0x7844 => {
8099
+ Name => 'FocusShiftShooting',
8100
+ RawConv => '$$self{FocusShiftShooting} = $val',
8101
+ PrintConv => q{
8102
+ return 'Off' if $val == 0 ;
8103
+ my $i = sprintf("Frame %.0f of %.0f",$val, $$self{FocusShiftNumberShots}); # something like Frame 1 of 100"
8104
+ return "On: $i"
8105
+ },
8106
+ },
8107
+ ### 0xeaeb - OrientationInfo start (Z9 firmware 1.00)
8108
+ 0xeaea => {
8109
+ Name => 'OrientationHook',
8110
+ Hidden => 1,
8111
+ RawConv => 'undef',
8112
+ # account for variable location of OrientationInfo data
8113
+ Hook => '$varSize = $$self{OrientationOffset} - 0xeaeb',
8114
+ },
8115
+ 0xeaeb => {
8116
+ Name => 'RollAngle',
8117
+ Format => 'fixed32u',
8118
+ Notes => 'converted to degrees of clockwise camera roll',
8119
+ ValueConv => '$val <= 180 ? $val : $val - 360',
8120
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
8121
+ PrintConv => 'sprintf("%.1f", $val)',
8122
+ PrintConvInv => '$val',
8123
+ },
8124
+ 0xeaef => {
8125
+ Name => 'PitchAngle',
8126
+ Format => 'fixed32u',
8127
+ Notes => 'converted to degrees of upward camera tilt',
8128
+ ValueConv => '$val <= 180 ? $val : $val - 360',
8129
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
8130
+ PrintConv => 'sprintf("%.1f", $val)',
8131
+ PrintConvInv => '$val',
8132
+ },
8133
+ 0xeaf3 => {
8134
+ Name => 'YawAngle',
8135
+ Format => 'fixed32u',
8136
+ Notes => 'the camera yaw angle when shooting in portrait orientation',
8137
+ ValueConv => '$val <= 180 ? $val : $val - 360',
8138
+ ValueConvInv => '$val >= 0 ? $val : $val + 360',
8139
+ PrintConv => 'sprintf("%.1f", $val)',
8140
+ PrintConvInv => '$val',
8141
+ },
8142
+ ### 0xeb5f - Offset26 info start (Z9 firmware 1.00)
8143
+ 0xeb6f => {
8144
+ Name => 'MenuSettingsZ9Offset',
8145
+ Writable => 0,
8146
+ Hidden => 1,
8147
+ # offset to MenuSettingsZ9 is relative to start of Offset26 block
8148
+ RawConv => '$$self{MenuSettingsZ9Offset} = ($val || 0x10000000) + $$self{Offset26}; undef', # (ignore if 0)
8149
+ },
8150
+ 0xeb70 => {
8151
+ Name => 'Hook5',
8152
+ Hidden => 1,
8153
+ RawConv => 'undef',
8154
+ # account for variable location of menu settings data
8155
+ Hook => '$varSize = $$self{MenuSettingsZ9Offset} - 0xec4b',
8156
+ },
8157
+ 0xec4b => {
8158
+ Name => 'MenuSettingsZ9',
8159
+ Format => 'undef[1646]',
8160
+ SubDirectory => {
8161
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9',
8162
+ },
8163
+ },
8164
+ # note: DecryptLen currently set to 0xec4b + 1646
8165
+ );
8166
+
8167
+ %Image::ExifTool::Nikon::MenuSettingsZ7II = (
8168
+ %binaryDataAttrs,
8169
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8170
+ DATAMEMBER => [ 176, 180, 328, 352, 858 ],
8171
+ NOTES => 'These tags are used by the Z5, Z6, Z7, Z6II, Z7II, Z50 and Zfc.',
7766
8172
  160 => {
7767
8173
  Name => 'IntervalDurationHours',
7768
8174
  Format => 'int32u',
7769
- Condition => '$$self{IntervalShooting} > 0',
8175
+ #Condition => '$$self{IntervalShooting} > 0',
7770
8176
  },
7771
8177
  164 => {
7772
8178
  Name => 'IntervalDurationMinutes',
7773
8179
  Format => 'int32u',
7774
- Condition => '$$self{IntervalShooting} > 0',
8180
+ #Condition => '$$self{IntervalShooting} > 0',
7775
8181
  },
7776
8182
  168 => {
7777
8183
  Name => 'IntervalDurationSeconds',
7778
8184
  Format => 'int32u',
7779
- Condition => '$$self{IntervalShooting} > 0',
8185
+ #Condition => '$$self{IntervalShooting} > 0',
7780
8186
  },
7781
8187
  176 => {
7782
8188
  Name => 'Intervals',
7783
8189
  Format => 'int32u',
7784
8190
  RawConv => '$$self{IntervalShootingIntervals} = $val',
7785
- Condition => '$$self{IntervalShooting} > 0',
8191
+ #Condition => '$$self{IntervalShooting} > 0',
7786
8192
  },
7787
8193
  180 => {
7788
8194
  Name => 'ShotsPerInterval',
7789
8195
  Format => 'int32u',
7790
8196
  RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
7791
- Condition => '$$self{IntervalShooting} > 0',
8197
+ #Condition => '$$self{IntervalShooting} > 0',
7792
8198
  },
7793
8199
  184 => {
7794
8200
  Name => 'IntervalExposureSmoothing',
7795
- Condition => '$$self{IntervalShooting} > 0',
8201
+ #Condition => '$$self{IntervalShooting} > 0',
7796
8202
  Format => 'int8u',
7797
8203
  PrintConv => \%offOn,
7798
8204
  },
7799
8205
  186 => {
7800
8206
  Name => 'IntervalPriority',
7801
- Condition => '$$self{IntervalShooting} > 0',
8207
+ #Condition => '$$self{IntervalShooting} > 0',
7802
8208
  Format => 'int8u',
7803
8209
  PrintConv => \%offOn,
7804
8210
  },
@@ -7841,16 +8247,11 @@ my %nikonFocalConversions = (
7841
8247
  3 => 'Highlight'
7842
8248
  },
7843
8249
  },
8250
+ 326 => { Name => 'NikonMeteringMode', PrintConv => \%meteringModeZ7},
7844
8251
  328 => {
7845
8252
  Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
7846
8253
  RawConv => '$$self{FlashControlMode} = $val',
7847
- PrintConv => {
7848
- 0 => 'TTL',
7849
- 1 => 'Auto External Flash',
7850
- 2 => 'GN (distance priority)',
7851
- 3 => 'Manual',
7852
- 4 => 'Repeating Flash',
7853
- },
8254
+ PrintConv => \%flashControlModeZ7,
7854
8255
  },
7855
8256
  334 => {
7856
8257
  Name => 'FlashGNDistance',
@@ -7868,25 +8269,8 @@ my %nikonFocalConversions = (
7868
8269
  PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
7869
8270
  PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
7870
8271
  },
7871
- 346 => {
7872
- Name => 'FlashWirelessOption', # also found in FlashInfoUnknown at offset 0x23 (with different mappings)
7873
- Unknown => 1,
7874
- PrintConv => {
7875
- 0 => 'Off',
7876
- 1 => 'Optical AWL',
7877
- 2 => 'Optical/Radio AWL',
7878
- 3 => 'Radio AWL'
7879
- },
7880
- },
7881
- 348 => {
7882
- Name => 'FlashRemoteControl', # also found in FlashInfoUnknown at offset 0x1e (with different mappings)
7883
- Unknown => 1,
7884
- PrintConv => {
7885
- 0 => 'Group',
7886
- 1 => 'Quick Wireless',
7887
- 2 => 'Remote Repeating',
7888
- },
7889
- },
8272
+ 346 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1},
8273
+ 348 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1},
7890
8274
  352 => {
7891
8275
  Name => 'FlashMasterControlMode', # tag name chosen for compatibility with those found in FlashInfo0102 & FlashInfo0103
7892
8276
  RawConv => '$$self{FlashGroupOptionsMasterMode} = $val',
@@ -7924,27 +8308,8 @@ my %nikonFocalConversions = (
7924
8308
  #444 => BracketProgram
7925
8309
  #446 => BracketIncrement
7926
8310
  #463 => SilentPhotography
7927
- 502 => {
7928
- Name => 'MovieFrameSize', # may want to rename or suppress the movie menu settings - potentially confusing for still photographers
7929
- Unknown => 1,
7930
- PrintConv => {
7931
- 1 => '1920x1080',
7932
- 2 => '3840x2160',
7933
- },
7934
- },
7935
- 504 => {
7936
- Name => 'MovieFrameRate',
7937
- Unknown => 1,
7938
- PrintConv => {
7939
- 0 => '120p',
7940
- 1 => '100p',
7941
- 2 => '60p',
7942
- 3 => '50p',
7943
- 4 => '30p',
7944
- 5 => '25p',
7945
- 6 => '24p',
7946
- },
7947
- },
8311
+ 502 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1},
8312
+ 504 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1},
7948
8313
  506 => {
7949
8314
  Name => 'MovieSlowMotion',
7950
8315
  Unknown => 1,
@@ -7969,79 +8334,20 @@ my %nikonFocalConversions = (
7969
8334
  Format => 'int16u',
7970
8335
  Unknown => 1,
7971
8336
  ValueConv => '($val-104)/8',
7972
- PrintConv => {
7973
- 0 => 'ISO 64',
7974
- 1 => 'ISO 80',
7975
- 2 => 'ISO 100',
7976
- 3 => 'ISO 125',
7977
- 4 => 'ISO 160',
7978
- 5 => 'ISO 200',
7979
- 6 => 'ISO 250',
7980
- 7 => 'ISO 320',
7981
- 8 => 'ISO 400',
7982
- 9 => 'ISO 500',
7983
- 10 => 'ISO 640',
7984
- 11 => 'ISO 800',
7985
- 12 => 'ISO 1000',
7986
- 13 => 'ISO 1250',
7987
- 14 => 'ISO 1600',
7988
- 15 => 'ISO 2000',
7989
- 16 => 'ISO 2500',
7990
- 17 => 'ISO 3200',
7991
- 18 => 'ISO 4000',
7992
- 19 => 'ISO 5000',
7993
- 20 => 'ISO 6400',
7994
- 21 => 'ISO 8000',
7995
- 22 => 'ISO 10000',
7996
- 23 => 'ISO 12800',
7997
- 24 => 'ISO 16000',
7998
- 25 => 'ISO 20000',
7999
- 26 => 'ISO 25600',
8000
- 27 => 'ISO Hi 0.3',
8001
- 28 => 'ISO Hi 0.7',
8002
- 29 => 'ISO Hi 1.0',
8003
- 32 => 'ISO Hi 2.0',
8004
- },
8337
+ ValueConvInv => '8 * ($val + 104)',
8338
+ PrintConv => \%iSOAutoHiLimitZ7,
8005
8339
  },
8006
8340
  #520 => MovieWhiteBalanceSameAsPhoto
8007
- 568 => {
8008
- Name => 'MovieActiveD-Lighting',
8009
- Unknown => 1,
8010
- PrintConv => {
8011
- 0 => 'Off',
8012
- 2 => 'Low',
8013
- 3 => 'Normal',
8014
- 4 => 'High',
8015
- 5 => 'Extra High',
8016
- },
8017
- },
8018
- 572 => {
8019
- Name => 'MovieHighISONoiseReduction',
8020
- Unknown => 1,
8021
- PrintConv => {
8022
- 0 => 'Off',
8023
- 1 => 'Low',
8024
- 2 => 'Normal',
8025
- 3 => 'High',
8026
- },
8027
- },
8028
- 574=> {
8029
- Name => 'MovieVignetteControl',
8030
- Unknown => 1,
8031
- PrintConv => {
8032
- 0 => 'Off',
8033
- 1 => 'Low',
8034
- 2 => 'Normal',
8035
- 3 => 'High',
8036
- },
8037
- },
8341
+ 568 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1},
8342
+ 572 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8343
+ 574 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8038
8344
  576 => {
8039
8345
  Name => 'MovieVignetteControlSameAsPhoto',
8040
8346
  Unknown => 1,
8041
8347
  PrintConv => \%noYes
8042
8348
  },
8043
- 5771 => {
8044
- Name => 'MovieDiffrationCompensation',
8349
+ 577 => {
8350
+ Name => 'MovieDiffractionCompensation',
8045
8351
  Unknown => 1,
8046
8352
  PrintConv => \%offOn
8047
8353
  },
@@ -8050,16 +8356,7 @@ my %nikonFocalConversions = (
8050
8356
  Unknown => 1,
8051
8357
  PrintConv => \%offOn
8052
8358
  },
8053
- 584 => {
8054
- Name => 'MovieFocusMode',
8055
- Unknown => 1,
8056
- PrintConv => {
8057
- 0 => 'Manual',
8058
- 1 => 'AF-S',
8059
- 2 => 'AF-C',
8060
- 4 => 'AF-F', # full frame
8061
- },
8062
- },
8359
+ 584 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1},
8063
8360
  #586 => MovieAFAreaMode
8064
8361
  590 => {
8065
8362
  Name => 'MovieVibrationReduction',
@@ -8088,6 +8385,400 @@ my %nikonFocalConversions = (
8088
8385
  },
8089
8386
  #859 => HDMIViewAssist
8090
8387
  );
8388
+
8389
+ %Image::ExifTool::Nikon::MenuSettingsZ9 = (
8390
+ %binaryDataAttrs,
8391
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8392
+ DATAMEMBER => [ 140, 188, 192, 232, 424, 534 ],
8393
+ IS_SUBDIR => [ 799 ],
8394
+ NOTES => 'These tags are used by the Z9.',
8395
+ #90 ISO
8396
+ 140 => {
8397
+ Name => 'MultipleExposureMode',
8398
+ RawConv => '$$self{MultipleExposureMode} = $val',
8399
+ PrintConv => {
8400
+ 0 => 'Off',
8401
+ 1 => 'On (Series)',
8402
+ 2 => 'On',
8403
+ },
8404
+ },
8405
+ 142 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0' }, #range 2-9
8406
+ 188 => {
8407
+ Name => 'Intervals',
8408
+ Format => 'int32u',
8409
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
8410
+ Condition => '$$self{IntervalShooting} > 0',
8411
+ },
8412
+ 192 => {
8413
+ Name => 'ShotsPerInterval',
8414
+ Format => 'int32u',
8415
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
8416
+ Condition => '$$self{IntervalShooting} > 0',
8417
+ },
8418
+ #220 NEFCompression 0=> 'Lossless' 1=> 'High Efficiency*' 4=> 'High Efficientcy'
8419
+ 232 => {
8420
+ Name => 'FocusShiftNumberShots', #1-300
8421
+ RawConv => '$$self{FocusShiftNumberShots} = $val',
8422
+ Condition => '$$self{FocusShiftShooting} > 0',
8423
+ },
8424
+ 236 => {
8425
+ Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
8426
+ Condition => '$$self{FocusShiftShooting} > 0',
8427
+ },
8428
+ 240 => {
8429
+ Name => 'FocusShiftInterval',
8430
+ Condition => '$$self{FocusShiftShooting} > 0',
8431
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
8432
+ },
8433
+ 244 => {
8434
+ Name => 'FocusShiftExposureLock',
8435
+ Unknown => 1,
8436
+ PrintConv => \%offOn,
8437
+ Condition => '$$self{FocusShiftShooting} > 0',
8438
+ },
8439
+ 274 => {
8440
+ Name => 'PhotoShootingMenuBank',
8441
+ PrintConv => {
8442
+ 0 => 'A',
8443
+ 1 => 'B',
8444
+ 2 => 'C',
8445
+ 3 => 'D',
8446
+ },
8447
+ },
8448
+ 276 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn, }, #single tag from both Photo & Video menus
8449
+ 308 => {
8450
+ Name => 'PhotoShootingMenuBankImageArea',
8451
+ PrintConv => {
8452
+ 0 => 'FX',
8453
+ 1 => 'DX',
8454
+ 4 => '16:9',
8455
+ 8 => '1:1',
8456
+ },
8457
+ },
8458
+ #310 ImageQuality
8459
+ 322 => { Name => 'AutoISO', PrintConv => \%offOn, },
8460
+ 324 => {
8461
+ Name => 'ISOAutoHiLimit',
8462
+ Format => 'int16u',
8463
+ Unknown => 1,
8464
+ ValueConv => '($val-104)/8',
8465
+ ValueConvInv => '8 * ($val + 104)',
8466
+ PrintConv => \%iSOAutoHiLimitZ7,
8467
+ },
8468
+ 326 => {
8469
+ Name => 'ISOAutoFlashLimit',
8470
+ Format => 'int16u',
8471
+ Unknown => 1,
8472
+ ValueConv => '($val-104)/8',
8473
+ ValueConvInv => '8 * ($val + 104)',
8474
+ PrintConv => \%iSOAutoHiLimitZ7,
8475
+ },
8476
+ #332 ISOAutoShutterTime - Auto setting 0=> 'Auto (Slowest)', 1 => 'Auto (Slower)', 2=> 'Auto', 3=> 'Auto (Faster)', 4=> 'Auto (Fastest)'
8477
+ 334 => {
8478
+ Name => 'ISOAutoShutterTime', #shutter speed is 2 ** (-$val/24)
8479
+ ValueConv => '$val / 8',
8480
+ Format => 'int16s',
8481
+ PrintConv => {
8482
+ -15 => 'Auto', #z9 firmware 1.00 maps both 'Auto' and '30 s' to -15
8483
+ -12 => '15 s',
8484
+ -9 => '8 s',
8485
+ -6 => '4 s',
8486
+ -3 => '2 s',
8487
+ 0 => '1 s',
8488
+ 1 => '1/1.3 s',
8489
+ 2 => '1/1.6 s',
8490
+ 3 => '1/2 s',
8491
+ 4 => '1/2.5 s',
8492
+ 5 => '1/3 s',
8493
+ 6 => '1/4 s',
8494
+ 7 => '1/5 s',
8495
+ 8 => '1/6 s',
8496
+ 9 => '1/8 s',
8497
+ 10 => '1/10 s',
8498
+ 11 => '1/13 s',
8499
+ 12 => '1/15 s',
8500
+ 13 => '1/20 s',
8501
+ 14 => '1/25 s',
8502
+ 15 => '1/30 s',
8503
+ 16 => '1/40 s',
8504
+ 17 => '1/50 s',
8505
+ 18 => '1/60 s',
8506
+ 19 => '1/80 s',
8507
+ 20 => '1/100 s',
8508
+ 21 => '1/120 s',
8509
+ 22 => '1/160 s',
8510
+ 23 => '1/200 s',
8511
+ 24 => '1/250 s',
8512
+ 25 => '1/320 s',
8513
+ 26 => '1/400 s',
8514
+ 27 => '1/500 s',
8515
+ 28 => '1/640 s',
8516
+ 29 => '1/800 s',
8517
+ 30 => '1/1000 s',
8518
+ 31 => '1/1250 s',
8519
+ 32 => '1/1600 s',
8520
+ 33 => '1/2000 s',
8521
+ 34 => '1/2500 s',
8522
+ 35 => '1/3200 s',
8523
+ 36 => '1/4000 s',
8524
+ 37 => '1/5000 s',
8525
+ 37.5 => '1/6000 s',
8526
+ 38 => '1/6400 s',
8527
+ 39 => '1/8000 s',
8528
+ 40 => '1/10000 s',
8529
+ 40.5 => '1/12000 s',
8530
+ 41 => '1/13000 s',
8531
+ 42 => '1/16000 s',
8532
+ },
8533
+ },
8534
+ #336 WhiteBalance
8535
+ #406 PictureControl
8536
+ #408 ColorSpace
8537
+ #410 ActiveD-Lighting
8538
+ #412 => { Name => 'NoiseReduction', PrintConv => \%offOn }, #Long Exposure Noise Reduction
8539
+ #414 HighISONoiseReduction
8540
+ #414 VignetteControl
8541
+ 416 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8542
+ 418 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, #value can be set from both the Photo Shoot Menu and the Video Shooting Menu
8543
+ #419 AutoDistortionControl #value can be set from both the Photo Shoot Menu and the Video Shooting Menu
8544
+ 420 => { Name => 'FlickerReductionShooting', PrintConv => \%offOn },
8545
+ #422 MeteringMode
8546
+ 424 => {
8547
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
8548
+ RawConv => '$$self{FlashControlMode} = $val',
8549
+ PrintConv => \%flashControlModeZ7,
8550
+ },
8551
+ 426 => {
8552
+ Name => 'FlashMasterCompensation',
8553
+ Format => 'int8s',
8554
+ Unknown => 1,
8555
+ ValueConv => '$val/6',
8556
+ ValueConvInv => '6 * $val',
8557
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8558
+ PrintConvInv => '$val',
8559
+ },
8560
+ 430 => {
8561
+ Name => 'FlashGNDistance',
8562
+ Condition => '$$self{FlashControlMode} == 2',
8563
+ Unknown => 1,
8564
+ ValueConv => '$val + 3',
8565
+ PrintConv => \%flashGNDistance,
8566
+ },
8567
+ 434 => {
8568
+ 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)
8569
+ Condition => '$$self{FlashControlMode} >= 3',
8570
+ Unknown => 1,
8571
+ ValueConv => '2 ** (-$val/3)',
8572
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
8573
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
8574
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
8575
+ },
8576
+ #442 flash wirelss control 0=> 'Off' 1=> 'CMD'
8577
+ 444 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1},
8578
+ 456 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1},
8579
+ #526 FocusMode
8580
+ 528 => {
8581
+ Name => 'AFAreaMode',
8582
+ PrintConv => {
8583
+ 1 => 'Single',
8584
+ 2 => 'Dynamic',
8585
+ 3 => 'Wide (S)',
8586
+ 4 => 'Wide (L)',
8587
+ 5 => '3D',
8588
+ 6 => 'Auto',
8589
+ },
8590
+ },
8591
+ 530 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
8592
+ 534 => {
8593
+ Name => 'BracketSet',
8594
+ RawConv => '$$self{BracketSet} = $val',
8595
+ PrintConv => {
8596
+ 0 => 'AE/Flash',
8597
+ 1 => 'AE',
8598
+ 2 => 'Flash',
8599
+ 3 => 'White Balance',
8600
+ 4 => 'Active-D Lighting',
8601
+ },
8602
+ },
8603
+ 536 => {
8604
+ Name => 'BracketProgram',
8605
+ Condition => '$$self{BracketSet} < 3',
8606
+ Notes => 'AE and/or Flash Bracketing',
8607
+ PrintConv => {
8608
+ 0 => 'Disabled',
8609
+ 2 => '2F',
8610
+ 3 => '3F',
8611
+ 4 => '4F',
8612
+ 5 => '5F',
8613
+ 7 => '7F',
8614
+ 9 => '9F',
8615
+ },
8616
+ },
8617
+ 538 => {
8618
+ Name => 'BracketIncrement',
8619
+ Condition => '$$self{BracketSet} < 3',
8620
+ Notes => 'AE and/or Flash Bracketing',
8621
+ PrintConv => {
8622
+ 0 => '0.3',
8623
+ #1 => '0.5',
8624
+ 2 => '0.7',
8625
+ 3 => '1.0',
8626
+ 4 => '2.0',
8627
+ 5 => '3.0',
8628
+ },
8629
+ },
8630
+ #544 BracketProgram for ADL
8631
+ 556 => {
8632
+ Name => 'SecondarySlotFunction',
8633
+ PrintConv => {
8634
+ 0 => 'Overflow',
8635
+ 1 => 'Backup',
8636
+ 2 => 'NEF Primary + JPG Secondary',
8637
+ 3 => 'JPG Primary + JPG Secondary',
8638
+ },
8639
+ },
8640
+ 572 => { Name => 'DXCropAlert', PrintConv => \%offOn, },
8641
+ 574 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9},
8642
+ 604 => {
8643
+ Name => 'MovieImageArea',
8644
+ Unknown => 1,
8645
+ Mask => 0x01, #without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
8646
+ PrintConv => {
8647
+ 0 => 'FX',
8648
+ 1 => 'DX',
8649
+ },
8650
+ },
8651
+ 614 => {
8652
+ Name => 'MovieType',
8653
+ Unknown => 1,
8654
+ PrintConv => {
8655
+ 1 => 'H.265 8-bit (MP4)',
8656
+ 2 => 'H.265 8-bit (MOV)',
8657
+ 3 => 'H.265 10-bit (MOV)',
8658
+ 4 => 'ProRes 422 HQ 10-bit (MOV)',
8659
+ },
8660
+ },
8661
+ 616 => {
8662
+ Name => 'MovieISOAutoHiLimit',
8663
+ Format => 'int16u',
8664
+ Unknown => 1,
8665
+ ValueConv => '($val-104)/8',
8666
+ ValueConvInv => '8 * ($val + 104)',
8667
+ PrintConv => \%iSOAutoHiLimitZ7,
8668
+ },
8669
+ 618 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1},
8670
+ 620 => {
8671
+ Name => 'MovieISOAutoManualMode',
8672
+ Format => 'int16u',
8673
+ Unknown => 1,
8674
+ ValueConv => '($val-104)/8',
8675
+ ValueConvInv => '8 * ($val + 104)',
8676
+ PrintConv => \%iSOAutoHiLimitZ7,
8677
+ },
8678
+ 696 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1},
8679
+ 698 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1},
8680
+ 704 => {
8681
+ Name => 'MovieFlickerReduction',
8682
+ PrintConv => {
8683
+ 0 => 'Auto',
8684
+ 1 => '50Hz',
8685
+ 2 => '60Hz',
8686
+ },
8687
+ },
8688
+ 706 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, , Unknown => 1},
8689
+ 708 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1},
8690
+ 710 => {
8691
+ Name => 'MovieAFAreaMode',
8692
+ PrintConv => {
8693
+ 1 => 'Single',
8694
+ 3 => 'Wide (S)',
8695
+ 4 => 'Wide (L)',
8696
+ 6 => 'Auto',
8697
+ 11 => 'Subject Tracking',
8698
+ },
8699
+ },
8700
+ 712 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1},
8701
+ 716 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, #distinct from MoveieVRMode
8702
+ 718 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'On', 2 => 'On' }, Unknown => 1 }, #not sure why the unusal mapping with 2 => 'On'
8703
+ 720 => { Name => 'MicrophoneSensitivity', Unknown => 1}, #1-20
8704
+ 722 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, #distinct from MoveieVRMode
8705
+ 724 => { Name => 'MicrophoneFrequencyResponse', PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
8706
+ 726 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
8707
+ 748 => {
8708
+ Name => 'MovieToneMap',
8709
+ Unknown => 1,
8710
+ PrintConv => {
8711
+ 0 => 'SDR',
8712
+ 1 => 'HLG',
8713
+ 2 => 'N-Log',
8714
+ },
8715
+ },
8716
+ 754 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1},
8717
+ 756 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1},
8718
+ 762 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
8719
+ 763 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
8720
+ 764 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1},
8721
+ 799 => {
8722
+ Name => 'CustomSettingsZ9',
8723
+ Format => 'undef[608]',
8724
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
8725
+ },
8726
+ 1426 => {
8727
+ Name => 'Language',
8728
+ Unknown => 1,
8729
+ PrintConv => {
8730
+ 4 => 'English',
8731
+ 5 => 'Spanish',
8732
+ 7 => 'French',
8733
+ },
8734
+ },
8735
+ 1428 => {
8736
+ Name => 'TimeZone',
8737
+ PrintConv => {
8738
+ 5 => '+09:00 (Tokyo)',
8739
+ 6 => '+08:00 (Beijing, Honk Kong, Sinapore)',
8740
+ 10 => '+05:45 (Kathmandu)',
8741
+ 11 => '+05:30 (New Dehli)',
8742
+ 16 => '+03:00 (Moscow, Nairobi)',
8743
+ 15 => '+02:00 (Athens)',
8744
+ 16 => '+01:00 (Madrid, Paris, Berlin)',
8745
+ 17 => '+02:00 (Athens, Helsinki)',
8746
+ 18 => '+00:00 (London)',
8747
+ 19 => '+00:00', #PH (unknown city)
8748
+ 22 => '-03:00 (Buenos Aires, Sao Paulo)',
8749
+ 24 => '-04:00 (Manaus, Caracas)',
8750
+ 25 => '-05:00 (New York, Toronto, Lima)',
8751
+ 26 => '-06:00 (Chicago, Mexico City)',
8752
+ 27 => '-07:00 (Denver)',
8753
+ 28 => '-08:00 (Los Angeles, Vancouver)',
8754
+ 29 => '-09:00 (Anchorage)',
8755
+ 30 => '-10:00 (Hawaii)',
8756
+ },
8757
+ },
8758
+ 1434 => {Name => 'MonitorBrightness', ValueConv => '$val - 5', Unknown => 1}, # settings: -5 to +5
8759
+ 1456 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
8760
+ 1552 => {
8761
+ Name => 'HDMIOutputResolution',
8762
+ PrintConv => {
8763
+ 0 => 'Auto',
8764
+ 1 => '4320p',
8765
+ 2 => '2160p',
8766
+ 3 => '1080p',
8767
+ #4 => '1080i',
8768
+ 5 => '720p',
8769
+ #6 => '576p',
8770
+ #7 => '480p',
8771
+ },
8772
+ },
8773
+ 1565 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
8774
+ 1572 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
8775
+ 1573 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
8776
+ 1608 => { Name => 'EnergySavingMode', PrintConv =>\%offOn, Unknown => 1 },
8777
+ 1632 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
8778
+ 1636 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
8779
+ 1645 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
8780
+ );
8781
+
8091
8782
  # Flash information (ref JD)
8092
8783
  %Image::ExifTool::Nikon::FlashInfo0100 = (
8093
8784
  %binaryDataAttrs,
@@ -9307,7 +9998,7 @@ my %nikonFocalConversions = (
9307
9998
  ],
9308
9999
  );
9309
10000
 
9310
- # Flash information for the Z7_2 (ref 28)
10001
+ # Flash information for the Z7II (ref 28)
9311
10002
  # (likey similar to FlashInfo010 and FlashInfo0108 with addition of support for radio controlled units such as the SB-5000?
9312
10003
  %Image::ExifTool::Nikon::FlashInfo0300 = (
9313
10004
  %binaryDataAttrs,
@@ -9331,7 +10022,7 @@ my %nikonFocalConversions = (
9331
10022
  SeparateTable => 'FlashFirmware',
9332
10023
  PrintConv => \%flashFirmware,
9333
10024
  },
9334
- 27 => {
10025
+ 10 => {
9335
10026
  Name => 'FlashCompensation',
9336
10027
  # this is the compensation from the camera (0x0012) for "Built-in" FlashType, or
9337
10028
  # the compensation from the external unit (0x0017) for "Optional" FlashType - PH
@@ -9466,6 +10157,25 @@ my %nikonFocalConversions = (
9466
10157
  },
9467
10158
  );
9468
10159
 
10160
+ # MakerNotes0x51 - compression info for Z9
10161
+ %Image::ExifTool::Nikon::MakerNotes0x51 = (
10162
+ %binaryDataAttrs,
10163
+ DATAMEMBER => [ 0 ],
10164
+ GROUPS => { 0 => 'MakerNotes' },
10165
+ 0 => {
10166
+ Name => 'FirmwareVersion',
10167
+ Format => 'string[8]',
10168
+ Writable => 0,
10169
+ RawConv => '$$self{FirmwareVersion} = $val',
10170
+ },
10171
+ 10 => {
10172
+ Name => 'NEFCompression',
10173
+ Writable => 'int16u',
10174
+ SeparateTable => 'NEFCompression',
10175
+ PrintConv => \%nefCompression,
10176
+ },
10177
+ );
10178
+
9469
10179
  # extra info found in IFD0 of NEF files (ref PH, Z6/Z7)
9470
10180
  %Image::ExifTool::Nikon::NEFInfo = (
9471
10181
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -10240,7 +10950,7 @@ my %nikonFocalConversions = (
10240
10950
  },
10241
10951
  },
10242
10952
  {
10243
- Condition => '$$valPt =~ /^080[01]/', # Z6/Z7
10953
+ Condition => '$$valPt =~ /^080[012]/', # Z6/Z7/Z9
10244
10954
  Name => 'LensData0800',
10245
10955
  SubDirectory => {
10246
10956
  TagTable => 'Image::ExifTool::Nikon::LensData0800',
@@ -10325,6 +11035,103 @@ my %nikonFocalConversions = (
10325
11035
  },
10326
11036
  );
10327
11037
 
11038
+ # Nikon XMP tags written in NKSC metadata
11039
+ %Image::ExifTool::Nikon::ast = (
11040
+ GROUPS => { 0 => 'XMP', 1 => 'XMP-ast', 2 => 'Image' },
11041
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11042
+ NAMESPACE => 'ast',
11043
+ VARS => { NO_ID => 1 },
11044
+ NOTES => 'Tags used by Nikon NX Studio in Nikon NKSC sidecar files and trailers.',
11045
+ about => { },
11046
+ version => { },
11047
+ XMLPackets => {
11048
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::Main' },
11049
+ Encoding => 'Base64',
11050
+ Binary => 1,
11051
+ },
11052
+ IPTC => {
11053
+ SubDirectory => { TagTable => 'Image::ExifTool::IPTC::Main' },
11054
+ Encoding => 'Base64',
11055
+ Binary => 1,
11056
+ },
11057
+ GPSVersionID => { Groups => { 2 => 'Location' }, %base64bytes },
11058
+ GPSLatitudeRef => {
11059
+ Groups => { 2 => 'Location' },
11060
+ %base64int32u,
11061
+ PrintConv => { 0 => 'North', 1 => 'South' }, #PH (NC)
11062
+ },
11063
+ GPSLatitude => { Groups => { 2 => 'Location' }, %base64coord },
11064
+ GPSLongitudeRef => {
11065
+ Groups => { 2 => 'Location' },
11066
+ %base64int32u,
11067
+ PrintConv => { 2 => 'East', 3 => 'West' }, #PH (NC)
11068
+ },
11069
+ GPSLongitude => { Groups => { 2 => 'Location' }, %base64coord },
11070
+ GPSAltitudeRef => {
11071
+ Groups => { 2 => 'Location' },
11072
+ %base64bytes,
11073
+ PrintConv => {
11074
+ 0 => 'Above Sea Level',
11075
+ 1 => 'Below Sea Level',
11076
+ },
11077
+ },
11078
+ GPSAltitude => {
11079
+ Groups => { 2 => 'Location' },
11080
+ %base64double,
11081
+ PrintConv => '"$val m"',
11082
+ },
11083
+ GPSMapDatum => { Groups => { 2 => 'Location' } },
11084
+ GPSImgDirection => {
11085
+ Groups => { 2 => 'Location' },
11086
+ %base64double,
11087
+ PrintConv => 'sprintf("%.2f", $val)',
11088
+ },
11089
+ GPSImgDirectionRef => {
11090
+ Groups => { 2 => 'Location' },
11091
+ PrintConv => {
11092
+ M => 'Magnetic North',
11093
+ T => 'True North',
11094
+ },
11095
+ },
11096
+ );
11097
+ %Image::ExifTool::Nikon::sdc = (
11098
+ GROUPS => { 0 => 'XMP', 1 => 'XMP-sdc', 2 => 'Image' },
11099
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11100
+ NAMESPACE => 'sdc',
11101
+ VARS => { NO_ID => 1 },
11102
+ about => { },
11103
+ version => { },
11104
+ appversion => { Name => 'AppVersion' },
11105
+ appname => { Name => 'AppName' },
11106
+ );
11107
+ %Image::ExifTool::Nikon::nine = (
11108
+ GROUPS => { 0 => 'XMP', 1 => 'XMP-nine', 2 => 'Image' },
11109
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11110
+ NAMESPACE => 'nine',
11111
+ VARS => { NO_ID => 1 },
11112
+ about => { },
11113
+ version => { },
11114
+ Label => { },
11115
+ Rating => { },
11116
+ Trim => { %base64bin },
11117
+ NineEdits => {
11118
+ SubDirectory => {
11119
+ TagTable => 'Image::ExifTool::Nikon::NineEdits',
11120
+ IgnoreProp => { userData => 1 }, # remove "UserData" from already overly long tag names
11121
+ },
11122
+ Binary => 1,
11123
+ },
11124
+ );
11125
+ %Image::ExifTool::Nikon::NineEdits = (
11126
+ GROUPS => { 0 => 'XML', 1 => 'NineEdits', 2 => 'Image' },
11127
+ PROCESS_PROC => \&Image::ExifTool::XMP::ProcessXMP,
11128
+ VARS => { NO_ID => 1 },
11129
+ NOTES => 'XML-based tags used to store editing information.',
11130
+ filterParametersBinary => { %base64bin },
11131
+ filterParametersExportExportData => { %base64bin },
11132
+ filterParametersCustomCustomData => { %base64bin },
11133
+ );
11134
+
10328
11135
  # Nikon composite tags
10329
11136
  %Image::ExifTool::Nikon::Composite = (
10330
11137
  GROUPS => { 2 => 'Camera' },
@@ -10516,7 +11323,7 @@ sub PrintAFPointsLeftRight($$)
10516
11323
 
10517
11324
  #------------------------------------------------------------------------------
10518
11325
  # Print conversion for relative Up/Down AF points (ref 28)
10519
- # Inputs: 0) column, 1) number of columns
11326
+ # Inputs: 0) row, 1) number of rows
10520
11327
  # Returns: AF point data as a string (e.g. '2U' or 'C' or '3D')
10521
11328
  sub PrintAFPointsUpDown($$)
10522
11329
  {
@@ -10718,6 +11525,72 @@ sub SerialKey($$)
10718
11525
  return 0x60; # D200 (ref 10), D40X (ref PH), etc
10719
11526
  }
10720
11527
 
11528
+ #------------------------------------------------------------------------------
11529
+ # Extract information from "NIKON APP" trailer (ref PH)
11530
+ # Inputs: 0) ExifTool ref, 1) Optional dirInfo ref for returning trailer info
11531
+ # Returns: true on success
11532
+ sub ProcessNikonApp($;$)
11533
+ {
11534
+ local $_;
11535
+ my ($et, $dirInfo) = @_;
11536
+ my $raf = $$et{RAF};
11537
+ my $offset = $dirInfo ? $$dirInfo{Offset} || 0 : 0;
11538
+ my $buff;
11539
+
11540
+ return 0 unless $raf->Seek(-20-$offset, 2) and $raf->Read($buff, 20) == 20 and
11541
+ substr($buff,-16) eq "\0\0\0\0\0\0/NIKON APP"; # check magic number
11542
+
11543
+ my $verbose = $et->Options('Verbose');
11544
+ my $fileEnd = $raf->Tell();
11545
+ my $trailerLen = unpack('N', $buff);
11546
+ $trailerLen > $fileEnd and $et->Warn('Bad NikonApp trailer size'), return 0;
11547
+ if ($dirInfo) {
11548
+ $$dirInfo{DirLen} = $trailerLen if $dirInfo;
11549
+ $$dirInfo{DataPos} = $fileEnd - $trailerLen;
11550
+ if ($$dirInfo{OutFile}) {
11551
+ if ($$et{DEL_GROUP}{NikonApp}) {
11552
+ ++$$et{CHANGED};
11553
+ # just copy the trailer when writing
11554
+ } elsif ($trailerLen > $fileEnd or not $raf->Seek($$dirInfo{DataPos}, 0) or
11555
+ $raf->Read(${$$dirInfo{OutFile}}, $trailerLen) != $trailerLen)
11556
+ {
11557
+ return 0;
11558
+ } else {
11559
+ return 1;
11560
+ }
11561
+ }
11562
+ $et->DumpTrailer($dirInfo) if $verbose or $$et{HTML_DUMP};
11563
+ }
11564
+ unless ($trailerLen >= 0x40 and $raf->Seek($fileEnd - $trailerLen, 0) and
11565
+ $raf->Read($buff, 0x40) == 0x40 and $buff =~ m(NIKON APP\0))
11566
+ {
11567
+ $et->Warn('Error reading NikonApp trailer');
11568
+ return 0;
11569
+ }
11570
+ $$et{SET_GROUP0} = 'NikonApp';
11571
+ while ($raf->Read($buff, 8) == 8) {
11572
+ my ($id, $len) = unpack('N2', $buff);
11573
+ if ($len & 0x80000000) {
11574
+ $et->Warn('Invalid NikonApp record length');
11575
+ last;
11576
+ }
11577
+ last if $id == 0 and $len == 0;
11578
+ unless ($raf->Read($buff, $len) == $len) {
11579
+ $et->Warn('Truncated NikonApp record');
11580
+ last;
11581
+ }
11582
+ if ($id == 1) {
11583
+ require Image::ExifTool::XMP;
11584
+ Image::ExifTool::XMP::ProcessXMP($et, { DataPt => \$buff });
11585
+ } else { # (haven't seen any other types of records)
11586
+ $et->Warn("Unknown NikonApp record $id");
11587
+ last;
11588
+ }
11589
+ }
11590
+ delete $$et{SET_GROUP0};
11591
+ return 1;
11592
+ }
11593
+
10721
11594
  #------------------------------------------------------------------------------
10722
11595
  # Read Nikon NCTG tags in MOV videos
10723
11596
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
@@ -11059,7 +11932,7 @@ Nikon maker notes in EXIF information.
11059
11932
 
11060
11933
  =head1 AUTHOR
11061
11934
 
11062
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
11935
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
11063
11936
 
11064
11937
  This library is free software; you can redistribute it and/or modify it
11065
11938
  under the same terms as Perl itself.