exiftool-vendored.exe 12.70.0 → 12.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/bin/exiftool_files/Changes +53 -1
  2. package/bin/exiftool_files/README +11 -11
  3. package/bin/exiftool_files/exiftool.pl +49 -28
  4. package/bin/exiftool_files/lib/File/RandomAccess.pm +1 -1
  5. package/bin/exiftool_files/lib/File/RandomAccess.pod +2 -2
  6. package/bin/exiftool_files/lib/Image/ExifTool/AAC.pm +177 -0
  7. package/bin/exiftool_files/lib/Image/ExifTool/AES.pm +1 -1
  8. package/bin/exiftool_files/lib/Image/ExifTool/AFCP.pm +1 -1
  9. package/bin/exiftool_files/lib/Image/ExifTool/AIFF.pm +1 -1
  10. package/bin/exiftool_files/lib/Image/ExifTool/APE.pm +1 -1
  11. package/bin/exiftool_files/lib/Image/ExifTool/APP12.pm +1 -1
  12. package/bin/exiftool_files/lib/Image/ExifTool/ASF.pm +1 -1
  13. package/bin/exiftool_files/lib/Image/ExifTool/Apple.pm +1 -1
  14. package/bin/exiftool_files/lib/Image/ExifTool/Audible.pm +1 -1
  15. package/bin/exiftool_files/lib/Image/ExifTool/BMP.pm +1 -1
  16. package/bin/exiftool_files/lib/Image/ExifTool/BPG.pm +1 -1
  17. package/bin/exiftool_files/lib/Image/ExifTool/BZZ.pm +1 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/BigTIFF.pm +1 -1
  19. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +4 -3
  20. package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +1 -1
  21. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +22 -7
  22. package/bin/exiftool_files/lib/Image/ExifTool/CanonCustom.pm +1 -1
  23. package/bin/exiftool_files/lib/Image/ExifTool/CanonRaw.pm +1 -1
  24. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +1 -1
  25. package/bin/exiftool_files/lib/Image/ExifTool/CaptureOne.pm +1 -1
  26. package/bin/exiftool_files/lib/Image/ExifTool/Casio.pm +1 -1
  27. package/bin/exiftool_files/lib/Image/ExifTool/Charset.pm +1 -1
  28. package/bin/exiftool_files/lib/Image/ExifTool/DICOM.pm +1 -1
  29. package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +1 -1
  30. package/bin/exiftool_files/lib/Image/ExifTool/DNG.pm +1 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/DPX.pm +1 -1
  32. package/bin/exiftool_files/lib/Image/ExifTool/DV.pm +1 -1
  33. package/bin/exiftool_files/lib/Image/ExifTool/DarwinCore.pm +1 -1
  34. package/bin/exiftool_files/lib/Image/ExifTool/DjVu.pm +1 -1
  35. package/bin/exiftool_files/lib/Image/ExifTool/EXE.pm +1 -1
  36. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +31 -10
  37. package/bin/exiftool_files/lib/Image/ExifTool/FITS.pm +1 -1
  38. package/bin/exiftool_files/lib/Image/ExifTool/FLAC.pm +1 -1
  39. package/bin/exiftool_files/lib/Image/ExifTool/FLIF.pm +1 -1
  40. package/bin/exiftool_files/lib/Image/ExifTool/FLIR.pm +1 -1
  41. package/bin/exiftool_files/lib/Image/ExifTool/Fixup.pm +1 -1
  42. package/bin/exiftool_files/lib/Image/ExifTool/Flash.pm +1 -1
  43. package/bin/exiftool_files/lib/Image/ExifTool/FlashPix.pm +60 -7
  44. package/bin/exiftool_files/lib/Image/ExifTool/Font.pm +1 -1
  45. package/bin/exiftool_files/lib/Image/ExifTool/FotoStation.pm +1 -1
  46. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +6 -3
  47. package/bin/exiftool_files/lib/Image/ExifTool/GE.pm +1 -1
  48. package/bin/exiftool_files/lib/Image/ExifTool/GIF.pm +1 -1
  49. package/bin/exiftool_files/lib/Image/ExifTool/GIMP.pm +1 -1
  50. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +1 -1
  51. package/bin/exiftool_files/lib/Image/ExifTool/GeoTiff.pm +1 -1
  52. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +1 -1
  53. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +17 -2
  54. package/bin/exiftool_files/lib/Image/ExifTool/H264.pm +1 -1
  55. package/bin/exiftool_files/lib/Image/ExifTool/HP.pm +1 -1
  56. package/bin/exiftool_files/lib/Image/ExifTool/HTML.pm +1 -1
  57. package/bin/exiftool_files/lib/Image/ExifTool/HtmlDump.pm +1 -1
  58. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  59. package/bin/exiftool_files/lib/Image/ExifTool/ICO.pm +1 -1
  60. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +8 -5
  61. package/bin/exiftool_files/lib/Image/ExifTool/IPTC.pm +1 -1
  62. package/bin/exiftool_files/lib/Image/ExifTool/ISO.pm +1 -1
  63. package/bin/exiftool_files/lib/Image/ExifTool/ITC.pm +1 -1
  64. package/bin/exiftool_files/lib/Image/ExifTool/Import.pm +1 -1
  65. package/bin/exiftool_files/lib/Image/ExifTool/InDesign.pm +1 -1
  66. package/bin/exiftool_files/lib/Image/ExifTool/InfiRay.pm +1 -1
  67. package/bin/exiftool_files/lib/Image/ExifTool/JPEG.pm +5 -2
  68. package/bin/exiftool_files/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  69. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +5 -2
  70. package/bin/exiftool_files/lib/Image/ExifTool/JVC.pm +3 -3
  71. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +17 -6
  72. package/bin/exiftool_files/lib/Image/ExifTool/Kodak.pm +1 -1
  73. package/bin/exiftool_files/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  74. package/bin/exiftool_files/lib/Image/ExifTool/LIF.pm +1 -1
  75. package/bin/exiftool_files/lib/Image/ExifTool/LNK.pm +1 -1
  76. package/bin/exiftool_files/lib/Image/ExifTool/Lang/cs.pm +1 -1
  77. package/bin/exiftool_files/lib/Image/ExifTool/Lang/de.pm +1 -1
  78. package/bin/exiftool_files/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  79. package/bin/exiftool_files/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  80. package/bin/exiftool_files/lib/Image/ExifTool/Lang/es.pm +4 -4
  81. package/bin/exiftool_files/lib/Image/ExifTool/Lang/fi.pm +1 -1
  82. package/bin/exiftool_files/lib/Image/ExifTool/Lang/fr.pm +4 -5
  83. package/bin/exiftool_files/lib/Image/ExifTool/Lang/it.pm +3 -3
  84. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ja.pm +1 -1
  85. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ko.pm +1 -1
  86. package/bin/exiftool_files/lib/Image/ExifTool/Lang/nl.pm +1 -1
  87. package/bin/exiftool_files/lib/Image/ExifTool/Lang/pl.pm +1 -1
  88. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ru.pm +1 -1
  89. package/bin/exiftool_files/lib/Image/ExifTool/Lang/sk.pm +1 -1
  90. package/bin/exiftool_files/lib/Image/ExifTool/Lang/sv.pm +1 -1
  91. package/bin/exiftool_files/lib/Image/ExifTool/Lang/tr.pm +1 -1
  92. package/bin/exiftool_files/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  93. package/bin/exiftool_files/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  94. package/bin/exiftool_files/lib/Image/ExifTool/Leaf.pm +3 -3
  95. package/bin/exiftool_files/lib/Image/ExifTool/Lytro.pm +1 -1
  96. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +22 -17
  97. package/bin/exiftool_files/lib/Image/ExifTool/MIE.pm +3 -3
  98. package/bin/exiftool_files/lib/Image/ExifTool/MIEUnits.pod +1 -1
  99. package/bin/exiftool_files/lib/Image/ExifTool/MIFF.pm +1 -1
  100. package/bin/exiftool_files/lib/Image/ExifTool/MISB.pm +1 -1
  101. package/bin/exiftool_files/lib/Image/ExifTool/MNG.pm +1 -1
  102. package/bin/exiftool_files/lib/Image/ExifTool/MOI.pm +1 -1
  103. package/bin/exiftool_files/lib/Image/ExifTool/MPC.pm +1 -1
  104. package/bin/exiftool_files/lib/Image/ExifTool/MPEG.pm +1 -1
  105. package/bin/exiftool_files/lib/Image/ExifTool/MPF.pm +1 -1
  106. package/bin/exiftool_files/lib/Image/ExifTool/MRC.pm +1 -1
  107. package/bin/exiftool_files/lib/Image/ExifTool/MWG.pm +1 -1
  108. package/bin/exiftool_files/lib/Image/ExifTool/MXF.pm +1 -1
  109. package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +1 -1
  110. package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +1 -1
  111. package/bin/exiftool_files/lib/Image/ExifTool/Matroska.pm +1 -1
  112. package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
  113. package/bin/exiftool_files/lib/Image/ExifTool/Minolta.pm +1 -1
  114. package/bin/exiftool_files/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  115. package/bin/exiftool_files/lib/Image/ExifTool/Motorola.pm +1 -1
  116. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +166 -97
  117. package/bin/exiftool_files/lib/Image/ExifTool/NikonCapture.pm +1 -1
  118. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +1 -1
  119. package/bin/exiftool_files/lib/Image/ExifTool/NikonSettings.pm +1 -1
  120. package/bin/exiftool_files/lib/Image/ExifTool/Nintendo.pm +1 -1
  121. package/bin/exiftool_files/lib/Image/ExifTool/OOXML.pm +1 -1
  122. package/bin/exiftool_files/lib/Image/ExifTool/Ogg.pm +1 -1
  123. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -1
  124. package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +1 -1
  125. package/bin/exiftool_files/lib/Image/ExifTool/Opus.pm +1 -1
  126. package/bin/exiftool_files/lib/Image/ExifTool/Other.pm +1 -1
  127. package/bin/exiftool_files/lib/Image/ExifTool/PCX.pm +1 -1
  128. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +1 -1
  129. package/bin/exiftool_files/lib/Image/ExifTool/PGF.pm +1 -1
  130. package/bin/exiftool_files/lib/Image/ExifTool/PICT.pm +1 -1
  131. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +1 -1
  132. package/bin/exiftool_files/lib/Image/ExifTool/PLUS.pm +1 -1
  133. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +24 -2
  134. package/bin/exiftool_files/lib/Image/ExifTool/PPM.pm +1 -1
  135. package/bin/exiftool_files/lib/Image/ExifTool/PSP.pm +1 -1
  136. package/bin/exiftool_files/lib/Image/ExifTool/Palm.pm +1 -1
  137. package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +27 -2
  138. package/bin/exiftool_files/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
  139. package/bin/exiftool_files/lib/Image/ExifTool/Parrot.pm +1 -1
  140. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +46 -16
  141. package/bin/exiftool_files/lib/Image/ExifTool/PhaseOne.pm +4 -4
  142. package/bin/exiftool_files/lib/Image/ExifTool/PhotoCD.pm +1 -1
  143. package/bin/exiftool_files/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  144. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +1 -1
  145. package/bin/exiftool_files/lib/Image/ExifTool/PostScript.pm +1 -1
  146. package/bin/exiftool_files/lib/Image/ExifTool/PrintIM.pm +1 -1
  147. package/bin/exiftool_files/lib/Image/ExifTool/Qualcomm.pm +1 -1
  148. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +50 -11
  149. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +148 -12
  150. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +1 -1
  151. package/bin/exiftool_files/lib/Image/ExifTool/RSRC.pm +1 -1
  152. package/bin/exiftool_files/lib/Image/ExifTool/RTF.pm +1 -1
  153. package/bin/exiftool_files/lib/Image/ExifTool/Radiance.pm +1 -1
  154. package/bin/exiftool_files/lib/Image/ExifTool/Rawzor.pm +1 -1
  155. package/bin/exiftool_files/lib/Image/ExifTool/Real.pm +1 -1
  156. package/bin/exiftool_files/lib/Image/ExifTool/Reconyx.pm +1 -1
  157. package/bin/exiftool_files/lib/Image/ExifTool/Red.pm +1 -1
  158. package/bin/exiftool_files/lib/Image/ExifTool/Ricoh.pm +111 -3
  159. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +4 -3
  160. package/bin/exiftool_files/lib/Image/ExifTool/Sanyo.pm +1 -1
  161. package/bin/exiftool_files/lib/Image/ExifTool/Scalado.pm +1 -1
  162. package/bin/exiftool_files/lib/Image/ExifTool/Shift.pl +1 -1
  163. package/bin/exiftool_files/lib/Image/ExifTool/Shortcuts.pm +1 -1
  164. package/bin/exiftool_files/lib/Image/ExifTool/Sigma.pm +1 -1
  165. package/bin/exiftool_files/lib/Image/ExifTool/SigmaRaw.pm +1 -1
  166. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +85 -6
  167. package/bin/exiftool_files/lib/Image/ExifTool/SonyIDC.pm +1 -1
  168. package/bin/exiftool_files/lib/Image/ExifTool/Stim.pm +1 -1
  169. package/bin/exiftool_files/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  170. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4878 -4830
  171. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +11518 -11379
  172. package/bin/exiftool_files/lib/Image/ExifTool/Text.pm +1 -1
  173. package/bin/exiftool_files/lib/Image/ExifTool/Theora.pm +1 -1
  174. package/bin/exiftool_files/lib/Image/ExifTool/Torrent.pm +1 -1
  175. package/bin/exiftool_files/lib/Image/ExifTool/Unknown.pm +1 -1
  176. package/bin/exiftool_files/lib/Image/ExifTool/VCard.pm +1 -1
  177. package/bin/exiftool_files/lib/Image/ExifTool/Validate.pm +1 -1
  178. package/bin/exiftool_files/lib/Image/ExifTool/Vorbis.pm +1 -1
  179. package/bin/exiftool_files/lib/Image/ExifTool/WPG.pm +1 -1
  180. package/bin/exiftool_files/lib/Image/ExifTool/WTV.pm +1 -1
  181. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  182. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +20 -5
  183. package/bin/exiftool_files/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  184. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -1
  185. package/bin/exiftool_files/lib/Image/ExifTool/WritePNG.pl +1 -1
  186. package/bin/exiftool_files/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  187. package/bin/exiftool_files/lib/Image/ExifTool/WritePostScript.pl +1 -1
  188. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +4 -1
  189. package/bin/exiftool_files/lib/Image/ExifTool/WriteRIFF.pl +1 -1
  190. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +5 -3
  191. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +87 -15
  192. package/bin/exiftool_files/lib/Image/ExifTool/XISF.pm +1 -1
  193. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +19 -3
  194. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +1 -1
  195. package/bin/exiftool_files/lib/Image/ExifTool/XMPStruct.pl +1 -1
  196. package/bin/exiftool_files/lib/Image/ExifTool/ZIP.pm +1 -1
  197. package/bin/exiftool_files/lib/Image/ExifTool/ZISRAW.pm +1 -1
  198. package/bin/exiftool_files/lib/Image/ExifTool/iWork.pm +1 -1
  199. package/bin/exiftool_files/lib/Image/ExifTool.pm +35 -8
  200. package/bin/exiftool_files/lib/Image/ExifTool.pod +29 -16
  201. package/package.json +5 -4
@@ -221,7 +221,7 @@ characteristics of TXT and CSV files.
221
221
 
222
222
  =head1 AUTHOR
223
223
 
224
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
224
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
225
225
 
226
226
  This library is free software; you can redistribute it and/or modify it
227
227
  under the same terms as Perl itself.
@@ -122,7 +122,7 @@ information from Theora video streams.
122
122
 
123
123
  =head1 AUTHOR
124
124
 
125
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
125
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
126
126
 
127
127
  This library is free software; you can redistribute it and/or modify it
128
128
  under the same terms as Perl itself.
@@ -309,7 +309,7 @@ bencoded information from BitTorrent files.
309
309
 
310
310
  =head1 AUTHOR
311
311
 
312
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
312
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
313
313
 
314
314
  This library is free software; you can redistribute it and/or modify it
315
315
  under the same terms as Perl itself.
@@ -53,7 +53,7 @@ unknown manufacturers.
53
53
 
54
54
  =head1 AUTHOR
55
55
 
56
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
56
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
57
57
 
58
58
  This library is free software; you can redistribute it and/or modify it
59
59
  under the same terms as Perl itself.
@@ -430,7 +430,7 @@ information from vCard VCF and iCalendar ICS files.
430
430
 
431
431
  =head1 AUTHOR
432
432
 
433
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
433
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
434
434
 
435
435
  This library is free software; you can redistribute it and/or modify it
436
436
  under the same terms as Perl itself.
@@ -678,7 +678,7 @@ ExifTool Validate option is enabled.
678
678
 
679
679
  =head1 AUTHOR
680
680
 
681
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
681
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
682
682
 
683
683
  This library is free software; you can redistribute it and/or modify it
684
684
  under the same terms as Perl itself.
@@ -228,7 +228,7 @@ information from Ogg Vorbis audio headers.
228
228
 
229
229
  =head1 AUTHOR
230
230
 
231
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
231
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
232
232
 
233
233
  This library is free software; you can redistribute it and/or modify it
234
234
  under the same terms as Perl itself.
@@ -271,7 +271,7 @@ This module contains definitions required by Image::ExifTool to read WPG
271
271
 
272
272
  =head1 AUTHOR
273
273
 
274
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
274
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
275
275
 
276
276
  This library is free software; you can redistribute it and/or modify it
277
277
  under the same terms as Perl itself.
@@ -297,7 +297,7 @@ This module contains definitions required by Image::ExifTool to read WTV
297
297
 
298
298
  =head1 AUTHOR
299
299
 
300
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
300
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
301
301
 
302
302
  This library is free software; you can redistribute it and/or modify it
303
303
  under the same terms as Perl itself.
@@ -630,7 +630,7 @@ JPEG files, and would lead to far fewer problems with corrupted metadata.
630
630
 
631
631
  =head1 AUTHOR
632
632
 
633
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
633
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
634
634
 
635
635
  This library is free software; you can redistribute it and/or modify it
636
636
  under the same terms as Perl itself.
@@ -569,6 +569,7 @@ sub WriteExif($$$)
569
569
  my $imageDataFlag = $$dirInfo{ImageData} || '';
570
570
  my $verbose = $et->Options('Verbose');
571
571
  my $out = $et->Options('TextOut');
572
+ my $noMandatory = $et->Options('NoMandatory');
572
573
  my ($nextIfdPos, %offsetData, $inMakerNotes);
573
574
  my (@offsetInfo, %validateInfo, %xDelete, $strEnc);
574
575
  my $deleteAll = 0;
@@ -698,8 +699,8 @@ sub WriteExif($$$)
698
699
  }
699
700
 
700
701
  # initialize variables to handle mandatory tags
701
- my $mandatory = $mandatory{$dirName};
702
- my ($allMandatory, $addMandatory);
702
+ my ($mandatory, $allMandatory, $addMandatory);
703
+ $mandatory = $mandatory{$dirName} unless $noMandatory;
703
704
  if ($mandatory) {
704
705
  # use X/Y resolution values from JFIF if available
705
706
  if ($dirName eq 'IFD0' and defined $$et{JFIFYResolution}) {
@@ -1152,7 +1153,7 @@ Entry: for (;;) {
1152
1153
  }
1153
1154
  my $nvHash;
1154
1155
  $nvHash = $et->GetNewValueHash($curInfo, $dirName) if $isNew >= 0;
1155
- unless ($nvHash or defined $$mandatory{$newID}) {
1156
+ unless ($nvHash or (defined $$mandatory{$newID} and not $noMandatory)) {
1156
1157
  goto NoWrite unless $wrongDir; # GOTO !
1157
1158
  # delete stuff from the wrong directory if setting somewhere else
1158
1159
  $nvHash = $et->GetNewValueHash($curInfo, $wrongDir);
@@ -2235,6 +2236,19 @@ NoOverwrite: next if $isNew > 0;
2235
2236
 
2236
2237
  # do our fixups now so we can more easily calculate offsets below
2237
2238
  $fixup->ApplyFixup(\$newData);
2239
+ # write Sony HiddenData now if this is an ARW file
2240
+ if ($$et{HiddenData} and not $$dirInfo{Fixup} and $$et{FILE_TYPE} eq 'TIFF') {
2241
+ $fixup->SetMarkerPointers(\$newData, 'HiddenData', length($newData));
2242
+ my $hbuf;
2243
+ my $hd = $$et{HiddenData};
2244
+ if ($raf->Seek($$hd{Offset}, 0) and $raf->Read($hbuf, $$hd{Size}) == $$hd{Size} and
2245
+ $hbuf =~ /^\x55\x26\x11\x05\0/)
2246
+ {
2247
+ $newData .= $hbuf;
2248
+ } else {
2249
+ $et->Error('Error copying hidden data', 1);
2250
+ }
2251
+ }
2238
2252
  #
2239
2253
  # determine total block size for deferred data
2240
2254
  #
@@ -2625,8 +2639,9 @@ NoOverwrite: next if $isNew > 0;
2625
2639
  $$fixup{Shift} += $newDataPos;
2626
2640
  $fixup->ApplyFixup(\$newData);
2627
2641
  }
2628
- # save fixup for adjusting Leica trailer offset if necessary
2642
+ # save fixup for adjusting Leica trailer and Sony HiddenData offsets if necessary
2629
2643
  $$et{LeicaTrailer}{Fixup}->AddFixup($fixup) if $$et{LeicaTrailer};
2644
+ $$et{HiddenData}{Fixup}->AddFixup($fixup) if $$et{HiddenData};
2630
2645
  # save fixup for PreviewImage in JPEG file if necessary
2631
2646
  my $previewInfo = $$et{PREVIEW_INFO};
2632
2647
  if ($previewInfo) {
@@ -2707,7 +2722,7 @@ This file contains routines to write EXIF metadata.
2707
2722
 
2708
2723
  =head1 AUTHOR
2709
2724
 
2710
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
2725
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
2711
2726
 
2712
2727
  This library is free software; you can redistribute it and/or modify it
2713
2728
  under the same terms as Perl itself.
@@ -711,7 +711,7 @@ seldom-used routines.
711
711
 
712
712
  =head1 AUTHOR
713
713
 
714
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
714
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
715
715
 
716
716
  This library is free software; you can redistribute it and/or modify it
717
717
  under the same terms as Perl itself.
@@ -753,7 +753,7 @@ C<PDF-update> pseudo group).
753
753
 
754
754
  =head1 AUTHOR
755
755
 
756
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
756
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
757
757
 
758
758
  This library is free software; you can redistribute it and/or modify it
759
759
  under the same terms as Perl itself.
@@ -401,7 +401,7 @@ strings).
401
401
 
402
402
  =head1 AUTHOR
403
403
 
404
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
404
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
405
405
 
406
406
  This library is free software; you can redistribute it and/or modify it
407
407
  under the same terms as Perl itself.
@@ -257,7 +257,7 @@ default resource name, and applied if no appended name is provided.
257
257
 
258
258
  =head1 AUTHOR
259
259
 
260
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
260
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
261
261
 
262
262
  This library is free software; you can redistribute it and/or modify it
263
263
  under the same terms as Perl itself.
@@ -687,7 +687,7 @@ Thanks to Tim Kordick for his help testing the EPS writer.
687
687
 
688
688
  =head1 AUTHOR
689
689
 
690
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
690
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
691
691
 
692
692
  This library is free software; you can redistribute it and/or modify it
693
693
  under the same terms as Perl itself.
@@ -169,8 +169,11 @@ sub ConvInvISO6709($)
169
169
  # with more than 5 digits after the decimal place:
170
170
  # https://exiftool.org/forum/index.php?topic=11055.msg67171#msg67171 )
171
171
  my @fmt = ('%s%02d.%s%s','%s%03d.%s%s','%s%d.%s%s');
172
+ my @limit = (90,180);
172
173
  foreach (@a) {
173
174
  return undef unless Image::ExifTool::IsFloat($_);
175
+ my $lim = shift @limit;
176
+ warn((@limit ? 'Lat' : 'Long') . "itude out of range\n") if $lim and abs($_) > $lim;
174
177
  $_ =~ s/^([-+]?)(\d+)\.?(\d*)/sprintf(shift(@fmt),$1||'+',$2,$3,length($3)<3 ? '0'x(3-length($3)) : '')/e;
175
178
  }
176
179
  return join '', @a, '/';
@@ -1958,7 +1961,7 @@ QuickTime-based file formats like MOV and MP4.
1958
1961
 
1959
1962
  =head1 AUTHOR
1960
1963
 
1961
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
1964
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
1962
1965
 
1963
1966
  This library is free software; you can redistribute it and/or modify it
1964
1967
  under the same terms as Perl itself.
@@ -363,7 +363,7 @@ Currently writes only WebP files.
363
363
 
364
364
  =head1 AUTHOR
365
365
 
366
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
366
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
367
367
 
368
368
  This library is free software; you can redistribute it and/or modify it
369
369
  under the same terms as Perl itself.
@@ -137,13 +137,15 @@ sub ValidateProperty($$;$)
137
137
 
138
138
  #------------------------------------------------------------------------------
139
139
  # Check XMP date values for validity and format accordingly
140
- # Inputs: 1) EXIF-format date string
140
+ # Inputs: 1) EXIF-format date string (XMP-format also accepted)
141
141
  # Returns: XMP date/time string (or undef on error)
142
142
  sub FormatXMPDate($)
143
143
  {
144
144
  my $val = shift;
145
145
  my ($y, $m, $d, $t, $tz);
146
- if ($val =~ /(\d{4}):(\d{2}):(\d{2}) (\d{2}:\d{2}(?::\d{2}(?:\.\d*)?)?)(.*)/) {
146
+ if ($val =~ /(\d{4}):(\d{2}):(\d{2}) (\d{2}:\d{2}(?::\d{2}(?:\.\d*)?)?)(.*)/ or
147
+ $val =~ /(\d{4})-(\d{2})-(\d{2})T(\d{2}:\d{2}(?::\d{2}(?:\.\d*)?)?)(.*)/)
148
+ {
147
149
  ($y, $m, $d, $t, $tz) = ($1, $2, $3, $4, $5);
148
150
  $val = "$y-$m-${d}T$t";
149
151
  } elsif ($val =~ /^\s*\d{4}(:\d{2}){0,2}\s*$/) {
@@ -1635,7 +1637,7 @@ This file contains routines to write XMP metadata.
1635
1637
 
1636
1638
  =head1 AUTHOR
1637
1639
 
1638
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
1640
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
1639
1641
 
1640
1642
  This library is free software; you can redistribute it and/or modify it
1641
1643
  under the same terms as Perl itself.
@@ -690,6 +690,12 @@ TAG: foreach $tagInfo (@matchingTags) {
690
690
  $writeProc = $$src{WRITE_PROC} unless $writeProc;
691
691
  }
692
692
  {
693
+ # make sure module is loaded if the writeProc is a string
694
+ unless (ref $writeProc) {
695
+ my $module = $writeProc;
696
+ $module =~ s/::\w+$//;
697
+ eval "require $module";
698
+ }
693
699
  no strict 'refs';
694
700
  next unless $writeProc and &$writeProc();
695
701
  }
@@ -1296,6 +1302,7 @@ sub SetNewValuesFromFile($$;@)
1296
1302
  ImageHashType => $$options{ImageHashType},
1297
1303
  Lang => $$options{Lang},
1298
1304
  LargeFileSupport=> $$options{LargeFileSupport},
1305
+ LimitLongValues => 10000000, # (10 MB)
1299
1306
  List => 1,
1300
1307
  ListItem => $$options{ListItem},
1301
1308
  ListSep => $$options{ListSep},
@@ -3239,9 +3246,15 @@ sub InsertTagValues($$$;$$$)
3239
3246
  $tag = $docGrp . ':' . $tag;
3240
3247
  $lcTag = lc $tag;
3241
3248
  }
3242
- my $et = $self;
3249
+ my ($et, $fileTags) = ($self, $foundTags);
3243
3250
  if ($tag =~ s/(\bfile\d+)://i) {
3244
- $et = $$self{ALT_EXIFTOOL}{ucfirst lc $1} or $et=$self, $tag = 'no_alt_file';
3251
+ $et = $$self{ALT_EXIFTOOL}{ucfirst lc $1};
3252
+ if ($et) {
3253
+ $fileTags = $$et{FoundTags};
3254
+ } else {
3255
+ $et = $self;
3256
+ $tag = 'no_alt_file';
3257
+ }
3245
3258
  }
3246
3259
  if ($lcTag eq 'all') {
3247
3260
  $val = 1; # always some tag available
@@ -3252,11 +3265,11 @@ sub InsertTagValues($$$;$$$)
3252
3265
  ($group, $tag) = ($1, $2);
3253
3266
  if (lc $tag eq 'all') {
3254
3267
  # see if any tag from the specified group exists
3255
- my $match = $et->GroupMatches($group, $foundTags);
3268
+ my $match = $et->GroupMatches($group, $fileTags);
3256
3269
  $val = $match ? 1 : 0;
3257
3270
  } else {
3258
3271
  # find the specified tag
3259
- my @matches = grep /^$tag(\s|$)/i, @$foundTags;
3272
+ my @matches = grep /^$tag(\s|$)/i, @$fileTags;
3260
3273
  @matches = $et->GroupMatches($group, \@matches);
3261
3274
  foreach $tg (@matches) {
3262
3275
  if (defined $val and $tg =~ / \((\d+)\)$/) {
@@ -3276,7 +3289,7 @@ sub InsertTagValues($$$;$$$)
3276
3289
  $val = $et->GetValue($tag, $type);
3277
3290
  unless (defined $val) {
3278
3291
  # check for tag name with different case
3279
- ($tg) = grep /^$tag$/i, @$foundTags;
3292
+ ($tg) = grep /^$tag$/i, @$fileTags;
3280
3293
  if (defined $tg) {
3281
3294
  $val = $et->GetValue($tg, $type);
3282
3295
  $tag = $tg;
@@ -3927,7 +3940,7 @@ sub RemoveNewValuesForGroup($$)
3927
3940
  my $wgrp = $$nvHash{WriteGroup};
3928
3941
  # use group1 if write group is not specific
3929
3942
  $wgrp = $grp1 if $wgrp eq $grp0;
3930
- if (grep /^($grp0|$wgrp)$/i, @groups) {
3943
+ if ($grp0 eq '*' or $wgrp eq '*' or grep /^($grp0|$wgrp)$/i, @groups) {
3931
3944
  $out and print $out "Removed new value for $wgrp:$$tagInfo{Name}\n";
3932
3945
  # remove from linked list
3933
3946
  $self->RemoveNewValueHash($nvHash, $tagInfo);
@@ -4494,6 +4507,7 @@ sub HexDump($;$%)
4494
4507
  # Count => number of values
4495
4508
  # Extra => Extra Verbose=2 information to put after tag number
4496
4509
  # Table => Reference to tag table
4510
+ # Name => Name to use for unknown tag
4497
4511
  # --> plus any of these HexDump() options: Start, Addr, Width
4498
4512
  sub VerboseInfo($$$%)
4499
4513
  {
@@ -4511,6 +4525,9 @@ sub VerboseInfo($$$%)
4511
4525
  # get tag name
4512
4526
  if ($tagInfo and $$tagInfo{Name}) {
4513
4527
  $tag = $$tagInfo{Name};
4528
+ } elsif ($parms{Name}) { # (used for PNG Plus FPX tags)
4529
+ $tag = $parms{Name};
4530
+ undef $hexID;
4514
4531
  } else {
4515
4532
  my $prefix;
4516
4533
  $prefix = $parms{Table}{TAG_PREFIX} if $parms{Table};
@@ -4663,9 +4680,18 @@ sub DumpUnknownTrailer($$)
4663
4680
  # account for preview/MPF image trailer
4664
4681
  my $prePos = $$self{VALUE}{PreviewImageStart} || $$self{PreviewImageStart};
4665
4682
  my $preLen = $$self{VALUE}{PreviewImageLength} || $$self{PreviewImageLength};
4683
+ my $hidPos = $$self{VALUE}{HiddenDataOffset};
4684
+ my $hidLen = $$self{VALUE}{HiddenDataLength};
4666
4685
  my $tag = 'PreviewImage';
4667
4686
  my $mpImageNum = 0;
4668
4687
  my (%image, $lastOne);
4688
+ # add HiddenData to list of known trailer blocks
4689
+ if ($hidPos and $hidLen) {
4690
+ # call ReadHiddenData to validate hidden data and fix offset if necessary
4691
+ require Image::ExifTool::Sony;
4692
+ my $datPt = Image::ExifTool::Sony::ReadHiddenData($self, $hidPos, $hidLen);
4693
+ $image{$hidPos} = ['HiddenData', $hidLen] if $datPt;
4694
+ }
4669
4695
  for (;;) {
4670
4696
  # add to Preview block list if valid and in the trailer
4671
4697
  $image{$prePos} = [$tag, $preLen] if $prePos and $preLen and $prePos+$preLen > $pos;
@@ -5780,13 +5806,16 @@ sub WriteJPEG($$)
5780
5806
  }
5781
5807
  }
5782
5808
  # switch to buffered output if required
5783
- if (($$self{PREVIEW_INFO} or $$self{LeicaTrailer}) and not $oldOutfile) {
5809
+ if (($$self{PREVIEW_INFO} or $$self{LeicaTrailer} or $$self{HiddenData}) and
5810
+ not $oldOutfile)
5811
+ {
5784
5812
  $writeBuffer = '';
5785
5813
  $oldOutfile = $outfile;
5786
5814
  $outfile = \$writeBuffer;
5787
5815
  # account for segment, EXIF and TIFF headers
5788
5816
  $$self{PREVIEW_INFO}{Fixup}{Start} += 18 if $$self{PREVIEW_INFO};
5789
5817
  $$self{LeicaTrailer}{Fixup}{Start} += 18 if $$self{LeicaTrailer};
5818
+ $$self{HiddenData}{Fixup}{Start} += 18 if $$self{HiddenData};
5790
5819
  }
5791
5820
  # write as multi-segment
5792
5821
  my $n = WriteMultiSegment($outfile, 0xe1, $exifAPP1hdr, \$buff, 'EXIF');
@@ -5932,7 +5961,9 @@ sub WriteJPEG($$)
5932
5961
  my $delPreview = $$self{DEL_PREVIEW};
5933
5962
  $trailInfo = IdentifyTrailer($raf) unless $$delGroup{Trailer};
5934
5963
  my $nvTrail = $self->GetNewValueHash($Image::ExifTool::Extra{Trailer});
5935
- unless ($oldOutfile or $delPreview or $trailInfo or $$delGroup{Trailer} or $nvTrail) {
5964
+ unless ($oldOutfile or $delPreview or $trailInfo or $$delGroup{Trailer} or $nvTrail or
5965
+ $$self{HiddenData})
5966
+ {
5936
5967
  # blindly copy the rest of the file
5937
5968
  while ($raf->Read($buff, 65536)) {
5938
5969
  Write($outfile, $buff) or $err = 1, last;
@@ -5962,7 +5993,7 @@ sub WriteJPEG($$)
5962
5993
  $endedWithFF = substr($buff, 65535, 1) eq "\xff" ? 1 : 0;
5963
5994
  }
5964
5995
  # remember position of last data copied
5965
- $endPos = $raf->Tell() - length($buff);
5996
+ $endPos = $$self{TrailerStart} = $raf->Tell() - length($buff);
5966
5997
  # write new trailer if specified
5967
5998
  if ($nvTrail) {
5968
5999
  # access new value directly to avoid copying a potentially very large data block
@@ -5976,6 +6007,34 @@ sub WriteJPEG($$)
5976
6007
  }
5977
6008
  last; # all done
5978
6009
  }
6010
+ # copy HiddenData if necessary
6011
+ if ($$self{HiddenData}) {
6012
+ my $pad;
6013
+ my $hd = $$self{HiddenData};
6014
+ my $hdOff = $$hd{Offset} + $$hd{Base};
6015
+ require Image::ExifTool::Sony;
6016
+ # read HiddenData, updating $hdOff with actual offset if necessary
6017
+ my $dataPt = Image::ExifTool::Sony::ReadHiddenData($self, $hdOff, $$hd{Size});
6018
+ if ($dataPt) {
6019
+ # preserve padding to avoid invalidating MPF pointers (yuk!)
6020
+ my $padLen = $hdOff - $endPos;
6021
+ unless ($padLen >= 0 and $raf->Seek($endPos,0) and $raf->Read($pad,$padLen)==$padLen) {
6022
+ $self->Error('Error reading HiddenData padding',1);
6023
+ $pad = '';
6024
+ }
6025
+ $endPos += length($pad) + length($$dataPt); # update end position
6026
+ } else {
6027
+ $$dataPt = $pad = '';
6028
+ }
6029
+ my $fixup = $$self{HiddenData}{Fixup};
6030
+ # set MakerNote pointer and size (subtract 10 for segment and EXIF headers)
6031
+ $fixup->SetMarkerPointers($outfile, 'HiddenData', length($$outfile) + length($pad) - 10);
6032
+ # clean up and write the buffered data
6033
+ $outfile = $oldOutfile;
6034
+ undef $oldOutfile;
6035
+ Write($outfile, $writeBuffer, $pad, $$dataPt) or $err = 1;
6036
+ undef $writeBuffer;
6037
+ }
5979
6038
  # rewrite existing trailers
5980
6039
  if ($trailInfo) {
5981
6040
  my $tbuf = '';
@@ -6085,7 +6144,7 @@ sub WriteJPEG($$)
6085
6144
  $delPreview = 1; # remove old preview
6086
6145
  }
6087
6146
  }
6088
- # copy over preview image if necessary
6147
+ # copy over preview image (or other data) if necessary
6089
6148
  unless ($delPreview) {
6090
6149
  my $extra;
6091
6150
  if ($trailInfo) {
@@ -6252,13 +6311,16 @@ sub WriteJPEG($$)
6252
6311
  }
6253
6312
  }
6254
6313
  # switch to buffered output if required
6255
- if (($$self{PREVIEW_INFO} or $$self{LeicaTrailer}) and not $oldOutfile) {
6314
+ if (($$self{PREVIEW_INFO} or $$self{LeicaTrailer} or $$self{HiddenData}) and
6315
+ not $oldOutfile)
6316
+ {
6256
6317
  $writeBuffer = '';
6257
6318
  $oldOutfile = $outfile;
6258
6319
  $outfile = \$writeBuffer;
6259
6320
  # must account for segment, EXIF and TIFF headers
6260
6321
  $$self{PREVIEW_INFO}{Fixup}{Start} += 18 if $$self{PREVIEW_INFO};
6261
6322
  $$self{LeicaTrailer}{Fixup}{Start} += 18 if $$self{LeicaTrailer};
6323
+ $$self{HiddenData}{Fixup}{Start} += 18 if $$self{HiddenData};
6262
6324
  }
6263
6325
  # write as multi-segment
6264
6326
  my $n = WriteMultiSegment($outfile, $marker, $exifAPP1hdr, $segDataPt, 'EXIF');
@@ -7123,14 +7185,24 @@ sub WriteBinaryData($$$)
7123
7185
  # ignore if offset is zero (eg. Ricoh DNG uses this to indicate no preview)
7124
7186
  next unless $offset;
7125
7187
  $fixup->AddFixup($entry, $$tagInfo{DataTag}, $format);
7126
- # handle the preview image now if this is a JPEG file
7127
- next unless $$self{FILE_TYPE} eq 'JPEG' and $$tagInfo{DataTag} and
7128
- $$tagInfo{DataTag} eq 'PreviewImage' and defined $$tagInfo{OffsetPair};
7188
+ next unless $$tagInfo{DataTag} and defined $$tagInfo{OffsetPair};
7129
7189
  # NOTE: here we assume there are no var-sized tags between the
7130
7190
  # OffsetPair tags. If this ever becomes possible we must recalculate
7131
7191
  # $varSize for the OffsetPair tag here!
7132
7192
  $entry = $$tagInfo{OffsetPair} * $increment + $varSize;
7133
7193
  my $size = ReadValue($dataPt, $entry, $format, 1, $dirLen-$entry);
7194
+ next unless defined $size;
7195
+ if ($$tagInfo{DataTag} eq 'HiddenData') {
7196
+ $$self{HiddenData} = {
7197
+ Offset => $offset,
7198
+ Size => $size,
7199
+ Fixup => new Image::ExifTool::Fixup,
7200
+ Base => $$dirInfo{Base},
7201
+ };
7202
+ next;
7203
+ }
7204
+ # handle the preview image now if this is a JPEG file
7205
+ next unless $$tagInfo{DataTag} eq 'PreviewImage' and $$self{FILE_TYPE} eq 'JPEG';
7134
7206
  my $previewInfo = $$self{PREVIEW_INFO};
7135
7207
  $previewInfo or $previewInfo = $$self{PREVIEW_INFO} = {
7136
7208
  Fixup => new Image::ExifTool::Fixup,
@@ -7237,7 +7309,7 @@ used routines.
7237
7309
 
7238
7310
  =head1 AUTHOR
7239
7311
 
7240
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
7312
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
7241
7313
 
7242
7314
  This library is free software; you can redistribute it and/or modify it
7243
7315
  under the same terms as Perl itself.
@@ -163,7 +163,7 @@ information from XISF (Extensible Image Serialization Format) images.
163
163
 
164
164
  =head1 AUTHOR
165
165
 
166
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
166
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
167
167
 
168
168
  This library is free software; you can redistribute it and/or modify it
169
169
  under the same terms as Perl itself.
@@ -50,7 +50,7 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.61';
53
+ $VERSION = '3.62';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
@@ -201,6 +201,7 @@ my %xmpNS = (
201
201
  nine => 'http://ns.nikon.com/nine/1.0/',
202
202
  hdr_metadata => 'http://ns.adobe.com/hdr-metadata/1.0/',
203
203
  hdrgm => 'http://ns.adobe.com/hdr-gain-map/1.0/',
204
+ xmpDSA => 'http://leica-camera.com/digital-shift-assistant/1.0/',
204
205
  # Note: Not included due to namespace prefix conflict with Device:Container
205
206
  # Container => 'http://ns.google.com/photos/1.0/container/',
206
207
  );
@@ -921,6 +922,10 @@ my %sRangeMask = (
921
922
  Name => 'hdrgm',
922
923
  SubDirectory => { TagTable => 'Image::ExifTool::XMP::hdrgm' },
923
924
  },
925
+ xmpDSA => {
926
+ Name => 'xmpDSA',
927
+ SubDirectory => { TagTable => 'Image::ExifTool::Panasonic::DSA' },
928
+ },
924
929
  # Note: Note included due to namespace prefix conflict with Device:Container
925
930
  # Container => {
926
931
  # Name => 'Container',
@@ -4158,7 +4163,18 @@ sub ProcessXMP($$;$)
4158
4163
  $dataLen = $$dirInfo{DataLen} || length($$dataPt);
4159
4164
  # check leading BOM (may indicate double-encoded UTF)
4160
4165
  pos($$dataPt) = $dirStart;
4161
- $double = $1 if $$dataPt =~ /\G((\0\0)?\xfe\xff|\xff\xfe(\0\0)?|\xef\xbb\xbf)\0*<\0*\?\0*x\0*p\0*a\0*c\0*k\0*e\0*t/g;
4166
+ if ($$dataPt =~ /\G((\0\0)?\xfe\xff|\xff\xfe(\0\0)?|\xef\xbb\xbf)\0*<\0*\?\0*x\0*p\0*a\0*c\0*k\0*e\0*t/g) {
4167
+ $double = $1
4168
+ } else {
4169
+ # handle UTF-16/32 XML
4170
+ pos($$dataPt) = $dirStart;
4171
+ if ($$dataPt =~ /\G((\0\0)?\xfe\xff|\xff\xfe(\0\0)?|\xef\xbb\xbf)\0*<\0*\?\0*x\0*m\0*l\0* /g) {
4172
+ my $tmp = $1;
4173
+ $fmt = $tmp =~ /\xfe\xff/ ? 'n' : 'v';
4174
+ $fmt = uc($fmt) if $tmp =~ /\0\0/;
4175
+ $isXML = 1;
4176
+ }
4177
+ }
4162
4178
  } else {
4163
4179
  my ($type, $mime, $buf2, $buf3);
4164
4180
  # read information from XMP file
@@ -4516,7 +4532,7 @@ information.
4516
4532
 
4517
4533
  =head1 AUTHOR
4518
4534
 
4519
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
4535
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
4520
4536
 
4521
4537
  This library is free software; you can redistribute it and/or modify it
4522
4538
  under the same terms as Perl itself.
@@ -2228,7 +2228,7 @@ This file contains definitions for less common XMP namespaces.
2228
2228
 
2229
2229
  =head1 AUTHOR
2230
2230
 
2231
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
2231
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
2232
2232
 
2233
2233
  This library is free software; you can redistribute it and/or modify it
2234
2234
  under the same terms as Perl itself.
@@ -937,7 +937,7 @@ information.
937
937
 
938
938
  =head1 AUTHOR
939
939
 
940
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
940
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
941
941
 
942
942
  This library is free software; you can redistribute it and/or modify it
943
943
  under the same terms as Perl itself.
@@ -836,7 +836,7 @@ Electronic Publication (EPUB), and Sketch design files (SKETCH).
836
836
 
837
837
  =head1 AUTHOR
838
838
 
839
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
839
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
840
840
 
841
841
  This library is free software; you can redistribute it and/or modify it
842
842
  under the same terms as Perl itself.
@@ -220,7 +220,7 @@ metadata from Zeiss Integrated Software RAW (ZISRAW) CZI files.
220
220
 
221
221
  =head1 AUTHOR
222
222
 
223
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
223
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
224
224
 
225
225
  This library is free software; you can redistribute it and/or modify it
226
226
  under the same terms as Perl itself.
@@ -215,7 +215,7 @@ information from Apple iWork '09 XML+ZIP files.
215
215
 
216
216
  =head1 AUTHOR
217
217
 
218
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
218
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
219
219
 
220
220
  This library is free software; you can redistribute it and/or modify it
221
221
  under the same terms as Perl itself.