exiftool_vendored 12.12.0 → 12.17.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of exiftool_vendored might be problematic. Click here for more details.

Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +73 -3
  3. data/bin/MANIFEST +3 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +3 -3
  7. data/bin/exiftool +87 -57
  8. data/bin/lib/File/RandomAccess.pm +1 -1
  9. data/bin/lib/File/RandomAccess.pod +2 -2
  10. data/bin/lib/Image/ExifTool.pm +36 -3
  11. data/bin/lib/Image/ExifTool.pod +12 -8
  12. data/bin/lib/Image/ExifTool/AES.pm +1 -1
  13. data/bin/lib/Image/ExifTool/AFCP.pm +1 -1
  14. data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
  15. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  16. data/bin/lib/Image/ExifTool/APP12.pm +1 -1
  17. data/bin/lib/Image/ExifTool/ASF.pm +1 -1
  18. data/bin/lib/Image/ExifTool/Apple.pm +1 -1
  19. data/bin/lib/Image/ExifTool/Audible.pm +1 -1
  20. data/bin/lib/Image/ExifTool/BMP.pm +1 -1
  21. data/bin/lib/Image/ExifTool/BPG.pm +1 -1
  22. data/bin/lib/Image/ExifTool/BZZ.pm +1 -1
  23. data/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
  24. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +14 -7
  25. data/bin/lib/Image/ExifTool/Canon.pm +3 -2
  26. data/bin/lib/Image/ExifTool/CanonCustom.pm +20 -2
  27. data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  28. data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
  29. data/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
  30. data/bin/lib/Image/ExifTool/Casio.pm +1 -1
  31. data/bin/lib/Image/ExifTool/Charset.pm +1 -1
  32. data/bin/lib/Image/ExifTool/DICOM.pm +1 -1
  33. data/bin/lib/Image/ExifTool/DJI.pm +28 -2
  34. data/bin/lib/Image/ExifTool/DNG.pm +1 -1
  35. data/bin/lib/Image/ExifTool/DPX.pm +4 -4
  36. data/bin/lib/Image/ExifTool/DV.pm +1 -1
  37. data/bin/lib/Image/ExifTool/DarwinCore.pm +1 -1
  38. data/bin/lib/Image/ExifTool/DjVu.pm +1 -1
  39. data/bin/lib/Image/ExifTool/EXE.pm +1 -1
  40. data/bin/lib/Image/ExifTool/Exif.pm +45 -16
  41. data/bin/lib/Image/ExifTool/FITS.pm +1 -1
  42. data/bin/lib/Image/ExifTool/FLAC.pm +1 -1
  43. data/bin/lib/Image/ExifTool/FLIF.pm +1 -1
  44. data/bin/lib/Image/ExifTool/FLIR.pm +1 -1
  45. data/bin/lib/Image/ExifTool/Fixup.pm +1 -1
  46. data/bin/lib/Image/ExifTool/Flash.pm +1 -1
  47. data/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
  48. data/bin/lib/Image/ExifTool/Font.pm +1 -1
  49. data/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
  50. data/bin/lib/Image/ExifTool/FujiFilm.pm +3 -2
  51. data/bin/lib/Image/ExifTool/GE.pm +1 -1
  52. data/bin/lib/Image/ExifTool/GIF.pm +1 -1
  53. data/bin/lib/Image/ExifTool/GIMP.pm +1 -1
  54. data/bin/lib/Image/ExifTool/GPS.pm +6 -6
  55. data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
  56. data/bin/lib/Image/ExifTool/Geotag.pm +1 -1
  57. data/bin/lib/Image/ExifTool/GoPro.pm +1 -1
  58. data/bin/lib/Image/ExifTool/H264.pm +21 -6
  59. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  60. data/bin/lib/Image/ExifTool/HTML.pm +1 -1
  61. data/bin/lib/Image/ExifTool/HtmlDump.pm +1 -1
  62. data/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  63. data/bin/lib/Image/ExifTool/ID3.pm +1 -1
  64. data/bin/lib/Image/ExifTool/IPTC.pm +1 -1
  65. data/bin/lib/Image/ExifTool/ISO.pm +1 -1
  66. data/bin/lib/Image/ExifTool/ITC.pm +1 -1
  67. data/bin/lib/Image/ExifTool/Import.pm +1 -1
  68. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  69. data/bin/lib/Image/ExifTool/JPEG.pm +24 -2
  70. data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  71. data/bin/lib/Image/ExifTool/JSON.pm +1 -1
  72. data/bin/lib/Image/ExifTool/JVC.pm +1 -1
  73. data/bin/lib/Image/ExifTool/Jpeg2000.pm +9 -4
  74. data/bin/lib/Image/ExifTool/Kodak.pm +1 -1
  75. data/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  76. data/bin/lib/Image/ExifTool/LNK.pm +1 -1
  77. data/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
  78. data/bin/lib/Image/ExifTool/Lang/de.pm +1 -1
  79. data/bin/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  80. data/bin/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  81. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  82. data/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
  83. data/bin/lib/Image/ExifTool/Lang/fr.pm +1 -1
  84. data/bin/lib/Image/ExifTool/Lang/it.pm +1 -1
  85. data/bin/lib/Image/ExifTool/Lang/ja.pm +1 -1
  86. data/bin/lib/Image/ExifTool/Lang/ko.pm +1 -1
  87. data/bin/lib/Image/ExifTool/Lang/nl.pm +1 -1
  88. data/bin/lib/Image/ExifTool/Lang/pl.pm +1 -1
  89. data/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
  90. data/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
  91. data/bin/lib/Image/ExifTool/Lang/tr.pm +1 -1
  92. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  93. data/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  94. data/bin/lib/Image/ExifTool/Leaf.pm +1 -1
  95. data/bin/lib/Image/ExifTool/Lytro.pm +1 -1
  96. data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
  97. data/bin/lib/Image/ExifTool/MIE.pm +1 -1
  98. data/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
  99. data/bin/lib/Image/ExifTool/MIFF.pm +1 -1
  100. data/bin/lib/Image/ExifTool/MNG.pm +1 -1
  101. data/bin/lib/Image/ExifTool/MOI.pm +1 -1
  102. data/bin/lib/Image/ExifTool/MPC.pm +1 -1
  103. data/bin/lib/Image/ExifTool/MPEG.pm +1 -1
  104. data/bin/lib/Image/ExifTool/MPF.pm +1 -1
  105. data/bin/lib/Image/ExifTool/MWG.pm +1 -1
  106. data/bin/lib/Image/ExifTool/MXF.pm +1 -1
  107. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  108. data/bin/lib/Image/ExifTool/MakerNotes.pm +1 -1
  109. data/bin/lib/Image/ExifTool/Matroska.pm +1 -1
  110. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  111. data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
  112. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  113. data/bin/lib/Image/ExifTool/Motorola.pm +1 -1
  114. data/bin/lib/Image/ExifTool/Nikon.pm +315 -36
  115. data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
  116. data/bin/lib/Image/ExifTool/NikonCustom.pm +1 -1
  117. data/bin/lib/Image/ExifTool/NikonSettings.pm +2013 -0
  118. data/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
  119. data/bin/lib/Image/ExifTool/OOXML.pm +1 -1
  120. data/bin/lib/Image/ExifTool/Ogg.pm +1 -1
  121. data/bin/lib/Image/ExifTool/Olympus.pm +1 -1
  122. data/bin/lib/Image/ExifTool/OpenEXR.pm +1 -1
  123. data/bin/lib/Image/ExifTool/Opus.pm +1 -1
  124. data/bin/lib/Image/ExifTool/PCX.pm +1 -1
  125. data/bin/lib/Image/ExifTool/PDF.pm +10 -2
  126. data/bin/lib/Image/ExifTool/PGF.pm +1 -1
  127. data/bin/lib/Image/ExifTool/PICT.pm +1 -1
  128. data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
  129. data/bin/lib/Image/ExifTool/PLUS.pm +1 -1
  130. data/bin/lib/Image/ExifTool/PNG.pm +12 -4
  131. data/bin/lib/Image/ExifTool/PPM.pm +1 -1
  132. data/bin/lib/Image/ExifTool/PSP.pm +1 -1
  133. data/bin/lib/Image/ExifTool/Palm.pm +1 -1
  134. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
  135. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
  136. data/bin/lib/Image/ExifTool/Parrot.pm +1 -1
  137. data/bin/lib/Image/ExifTool/Pentax.pm +3 -2
  138. data/bin/lib/Image/ExifTool/PhaseOne.pm +1 -1
  139. data/bin/lib/Image/ExifTool/PhotoCD.pm +1 -1
  140. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  141. data/bin/lib/Image/ExifTool/Photoshop.pm +1 -1
  142. data/bin/lib/Image/ExifTool/PostScript.pm +1 -1
  143. data/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
  144. data/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
  145. data/bin/lib/Image/ExifTool/QuickTime.pm +20 -14
  146. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +46 -7
  147. data/bin/lib/Image/ExifTool/README +5 -4
  148. data/bin/lib/Image/ExifTool/RIFF.pm +85 -7
  149. data/bin/lib/Image/ExifTool/RSRC.pm +1 -1
  150. data/bin/lib/Image/ExifTool/RTF.pm +1 -1
  151. data/bin/lib/Image/ExifTool/Radiance.pm +1 -1
  152. data/bin/lib/Image/ExifTool/Rawzor.pm +1 -1
  153. data/bin/lib/Image/ExifTool/Real.pm +1 -1
  154. data/bin/lib/Image/ExifTool/Reconyx.pm +1 -1
  155. data/bin/lib/Image/ExifTool/Red.pm +1 -1
  156. data/bin/lib/Image/ExifTool/Ricoh.pm +1 -1
  157. data/bin/lib/Image/ExifTool/Samsung.pm +1 -1
  158. data/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
  159. data/bin/lib/Image/ExifTool/Scalado.pm +1 -1
  160. data/bin/lib/Image/ExifTool/Shift.pl +1 -1
  161. data/bin/lib/Image/ExifTool/Shortcuts.pm +1 -1
  162. data/bin/lib/Image/ExifTool/Sigma.pm +1 -1
  163. data/bin/lib/Image/ExifTool/SigmaRaw.pm +1 -1
  164. data/bin/lib/Image/ExifTool/Sony.pm +6 -2
  165. data/bin/lib/Image/ExifTool/SonyIDC.pm +1 -1
  166. data/bin/lib/Image/ExifTool/Stim.pm +1 -1
  167. data/bin/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  168. data/bin/lib/Image/ExifTool/TagLookup.pm +3985 -3807
  169. data/bin/lib/Image/ExifTool/TagNames.pod +432 -21
  170. data/bin/lib/Image/ExifTool/Text.pm +1 -1
  171. data/bin/lib/Image/ExifTool/Theora.pm +1 -1
  172. data/bin/lib/Image/ExifTool/Torrent.pm +1 -1
  173. data/bin/lib/Image/ExifTool/Unknown.pm +1 -1
  174. data/bin/lib/Image/ExifTool/VCard.pm +1 -1
  175. data/bin/lib/Image/ExifTool/Validate.pm +1 -1
  176. data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
  177. data/bin/lib/Image/ExifTool/WTV.pm +1 -1
  178. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  179. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
  180. data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  181. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  182. data/bin/lib/Image/ExifTool/WritePNG.pl +1 -1
  183. data/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  184. data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -1
  185. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -1
  186. data/bin/lib/Image/ExifTool/WriteXMP.pl +10 -7
  187. data/bin/lib/Image/ExifTool/Writer.pl +32 -18
  188. data/bin/lib/Image/ExifTool/XMP.pm +44 -9
  189. data/bin/lib/Image/ExifTool/XMP2.pl +5 -1
  190. data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
  191. data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
  192. data/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
  193. data/bin/lib/Image/ExifTool/iWork.pm +1 -1
  194. data/bin/perl-Image-ExifTool.spec +1 -1
  195. data/lib/exiftool_vendored/version.rb +1 -1
  196. metadata +9 -4
@@ -223,7 +223,7 @@ characteristics of TXT and CSV files.
223
223
 
224
224
  =head1 AUTHOR
225
225
 
226
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
226
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
227
227
 
228
228
  This library is free software; you can redistribute it and/or modify it
229
229
  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-2020, Phil Harvey (philharvey66 at gmail.com)
125
+ Copyright 2003-2021, 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.
@@ -303,7 +303,7 @@ bencoded information from BitTorrent files.
303
303
 
304
304
  =head1 AUTHOR
305
305
 
306
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
306
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
307
307
 
308
308
  This library is free software; you can redistribute it and/or modify it
309
309
  under the same terms as Perl itself.
@@ -53,7 +53,7 @@ unknown manufacturers.
53
53
 
54
54
  =head1 AUTHOR
55
55
 
56
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
56
+ Copyright 2003-2021, 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.
@@ -416,7 +416,7 @@ information from vCard VCF and iCalendar ICS files.
416
416
 
417
417
  =head1 AUTHOR
418
418
 
419
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
419
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
420
420
 
421
421
  This library is free software; you can redistribute it and/or modify it
422
422
  under the same terms as Perl itself.
@@ -659,7 +659,7 @@ ExifTool Validate option is enabled.
659
659
 
660
660
  =head1 AUTHOR
661
661
 
662
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
662
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
663
663
 
664
664
  This library is free software; you can redistribute it and/or modify it
665
665
  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-2020, Phil Harvey (philharvey66 at gmail.com)
231
+ Copyright 2003-2021, 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.
@@ -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-2020, Phil Harvey (philharvey66 at gmail.com)
300
+ Copyright 2003-2021, 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.
@@ -623,7 +623,7 @@ JPEG files, and would lead to far fewer problems with corrupted metadata.
623
623
 
624
624
  =head1 AUTHOR
625
625
 
626
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
626
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
627
627
 
628
628
  This library is free software; you can redistribute it and/or modify it
629
629
  under the same terms as Perl itself.
@@ -2563,7 +2563,7 @@ This file contains routines to write EXIF metadata.
2563
2563
 
2564
2564
  =head1 AUTHOR
2565
2565
 
2566
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
2566
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
2567
2567
 
2568
2568
  This library is free software; you can redistribute it and/or modify it
2569
2569
  under the same terms as Perl itself.
@@ -715,7 +715,7 @@ seldom-used routines.
715
715
 
716
716
  =head1 AUTHOR
717
717
 
718
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
718
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
719
719
 
720
720
  This library is free software; you can redistribute it and/or modify it
721
721
  under the same terms as Perl itself.
@@ -749,7 +749,7 @@ C<PDF-update> pseudo group).
749
749
 
750
750
  =head1 AUTHOR
751
751
 
752
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
752
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
753
753
 
754
754
  This library is free software; you can redistribute it and/or modify it
755
755
  under the same terms as Perl itself.
@@ -379,7 +379,7 @@ strings).
379
379
 
380
380
  =head1 AUTHOR
381
381
 
382
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
382
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
383
383
 
384
384
  This library is free software; you can redistribute it and/or modify it
385
385
  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-2020, Phil Harvey (philharvey66 at gmail.com)
260
+ Copyright 2003-2021, 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.
@@ -686,7 +686,7 @@ Thanks to Tim Kordick for his help testing the EPS writer.
686
686
 
687
687
  =head1 AUTHOR
688
688
 
689
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
689
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
690
690
 
691
691
  This library is free software; you can redistribute it and/or modify it
692
692
  under the same terms as Perl itself.
@@ -1878,7 +1878,7 @@ QuickTime-based file formats like MOV and MP4.
1878
1878
 
1879
1879
  =head1 AUTHOR
1880
1880
 
1881
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
1881
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
1882
1882
 
1883
1883
  This library is free software; you can redistribute it and/or modify it
1884
1884
  under the same terms as Perl itself.
@@ -12,7 +12,7 @@ use vars qw(%specialStruct %dateTimeInfo %stdXlatNS);
12
12
 
13
13
  use Image::ExifTool qw(:DataAccess :Utils);
14
14
 
15
- sub CheckXMP($$$);
15
+ sub CheckXMP($$$;$);
16
16
  sub CaptureXMP($$$;$);
17
17
  sub SetPropertyPath($$;$$$$);
18
18
 
@@ -165,12 +165,12 @@ sub FormatXMPDate($)
165
165
 
166
166
  #------------------------------------------------------------------------------
167
167
  # Check XMP values for validity and format accordingly
168
- # Inputs: 0) ExifTool object ref, 1) tagInfo hash ref, 2) raw value ref
168
+ # Inputs: 0) ExifTool object ref, 1) tagInfo hash ref, 2) raw value ref, 3) conversion type
169
169
  # Returns: error string or undef (and may change value) on success
170
170
  # Note: copies structured information to avoid conflicts with calling code
171
- sub CheckXMP($$$)
171
+ sub CheckXMP($$$;$)
172
172
  {
173
- my ($et, $tagInfo, $valPtr) = @_;
173
+ my ($et, $tagInfo, $valPtr, $convType) = @_;
174
174
 
175
175
  if ($$tagInfo{Struct}) {
176
176
  require 'Image/ExifTool/XMPStruct.pl';
@@ -250,9 +250,12 @@ sub CheckXMP($$$)
250
250
  return "Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z])" unless $newDate;
251
251
  $$valPtr = $newDate;
252
252
  } elsif ($format eq 'boolean') {
253
+ # (allow lower-case 'true' and 'false' if not setting PrintConv value)
253
254
  if (not $$valPtr or $$valPtr =~ /false/i or $$valPtr =~ /^no$/i) {
254
- $$valPtr = 'False';
255
- } else {
255
+ if (not $$valPtr or $$valPtr ne 'false' or not $convType or $convType eq 'PrintConv') {
256
+ $$valPtr = 'False';
257
+ }
258
+ } elsif ($$valPtr ne 'true' or not $convType or $convType eq 'PrintConv') {
256
259
  $$valPtr = 'True';
257
260
  }
258
261
  } elsif ($format eq '1') {
@@ -1613,7 +1616,7 @@ This file contains routines to write XMP metadata.
1613
1616
 
1614
1617
  =head1 AUTHOR
1615
1618
 
1616
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
1619
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
1617
1620
 
1618
1621
  This library is free software; you can redistribute it and/or modify it
1619
1622
  under the same terms as Perl itself.
@@ -669,7 +669,7 @@ TAG: foreach $tagInfo (@matchingTags) {
669
669
  next TAG unless $lcWant eq lc $grp[1];
670
670
  }
671
671
  }
672
- $writeGroup or $writeGroup = ($$tagInfo{WriteGroup} || $grp[0]);
672
+ $writeGroup or $writeGroup = ($$tagInfo{WriteGroup} || $$tagInfo{Table}{WRITE_GROUP} || $grp[0]);
673
673
  $priority = $hiPri; # highest priority since group was specified
674
674
  }
675
675
  ++$foundMatch;
@@ -1987,12 +1987,12 @@ sub SetFileName($$;$$$)
1987
1987
  local (*EXIFTOOL_SFN_IN, *EXIFTOOL_SFN_OUT);
1988
1988
  # renaming didn't work, so copy the file instead
1989
1989
  unless ($self->Open(\*EXIFTOOL_SFN_IN, $file)) {
1990
- $self->Warn("Error opening '${file}'");
1990
+ $self->Error("Error opening '${file}'");
1991
1991
  return -1;
1992
1992
  }
1993
1993
  unless ($self->Open(\*EXIFTOOL_SFN_OUT, $newName, '>')) {
1994
1994
  close EXIFTOOL_SFN_IN;
1995
- $self->Warn("Error creating '${newName}'");
1995
+ $self->Error("Error creating '${newName}'");
1996
1996
  return -1;
1997
1997
  }
1998
1998
  binmode EXIFTOOL_SFN_IN;
@@ -2005,7 +2005,7 @@ sub SetFileName($$;$$$)
2005
2005
  close EXIFTOOL_SFN_IN;
2006
2006
  if ($err) {
2007
2007
  $self->Unlink($newName); # erase bad output file
2008
- $self->Warn("Error writing '${newName}'");
2008
+ $self->Error("Error writing '${newName}'");
2009
2009
  return -1;
2010
2010
  }
2011
2011
  # preserve modification time
@@ -2133,20 +2133,24 @@ sub WriteInfo($$;$$)
2133
2133
  }
2134
2134
  if ($numNew == $numPseudo) {
2135
2135
  $rtnVal = 2;
2136
+ if ((defined $newFileName or defined $newDir) and not ref $infile) {
2137
+ my $result = $self->SetFileName($infile);
2138
+ if ($result > 0) {
2139
+ $infile = $$self{NewName}; # file name changed
2140
+ $rtnVal = 1;
2141
+ } elsif ($result < 0) {
2142
+ return 0; # don't try to do anything else
2143
+ }
2144
+ }
2136
2145
  if (not ref $infile or UNIVERSAL::isa($infile,'GLOB')) {
2137
2146
  $self->SetFileModifyDate($infile) > 0 and $rtnVal = 1 if $setModDate;
2138
2147
  $self->SetFileModifyDate($infile, undef, 'FileCreateDate') > 0 and $rtnVal = 1 if $setCreateDate;
2139
2148
  $self->SetSystemTags($infile) > 0 and $rtnVal = 1;
2140
2149
  }
2141
- if ((defined $newFileName or defined $newDir) and not ref $infile) {
2142
- $self->SetFileName($infile) > 0 and $rtnVal = 1;
2143
- }
2144
2150
  if (defined $hardLink or defined $symLink or defined $testName) {
2145
- my $src = $$self{NewName};
2146
- $src = $infile unless defined $src;
2147
- $hardLink and $self->SetFileName($src, $hardLink, 'HardLink') and $rtnVal = 1;
2148
- $symLink and $self->SetFileName($src, $symLink, 'SymLink') and $rtnVal = 1;
2149
- $testName and $self->SetFileName($src, $testName, 'Test') and $rtnVal = 1;
2151
+ $hardLink and $self->SetFileName($infile, $hardLink, 'HardLink') and $rtnVal = 1;
2152
+ $symLink and $self->SetFileName($infile, $symLink, 'SymLink') and $rtnVal = 1;
2153
+ $testName and $self->SetFileName($infile, $testName, 'Test') and $rtnVal = 1;
2150
2154
  }
2151
2155
  return $rtnVal;
2152
2156
  } elsif (defined $newFileName and length $newFileName) {
@@ -2762,6 +2766,8 @@ sub ConvInv($$$$$;$$)
2762
2766
  my ($self, $val, $tagInfo, $tag, $wgrp1, $convType, $wantGroup) = @_;
2763
2767
  my ($err, $type);
2764
2768
 
2769
+ $convType or $convType = $$self{ConvType} || 'PrintConv';
2770
+
2765
2771
  Conv: for (;;) {
2766
2772
  if (not defined $type) {
2767
2773
  # split value into list if necessary
@@ -2775,7 +2781,7 @@ Conv: for (;;) {
2775
2781
  $val = @splitVal > 1 ? \@splitVal : @splitVal ? $splitVal[0] : '';
2776
2782
  }
2777
2783
  }
2778
- $type = $convType || $$self{ConvType} || 'PrintConv';
2784
+ $type = $convType;
2779
2785
  } elsif ($type eq 'PrintConv') {
2780
2786
  $type = 'ValueConv';
2781
2787
  } else {
@@ -2798,11 +2804,11 @@ Conv: for (;;) {
2798
2804
  if (ref $val eq 'ARRAY') {
2799
2805
  # loop through array values
2800
2806
  foreach $v (@$val) {
2801
- $err2 = &$checkProc($self, $tagInfo, \$v);
2807
+ $err2 = &$checkProc($self, $tagInfo, \$v, $convType);
2802
2808
  last if $err2;
2803
2809
  }
2804
2810
  } else {
2805
- $err2 = &$checkProc($self, $tagInfo, \$val);
2811
+ $err2 = &$checkProc($self, $tagInfo, \$val, $convType);
2806
2812
  }
2807
2813
  }
2808
2814
  }
@@ -4807,9 +4813,17 @@ TryLib: for ($lib=$strptimeLib; ; $lib='') {
4807
4813
  $ss = ':00';
4808
4814
  }
4809
4815
  # construct properly formatted date/time string
4810
- if ($a[0]<=12 and $a[1]<=31 and $a[2]<=24 and $a[3]<=59) {
4811
- $rtnVal = "$yr:$a[0]:$a[1] $a[2]:$a[3]$ss$fs$tz";
4816
+ if ($a[0] < 1 or $a[0] > 12) {
4817
+ warn "Month '$a[0]' out of range 1..12\n";
4818
+ return undef;
4819
+ }
4820
+ if ($a[1] < 1 or $a[1] > 31) {
4821
+ warn "Day '$a[1]' out of range 1..31\n";
4822
+ return undef;
4812
4823
  }
4824
+ $a[2] > 24 and warn("Hour '$a[2]' out of range 0..24\n"), return undef;
4825
+ $a[3] > 59 and warn("Minutes '$a[3]' out of range 0..59\n"), return undef;
4826
+ $rtnVal = "$yr:$a[0]:$a[1] $a[2]:$a[3]$ss$fs$tz";
4813
4827
  } elsif ($dateOnly) {
4814
4828
  $rtnVal = join ':', $yr, @a;
4815
4829
  }
@@ -6940,7 +6954,7 @@ used routines.
6940
6954
 
6941
6955
  =head1 AUTHOR
6942
6956
 
6943
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
6957
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
6944
6958
 
6945
6959
  This library is free software; you can redistribute it and/or modify it
6946
6960
  under the same terms as Perl itself.
@@ -50,13 +50,13 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.36';
53
+ $VERSION = '3.38';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
57
57
  sub ProcessXMP($$;$);
58
58
  sub WriteXMP($$;$);
59
- sub CheckXMP($$$);
59
+ sub CheckXMP($$$;$);
60
60
  sub ParseXMPElement($$$;$$$$);
61
61
  sub DecodeBase64($);
62
62
  sub EncodeBase64($;$);
@@ -467,6 +467,19 @@ my %sCorrectionMask = (
467
467
  CenterValue => { Writable => 'real', List => 0 },
468
468
  PerimeterValue=>{ Writable => 'real', List => 0 },
469
469
  );
470
+ my %sCorrectionRangeMask = (
471
+ STRUCT_NAME => 'CorrectionRangeMask',
472
+ NAMESPACE => 'crs',
473
+ Version => { },
474
+ Type => { },
475
+ ColorAmount => { Writable => 'real' },
476
+ LumMin => { Writable => 'real' },
477
+ LumMax => { Writable => 'real' },
478
+ LumFeather => { Writable => 'real' },
479
+ DepthMin => { Writable => 'real' },
480
+ DepthMax => { Writable => 'real' },
481
+ DepthFeather=> { Writable => 'real' },
482
+ );
470
483
  my %sCorrection = (
471
484
  STRUCT_NAME => 'Correction',
472
485
  NAMESPACE => 'crs',
@@ -491,6 +504,15 @@ my %sCorrection = (
491
504
  LocalDefringe => { FlatName => 'Defringe', Writable => 'real', List => 0 },
492
505
  LocalTemperature => { FlatName => 'Temperature',Writable => 'real', List => 0 },
493
506
  LocalTint => { FlatName => 'Tint', Writable => 'real', List => 0 },
507
+ LocalHue => { FlatName => 'Hue', Writable => 'real', List => 0 },
508
+ LocalWhites2012 => { FlatName => 'Whites2012', Writable => 'real', List => 0 },
509
+ LocalBlacks2012 => { FlatName => 'Blacks2012', Writable => 'real', List => 0 },
510
+ LocalDehaze => { FlatName => 'Dehaze', Writable => 'real', List => 0 },
511
+ LocalTexture => { FlatName => 'Texture', Writable => 'real', List => 0 },
512
+ CorrectionRangeMask => {
513
+ FlatName => 'RangeMask',
514
+ Struct => \%sCorrectionRangeMask,
515
+ },
494
516
  CorrectionMasks => {
495
517
  FlatName => 'Mask',
496
518
  Struct => \%sCorrectionMask,
@@ -2311,6 +2333,7 @@ my %sPantryItem = (
2311
2333
  Location => { Groups => { 2 => 'Location' } },
2312
2334
  Scene => { Groups => { 2 => 'Other' }, List => 'Bag' },
2313
2335
  SubjectCode => { Groups => { 2 => 'Other' }, List => 'Bag' },
2336
+ # Copyright - have seen this in a sample (Jan 2021), but I think it is non-standard
2314
2337
  );
2315
2338
 
2316
2339
  # Adobe Lightroom namespace properties (lr) (ref PH)
@@ -3105,10 +3128,15 @@ sub FoundXMP($$$$;$)
3105
3128
  }
3106
3129
  }
3107
3130
 
3108
- if (not $ns and $$tagTablePtr{GROUPS}{0} ne 'XMP') {
3109
- # this is a simple XML table (no namespaces)
3131
+ my $xmlGroups;
3132
+ my $grp0 = $$tagTablePtr{GROUPS}{0};
3133
+ if (not $ns and $grp0 ne 'XMP') {
3110
3134
  $tagID = $tag;
3135
+ } elsif ($grp0 eq 'XML' and not $table) {
3136
+ # this is an XML table (no namespace lookup)
3137
+ $tagID = "$ns:$tag";
3111
3138
  } else {
3139
+ $xmlGroups = 1 if $grp0 eq 'XML';
3112
3140
  # look up this tag in the appropriate table
3113
3141
  $table or $table = 'Image::ExifTool::XMP::other';
3114
3142
  $tagTablePtr = GetTagTable($table);
@@ -3301,6 +3329,9 @@ NoLoop:
3301
3329
  } else {
3302
3330
  $val = ConvertXMPDate($val, $new) if $new or $fmt eq 'date';
3303
3331
  }
3332
+ if ($$et{XmpValidate} and $fmt and $fmt eq 'boolean') {
3333
+ $et->WarnOnce("Boolean value for XMP-$ns:$$tagInfo{Name} should be capitalized",1);
3334
+ }
3304
3335
  # protect against large binary data in unknown tags
3305
3336
  $$tagInfo{Binary} = 1 if $new and length($val) > 65536;
3306
3337
  }
@@ -3335,7 +3366,10 @@ NoLoop:
3335
3366
  $$et{TAG_EXTRA}{$key}{Struct} = \@structProps;
3336
3367
  $$et{IsStruct} = 1;
3337
3368
  }
3338
- if ($ns and not $$tagInfo{StaticGroup1}) {
3369
+ if ($xmlGroups) {
3370
+ $et->SetGroup($key, 'XML', 0);
3371
+ $et->SetGroup($key, "XML-$ns", 1);
3372
+ } elsif ($ns and not $$tagInfo{StaticGroup1}) {
3339
3373
  # set group1 dynamically according to the namespace
3340
3374
  $et->SetGroup($key, "$$tagTablePtr{GROUPS}{0}-$ns");
3341
3375
  }
@@ -4027,11 +4061,12 @@ sub ProcessXMP($$;$)
4027
4061
  $dirLen = $dataLen = length $$dataPt;
4028
4062
  }
4029
4063
 
4030
- # extract XMP as a block if specified
4064
+ # extract XMP/XML as a block if specified
4031
4065
  my $blockName = $$dirInfo{BlockInfo} ? $$dirInfo{BlockInfo}{Name} : 'XMP';
4032
4066
  if (($$et{REQ_TAG_LOOKUP}{lc $blockName} or ($$et{TAGS_FROM_FILE} and
4033
- not $$et{EXCL_TAG_LOOKUP}{lc $blockName})) and ($$et{FileType} eq 'XMP' or
4034
- ($$dirInfo{DirName} and $$dirInfo{DirName} eq 'XMP')))
4067
+ not $$et{EXCL_TAG_LOOKUP}{lc $blockName})) and
4068
+ (($$et{FileType} eq 'XMP' and $blockName eq 'XMP') or
4069
+ ($$dirInfo{DirName} and $$dirInfo{DirName} eq $blockName)))
4035
4070
  {
4036
4071
  $et->FoundTag($$dirInfo{BlockInfo} || 'XMP', substr($$dataPt, $dirStart, $dirLen));
4037
4072
  }
@@ -4193,7 +4228,7 @@ information.
4193
4228
 
4194
4229
  =head1 AUTHOR
4195
4230
 
4196
- Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
4231
+ Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
4197
4232
 
4198
4233
  This library is free software; you can redistribute it and/or modify it
4199
4234
  under the same terms as Perl itself.