exiftool-vendored.exe 12.72.0 → 12.76.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 (202) hide show
  1. package/bin/exiftool_files/Changes +64 -1
  2. package/bin/exiftool_files/README +47 -46
  3. package/bin/exiftool_files/exiftool.pl +121 -90
  4. package/bin/exiftool_files/lib/File/RandomAccess.pm +32 -6
  5. package/bin/exiftool_files/lib/File/RandomAccess.pod +6 -6
  6. package/bin/exiftool_files/lib/Image/ExifTool/7Z.pm +3 -3
  7. package/bin/exiftool_files/lib/Image/ExifTool/AAC.pm +8 -6
  8. package/bin/exiftool_files/lib/Image/ExifTool/AES.pm +1 -1
  9. package/bin/exiftool_files/lib/Image/ExifTool/AFCP.pm +3 -3
  10. package/bin/exiftool_files/lib/Image/ExifTool/AIFF.pm +1 -1
  11. package/bin/exiftool_files/lib/Image/ExifTool/APE.pm +1 -1
  12. package/bin/exiftool_files/lib/Image/ExifTool/APP12.pm +1 -1
  13. package/bin/exiftool_files/lib/Image/ExifTool/ASF.pm +1 -1
  14. package/bin/exiftool_files/lib/Image/ExifTool/Apple.pm +1 -1
  15. package/bin/exiftool_files/lib/Image/ExifTool/Audible.pm +1 -1
  16. package/bin/exiftool_files/lib/Image/ExifTool/BMP.pm +1 -1
  17. package/bin/exiftool_files/lib/Image/ExifTool/BPG.pm +1 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/BZZ.pm +3 -3
  19. package/bin/exiftool_files/lib/Image/ExifTool/BigTIFF.pm +1 -1
  20. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +9 -9
  21. package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +1 -1
  22. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +7 -6
  23. package/bin/exiftool_files/lib/Image/ExifTool/CanonCustom.pm +1 -1
  24. package/bin/exiftool_files/lib/Image/ExifTool/CanonRaw.pm +1 -1
  25. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +3 -3
  26. package/bin/exiftool_files/lib/Image/ExifTool/CaptureOne.pm +1 -1
  27. package/bin/exiftool_files/lib/Image/ExifTool/Casio.pm +1 -1
  28. package/bin/exiftool_files/lib/Image/ExifTool/Charset.pm +1 -1
  29. package/bin/exiftool_files/lib/Image/ExifTool/DICOM.pm +3 -3
  30. package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +1 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/DNG.pm +5 -5
  32. package/bin/exiftool_files/lib/Image/ExifTool/DPX.pm +1 -1
  33. package/bin/exiftool_files/lib/Image/ExifTool/DV.pm +1 -1
  34. package/bin/exiftool_files/lib/Image/ExifTool/DarwinCore.pm +1 -1
  35. package/bin/exiftool_files/lib/Image/ExifTool/DjVu.pm +1 -1
  36. package/bin/exiftool_files/lib/Image/ExifTool/EXE.pm +1 -1
  37. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +4 -3
  38. package/bin/exiftool_files/lib/Image/ExifTool/FITS.pm +1 -1
  39. package/bin/exiftool_files/lib/Image/ExifTool/FLAC.pm +1 -1
  40. package/bin/exiftool_files/lib/Image/ExifTool/FLIF.pm +1 -1
  41. package/bin/exiftool_files/lib/Image/ExifTool/FLIR.pm +3 -3
  42. package/bin/exiftool_files/lib/Image/ExifTool/Fixup.pm +4 -4
  43. package/bin/exiftool_files/lib/Image/ExifTool/Flash.pm +1 -1
  44. package/bin/exiftool_files/lib/Image/ExifTool/FlashPix.pm +61 -8
  45. package/bin/exiftool_files/lib/Image/ExifTool/Font.pm +1 -1
  46. package/bin/exiftool_files/lib/Image/ExifTool/FotoStation.pm +1 -1
  47. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +9 -4
  48. package/bin/exiftool_files/lib/Image/ExifTool/GE.pm +1 -1
  49. package/bin/exiftool_files/lib/Image/ExifTool/GIF.pm +1 -1
  50. package/bin/exiftool_files/lib/Image/ExifTool/GIMP.pm +1 -1
  51. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +1 -1
  52. package/bin/exiftool_files/lib/Image/ExifTool/GeoTiff.pm +1 -1
  53. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +4 -4
  54. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +1 -1
  55. package/bin/exiftool_files/lib/Image/ExifTool/H264.pm +1 -1
  56. package/bin/exiftool_files/lib/Image/ExifTool/HP.pm +1 -1
  57. package/bin/exiftool_files/lib/Image/ExifTool/HTML.pm +1 -1
  58. package/bin/exiftool_files/lib/Image/ExifTool/HtmlDump.pm +7 -5
  59. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  60. package/bin/exiftool_files/lib/Image/ExifTool/ICO.pm +1 -1
  61. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +3 -3
  62. package/bin/exiftool_files/lib/Image/ExifTool/IPTC.pm +1 -1
  63. package/bin/exiftool_files/lib/Image/ExifTool/ISO.pm +1 -1
  64. package/bin/exiftool_files/lib/Image/ExifTool/ITC.pm +1 -1
  65. package/bin/exiftool_files/lib/Image/ExifTool/Import.pm +6 -6
  66. package/bin/exiftool_files/lib/Image/ExifTool/InDesign.pm +1 -1
  67. package/bin/exiftool_files/lib/Image/ExifTool/InfiRay.pm +1 -1
  68. package/bin/exiftool_files/lib/Image/ExifTool/JPEG.pm +5 -2
  69. package/bin/exiftool_files/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  70. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +3 -3
  71. package/bin/exiftool_files/lib/Image/ExifTool/JVC.pm +3 -3
  72. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +67 -17
  73. package/bin/exiftool_files/lib/Image/ExifTool/Kodak.pm +1 -1
  74. package/bin/exiftool_files/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  75. package/bin/exiftool_files/lib/Image/ExifTool/LIF.pm +1 -1
  76. package/bin/exiftool_files/lib/Image/ExifTool/LNK.pm +1 -1
  77. package/bin/exiftool_files/lib/Image/ExifTool/Lang/cs.pm +1 -1
  78. package/bin/exiftool_files/lib/Image/ExifTool/Lang/de.pm +1 -1
  79. package/bin/exiftool_files/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  80. package/bin/exiftool_files/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  81. package/bin/exiftool_files/lib/Image/ExifTool/Lang/es.pm +4 -4
  82. package/bin/exiftool_files/lib/Image/ExifTool/Lang/fi.pm +1 -1
  83. package/bin/exiftool_files/lib/Image/ExifTool/Lang/fr.pm +4 -5
  84. package/bin/exiftool_files/lib/Image/ExifTool/Lang/it.pm +3 -3
  85. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ja.pm +1 -1
  86. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ko.pm +1 -1
  87. package/bin/exiftool_files/lib/Image/ExifTool/Lang/nl.pm +1 -1
  88. package/bin/exiftool_files/lib/Image/ExifTool/Lang/pl.pm +1 -1
  89. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ru.pm +1 -1
  90. package/bin/exiftool_files/lib/Image/ExifTool/Lang/sk.pm +1 -1
  91. package/bin/exiftool_files/lib/Image/ExifTool/Lang/sv.pm +1 -1
  92. package/bin/exiftool_files/lib/Image/ExifTool/Lang/tr.pm +1 -1
  93. package/bin/exiftool_files/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  94. package/bin/exiftool_files/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  95. package/bin/exiftool_files/lib/Image/ExifTool/Leaf.pm +3 -3
  96. package/bin/exiftool_files/lib/Image/ExifTool/Lytro.pm +1 -1
  97. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +1 -1
  98. package/bin/exiftool_files/lib/Image/ExifTool/MIE.pm +5 -5
  99. package/bin/exiftool_files/lib/Image/ExifTool/MIEUnits.pod +1 -1
  100. package/bin/exiftool_files/lib/Image/ExifTool/MIFF.pm +1 -1
  101. package/bin/exiftool_files/lib/Image/ExifTool/MISB.pm +1 -1
  102. package/bin/exiftool_files/lib/Image/ExifTool/MNG.pm +1 -1
  103. package/bin/exiftool_files/lib/Image/ExifTool/MOI.pm +1 -1
  104. package/bin/exiftool_files/lib/Image/ExifTool/MPC.pm +1 -1
  105. package/bin/exiftool_files/lib/Image/ExifTool/MPEG.pm +1 -1
  106. package/bin/exiftool_files/lib/Image/ExifTool/MPF.pm +1 -1
  107. package/bin/exiftool_files/lib/Image/ExifTool/MRC.pm +1 -1
  108. package/bin/exiftool_files/lib/Image/ExifTool/MWG.pm +1 -1
  109. package/bin/exiftool_files/lib/Image/ExifTool/MXF.pm +1 -1
  110. package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +1 -1
  111. package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +1 -1
  112. package/bin/exiftool_files/lib/Image/ExifTool/Matroska.pm +1 -1
  113. package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
  114. package/bin/exiftool_files/lib/Image/ExifTool/Minolta.pm +1 -1
  115. package/bin/exiftool_files/lib/Image/ExifTool/MinoltaRaw.pm +3 -3
  116. package/bin/exiftool_files/lib/Image/ExifTool/Motorola.pm +1 -1
  117. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +11 -8
  118. package/bin/exiftool_files/lib/Image/ExifTool/NikonCapture.pm +1 -1
  119. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +4 -4
  120. package/bin/exiftool_files/lib/Image/ExifTool/NikonSettings.pm +1 -1
  121. package/bin/exiftool_files/lib/Image/ExifTool/Nintendo.pm +1 -1
  122. package/bin/exiftool_files/lib/Image/ExifTool/OOXML.pm +1 -1
  123. package/bin/exiftool_files/lib/Image/ExifTool/Ogg.pm +3 -3
  124. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -1
  125. package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +1 -1
  126. package/bin/exiftool_files/lib/Image/ExifTool/Opus.pm +1 -1
  127. package/bin/exiftool_files/lib/Image/ExifTool/Other.pm +1 -1
  128. package/bin/exiftool_files/lib/Image/ExifTool/PCX.pm +1 -1
  129. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +55 -5
  130. package/bin/exiftool_files/lib/Image/ExifTool/PGF.pm +1 -1
  131. package/bin/exiftool_files/lib/Image/ExifTool/PICT.pm +1 -1
  132. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +4 -4
  133. package/bin/exiftool_files/lib/Image/ExifTool/PLUS.pm +1 -1
  134. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +24 -2
  135. package/bin/exiftool_files/lib/Image/ExifTool/PPM.pm +1 -1
  136. package/bin/exiftool_files/lib/Image/ExifTool/PSP.pm +1 -1
  137. package/bin/exiftool_files/lib/Image/ExifTool/Palm.pm +1 -1
  138. package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +27 -2
  139. package/bin/exiftool_files/lib/Image/ExifTool/PanasonicRaw.pm +4 -4
  140. package/bin/exiftool_files/lib/Image/ExifTool/Parrot.pm +1 -1
  141. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +32 -11
  142. package/bin/exiftool_files/lib/Image/ExifTool/PhaseOne.pm +6 -6
  143. package/bin/exiftool_files/lib/Image/ExifTool/PhotoCD.pm +1 -1
  144. package/bin/exiftool_files/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  145. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +4 -4
  146. package/bin/exiftool_files/lib/Image/ExifTool/PostScript.pm +3 -3
  147. package/bin/exiftool_files/lib/Image/ExifTool/PrintIM.pm +1 -1
  148. package/bin/exiftool_files/lib/Image/ExifTool/Qualcomm.pm +1 -1
  149. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +55 -101
  150. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +97 -7
  151. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +1 -1
  152. package/bin/exiftool_files/lib/Image/ExifTool/RSRC.pm +3 -3
  153. package/bin/exiftool_files/lib/Image/ExifTool/RTF.pm +1 -1
  154. package/bin/exiftool_files/lib/Image/ExifTool/Radiance.pm +1 -1
  155. package/bin/exiftool_files/lib/Image/ExifTool/Rawzor.pm +1 -1
  156. package/bin/exiftool_files/lib/Image/ExifTool/Real.pm +1 -1
  157. package/bin/exiftool_files/lib/Image/ExifTool/Reconyx.pm +1 -1
  158. package/bin/exiftool_files/lib/Image/ExifTool/Red.pm +1 -1
  159. package/bin/exiftool_files/lib/Image/ExifTool/Ricoh.pm +3 -3
  160. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +5 -5
  161. package/bin/exiftool_files/lib/Image/ExifTool/Sanyo.pm +1 -1
  162. package/bin/exiftool_files/lib/Image/ExifTool/Scalado.pm +1 -1
  163. package/bin/exiftool_files/lib/Image/ExifTool/Shift.pl +2 -3
  164. package/bin/exiftool_files/lib/Image/ExifTool/Shortcuts.pm +1 -1
  165. package/bin/exiftool_files/lib/Image/ExifTool/Sigma.pm +1 -1
  166. package/bin/exiftool_files/lib/Image/ExifTool/SigmaRaw.pm +4 -4
  167. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +5 -5
  168. package/bin/exiftool_files/lib/Image/ExifTool/SonyIDC.pm +1 -1
  169. package/bin/exiftool_files/lib/Image/ExifTool/Stim.pm +1 -1
  170. package/bin/exiftool_files/lib/Image/ExifTool/TagInfoXML.pm +4 -4
  171. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +3879 -3862
  172. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +11439 -11374
  173. package/bin/exiftool_files/lib/Image/ExifTool/Text.pm +1 -1
  174. package/bin/exiftool_files/lib/Image/ExifTool/Theora.pm +1 -1
  175. package/bin/exiftool_files/lib/Image/ExifTool/Torrent.pm +1 -1
  176. package/bin/exiftool_files/lib/Image/ExifTool/Unknown.pm +1 -1
  177. package/bin/exiftool_files/lib/Image/ExifTool/VCard.pm +1 -1
  178. package/bin/exiftool_files/lib/Image/ExifTool/Validate.pm +1 -1
  179. package/bin/exiftool_files/lib/Image/ExifTool/Vorbis.pm +1 -1
  180. package/bin/exiftool_files/lib/Image/ExifTool/WPG.pm +1 -1
  181. package/bin/exiftool_files/lib/Image/ExifTool/WTV.pm +1 -1
  182. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +2 -2
  183. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +27 -24
  184. package/bin/exiftool_files/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  185. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +2 -2
  186. package/bin/exiftool_files/lib/Image/ExifTool/WritePNG.pl +1 -1
  187. package/bin/exiftool_files/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  188. package/bin/exiftool_files/lib/Image/ExifTool/WritePostScript.pl +1 -1
  189. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +5 -2
  190. package/bin/exiftool_files/lib/Image/ExifTool/WriteRIFF.pl +1 -1
  191. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +9 -5
  192. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +74 -45
  193. package/bin/exiftool_files/lib/Image/ExifTool/XISF.pm +1 -1
  194. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +20 -3
  195. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +10 -1
  196. package/bin/exiftool_files/lib/Image/ExifTool/XMPStruct.pl +1 -1
  197. package/bin/exiftool_files/lib/Image/ExifTool/ZIP.pm +7 -7
  198. package/bin/exiftool_files/lib/Image/ExifTool/ZISRAW.pm +1 -1
  199. package/bin/exiftool_files/lib/Image/ExifTool/iWork.pm +1 -1
  200. package/bin/exiftool_files/lib/Image/ExifTool.pm +59 -28
  201. package/bin/exiftool_files/lib/Image/ExifTool.pod +81 -68
  202. package/package.json +6 -6
@@ -26,6 +26,7 @@ sub RemoveNewValuesForGroup($$);
26
26
  sub GetWriteGroup1($$);
27
27
  sub Sanitize($$);
28
28
  sub ConvInv($$$$$;$$);
29
+ sub PushValue($$$;$);
29
30
 
30
31
  my $loadedAllTables; # flag indicating we loaded all tables
31
32
  my $advFmtSelf; # ExifTool object during evaluation of advanced formatting expr
@@ -1260,7 +1261,7 @@ sub SetNewValuesFromFile($$;@)
1260
1261
  }
1261
1262
  # expand shortcuts
1262
1263
  @setTags and ExpandShortcuts(\@setTags);
1263
- my $srcExifTool = new Image::ExifTool;
1264
+ my $srcExifTool = Image::ExifTool->new;
1264
1265
  # set flag to indicate we are being called from inside SetNewValuesFromFile()
1265
1266
  $$srcExifTool{TAGS_FROM_FILE} = 1;
1266
1267
  # synchronize and increment the file sequence number
@@ -1302,6 +1303,7 @@ sub SetNewValuesFromFile($$;@)
1302
1303
  ImageHashType => $$options{ImageHashType},
1303
1304
  Lang => $$options{Lang},
1304
1305
  LargeFileSupport=> $$options{LargeFileSupport},
1306
+ LimitLongValues => 10000000, # (10 MB)
1305
1307
  List => 1,
1306
1308
  ListItem => $$options{ListItem},
1307
1309
  ListSep => $$options{ListSep},
@@ -1581,7 +1583,7 @@ SET: foreach $set (@setList) {
1581
1583
  my $opts = $$set[3];
1582
1584
  # handle expressions
1583
1585
  if ($$opts{EXPR}) {
1584
- my $val = $srcExifTool->InsertTagValues(\@tags, $$set[1], 'Error');
1586
+ my $val = $srcExifTool->InsertTagValues($$set[1], \@tags, 'Error');
1585
1587
  my $err = $$srcExifTool{VALUE}{Error};
1586
1588
  if ($err) {
1587
1589
  # pass on any error as a warning unless it is suppressed
@@ -2431,7 +2433,7 @@ sub WriteInfo($$;$$)
2431
2433
  #
2432
2434
  until ($$self{VALUE}{Error}) {
2433
2435
  # create random access file object (disable seek test in case of straight copy)
2434
- $raf or $raf = new File::RandomAccess($inRef, 1);
2436
+ $raf or $raf = File::RandomAccess->new($inRef, 1);
2435
2437
  $raf->BinMode();
2436
2438
  if ($numNew == $numPseudo) {
2437
2439
  $rtnVal = 1;
@@ -2702,7 +2704,7 @@ sub GetAllTags(;$)
2702
2704
  my (%allTags, @groups);
2703
2705
  @groups = split ':', $group if $group;
2704
2706
 
2705
- my $et = new Image::ExifTool;
2707
+ my $et = Image::ExifTool->new;
2706
2708
  LoadAllTables(); # first load all our tables
2707
2709
  my @tableNames = keys %allTables;
2708
2710
 
@@ -2747,7 +2749,7 @@ sub GetWritableTags(;$)
2747
2749
  my (%writableTags, @groups);
2748
2750
  @groups = split ':', $group if $group;
2749
2751
 
2750
- my $et = new Image::ExifTool;
2752
+ my $et = Image::ExifTool->new;
2751
2753
  LoadAllTables();
2752
2754
  my @tableNames = keys %allTables;
2753
2755
 
@@ -3123,11 +3125,37 @@ Conv: for (;;) {
3123
3125
  return($val, $err);
3124
3126
  }
3125
3127
 
3128
+ #------------------------------------------------------------------------------
3129
+ # Dereference value and push onto list
3130
+ # Inputs: 0) ExifTool ref, 1) value, 2) list ref, 3) flag to push MissingTagValue for undef value
3131
+ sub PushValue($$$;$)
3132
+ {
3133
+ local $_;
3134
+ my ($self, $val, $list, $missing) = @_;
3135
+ if (ref $val eq 'ARRAY' and ref $$val[0] ne 'HASH') {
3136
+ $self->PushValue($_, $list, $missing) foreach @$val;
3137
+ } elsif (ref $val eq 'SCALAR') {
3138
+ if ($$self{OPTIONS}{Binary} or $$val =~ /^Binary data/) {
3139
+ push @$list, $$val;
3140
+ } else {
3141
+ push @$list, 'Binary data ' . length($$val) . ' bytes';
3142
+ }
3143
+ } elsif (ref $val eq 'HASH' or ref $val eq 'ARRAY') {
3144
+ require 'Image/ExifTool/XMPStruct.pl';
3145
+ push @$list, Image::ExifTool::XMP::SerializeStruct($self, $val);
3146
+ } elsif (not defined $val) {
3147
+ my $mval = $$self{OPTIONS}{MissingTagValue};
3148
+ push @$list, $mval if $missing and defined $mval;
3149
+ } else {
3150
+ push @$list, $val;
3151
+ }
3152
+ }
3153
+
3126
3154
  #------------------------------------------------------------------------------
3127
3155
  # Convert tag names to values or variables in a string
3128
3156
  # (eg. '${EXIF:ISO}x $$' --> '100x $' without hash ref, or "$info{'EXIF:ISO'}x $" with)
3129
- # Inputs: 0) ExifTool object ref, 1) reference to list of found tags
3130
- # 2) string with embedded tag names, 3) Options:
3157
+ # Inputs: 0) ExifTool object ref, 1) string with embedded tag names,
3158
+ # 2) reference to list of found tags or undef to use FOUND_TAGS, 3) Options:
3131
3159
  # undef - set missing tags to ''
3132
3160
  # 'Error' - issue minor error on missing tag (and return undef)
3133
3161
  # 'Warn' - issue minor warning on missing tag (and return undef)
@@ -3144,20 +3172,22 @@ Conv: for (;;) {
3144
3172
  # - advanced feature allows Perl expressions inside braces (eg. '${model;tr/ //d}')
3145
3173
  # - an error/warning in an advanced expression ("${TAG;EXPR}") generates an error
3146
3174
  # if option set to 'Error', or a warning otherwise
3147
- sub InsertTagValues($$$;$$$)
3175
+ sub InsertTagValues($$;$$$$)
3148
3176
  {
3149
3177
  local $_;
3150
- my ($self, $foundTags, $line, $opt, $docGrp, $cache) = @_;
3178
+ my ($self, $line, $foundTags, $opt, $docGrp, $cache) = @_;
3151
3179
  my $rtnStr = '';
3152
3180
  my ($docNum, $tag);
3181
+
3153
3182
  if ($docGrp) {
3154
3183
  $docNum = $docGrp =~ /(\d+)$/ ? $1 : 0;
3155
3184
  } else {
3156
3185
  undef $cache; # no cache if no document groups
3157
3186
  }
3187
+ $foundTags or $foundTags = $$self{FOUND_TAGS} || [];
3158
3188
  while ($line =~ s/(.*?)\$(\{\s*)?([-\w]*\w|\$|\/)//s) {
3159
3189
  my ($pre, $bra, $var) = ($1, $2, $3);
3160
- my (@tags, $val, $tg, @val, $type, $expr, $didExpr, $level, $asList);
3190
+ my (@tags, $tg, $val, @val, $type, $expr, $didExpr, $level, $asList);
3161
3191
  # "$$" represents a "$" symbol, and "$/" is a newline
3162
3192
  if ($var eq '$' or $var eq '/') {
3163
3193
  $line =~ s/^\s*\}// if $bra;
@@ -3260,15 +3290,24 @@ sub InsertTagValues($$$;$$$)
3260
3290
  } elsif (defined $$et{OPTIONS}{UserParam}{$lcTag}) {
3261
3291
  $val = $$et{OPTIONS}{UserParam}{$lcTag};
3262
3292
  } elsif ($tag =~ /(.*):(.+)/) {
3263
- my $group;
3293
+ my ($group, @matches);
3264
3294
  ($group, $tag) = ($1, $2);
3265
- if (lc $tag eq 'all') {
3266
- # see if any tag from the specified group exists
3267
- my $match = $et->GroupMatches($group, $fileTags);
3268
- $val = $match ? 1 : 0;
3295
+ # join values of all matching tags if "All" group is used
3296
+ # (and remove "All" from group prefix)
3297
+ if ($group =~ s/(^|:)(all|\*)(:|$)/$1 and $3/ei) {
3298
+ if (lc $tag eq 'all') {
3299
+ @matches = $group ? $et->GroupMatches($group, $fileTags) : @$fileTags;
3300
+ } else {
3301
+ @matches = grep /^$tag(\s|$)/i, @$fileTags;
3302
+ @matches = $et->GroupMatches($group, \@matches) if $group;
3303
+ }
3304
+ $self->PushValue(scalar $et->GetValue($_, $type), \@val) foreach @matches;
3305
+ } elsif (lc $tag eq 'all') {
3306
+ # return "1" if any tag from the specified group exists
3307
+ $val = $et->GroupMatches($group, $fileTags) ? 1 : 0;
3269
3308
  } else {
3270
3309
  # find the specified tag
3271
- my @matches = grep /^$tag(\s|$)/i, @$fileTags;
3310
+ @matches = grep /^$tag(\s|$)/i, @$fileTags;
3272
3311
  @matches = $et->GroupMatches($group, \@matches);
3273
3312
  foreach $tg (@matches) {
3274
3313
  if (defined $val and $tg =~ / \((\d+)\)$/) {
@@ -3297,31 +3336,15 @@ sub InsertTagValues($$$;$$$)
3297
3336
  }
3298
3337
  }
3299
3338
  $self->Options(ListJoin => $oldListJoin) if $asList;
3300
- if (ref $val eq 'ARRAY') {
3301
- push @val, @$val;
3302
- undef $val;
3303
- last unless @tags;
3304
- } elsif (ref $val eq 'SCALAR') {
3305
- if ($$self{OPTIONS}{Binary} or $$val =~ /^Binary data/) {
3306
- $val = $$val;
3307
- } else {
3308
- $val = 'Binary data ' . length($$val) . ' bytes';
3309
- }
3310
- } elsif (ref $val eq 'HASH') {
3311
- require 'Image/ExifTool/XMPStruct.pl';
3312
- $val = Image::ExifTool::XMP::SerializeStruct($self, $val);
3313
- } elsif (not defined $val) {
3314
- $val = $$self{OPTIONS}{MissingTagValue} if $asList;
3315
- }
3316
- last unless @tags;
3317
- push @val, $val if defined $val;
3339
+ $self->PushValue($val, \@val, $asList);
3318
3340
  undef $val;
3341
+ last unless @tags;
3319
3342
  }
3320
3343
  if (@val) {
3321
- push @val, $val if defined $val;
3344
+ $self->PushValue($val, \@val) if defined $val;
3322
3345
  $val = join $$self{OPTIONS}{ListSep}, @val;
3323
- } else {
3324
- push @val, $val if defined $val; # (so the eval has access to @val if required)
3346
+ } elsif (defined $val) {
3347
+ $self->PushValue($val, \@val); # (so the eval has access to @val if required)
3325
3348
  }
3326
3349
  # evaluate advanced formatting expression if given (eg. "${TAG;EXPR}")
3327
3350
  if (defined $expr and defined $val) {
@@ -3330,7 +3353,7 @@ sub InsertTagValues($$$;$$$)
3330
3353
  $advFmtSelf = $self;
3331
3354
  if ($asList) {
3332
3355
  foreach (@val) {
3333
- #### eval advanced formatting expression ($_, $self, @val, $advFmtSelf)
3356
+ #### eval advanced formatting expression ($_, $self, @val, $tag, $advFmtSelf)
3334
3357
  eval $expr;
3335
3358
  $@ and $evalWarning = $@;
3336
3359
  }
@@ -3339,7 +3362,7 @@ sub InsertTagValues($$$;$$$)
3339
3362
  $val = @val ? join $$self{OPTIONS}{ListSep}, @val : undef;
3340
3363
  } else {
3341
3364
  $_ = $val;
3342
- #### eval advanced formatting expression ($_, $self, @val, $advFmtSelf)
3365
+ #### eval advanced formatting expression ($_, $self, @val, $tag, $advFmtSelf)
3343
3366
  eval $expr;
3344
3367
  $@ and $evalWarning = $@;
3345
3368
  $val = ref $_ eq 'ARRAY' ? join($$self{OPTIONS}{ListSep}, @$_): $_;
@@ -3394,6 +3417,7 @@ sub InsertTagValues($$$;$$$)
3394
3417
  #------------------------------------------------------------------------------
3395
3418
  # Reformat date/time value in $_ based on specified format string
3396
3419
  # Inputs: 0) date/time format string
3420
+ # Returns: Reformatted date/time string
3397
3421
  sub DateFmt($)
3398
3422
  {
3399
3423
  my $et = bless { OPTIONS => { DateFormat => shift, StrictDate => 1 } };
@@ -3405,6 +3429,7 @@ sub DateFmt($)
3405
3429
  $_ = $et->ConvertDateTime($_);
3406
3430
  defined $_ or warn "Error converting date/time\n";
3407
3431
  $$advFmtSelf{GLOBAL_TIME_OFFSET} = $$et{GLOBAL_TIME_OFFSET} if $shift;
3432
+ return $_;
3408
3433
  }
3409
3434
 
3410
3435
  #------------------------------------------------------------------------------
@@ -3514,7 +3539,7 @@ sub CreateDirectory($$)
3514
3539
  }
3515
3540
  unless ($k32CreateDir) {
3516
3541
  return -1 if defined $k32CreateDir;
3517
- $k32CreateDir = new Win32::API('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
3542
+ $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
3518
3543
  unless ($k32CreateDir) {
3519
3544
  $self->Warn('Error calling Win32::API::CreateDirectoryW');
3520
3545
  $k32CreateDir = 0;
@@ -4506,6 +4531,7 @@ sub HexDump($;$%)
4506
4531
  # Count => number of values
4507
4532
  # Extra => Extra Verbose=2 information to put after tag number
4508
4533
  # Table => Reference to tag table
4534
+ # Name => Name to use for unknown tag
4509
4535
  # --> plus any of these HexDump() options: Start, Addr, Width
4510
4536
  sub VerboseInfo($$$%)
4511
4537
  {
@@ -4523,6 +4549,9 @@ sub VerboseInfo($$$%)
4523
4549
  # get tag name
4524
4550
  if ($tagInfo and $$tagInfo{Name}) {
4525
4551
  $tag = $$tagInfo{Name};
4552
+ } elsif ($parms{Name}) { # (used for PNG Plus FPX tags)
4553
+ $tag = $parms{Name};
4554
+ undef $hexID;
4526
4555
  } else {
4527
4556
  my $prefix;
4528
4557
  $prefix = $parms{Table}{TAG_PREFIX} if $parms{Table};
@@ -6228,7 +6257,7 @@ sub WriteJPEG($$)
6228
6257
  last unless $$editDirs{CIFF};
6229
6258
  my $newData = '';
6230
6259
  my %dirInfo = (
6231
- RAF => new File::RandomAccess($segDataPt),
6260
+ RAF => File::RandomAccess->new($segDataPt),
6232
6261
  OutFile => \$newData,
6233
6262
  );
6234
6263
  require Image::ExifTool::CanonRaw;
@@ -6947,7 +6976,7 @@ sub SetFileTime($$;$$$$)
6947
6976
  }
6948
6977
  unless ($k32SetFileTime) {
6949
6978
  return 0 if defined $k32SetFileTime;
6950
- $k32SetFileTime = new Win32::API('KERNEL32', 'SetFileTime', 'NPPP', 'I');
6979
+ $k32SetFileTime = Win32::API->new('KERNEL32', 'SetFileTime', 'NPPP', 'I');
6951
6980
  unless ($k32SetFileTime) {
6952
6981
  $self->Warn('Error calling Win32::API::SetFileTime');
6953
6982
  $k32SetFileTime = 0;
@@ -7191,7 +7220,7 @@ sub WriteBinaryData($$$)
7191
7220
  $$self{HiddenData} = {
7192
7221
  Offset => $offset,
7193
7222
  Size => $size,
7194
- Fixup => new Image::ExifTool::Fixup,
7223
+ Fixup => Image::ExifTool::Fixup->new,
7195
7224
  Base => $$dirInfo{Base},
7196
7225
  };
7197
7226
  next;
@@ -7200,7 +7229,7 @@ sub WriteBinaryData($$$)
7200
7229
  next unless $$tagInfo{DataTag} eq 'PreviewImage' and $$self{FILE_TYPE} eq 'JPEG';
7201
7230
  my $previewInfo = $$self{PREVIEW_INFO};
7202
7231
  $previewInfo or $previewInfo = $$self{PREVIEW_INFO} = {
7203
- Fixup => new Image::ExifTool::Fixup,
7232
+ Fixup => Image::ExifTool::Fixup->new,
7204
7233
  };
7205
7234
  # set flag indicating we are using short pointers
7206
7235
  $$previewInfo{IsShort} = 1 unless $format eq 'int32u';
@@ -7304,7 +7333,7 @@ used routines.
7304
7333
 
7305
7334
  =head1 AUTHOR
7306
7335
 
7307
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
7336
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
7308
7337
 
7309
7338
  This library is free software; you can redistribute it and/or modify it
7310
7339
  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.63';
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',
@@ -3639,6 +3644,7 @@ NoLoop:
3639
3644
  IgnoreProp => $$subdir{IgnoreProp}, # (allow XML to ignore specified properties)
3640
3645
  IsExtended => 1, # (hack to avoid Duplicate warning for embedded XMP)
3641
3646
  NoStruct => 1, # (don't try to build structures since this isn't true XMP)
3647
+ NoBlockSave => 1,# (don't save as a block because we already did this)
3642
3648
  );
3643
3649
  my $oldOrder = GetByteOrder();
3644
3650
  SetByteOrder($$subdir{ByteOrder}) if $$subdir{ByteOrder};
@@ -4158,7 +4164,18 @@ sub ProcessXMP($$;$)
4158
4164
  $dataLen = $$dirInfo{DataLen} || length($$dataPt);
4159
4165
  # check leading BOM (may indicate double-encoded UTF)
4160
4166
  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;
4167
+ 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) {
4168
+ $double = $1
4169
+ } else {
4170
+ # handle UTF-16/32 XML
4171
+ pos($$dataPt) = $dirStart;
4172
+ if ($$dataPt =~ /\G((\0\0)?\xfe\xff|\xff\xfe(\0\0)?|\xef\xbb\xbf)\0*<\0*\?\0*x\0*m\0*l\0* /g) {
4173
+ my $tmp = $1;
4174
+ $fmt = $tmp =~ /\xfe\xff/ ? 'n' : 'v';
4175
+ $fmt = uc($fmt) if $tmp =~ /\0\0/;
4176
+ $isXML = 1;
4177
+ }
4178
+ }
4162
4179
  } else {
4163
4180
  my ($type, $mime, $buf2, $buf3);
4164
4181
  # read information from XMP file
@@ -4516,7 +4533,7 @@ information.
4516
4533
 
4517
4534
  =head1 AUTHOR
4518
4535
 
4519
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
4536
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
4520
4537
 
4521
4538
  This library is free software; you can redistribute it and/or modify it
4522
4539
  under the same terms as Perl itself.
@@ -2191,6 +2191,15 @@ my %sSubVersion = (
2191
2191
  GROUPS => { 0 => 'SVG', 2 => 'Unknown' },
2192
2192
  LANG_INFO => \&GetLangInfo,
2193
2193
  NAMESPACE => undef, # variable namespace
2194
+ 'c2pa:manifest' => {
2195
+ Name => 'JUMBF',
2196
+ Groups => { 0 => 'JUMBF' },
2197
+ RawConv => 'Image::ExifTool::XMP::DecodeBase64($val)',
2198
+ SubDirectory => {
2199
+ TagTable => 'Image::ExifTool::Jpeg2000::Main',
2200
+ ByteOrder => 'BigEndian',
2201
+ },
2202
+ },
2194
2203
  );
2195
2204
 
2196
2205
  #------------------------------------------------------------------------------
@@ -2228,7 +2237,7 @@ This file contains definitions for less common XMP namespaces.
2228
2237
 
2229
2238
  =head1 AUTHOR
2230
2239
 
2231
- Copyright 2003-2023, Phil Harvey (philharvey66 at gmail.com)
2240
+ Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
2232
2241
 
2233
2242
  This library is free software; you can redistribute it and/or modify it
2234
2243
  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.
@@ -20,7 +20,7 @@ use strict;
20
20
  use vars qw($VERSION $warnString);
21
21
  use Image::ExifTool qw(:DataAccess :Utils);
22
22
 
23
- $VERSION = '1.30';
23
+ $VERSION = '1.31';
24
24
 
25
25
  sub WarnProc($) { $warnString = $_[0]; }
26
26
 
@@ -367,7 +367,7 @@ sub ProcessRAR($$)
367
367
  # read the header and create new RAF object for reading it
368
368
  my $header;
369
369
  $raf->Read($header, $headSize) == $headSize or last;
370
- my $rafHdr = new File::RandomAccess(\$header);
370
+ my $rafHdr = File::RandomAccess->new(\$header);
371
371
  my $headType = ReadULEB($rafHdr); # get header type
372
372
 
373
373
  if ($headType == 4) { # encryption block
@@ -550,14 +550,14 @@ sub ProcessZIP($$)
550
550
  } elsif (eval { require IO::String }) {
551
551
  # read the whole file into memory (what else can I do?)
552
552
  $raf->Slurp();
553
- $fh = new IO::String ${$raf->{BUFF_PT}};
553
+ $fh = IO::String->new(${$raf->{BUFF_PT}});
554
554
  } else {
555
555
  my $type = $raf->{FILE_PT} ? 'pipe or socket' : 'scalar reference';
556
556
  $et->Warn("Install IO::String to decode compressed ZIP information from a $type");
557
557
  last;
558
558
  }
559
559
  $et->VPrint(1, " --- using Archive::Zip ---\n");
560
- $zip = new Archive::Zip;
560
+ $zip = Archive::Zip->new;
561
561
  # catch all warnings! (Archive::Zip is bad for this)
562
562
  local $SIG{'__WARN__'} = \&WarnProc;
563
563
  my $status = $zip->readFromFileHandle($fh);
@@ -568,8 +568,8 @@ sub ProcessZIP($$)
568
568
  # a failed test with Perl 5.6.2 GNU/Linux 2.6.32-5-686 i686-linux-64int-ld
569
569
  $raf->Seek(0,0);
570
570
  $raf->Slurp();
571
- $fh = new IO::String ${$raf->{BUFF_PT}};
572
- $zip = new Archive::Zip;
571
+ $fh = IO::String->new(${$raf->{BUFF_PT}});
572
+ $zip = Archive::Zip->new;
573
573
  $status = $zip->readFromFileHandle($fh);
574
574
  }
575
575
  if ($status) {
@@ -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.