exiftool-vendored.exe 12.31.0 → 12.39.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 (196) hide show
  1. package/LICENSE +254 -247
  2. package/bin/exiftool_files/Changes +130 -4
  3. package/bin/exiftool_files/README +45 -45
  4. package/bin/exiftool_files/arg_files/xmp2exif.args +2 -1
  5. package/bin/exiftool_files/exiftool.pl +143 -101
  6. package/bin/exiftool_files/lib/File/RandomAccess.pm +1 -1
  7. package/bin/exiftool_files/lib/File/RandomAccess.pod +2 -2
  8. package/bin/exiftool_files/lib/Image/ExifTool/AES.pm +1 -1
  9. package/bin/exiftool_files/lib/Image/ExifTool/AFCP.pm +1 -1
  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 +1 -1
  19. package/bin/exiftool_files/lib/Image/ExifTool/BigTIFF.pm +1 -1
  20. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +17 -5
  21. package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +331 -0
  22. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +171 -13
  23. package/bin/exiftool_files/lib/Image/ExifTool/CanonCustom.pm +13 -3
  24. package/bin/exiftool_files/lib/Image/ExifTool/CanonRaw.pm +1 -1
  25. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +1 -1
  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 +3 -1
  29. package/bin/exiftool_files/lib/Image/ExifTool/DICOM.pm +1 -1
  30. package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +1 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/DNG.pm +1 -1
  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 +3 -3
  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 +118 -4
  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 +48 -11
  42. package/bin/exiftool_files/lib/Image/ExifTool/Fixup.pm +1 -1
  43. package/bin/exiftool_files/lib/Image/ExifTool/Flash.pm +1 -1
  44. package/bin/exiftool_files/lib/Image/ExifTool/FlashPix.pm +1 -1
  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 +1 -1
  48. package/bin/exiftool_files/lib/Image/ExifTool/GE.pm +1 -1
  49. package/bin/exiftool_files/lib/Image/ExifTool/GIF.pm +6 -2
  50. package/bin/exiftool_files/lib/Image/ExifTool/GIMP.pm +1 -1
  51. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +15 -11
  52. package/bin/exiftool_files/lib/Image/ExifTool/GeoTiff.pm +1 -1
  53. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +14 -3
  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 +1 -1
  59. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +97 -5
  60. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +1 -1
  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/JPEG.pm +6 -2
  67. package/bin/exiftool_files/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  68. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +8 -4
  69. package/bin/exiftool_files/lib/Image/ExifTool/JVC.pm +1 -1
  70. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +155 -25
  71. package/bin/exiftool_files/lib/Image/ExifTool/Kodak.pm +1 -1
  72. package/bin/exiftool_files/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  73. package/bin/exiftool_files/lib/Image/ExifTool/LIF.pm +1 -1
  74. package/bin/exiftool_files/lib/Image/ExifTool/LNK.pm +1 -1
  75. package/bin/exiftool_files/lib/Image/ExifTool/Lang/cs.pm +1 -1
  76. package/bin/exiftool_files/lib/Image/ExifTool/Lang/de.pm +1 -1
  77. package/bin/exiftool_files/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
  78. package/bin/exiftool_files/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
  79. package/bin/exiftool_files/lib/Image/ExifTool/Lang/es.pm +1 -1
  80. package/bin/exiftool_files/lib/Image/ExifTool/Lang/fi.pm +1 -1
  81. package/bin/exiftool_files/lib/Image/ExifTool/Lang/fr.pm +1 -1
  82. package/bin/exiftool_files/lib/Image/ExifTool/Lang/it.pm +1 -1
  83. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ja.pm +1 -1
  84. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ko.pm +1 -1
  85. package/bin/exiftool_files/lib/Image/ExifTool/Lang/nl.pm +1 -1
  86. package/bin/exiftool_files/lib/Image/ExifTool/Lang/pl.pm +1 -1
  87. package/bin/exiftool_files/lib/Image/ExifTool/Lang/ru.pm +1 -1
  88. package/bin/exiftool_files/lib/Image/ExifTool/Lang/sv.pm +1 -1
  89. package/bin/exiftool_files/lib/Image/ExifTool/Lang/tr.pm +1 -1
  90. package/bin/exiftool_files/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  91. package/bin/exiftool_files/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  92. package/bin/exiftool_files/lib/Image/ExifTool/Leaf.pm +1 -1
  93. package/bin/exiftool_files/lib/Image/ExifTool/Lytro.pm +1 -1
  94. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +1 -1
  95. package/bin/exiftool_files/lib/Image/ExifTool/MIE.pm +1 -1
  96. package/bin/exiftool_files/lib/Image/ExifTool/MIEUnits.pod +1 -1
  97. package/bin/exiftool_files/lib/Image/ExifTool/MIFF.pm +1 -1
  98. package/bin/exiftool_files/lib/Image/ExifTool/MNG.pm +1 -1
  99. package/bin/exiftool_files/lib/Image/ExifTool/MOI.pm +1 -1
  100. package/bin/exiftool_files/lib/Image/ExifTool/MPC.pm +1 -1
  101. package/bin/exiftool_files/lib/Image/ExifTool/MPEG.pm +1 -1
  102. package/bin/exiftool_files/lib/Image/ExifTool/MPF.pm +1 -1
  103. package/bin/exiftool_files/lib/Image/ExifTool/MRC.pm +1 -1
  104. package/bin/exiftool_files/lib/Image/ExifTool/MWG.pm +1 -1
  105. package/bin/exiftool_files/lib/Image/ExifTool/MXF.pm +1 -1
  106. package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +3 -3
  107. package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +1 -1
  108. package/bin/exiftool_files/lib/Image/ExifTool/Matroska.pm +9 -5
  109. package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
  110. package/bin/exiftool_files/lib/Image/ExifTool/Minolta.pm +1 -1
  111. package/bin/exiftool_files/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  112. package/bin/exiftool_files/lib/Image/ExifTool/Motorola.pm +1 -1
  113. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +1895 -74
  114. package/bin/exiftool_files/lib/Image/ExifTool/NikonCapture.pm +1 -1
  115. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +523 -6
  116. package/bin/exiftool_files/lib/Image/ExifTool/NikonSettings.pm +150 -87
  117. package/bin/exiftool_files/lib/Image/ExifTool/Nintendo.pm +1 -1
  118. package/bin/exiftool_files/lib/Image/ExifTool/OOXML.pm +1 -1
  119. package/bin/exiftool_files/lib/Image/ExifTool/Ogg.pm +1 -1
  120. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +6 -2
  121. package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +5 -3
  122. package/bin/exiftool_files/lib/Image/ExifTool/Opus.pm +1 -1
  123. package/bin/exiftool_files/lib/Image/ExifTool/Other.pm +1 -1
  124. package/bin/exiftool_files/lib/Image/ExifTool/PCX.pm +1 -1
  125. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +6 -4
  126. package/bin/exiftool_files/lib/Image/ExifTool/PGF.pm +1 -1
  127. package/bin/exiftool_files/lib/Image/ExifTool/PICT.pm +1 -1
  128. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +1 -1
  129. package/bin/exiftool_files/lib/Image/ExifTool/PLUS.pm +1 -1
  130. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +29 -8
  131. package/bin/exiftool_files/lib/Image/ExifTool/PPM.pm +1 -1
  132. package/bin/exiftool_files/lib/Image/ExifTool/PSP.pm +1 -1
  133. package/bin/exiftool_files/lib/Image/ExifTool/Palm.pm +1 -1
  134. package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +3 -3
  135. package/bin/exiftool_files/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
  136. package/bin/exiftool_files/lib/Image/ExifTool/Parrot.pm +1 -1
  137. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +4 -2
  138. package/bin/exiftool_files/lib/Image/ExifTool/PhaseOne.pm +1 -1
  139. package/bin/exiftool_files/lib/Image/ExifTool/PhotoCD.pm +1 -1
  140. package/bin/exiftool_files/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  141. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +1 -1
  142. package/bin/exiftool_files/lib/Image/ExifTool/PostScript.pm +1 -1
  143. package/bin/exiftool_files/lib/Image/ExifTool/PrintIM.pm +1 -1
  144. package/bin/exiftool_files/lib/Image/ExifTool/Qualcomm.pm +1 -1
  145. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +25 -4
  146. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +125 -81
  147. package/bin/exiftool_files/lib/Image/ExifTool/README +9 -2
  148. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +1 -1
  149. package/bin/exiftool_files/lib/Image/ExifTool/RSRC.pm +1 -1
  150. package/bin/exiftool_files/lib/Image/ExifTool/RTF.pm +1 -1
  151. package/bin/exiftool_files/lib/Image/ExifTool/Radiance.pm +1 -1
  152. package/bin/exiftool_files/lib/Image/ExifTool/Rawzor.pm +1 -1
  153. package/bin/exiftool_files/lib/Image/ExifTool/Real.pm +1 -1
  154. package/bin/exiftool_files/lib/Image/ExifTool/Reconyx.pm +1 -1
  155. package/bin/exiftool_files/lib/Image/ExifTool/Red.pm +1 -1
  156. package/bin/exiftool_files/lib/Image/ExifTool/Ricoh.pm +1 -1
  157. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +1 -1
  158. package/bin/exiftool_files/lib/Image/ExifTool/Sanyo.pm +1 -1
  159. package/bin/exiftool_files/lib/Image/ExifTool/Scalado.pm +1 -1
  160. package/bin/exiftool_files/lib/Image/ExifTool/Shift.pl +3 -1
  161. package/bin/exiftool_files/lib/Image/ExifTool/Shortcuts.pm +1 -1
  162. package/bin/exiftool_files/lib/Image/ExifTool/Sigma.pm +1 -1
  163. package/bin/exiftool_files/lib/Image/ExifTool/SigmaRaw.pm +1 -1
  164. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +34 -14
  165. package/bin/exiftool_files/lib/Image/ExifTool/SonyIDC.pm +1 -1
  166. package/bin/exiftool_files/lib/Image/ExifTool/Stim.pm +1 -1
  167. package/bin/exiftool_files/lib/Image/ExifTool/TagInfoXML.pm +11 -6
  168. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +6589 -5877
  169. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +1681 -65
  170. package/bin/exiftool_files/lib/Image/ExifTool/Text.pm +1 -1
  171. package/bin/exiftool_files/lib/Image/ExifTool/Theora.pm +1 -1
  172. package/bin/exiftool_files/lib/Image/ExifTool/Torrent.pm +1 -1
  173. package/bin/exiftool_files/lib/Image/ExifTool/Unknown.pm +1 -1
  174. package/bin/exiftool_files/lib/Image/ExifTool/VCard.pm +1 -1
  175. package/bin/exiftool_files/lib/Image/ExifTool/Validate.pm +1 -1
  176. package/bin/exiftool_files/lib/Image/ExifTool/Vorbis.pm +1 -1
  177. package/bin/exiftool_files/lib/Image/ExifTool/WTV.pm +1 -1
  178. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  179. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +1 -1
  180. package/bin/exiftool_files/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  181. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -1
  182. package/bin/exiftool_files/lib/Image/ExifTool/WritePNG.pl +30 -10
  183. package/bin/exiftool_files/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  184. package/bin/exiftool_files/lib/Image/ExifTool/WritePostScript.pl +1 -1
  185. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +12 -1
  186. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +11 -12
  187. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +56 -10
  188. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +164 -52
  189. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +6 -3
  190. package/bin/exiftool_files/lib/Image/ExifTool/XMPStruct.pl +4 -2
  191. package/bin/exiftool_files/lib/Image/ExifTool/ZIP.pm +10 -2
  192. package/bin/exiftool_files/lib/Image/ExifTool/ZISRAW.pm +1 -1
  193. package/bin/exiftool_files/lib/Image/ExifTool/iWork.pm +1 -1
  194. package/bin/exiftool_files/lib/Image/ExifTool.pm +8939 -8864
  195. package/bin/exiftool_files/lib/Image/ExifTool.pod +76 -67
  196. package/package.json +3 -3
@@ -10,15 +10,15 @@
10
10
  use strict;
11
11
  require 5.004;
12
12
 
13
- my $version = '12.31';
13
+ my $version = '12.39';
14
14
 
15
15
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
16
- my $exeDir;
16
+ my $exePath;
17
17
  BEGIN {
18
18
  # (undocumented -xpath option added in 11.91, must come before other options)
19
- $Image::ExifTool::exePath = @ARGV && lc($ARGV[0]) eq '-xpath' && shift() ? $^X : $0;
19
+ $exePath = @ARGV && lc($ARGV[0]) eq '-xpath' && shift() ? $^X : $0;
20
20
  # get exe directory
21
- $exeDir = ($Image::ExifTool::exePath =~ /(.*)[\\\/]/) ? $1 : '.';
21
+ $Image::ExifTool::exeDir = ($exePath =~ /(.*)[\\\/]/) ? $1 : '.';
22
22
  # (no link following for Windows exe version)
23
23
  # add lib directory at start of include path
24
24
  unshift @INC, ($0 =~ /(.*)[\\\/]/) ? "$1/lib" : './lib';
@@ -350,7 +350,7 @@ sub Cleanup() {
350
350
  #
351
351
 
352
352
  # add arguments embedded in filename (Windows .exe version only)
353
- if ($Image::ExifTool::exePath =~ /\(([^\\\/]+)\)(.exe|.pl)?$/i) {
353
+ if ($exePath =~ /\(([^\\\/]+)\)(.exe|.pl)?$/i) {
354
354
  my $argstr = $1;
355
355
  # divide into separate quoted or whitespace-delineated arguments
356
356
  my (@args, $arg, $quote);
@@ -773,7 +773,7 @@ for (;;) {
773
773
  }
774
774
  my $fp = ($stayOpen == 1 ? \*STAYOPEN : \*ARGFILE);
775
775
  unless ($mt->Open($fp, $argFile)) {
776
- unless ($argFile !~ /^\// and $mt->Open($fp, "$exeDir/$argFile")) {
776
+ unless ($argFile !~ /^\// and $mt->Open($fp, "$Image::ExifTool::exeDir/$argFile")) {
777
777
  Error "Error opening arg file $argFile\n";
778
778
  $badCmd = 1;
779
779
  next
@@ -1251,7 +1251,7 @@ for (;;) {
1251
1251
  $textOverwrite += 2 if $t2 =~ /\+/; # append
1252
1252
  if ($t1 ne 'W' and lc($t1) ne 'tagout') {
1253
1253
  undef $tagOut;
1254
- } elsif ($textOverwrite >= 2 and $textOut !~ /%[-+]?\d*[.:]?\d*[lu]?[tgs]/) {
1254
+ } elsif ($textOverwrite >= 2 and $textOut !~ /%[-+]?\d*[.:]?\d*[lu]?[tgso]/) {
1255
1255
  $tagOut = 0; # append tags to one file
1256
1256
  } else {
1257
1257
  $tagOut = 1; # separate file for each tag
@@ -1619,7 +1619,7 @@ if (@newValues) {
1619
1619
  next;
1620
1620
  }
1621
1621
  my %opts = ( Shift => 0 ); # shift values if possible instead of adding/deleting
1622
- # allow writing of 'unsafe' tags unless specified by wildcard
1622
+ # allow writing of 'Unsafe' tags unless specified by wildcard
1623
1623
  $opts{Protected} = 1 unless $tag =~ /[?*]/;
1624
1624
 
1625
1625
  if ($tag =~ s/<// and defined $newVal) {
@@ -1954,10 +1954,20 @@ sub GetImageInfo($$)
1954
1954
  my $pipe = $file;
1955
1955
  if ($doUnzip) {
1956
1956
  # pipe through gzip or bzip2 if necessary
1957
- if ($file =~ /\.gz$/i) {
1958
- $pipe = qq{gzip -dc "$file" |};
1959
- } elsif ($file =~ /\.bz2$/i) {
1960
- $pipe = qq{bzip2 -dc "$file" |};
1957
+ if ($file =~ /\.(gz|bz2)$/i) {
1958
+ my $type = lc $1;
1959
+ if ($file =~ /[^-_.'A-Za-z0-9\/\\]/) {
1960
+ Warn "Error: Insecure zip file name. Skipped\n";
1961
+ EFile($file);
1962
+ ++$countBad;
1963
+ return;
1964
+ }
1965
+ if ($type eq 'gz') {
1966
+ $pipe = qq{gzip -dc "$file" |};
1967
+ } else {
1968
+ $pipe = qq{bzip2 -dc "$file" |};
1969
+ }
1970
+ $$et{TRUST_PIPE} = 1;
1961
1971
  }
1962
1972
  }
1963
1973
  # evaluate -if expression for conditional processing
@@ -2228,12 +2238,13 @@ sub GetImageInfo($$)
2228
2238
  next unless defined $forcePrint;
2229
2239
  $grp0 = $grp1 = 'Unknown';
2230
2240
  }
2241
+ # add groups from structure fields
2242
+ AddGroups($$info{$tag}, $grp0, \%groups, \@groups) if ref $$info{$tag};
2231
2243
  next if $groups{$grp1};
2232
2244
  # include family 0 and 1 groups in URI except for internal tags
2233
2245
  # (this will put internal tags in the "XML" group on readback)
2234
2246
  $groups{$grp1} = $grp0;
2235
2247
  push @groups, $grp1;
2236
- AddGroups($$info{$tag}, $grp0, \%groups, \@groups) if ref $$info{$tag};
2237
2248
  }
2238
2249
  foreach $grp1 (@groups) {
2239
2250
  my $grp = $groups{$grp1};
@@ -2276,7 +2287,7 @@ TAG: foreach $tag (@foundTags) {
2276
2287
  # avoid extracting Protected binary tags (eg. data blocks) [insider information]
2277
2288
  my $lcTag = lc $tag;
2278
2289
  $lcTag =~ s/ .*//;
2279
- next unless $$et{REQ_TAG_LOOKUP}{$lcTag};
2290
+ next unless $$et{REQ_TAG_LOOKUP}{$lcTag} or ($$et{OPTIONS}{RequestAll} || 0) > 2;
2280
2291
  }
2281
2292
  $val = ConvertBinary($val); # convert SCALAR references
2282
2293
  next unless defined $val;
@@ -2356,7 +2367,8 @@ TAG: foreach $tag (@foundTags) {
2356
2367
  }
2357
2368
  my @groups = $et->GetGroup($tag);
2358
2369
  $outfile and close($fp), undef($tmpText); # (shouldn't happen)
2359
- ($fp, $outfile, $append) = OpenOutputFile($orig, $tagName, \@groups, $ext);
2370
+ my $org = $et->GetValue('OriginalRawFileName') || $et->GetValue('OriginalFileName');
2371
+ ($fp, $outfile, $append) = OpenOutputFile($orig, $tagName, \@groups, $ext, $org);
2360
2372
  $fp or ++$countBad, next TAG;
2361
2373
  $tmpText = $outfile unless $append;
2362
2374
  }
@@ -3052,12 +3064,14 @@ sub SetImageInfo($$$)
3052
3064
  # temporarily disable CTRL-C during this critical operation
3053
3065
  $critical = 1;
3054
3066
  undef $tmpFile; # handle deletion of temporary file ourself
3055
- if ($et->Open(\*ORIG_FILE, $file, '>')) {
3067
+ if ($et->Open(\*ORIG_FILE, $file, '+<')) {
3056
3068
  binmode(ORIG_FILE);
3057
3069
  while (read(NEW_FILE, $buff, 65536)) {
3058
3070
  print ORIG_FILE $buff or $err = 1;
3059
3071
  }
3060
3072
  close(NEW_FILE);
3073
+ # Handle files being shorter than the original
3074
+ eval { truncate(ORIG_FILE, tell(ORIG_FILE)) } or $err = 1;
3061
3075
  close(ORIG_FILE) or $err = 1;
3062
3076
  if ($err) {
3063
3077
  Warn "Couldn't overwrite in place - $file\n";
@@ -3241,7 +3255,8 @@ sub FormatXML($$$)
3241
3255
  } elsif (ref $val eq 'HASH') {
3242
3256
  $gt = " rdf:parseType='Resource'>";
3243
3257
  my $val2 = '';
3244
- foreach (sort keys %$val) {
3258
+ my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
3259
+ foreach (@keys) {
3245
3260
  # (some variable-namespace XML structure fields may have a different group)
3246
3261
  my $tok = /:/ ? $_ : ($grp . ':' . $_);
3247
3262
  $val2 .= "\n$ind <$tok" . FormatXML($$val{$_}, "$ind ", $grp) . "</$tok>";
@@ -3318,7 +3333,8 @@ sub FormatJSON($$$)
3318
3333
  } elsif (ref $val eq 'HASH') {
3319
3334
  my ($bra, $ket, $sep) = $json == 1 ? ('{','}',':') : ('Array(',')',' =>');
3320
3335
  print $fp $bra;
3321
- foreach (sort keys %$val) {
3336
+ my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
3337
+ foreach (@keys) {
3322
3338
  print $fp ',' if $comma;
3323
3339
  my $key = EscapeJSON($_, 1);
3324
3340
  print $fp qq(\n$ind $key$sep );
@@ -3451,18 +3467,26 @@ sub ConvertBinary($)
3451
3467
  }
3452
3468
 
3453
3469
  #------------------------------------------------------------------------------
3454
- # Compare two tag values to see if they are equal
3470
+ # Compare ValueConv and PrintConv values of a tag to see if they are equal
3455
3471
  # Inputs: 0) value1, 1) value2
3456
3472
  # Returns: true if they are equal
3457
3473
  sub IsEqual($$)
3458
3474
  {
3459
- return 1 if ref $_[0] eq 'SCALAR' or $_[0] eq $_[1];
3460
- return 0 if ref $_[0] ne 'ARRAY' or ref $_[1] ne 'ARRAY' or
3461
- @{$_[0]} ne @{$_[1]};
3462
- # test all elements of an array
3463
- my $i = 0;
3464
- for ($i=0; $i<scalar(@{$_[0]}); ++$i) {
3465
- return 0 if $_[0][$i] ne $_[1][$i];
3475
+ my ($a, $b) = @_;
3476
+ # (scalar values are not print-converted)
3477
+ return 1 if $a eq $b or ref $a eq 'SCALAR';
3478
+ if (ref $a eq 'HASH' and ref $b eq 'HASH') {
3479
+ return 0 if scalar(keys %$a) != scalar(keys %$b);
3480
+ my $key;
3481
+ foreach $key (keys %$a) {
3482
+ return 0 unless IsEqual($$a{$key}, $$b{$key});
3483
+ }
3484
+ } else {
3485
+ return 0 if ref $a ne 'ARRAY' or ref $b ne 'ARRAY' or @$a != @$b;
3486
+ my $i;
3487
+ for ($i=0; $i<scalar(@$a); ++$i) {
3488
+ return 0 unless IsEqual($$a[$i], $$b[$i]);
3489
+ }
3466
3490
  }
3467
3491
  return 1;
3468
3492
  }
@@ -3790,7 +3814,7 @@ sub FindFileWindows($$)
3790
3814
  my $enc = $et->Options('CharsetFileName');
3791
3815
  $wildfile = $et->Decode($wildfile, $enc, undef, 'UTF8') if $enc and $enc ne 'UTF8';
3792
3816
  $wildfile =~ tr/\\/\//; # use forward slashes
3793
- my ($dir, $wildname) = ($wildfile =~ m{(.*/)(.*)}) ? ($1, $2) : ('', $wildfile);
3817
+ my ($dir, $wildname) = ($wildfile =~ m{(.*[:/])(.*)}) ? ($1, $2) : ('', $wildfile);
3794
3818
  if ($dir =~ /[*?]/) {
3795
3819
  Warn "Wildcards don't work in the directory specification\n";
3796
3820
  return ();
@@ -3930,7 +3954,7 @@ sub SuggestedExtension($$$)
3930
3954
  $ext = 'xml';
3931
3955
  } elsif ($$valPt =~ /^RIFF....WAVE/s) {
3932
3956
  $ext = 'wav';
3933
- } elsif ($tag eq 'OriginalRawFileData' and defined($ext = $et->GetValue('OriginalRawFileName'))) {
3957
+ } elsif ($tag eq 'OriginalRawImage' and defined($ext = $et->GetValue('OriginalRawFileName'))) {
3934
3958
  $ext =~ s/^.*\.//s;
3935
3959
  $ext = $ext ? lc($ext) : 'raw';
3936
3960
  } elsif ($tag eq 'EXIF') {
@@ -3982,14 +4006,15 @@ sub LoadPrintFormat($)
3982
4006
  # A sort of sprintf for filenames
3983
4007
  # Inputs: 0) format string (%d=dir, %f=file name, %e=ext),
3984
4008
  # 1) source filename or undef to test format string
3985
- # 2-4) [%t %g %s only] tag name, ref to array of group names, suggested extension
4009
+ # 2-4) [%t %g %s %o only] tag name, ref to array of group names,
4010
+ # suggested extension, original raw file name
3986
4011
  # Returns: new filename or undef on error (or if no file and fmt contains token)
3987
4012
  sub FilenameSPrintf($;$@)
3988
4013
  {
3989
4014
  my ($fmt, $file, @extra) = @_;
3990
4015
  local $_;
3991
4016
  # return format string straight away if no tokens
3992
- return $fmt unless $fmt =~ /%[-+]?\d*[.:]?\d*[lu]?[dDfFeEtgs]/;
4017
+ return $fmt unless $fmt =~ /%[-+]?\d*[.:]?\d*[lu]?[dDfFeEtgso]/;
3993
4018
  return undef unless defined $file;
3994
4019
  CleanFilename($file); # make sure we are using forward slashes
3995
4020
  # split filename into directory, file, extension
@@ -4003,9 +4028,9 @@ sub FilenameSPrintf($;$@)
4003
4028
  }
4004
4029
  $part{F} = $part{f} . $part{E};
4005
4030
  ($part{D} = $part{d}) =~ s{/+$}{};
4006
- @part{qw(t g s)} = @extra;
4031
+ @part{qw(t g s o)} = @extra;
4007
4032
  my ($filename, $pos) = ('', 0);
4008
- while ($fmt =~ /(%([-+]?)(\d*)([.:]?)(\d*)([lu]?)([dDfFeEtgs]))/g) {
4033
+ while ($fmt =~ /(%([-+]?)(\d*)([.:]?)(\d*)([lu]?)([dDfFeEtgso]))/g) {
4009
4034
  $filename .= substr($fmt, $pos, pos($fmt) - $pos - length($1));
4010
4035
  $pos = pos($fmt);
4011
4036
  my ($sign, $wid, $dot, $skip, $mod, $code) = ($2, $3, $4, $5 || 0, $6, $7);
@@ -4168,7 +4193,7 @@ sub OpenOutputFile($;@)
4168
4193
  if ($textOut) {
4169
4194
  $outfile = $file;
4170
4195
  CleanFilename($outfile);
4171
- if ($textOut =~ /%[-+]?\d*[.:]?\d*[lun]?[dDfFeEtgscC]/ or defined $tagOut) {
4196
+ if ($textOut =~ /%[-+]?\d*[.:]?\d*[lun]?[dDfFeEtgsocC]/ or defined $tagOut) {
4172
4197
  # make filename from printf-like $textOut
4173
4198
  $outfile = FilenameSPrintf($textOut, $file, @args);
4174
4199
  return () unless defined $outfile;
@@ -4444,7 +4469,7 @@ SYNOPSIS
4444
4469
  exiftool [*OPTIONS*] -*TAG*[+-<]=[*VALUE*]... *FILE*...
4445
4470
 
4446
4471
  Copying
4447
- exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-*SRCTAG*[>*DSTTAG*]...]
4472
+ exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-[*DSTTAG*<]*SRCTAG*...]
4448
4473
  *FILE*...
4449
4474
 
4450
4475
  Other
@@ -4483,48 +4508,48 @@ DESCRIPTION
4483
4508
 
4484
4509
  File Types
4485
4510
  ------------+-------------+-------------+-------------+------------
4486
- 360 r/w | DR4 r/w/c | JNG r/w | ODP r | RIFF r
4487
- 3FR r | DSS r | JP2 r/w | ODS r | RSRC r
4488
- 3G2 r/w | DV r | JPEG r/w | ODT r | RTF r
4489
- 3GP r/w | DVB r/w | JSON r | OFR r | RW2 r/w
4490
- A r | DVR-MS r | JXL r | OGG r | RWL r/w
4491
- AA r | DYLIB r | K25 r | OGV r | RWZ r
4492
- AAE r | EIP r | KDC r | ONP r | RM r
4493
- AAX r/w | EPS r/w | KEY r | OPUS r | SEQ r
4494
- ACR r | EPUB r | LA r | ORF r/w | SKETCH r
4495
- AFM r | ERF r/w | LFP r | ORI r/w | SO r
4496
- AI r/w | EXE r | LIF r | OTF r | SR2 r/w
4497
- AIFF r | EXIF r/w/c | LNK r | PAC r | SRF r
4498
- APE r | EXR r | LRV r/w | PAGES r | SRW r/w
4499
- ARQ r/w | EXV r/w/c | M2TS r | PBM r/w | SVG r
4500
- ARW r/w | F4A/V r/w | M4A/V r/w | PCD r | SWF r
4501
- ASF r | FFF r/w | MACOS r | PCX r | THM r/w
4502
- AVI r | FITS r | MAX r | PDB r | TIFF r/w
4503
- AVIF r/w | FLA r | MEF r/w | PDF r/w | TORRENT r
4504
- AZW r | FLAC r | MIE r/w/ | PEF r/w | TTC r
4505
- BMP r | FLIF r/w | MIFF r c | PFA r | TTF r
4506
- BPG r | FLV r | MKA r | PFB r | TXT r
4507
- BTF r | FPF r | MKS r | PFM r | VCF r
4508
- CHM r | FPX r | MKV r | PGF r | VRD r/w/c
4509
- COS r | GIF r/w | MNG r/w | PGM r/w | VSD r
4510
- CR2 r/w | GPR r/w | MOBI r | PLIST r | WAV r
4511
- CR3 r/w | GZ r | MODD r | PICT r | WDP r/w
4512
- CRM r/w | HDP r/w | MOI r | PMP r | WEBP r
4513
- CRW r/w | HDR r | MOS r/w | PNG r/w | WEBM r
4514
- CS1 r/w | HEIC r/w | MOV r/w | PPM r/w | WMA r
4515
- CSV r | HEIF r/w | MP3 r | PPT r | WMV r
4516
- CZI r | HTML r | MP4 r/w | PPTX r | WTV r
4517
- DCM r | ICC r/w/c | MPC r | PS r/w | WV r
4518
- DCP r/w | ICS r | MPG r | PSB r/w | X3F r/w
4519
- DCR r | IDML r | MPO r/w | PSD r/w | XCF r
4520
- DFONT r | IIQ r/w | MQV r/w | PSP r | XLS r
4521
- DIVX r | IND r/w | MRC r | QTIF r/w | XLSX r
4522
- DJVU r | INSP r/w | MRW r/w | R3D r | XMP r/w/c
4523
- DLL r | INSV r | MXF r | RA r | ZIP r
4524
- DNG r/w | INX r | NEF r/w | RAF r/w |
4525
- DOC r | ISO r | NRW r/w | RAM r |
4526
- DOCX r | ITC r | NUMBERS r | RAR r |
4527
- DPX r | J2C r | O r | RAW r/w |
4511
+ 360 r/w | DR4 r/w/c | JNG r/w | O r | RAW r/w
4512
+ 3FR r | DSS r | JP2 r/w | ODP r | RIFF r
4513
+ 3G2 r/w | DV r | JPEG r/w | ODS r | RSRC r
4514
+ 3GP r/w | DVB r/w | JSON r | ODT r | RTF r
4515
+ A r | DVR-MS r | JXL r | OFR r | RW2 r/w
4516
+ AA r | DYLIB r | K25 r | OGG r | RWL r/w
4517
+ AAE r | EIP r | KDC r | OGV r | RWZ r
4518
+ AAX r/w | EPS r/w | KEY r | ONP r | RM r
4519
+ ACR r | EPUB r | LA r | OPUS r | SEQ r
4520
+ AFM r | ERF r/w | LFP r | ORF r/w | SKETCH r
4521
+ AI r/w | EXE r | LIF r | ORI r/w | SO r
4522
+ AIFF r | EXIF r/w/c | LNK r | OTF r | SR2 r/w
4523
+ APE r | EXR r | LRV r/w | PAC r | SRF r
4524
+ ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SRW r/w
4525
+ ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | SVG r
4526
+ ASF r | FFF r/w | MACOS r | PCD r | SWF r
4527
+ AVI r | FITS r | MAX r | PCX r | THM r/w
4528
+ AVIF r/w | FLA r | MEF r/w | PDB r | TIFF r/w
4529
+ AZW r | FLAC r | MIE r/w/ | PDF r/w | TORRENT r
4530
+ BMP r | FLIF r/w | MIFF r c | PEF r/w | TTC r
4531
+ BPG r | FLV r | MKA r | PFA r | TTF r
4532
+ BTF r | FPF r | MKS r | PFB r | TXT r
4533
+ CHM r | FPX r | MKV r | PFM r | VCF r
4534
+ COS r | GIF r/w | MNG r/w | PGF r | VRD r/w/c
4535
+ CR2 r/w | GPR r/w | MOBI r | PGM r/w | VSD r
4536
+ CR3 r/w | GZ r | MODD r | PLIST r | WAV r
4537
+ CRM r/w | HDP r/w | MOI r | PICT r | WDP r/w
4538
+ CRW r/w | HDR r | MOS r/w | PMP r | WEBP r
4539
+ CS1 r/w | HEIC r/w | MOV r/w | PNG r/w | WEBM r
4540
+ CSV r | HEIF r/w | MP3 r | PPM r/w | WMA r
4541
+ CZI r | HTML r | MP4 r/w | PPT r | WMV r
4542
+ DCM r | ICC r/w/c | MPC r | PPTX r | WTV r
4543
+ DCP r/w | ICS r | MPG r | PS r/w | WV r
4544
+ DCR r | IDML r | MPO r/w | PSB r/w | X3F r/w
4545
+ DFONT r | IIQ r/w | MQV r/w | PSD r/w | XCF r
4546
+ DIVX r | IND r/w | MRC r | PSP r | XLS r
4547
+ DJVU r | INSP r/w | MRW r/w | QTIF r/w | XLSX r
4548
+ DLL r | INSV r | MXF r | R3D r | XMP r/w/c
4549
+ DNG r/w | INX r | NEF r/w | RA r | ZIP r
4550
+ DOC r | ISO r | NKSC r/w | RAF r/w |
4551
+ DOCX r | ITC r | NRW r/w | RAM r |
4552
+ DPX r | J2C r | NUMBERS r | RAR r |
4528
4553
 
4529
4554
  Meta Information
4530
4555
  ----------------------+----------------------+---------------------
@@ -4713,6 +4738,15 @@ OPTIONS
4713
4738
  4 below). Instead, individual tags may be recovered using the
4714
4739
  -tagsFromFile option (eg. "-all= -tagsfromfile @ -artist").
4715
4740
 
4741
+ To speed processing when reading XMP, exclusions in XMP groups also
4742
+ bypass processing of the corresponding XMP property and any
4743
+ contained properties. For example, "--xmp-crs:all" may speed
4744
+ processing significantly in cases where a large number of XMP-crs
4745
+ tags exist. To use this feature to bypass processing of a specific
4746
+ XMP property, the property name must be used instead of the
4747
+ ExifTool tag name (eg. "--xmp-crs:dabs"). Also, "XMP-all" may be
4748
+ used to to indicate any XMP namespace (eg. <C--xmp-all:dabs>).
4749
+
4716
4750
  -*TAG*[+-^]=[*VALUE*]
4717
4751
  Write a new value for the specified tag (eg. "-comment=wow"), or
4718
4752
  delete the tag if no *VALUE* is given (eg. "-comment="). "+=" and
@@ -4723,18 +4757,20 @@ OPTIONS
4723
4757
  may be used to conditionally delete or replace a tag (see "WRITING
4724
4758
  EXAMPLES" for examples). "^=" is used to write an empty string
4725
4759
  instead of deleting the tag when no *VALUE* is given, but otherwise
4726
- it is equivalent to "=".
4760
+ it is equivalent to "=", but note that the caret must be quoted on
4761
+ the Windows command line.
4727
4762
 
4728
4763
  *TAG* may contain one or more leading family 0, 1, 2 or 7 group
4729
4764
  names, prefixed by optional family numbers, and separated colons.
4730
4765
  If no group name is specified, the tag is created in the preferred
4731
4766
  group, and updated in any other location where a same-named tag
4732
- already exists. The preferred group is the first group in the
4733
- following list where *TAG* is valid: 1) EXIF, 2) IPTC, 3) XMP.
4767
+ already exists. The preferred group in JPEG and TIFF-format images
4768
+ is the first group in the following list where *TAG* is valid: 1)
4769
+ EXIF, 2) IPTC, 3) XMP.
4734
4770
 
4735
4771
  The wildcards "*" and "?" may be used in tag names to assign the
4736
4772
  same value to multiple tags. When specified with wildcards,
4737
- "unsafe" tags are not written. A tag name of "All" is equivalent to
4773
+ "Unsafe" tags are not written. A tag name of "All" is equivalent to
4738
4774
  "*" (except that it doesn't require quoting, while arguments with
4739
4775
  wildcards do on systems with shell globbing), and is often used
4740
4776
  when deleting all metadata (ie. "-All=") or an entire group (eg.
@@ -4889,9 +4925,9 @@ OPTIONS
4889
4925
  Notes:
4890
4926
 
4891
4927
  1) Some tags (generally tags which may affect the appearance of the
4892
- image) are considered "unsafe" to write, and are only copied if
4928
+ image) are considered "Unsafe" to write, and are only copied if
4893
4929
  specified explicitly (ie. no wildcards). See the tag name
4894
- documentation for more details about "unsafe" tags.
4930
+ documentation for more details about "Unsafe" tags.
4895
4931
 
4896
4932
  2) Be aware of the difference between excluding a tag from being
4897
4933
  copied (--*TAG*), and deleting a tag (-*TAG*=). Excluding a tag
@@ -4989,7 +5025,7 @@ OPTIONS
4989
5025
  exiftool -@ out.args -sep ", " dst.jpg
4990
5026
 
4991
5027
  Note: Be careful when copying information with this technique since
4992
- it is easy to write tags which are normally considered "unsafe".
5028
+ it is easy to write tags which are normally considered "Unsafe".
4993
5029
  For instance, the FileName and Directory tags are excluded in the
4994
5030
  example above to avoid renaming and moving the destination file.
4995
5031
  Also note that the second command above will produce warning
@@ -5009,9 +5045,9 @@ OPTIONS
5009
5045
  output. By default, list items are separated by a newline when
5010
5046
  extracted with the -b option, but this may be changed (see the -sep
5011
5047
  option for details). May be combined with -j, -php or -X to extract
5012
- binary data in JSON, PHP or XML format, but note that "unsafe" tags
5013
- must be specified explicitly to be extracted as binary in these
5014
- formats.
5048
+ binary data in JSON, PHP or XML format, but note that "Unsafe" tags
5049
+ are not extracted as binary unless they are specified explicitly or
5050
+ the API RequestAll option is set to 3 or higher.
5015
5051
 
5016
5052
  With a leading double dash (--b or --binary), tags which contain
5017
5053
  binary data are suppressed in the output when reading.
@@ -5178,7 +5214,10 @@ OPTIONS
5178
5214
  "strftime" man page on your system for details. The default format
5179
5215
  is equivalent to "%Y:%m:%d %H:%M:%S". This option has no effect on
5180
5216
  date-only or time-only tags and ignores timezone information if
5181
- present. Only one -d option may be used per command. Requires
5217
+ present. ExifTool adds a %f format code to represent fractional
5218
+ seconds, and supports an optional width to specify the number of
5219
+ digits after the decimal point (eg. %3f would give something like
5220
+ .437). Only one -d option may be used per command. Requires
5182
5221
  POSIX::strptime or Time::Piece for the inversion conversion when
5183
5222
  writing.
5184
5223
 
@@ -5215,7 +5254,7 @@ OPTIONS
5215
5254
  collapsing adjacent identical group names, but this can be avoided
5216
5255
  by placing a colon before the first family number (eg. -g:3:1). Use
5217
5256
  the -listg option to list group names for a specified family. The
5218
- SavePath and SaveFormat API options are automatically enabled if
5257
+ API SavePath and SaveFormat options are automatically enabled if
5219
5258
  the respective family 5 or 6 group names are requested. See the API
5220
5259
  GetGroup documentation for more information.
5221
5260
 
@@ -5407,7 +5446,8 @@ OPTIONS
5407
5446
  beginning with "#" are output for each processed file. Lines
5408
5447
  beginning with "#[IF]" are not output, but all BODY lines are
5409
5448
  skipped if any tag on an IF line doesn't exist. Other lines
5410
- beginning with "#" are ignored. For example, this format file:
5449
+ beginning with "#" are ignored. (To output a line beginning with
5450
+ "#", use "#[BODY]#".) For example, this format file:
5411
5451
 
5412
5452
  # this is a comment line
5413
5453
  #[HEAD]-- Generated by ExifTool $exifToolVersion --
@@ -5421,7 +5461,7 @@ OPTIONS
5421
5461
 
5422
5462
  produces output like this:
5423
5463
 
5424
- -- Generated by ExifTool 12.31 --
5464
+ -- Generated by ExifTool 12.39 --
5425
5465
  File: a.jpg - 2003:10:31 15:44:19
5426
5466
  (f/5.6, 1/60s, ISO 100)
5427
5467
  File: b.jpg - 2006:05:23 11:57:38
@@ -5438,7 +5478,7 @@ OPTIONS
5438
5478
  If a specified tag does not exist, a minor warning is issued and
5439
5479
  the line with the missing tag is not printed. However, the -f
5440
5480
  option may be used to set the value of missing tags to '-' (but
5441
- this may be configured via the MissingTagValue API option), or the
5481
+ this may be configured via the API MissingTagValue option), or the
5442
5482
  -m option may be used to ignore minor warnings and leave the
5443
5483
  missing values empty. Alternatively, -q -q may be used to simply
5444
5484
  suppress the warning messages.
@@ -5678,13 +5718,15 @@ OPTIONS
5678
5718
 
5679
5719
  1) With -W, a new output file is created for each extracted tag.
5680
5720
 
5681
- 2) -W supports three additional format codes: %t, %g and %s
5721
+ 2) -W supports four additional format codes: %t, %g and %s
5682
5722
  represent the tag name, group name, and suggested extension for the
5683
- output file (based on the format of the data). The %g code may be
5684
- followed by a single digit to specify the group family number (eg.
5685
- %g1), otherwise family 0 is assumed. The substring
5686
- width/position/case specifiers may be used with these format codes
5687
- in exactly the same way as with %f and %e.
5723
+ output file (based on the format of the data), and %o represents
5724
+ the value of the OriginalRawFileName or OriginalFileName tag from
5725
+ the input file (including extension). The %g code may be followed
5726
+ by a single digit to specify the group family number (eg. %g1),
5727
+ otherwise family 0 is assumed. The substring width/position/case
5728
+ specifiers may be used with these format codes in exactly the same
5729
+ way as with %f and %e.
5688
5730
 
5689
5731
  3) The argument for -W is interpreted as a file name if it contains
5690
5732
  no format codes. (For -w, this would be a file extension.) This
@@ -5706,7 +5748,7 @@ OPTIONS
5706
5748
  file names to the console instead of giving a verbose dump of the
5707
5749
  entire file. (Unless appending all output to one file for each
5708
5750
  source file by using -W+ with an output file *FMT* that does not
5709
- contain %t, $g or %s.)
5751
+ contain %t, %g, %s or %o.)
5710
5752
 
5711
5753
  5) Individual list items are stored in separate files when -W is
5712
5754
  combined with -b, but note that for separate files to be created %c
@@ -7102,7 +7144,7 @@ EXIT STATUS
7102
7144
  the commands if -execute was used).
7103
7145
 
7104
7146
  AUTHOR
7105
- Copyright 2003-2021, Phil Harvey
7147
+ Copyright 2003-2022, Phil Harvey
7106
7148
 
7107
7149
  This is free software; you can redistribute it and/or modify it under
7108
7150
  the same terms as Perl itself.
@@ -7115,9 +7157,9 @@ __HELP__
7115
7157
 
7116
7158
  my $dir = $ENV{PAR_GLOBAL_TEMP} || $ENV{PAR_TEMP} || $ENV{TMP} || $ENV{TEMP} || '/tmp';
7117
7159
  my $docFile = "$dir/exiftool_${version}_doc.txt";
7160
+ # try backslashes first if it seems we may be running in cmd.exe
7161
+ $docFile =~ tr/\//\\/ if $ENV{ComSpec} or $docFile =~ /\\/;
7118
7162
  unless (-e $docFile) {
7119
- # try backslashes first if it seems we may be running in cmd.exe
7120
- $docFile =~ tr/\//\\/ if $ENV{ComSpec} or $docFile =~ /\\/;
7121
7163
  unless (open(TEMP, ">$docFile") or
7122
7164
  ($docFile =~ tr/\/\\/\\\// and open(TEMP, ">$docFile")) or # try forward slash
7123
7165
  (CreateDirectory($docFile) and open(TEMP, ">$docFile"))) # try creating dir
@@ -25,7 +25,7 @@
25
25
  #
26
26
  # May also be used for string i/o (just pass a scalar reference)
27
27
  #
28
- # Legal: Copyright (c) 2003-2021 Phil Harvey (philharvey66 at gmail.com)
28
+ # Legal: Copyright (c) 2003-2022 Phil Harvey (philharvey66 at gmail.com)
29
29
  # This library is free software; you can redistribute it and/or
30
30
  # modify it under the same terms as Perl itself.
31
31
  #------------------------------------------------------------------------------
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Description: Buffer to support random access reading of sequential file
5
5
  #
6
- # Legal: Copyright (c) 2003-2021 Phil Harvey (philharvey66 at gmail.com)
6
+ # Legal: Copyright (c) 2003-2022 Phil Harvey (philharvey66 at gmail.com)
7
7
  # This library is free software; you can redistribute it and/or
8
8
  # modify it under the same terms as Perl itself.
9
9
  #------------------------------------------------------------------------------
@@ -236,7 +236,7 @@ the end of file is not allowed.
236
236
 
237
237
  =head1 AUTHOR
238
238
 
239
- Copyright 2003-2021 Phil Harvey (philharvey66 at gmail.com)
239
+ Copyright 2003-2022 Phil Harvey (philharvey66 at gmail.com)
240
240
 
241
241
  This library is free software; you can redistribute it and/or modify it
242
242
  under the same terms as Perl itself.
@@ -477,7 +477,7 @@ main purpose of encryption, so this really can't be considered a bug.
477
477
 
478
478
  =head1 AUTHOR
479
479
 
480
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
480
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
481
481
 
482
482
  This library is free software; you can redistribute it and/or modify it
483
483
  under the same terms as Perl itself.
@@ -259,7 +259,7 @@ scanning for AFCP information.
259
259
 
260
260
  =head1 AUTHOR
261
261
 
262
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
262
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
263
263
 
264
264
  This library is free software; you can redistribute it and/or modify it
265
265
  under the same terms as Perl itself.
@@ -287,7 +287,7 @@ information from AIFF (Audio Interchange File Format) audio files.
287
287
 
288
288
  =head1 AUTHOR
289
289
 
290
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
290
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
291
291
 
292
292
  This library is free software; you can redistribute it and/or modify it
293
293
  under the same terms as Perl itself.
@@ -263,7 +263,7 @@ Currently doesn't parse MAC header unless it is at the start of the file.
263
263
 
264
264
  =head1 AUTHOR
265
265
 
266
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
266
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
267
267
 
268
268
  This library is free software; you can redistribute it and/or modify it
269
269
  under the same terms as Perl itself.
@@ -305,7 +305,7 @@ APP12 meta information.
305
305
 
306
306
  =head1 AUTHOR
307
307
 
308
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
308
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
309
309
 
310
310
  This library is free software; you can redistribute it and/or modify it
311
311
  under the same terms as Perl itself.
@@ -876,7 +876,7 @@ Windows Media Audio (WMA) and Windows Media Video (WMV) files.
876
876
 
877
877
  =head1 AUTHOR
878
878
 
879
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
879
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
880
880
 
881
881
  This library is free software; you can redistribute it and/or modify it
882
882
  under the same terms as Perl itself.
@@ -149,7 +149,7 @@ Apple maker notes in EXIF information.
149
149
 
150
150
  =head1 AUTHOR
151
151
 
152
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
152
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
153
153
 
154
154
  This library is free software; you can redistribute it and/or modify it
155
155
  under the same terms as Perl itself.
@@ -291,7 +291,7 @@ information from Audible audio books.
291
291
 
292
292
  =head1 AUTHOR
293
293
 
294
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
294
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
295
295
 
296
296
  This library is free software; you can redistribute it and/or modify it
297
297
  under the same terms as Perl itself.
@@ -335,7 +335,7 @@ This module contains definitions required by Image::ExifTool to read BMP
335
335
 
336
336
  =head1 AUTHOR
337
337
 
338
- Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
338
+ Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
339
339
 
340
340
  This library is free software; you can redistribute it and/or modify it
341
341
  under the same terms as Perl itself.