exiftool_vendored 13.19.0 → 13.22.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19b270f0ce5b43c0bc65a0cf0f71fdea7426079ce467cb9e79a42ae9a5909c12
4
- data.tar.gz: d989e4609455211361660c40fdec7c81ac3809d35030fd08ee0406fcf220be1e
3
+ metadata.gz: ad918781e3d8bd85a5482713e9f0007a5c6a49baf150bc89899989a38d2976b4
4
+ data.tar.gz: 6c73a902a729e31ca68eb9cfb10162cc9cb58e4f5530a8383c791bd00f358f93
5
5
  SHA512:
6
- metadata.gz: c4f5c17319320481c245bf7009a86055da882a2374fb4e5c4f59b5ac31b82dba1f094e54adc442759fe3758ceeeab2e1d8f75b73efbdff57e1214ef871b8d12e
7
- data.tar.gz: c657963e15956834d70bde5bf04c64446e1361a5e170eaef59a1d42b54acaeef54428654dd96c2d18ffef7548752fcd757e345d6a130076684f70ec1095eb033
6
+ metadata.gz: 7140b651487bbf72d3977a7af1dff81162a4e11de366121a9fcfffd6ef767df7c91e5e84c4f184ee2f0691fd014f90bdf1ed24bb71262d9b2b10225e3ae59374
7
+ data.tar.gz: 607ce339d770ac81eb2bea3d1cf1a2029c3916bd717ebc300c20807ad7c443218c34ede0769f3329dea40fba4abdd1fedf6e7e18ae367c5fa6901a790f6048fd
data/bin/Changes CHANGED
@@ -7,6 +7,41 @@ RSS feed: https://exiftool.org/rss.xml
7
7
  Note: The most recent production release is Version 13.10. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Mar. 1, 2025 - Version 13.22
11
+
12
+ - Improvements and additions to the new plot feature
13
+ - Decode a few more DJI timed metadata tags
14
+ - Extract GainMapImage from PNG images
15
+ - Reverted WebP FileType change of version 13.20
16
+ - Set $^W in the exiftool application to re-enable global warnings (they have
17
+ been disabled since version 12.92 due to the shebang change)
18
+ - Fixed possible incorrect IFD number in "No size tag" warning
19
+ - Fixed "File is empty" error when using -plot with -w to write the output
20
+ file into the same directory as the input files
21
+
22
+ Feb. 20, 2025 - Version 13.21
23
+
24
+ - Patched issue that could result in runtime warning for some video files
25
+ - Fixed a bug with the new -plot option that could generate a compiler error
26
+
27
+ Feb. 20, 2025 - Version 13.20
28
+
29
+ - Added new -plot option for generating SVG-format plots from tag values
30
+ - Added a new Olympus CameraType
31
+ - Added a new Nikon Z LensID (thanks Warren Hatch)
32
+ - Overhauled decoding of Nikon AF tags (thanks Warren Hatch)
33
+ - Decode timed GPS from yet another model dashcam
34
+ - Decode more information from AAE files
35
+ - Decode more tags from DJI videos
36
+ - Updated Windows launcher (thanks Oliver Betz)
37
+ - Enhanced -w option to be available for use with the -csv output
38
+ - Attempted to patch a problem writing some PDF files
39
+ - Fail if a required module is missing when attempting to write a formatted
40
+ date/time value instead of falling back to write as unformatted
41
+ - Minor change to WebP lossless FileType text
42
+ - API Changes:
43
+ - Added Plot option
44
+
10
45
  Feb. 10, 2025 - Version 13.19
11
46
 
12
47
  - Added read/write support for PDF and XMP-pdfx SourceModified
@@ -14,11 +49,11 @@ Feb. 10, 2025 - Version 13.19
14
49
  - Decode timed GPS from Rexing V1-4k dashcam
15
50
  - Decode more information from AAE files
16
51
  - Made a new icon for the Windows EXE application
17
- - Changed family 3 groups for ICO files so the first icon is in the Doc1
18
- instead of the Main group
19
52
  - Improved handling of ICC_Profile in HEIC images:
20
53
  - Profiles for sub-images are extracted as sub-documents
21
54
  - Allow only the profile of the main image to be written
55
+ - Changed family 3 groups for ICO files so the first icon is in the Doc1
56
+ instead of the Main group
22
57
  - Updated Sony decoding for ILCE-1M2 (thanks Jos Roost)
23
58
 
24
59
  Feb. 3, 2025 - Version 13.18
data/bin/MANIFEST CHANGED
@@ -208,9 +208,16 @@ html/htmldump.html
208
208
  html/idiosyncracies.html
209
209
  html/index.html
210
210
  html/install.html
211
+ html/markers.svg
211
212
  html/metafiles.html
212
213
  html/mistakes.html
213
214
  html/overview.png
215
+ html/plot.html
216
+ html/plot1.svg
217
+ html/plot2.svg
218
+ html/plot3.svg
219
+ html/plot4.svg
220
+ html/plot5.svg
214
221
  html/standards.html
215
222
  html/struct.html
216
223
  html/style.css
@@ -398,6 +405,7 @@ lib/Image/ExifTool/PhaseOne.pm
398
405
  lib/Image/ExifTool/PhotoCD.pm
399
406
  lib/Image/ExifTool/PhotoMechanic.pm
400
407
  lib/Image/ExifTool/Photoshop.pm
408
+ lib/Image/ExifTool/Plot.pm
401
409
  lib/Image/ExifTool/PostScript.pm
402
410
  lib/Image/ExifTool/PrintIM.pm
403
411
  lib/Image/ExifTool/Protobuf.pm
data/bin/META.json CHANGED
@@ -50,5 +50,5 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "13.19"
53
+ "version" : "13.22"
54
54
  }
data/bin/META.yml CHANGED
@@ -31,4 +31,4 @@ recommends:
31
31
  Time::HiRes: '0'
32
32
  requires:
33
33
  perl: '5.004'
34
- version: '13.19'
34
+ version: '13.22'
data/bin/README CHANGED
@@ -109,8 +109,8 @@ your home directory, then you would type the following commands in a
109
109
  terminal window to extract and run ExifTool:
110
110
 
111
111
  cd ~/Desktop
112
- gzip -dc Image-ExifTool-13.19.tar.gz | tar -xf -
113
- cd Image-ExifTool-13.19
112
+ gzip -dc Image-ExifTool-13.22.tar.gz | tar -xf -
113
+ cd Image-ExifTool-13.22
114
114
  ./exiftool t/images/ExifTool.jpg
115
115
 
116
116
  Note: These commands extract meta information from one of the test images.
data/bin/exiftool CHANGED
@@ -11,7 +11,9 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '13.19';
14
+ my $version = '13.22';
15
+
16
+ $^W = 1; # enable global warnings
15
17
 
16
18
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
19
  my $exePath;
@@ -52,7 +54,7 @@ sub EncodeXML($);
52
54
  sub FormatXML($$$);
53
55
  sub EscapeJSON($;$);
54
56
  sub FormatJSON($$$;$);
55
- sub PrintCSV();
57
+ sub PrintCSV(;$);
56
58
  sub AddGroups($$$$);
57
59
  sub ConvertBinary($);
58
60
  sub IsEqual($$);
@@ -189,6 +191,7 @@ my $outFormat; # -1=Canon format, 0=same-line, 1=tag names, 2=values only
189
191
  my $outOpt; # output file or directory name
190
192
  my $overwriteOrig; # flag to overwrite original file (1=overwrite, 2=in place)
191
193
  my $pause; # pause before returning
194
+ my $plot; # flag for plot output format
192
195
  my $preserveTime; # flag to preserve times of updated files (2=preserve FileCreateDate only)
193
196
  my $progress; # flag to calculate total files to process (0=calculate but don't display)
194
197
  my $progressCount; # count of files processed
@@ -216,6 +219,7 @@ my $structOpt; # output structured XMP information (JSON and XML output onl
216
219
  my $tabFormat; # non-zero for tab output format
217
220
  my $tagOut; # flag for separate text output file for each tag
218
221
  my $textOut; # extension for text output file (or undef for no output)
222
+ my $textOut2; # complete file name for single text output file
219
223
  my $textOverwrite; # flag to overwrite existing text output file (2=append, 3=over+append)
220
224
  my $tmpFile; # temporary file to delete on exit
221
225
  my $tmpText; # temporary text file
@@ -459,8 +463,8 @@ undef %filterExt;
459
463
  undef %ignore;
460
464
  undef %outComma;
461
465
  undef %outTrailer;
462
- undef %printFmt;
463
466
  undef %preserveTime;
467
+ undef %printFmt;
464
468
  undef %seqFileDir;
465
469
  undef %setTags;
466
470
  undef %setTagsList;
@@ -1176,6 +1180,7 @@ for (;;) {
1176
1180
  }
1177
1181
  /^overwrite_original$/i and $overwriteOrig = 1, next;
1178
1182
  /^overwrite_original_in_place$/i and $overwriteOrig = 2, next;
1183
+ /^plot$/i and require Image::ExifTool::Plot and $plot = Image::ExifTool::Plot->new, next;
1179
1184
  if (/^p(-?)$/ or /^printformat(-?)$/i) {
1180
1185
  my $fmt = shift;
1181
1186
  if ($pass) {
@@ -1466,15 +1471,10 @@ if (not @files and not $outOpt and not @newValues) {
1466
1471
  # print help
1467
1472
  unless ((@tags and not $outOpt) or @files or @newValues or $geoOnly) {
1468
1473
  if ($doGlob and $doGlob == 2) {
1469
- Warn "No matching files\n";
1470
- $rtnVal = 1;
1471
- next;
1472
- }
1473
- if ($outOpt) {
1474
- Warn "Nothing to write\n";
1475
- $rtnVal = 1;
1474
+ Error "No matching files\n";
1476
1475
  next;
1477
1476
  }
1477
+ $outOpt and Error("Nothing to write\n"), next;
1478
1478
  unless ($helped) {
1479
1479
  # catch warnings if we have problems running perldoc
1480
1480
  local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] };
@@ -1499,38 +1499,34 @@ unless ((@tags and not $outOpt) or @files or @newValues or $geoOnly) {
1499
1499
  if (defined $deleteOrig and (@newValues or @tags)) {
1500
1500
  if (not @newValues) {
1501
1501
  my $verb = $deleteOrig ? 'deleting' : 'restoring from';
1502
- Warn "Can't specify tags when $verb originals\n";
1502
+ Error "Can't specify tags when $verb originals\n";
1503
1503
  } elsif ($deleteOrig) {
1504
- Warn "Can't use -delete_original when writing.\n";
1505
- Warn "Maybe you meant -overwrite_original ?\n";
1504
+ Error "Can't use -delete_original when writing.\n";
1505
+ Error "Maybe you meant -overwrite_original ?\n";
1506
1506
  } else {
1507
- Warn "It makes no sense to use -restore_original when writing\n";
1507
+ Error "It makes no sense to use -restore_original when writing\n";
1508
1508
  }
1509
- $rtnVal = 1;
1510
1509
  next;
1511
1510
  }
1512
1511
 
1513
1512
  if ($overwriteOrig > 1 and $outOpt) {
1514
- Warn "Can't overwrite in place when -o option is used\n";
1515
- $rtnVal = 1;
1513
+ Error "Can't overwrite in place when -o option is used\n";
1516
1514
  next;
1517
1515
  }
1518
1516
 
1519
- if (($tagOut or defined $diff) and ($csv or $json or %printFmt or $tabFormat or $xml or
1517
+ if (($tagOut or defined $diff) and ($csv or $json or %printFmt or $tabFormat or $xml or $plot or
1520
1518
  ($verbose and $html)))
1521
1519
  {
1522
1520
  my $opt = $tagOut ? '-W' : '-diff';
1523
- Warn "Sorry, $opt may not be combined with -csv, -htmlDump, -j, -p, -t or -X\n";
1524
- $rtnVal = 1;
1521
+ Error "Sorry, $opt may not be combined with -csv, -htmlDump, -j, -p, -t or -X\n";
1525
1522
  next;
1526
1523
  }
1527
1524
 
1528
1525
  if ($csv and $csv eq 'CSV' and not $isWriting) {
1529
1526
  $json = 0; # (not compatible)
1530
1527
  if ($textOut) {
1531
- Warn "Sorry, -w may not be combined with -csv\n";
1532
- $rtnVal = 1;
1533
- next;
1528
+ $textOut2 = $textOut;
1529
+ undef $textOut;
1534
1530
  }
1535
1531
  if ($binaryOutput) {
1536
1532
  $binaryOutput = 0;
@@ -1542,6 +1538,32 @@ if ($csv and $csv eq 'CSV' and not $isWriting) {
1542
1538
  }
1543
1539
  require Image::ExifTool::XMP if $setCharset;
1544
1540
  }
1541
+ if ($plot and $textOut) {
1542
+ $textOut2 = $textOut;
1543
+ undef $textOut;
1544
+ }
1545
+ if ($textOut2) {
1546
+ if ($textOverwrite > 1) {
1547
+ Error "Can not append to multi-file output format\n";
1548
+ undef $textOut2;
1549
+ next;
1550
+ }
1551
+ if (not $textOverwrite and $mt->Exists($textOut2, 1)) {
1552
+ Error "Output file $textOut2 already exists\n";
1553
+ undef $textOut2;
1554
+ next;
1555
+ }
1556
+ # make sure we can write the output text file before processing all input files
1557
+ CreateDirectory($textOut2); # create directory if necessary
1558
+ if ($mt->Open(\*OUTFILE, $textOut2, '>')) {
1559
+ close(\*OUTFILE);
1560
+ unlink($textOut2); # (this was just a test)
1561
+ } else {
1562
+ Error("Error creating $textOut2\n");
1563
+ undef $textOut2;
1564
+ next;
1565
+ }
1566
+ }
1545
1567
 
1546
1568
  if ($escapeHTML or $json) {
1547
1569
  # must be UTF8 for HTML conversion and JSON output
@@ -1555,7 +1577,7 @@ if ($escapeHTML or $json) {
1555
1577
  # set sort option
1556
1578
  if ($sortOpt) {
1557
1579
  # (note that -csv sorts alphabetically by default anyway if more than 1 file)
1558
- my $sort = ($outFormat > 0 or $xml or $json or $csv) ? 'Tag' : 'Descr';
1580
+ my $sort = ($outFormat > 0 or $xml or $json or $csv or $plot) ? 'Tag' : 'Descr';
1559
1581
  $mt->Options(Sort => $sort, Sort2 => $sort);
1560
1582
  }
1561
1583
 
@@ -1566,7 +1588,11 @@ if ($mt->Options('Struct') and not $structOpt) {
1566
1588
  }
1567
1589
 
1568
1590
  # set up for RDF/XML, JSON and PHP output formats
1569
- if ($xml) {
1591
+ if ($plot) {
1592
+ undef $joinLists;
1593
+ $mt->Options(List => 1);
1594
+ $plot->Settings($mt->Options('Plot'));
1595
+ } elsif ($xml) {
1570
1596
  require Image::ExifTool::XMP; # for EscapeXML()
1571
1597
  my $charset = $mt->Options('Charset');
1572
1598
  # standard XML encoding names for supported Charset settings
@@ -1638,11 +1664,10 @@ if (Image::ExifTool::IsPC()) {
1638
1664
  unless (@files) {
1639
1665
  unless ($outOpt) {
1640
1666
  if ($doGlob and $doGlob == 2) {
1641
- Warn "No matching files\n";
1667
+ Error "No matching files\n";
1642
1668
  } else {
1643
- Warn "No file specified\n";
1669
+ Error "No file specified\n";
1644
1670
  }
1645
- $rtnVal = 1;
1646
1671
  next;
1647
1672
  }
1648
1673
  push @files, ''; # create file from nothing
@@ -1705,8 +1730,7 @@ if (@newValues) {
1705
1730
  next; # set tags from dynamic file later
1706
1731
  }
1707
1732
  unless ($mt->Exists($newVal) or $newVal eq '-') {
1708
- Warn "File '${newVal}' does not exist for -tagsFromFile option\n";
1709
- $rtnVal = 1;
1733
+ Error "File '${newVal}' does not exist for -tagsFromFile option\n";
1710
1734
  next Command;
1711
1735
  }
1712
1736
  my $setTags = $setTags{$newVal};
@@ -1770,19 +1794,20 @@ if (@newValues) {
1770
1794
  }
1771
1795
  }
1772
1796
  unless ($isWriting or $outOpt or @tags) {
1773
- Warn "Nothing to do.\n";
1774
- $rtnVal = 1;
1797
+ Error "Nothing to do.\n";
1775
1798
  next;
1776
1799
  }
1777
1800
  } elsif (grep /^(\*:)?\*$/, @exclude) {
1778
- Warn "All tags excluded -- nothing to do.\n";
1779
- $rtnVal = 1;
1801
+ Error "All tags excluded -- nothing to do.\n";
1780
1802
  next;
1781
1803
  }
1782
1804
  if ($isWriting) {
1783
1805
  if (defined $diff) {
1784
1806
  Error "Can't use -diff option when writing tags\n";
1785
1807
  next;
1808
+ } elsif ($plot) {
1809
+ Error "Can't use -plot option when writing tags\n";
1810
+ next;
1786
1811
  } elsif (@tags and not $outOpt and not $csv) {
1787
1812
  my ($tg, $s) = @tags > 1 ? ("$tags[0] ...", 's') : ($tags[0], '');
1788
1813
  Warn "Ignored superfluous tag name$s or invalid option$s: -$tg\n";
@@ -1931,9 +1956,6 @@ ProcessFiles($mt);
1931
1956
 
1932
1957
  Error "No file with specified extension\n" if $filtered and not $validFile;
1933
1958
 
1934
- # print CSV information if necessary
1935
- PrintCSV() if $csv and not $isWriting;
1936
-
1937
1959
  # print folder/file trailer if necessary
1938
1960
  if ($textOut) {
1939
1961
  foreach (keys %outTrailer) {
@@ -1949,6 +1971,37 @@ if ($textOut) {
1949
1971
  } else {
1950
1972
  print $sectTrailer if $sectTrailer;
1951
1973
  print $fileTrailer if $fileTrailer and not $fileHeader;
1974
+ # print CSV or SVG output file if necessary
1975
+ my ($fp, $err);
1976
+ if ($textOut2) {
1977
+ if ($mt->Open(\*OUTFILE, $textOut2, '>')) {
1978
+ $fp = \*OUTFILE;
1979
+ } else {
1980
+ Error("Error creating $textOut2\n");
1981
+ $err = 1;
1982
+ }
1983
+ }
1984
+ unless ($err) {
1985
+ PrintCSV($fp) if $csv and not $isWriting;
1986
+ # print SVG plot
1987
+ if ($plot) {
1988
+ $plot->Draw($fp || \*STDOUT);
1989
+ if ($$plot{Error}) {
1990
+ Error("Error: $$plot{Error}\n");
1991
+ $err = 1;
1992
+ } elsif ($$plot{Warn}) {
1993
+ Warn("Warning: $$plot{Warn}\n");
1994
+ }
1995
+ }
1996
+ }
1997
+ if ($fp) {
1998
+ close($fp) or $err = 1;
1999
+ if ($err) {
2000
+ $mt->Unlink($textOut2);
2001
+ } else {
2002
+ $created{$textOut2} = 1;
2003
+ }
2004
+ }
1952
2005
  }
1953
2006
 
1954
2007
  my $totWr = $countGoodWr + $countBadWr + $countSameWr + $countCopyWr +
@@ -1993,7 +2046,7 @@ if (defined $deleteOrig) {
1993
2046
  # print summary
1994
2047
  my $tot = $count + $countBad;
1995
2048
  if ($countDir or $totWr or $countFailed or $tot > 1 or $textOut or %countLink) {
1996
- my $o = (($html or $json or $xml or %printFmt or $csv) and not $textOut) ? \*STDERR : $vout;
2049
+ my $o = (($html or $json or $xml or %printFmt or $csv or $plot) and not $textOut) ? \*STDERR : $vout;
1997
2050
  printf($o "%5d directories scanned\n", $countDir) if $countDir;
1998
2051
  printf($o "%5d directories created\n", $countNewDir) if $countNewDir;
1999
2052
  printf($o "%5d files failed condition\n", $countFailed) if $countFailed;
@@ -2005,7 +2058,7 @@ if (defined $deleteOrig) {
2005
2058
  printf($o "%5d files weren't created due to errors\n", $countBadCr) if $countBadCr;
2006
2059
  printf($o "%5d image files read\n", $count) if ($tot+$countFailed)>1 or ($countDir and not $totWr);
2007
2060
  printf($o "%5d files could not be read\n", $countBad) if $countBad;
2008
- printf($o "%5d output files created\n", scalar(keys %created)) if $textOut;
2061
+ printf($o "%5d output files created\n", scalar(keys %created)) if $textOut or $textOut2;
2009
2062
  printf($o "%5d output files appended\n", scalar(keys %appended)) if %appended;
2010
2063
  printf($o "%5d hard links created\n", $countLink{Hard} || 0) if $countLink{Hard} or $countLink{BadHard};
2011
2064
  printf($o "%5d hard links could not be created\n", $countLink{BadHard}) if $countLink{BadHard};
@@ -2210,7 +2263,7 @@ sub GetImageInfo($$)
2210
2263
 
2211
2264
  my $lineCount = 0;
2212
2265
  my ($fp, $outfile, $append);
2213
- if ($textOut and ($verbose or $et->Options('PrintCSV')) and not ($tagOut or defined $diff)) {
2266
+ if ($textOut and ($verbose or $et->Options('PrintCSV')) and not ($tagOut or defined $diff or $plot)) {
2214
2267
  ($fp, $outfile, $append) = OpenOutputFile($orig);
2215
2268
  $fp or EFile($file), ++$countBad, return;
2216
2269
  # delete file if we exit prematurely (unless appending)
@@ -2250,7 +2303,7 @@ sub GetImageInfo($$)
2250
2303
  }
2251
2304
  # print file/progress message
2252
2305
  my $o;
2253
- unless ($binaryOutput or $textOut or %printFmt or $html > 1 or $csv) {
2306
+ unless ($binaryOutput or $textOut or %printFmt or $html > 1 or $csv or $plot) {
2254
2307
  if ($html) {
2255
2308
  require Image::ExifTool::HTML;
2256
2309
  my $f = Image::ExifTool::HTML::EscapeHTML($file);
@@ -2353,7 +2406,7 @@ sub GetImageInfo($$)
2353
2406
  unless (defined $outfile or $tagOut) {
2354
2407
  ($fp, $outfile, $append) = OpenOutputFile($orig);
2355
2408
  $fp or EFile($file), ++$countBad, return;
2356
- $tmpText = $outfile unless $append;
2409
+ $tmpText = $outfile if defined $outfile and not $append;
2357
2410
  }
2358
2411
 
2359
2412
  # print differences if requested
@@ -2464,9 +2517,8 @@ T2: foreach $t2 (@tags2) {
2464
2517
  $done2{$tag2} = 1 if defined $tag2;
2465
2518
  }
2466
2519
  print $fp "(no metadata differences)\n" unless $wasDiff;
2467
- undef $tmpText;
2468
2520
  if (defined $outfile) {
2469
- ++$created{$outfile};
2521
+ $created{$outfile} = 1;
2470
2522
  close($fp);
2471
2523
  undef $tmpText;
2472
2524
  }
@@ -2541,6 +2593,17 @@ T2: foreach $t2 (@tags2) {
2541
2593
  delete $printFmt{HEAD} unless defined $outfile; # print header only once per output file
2542
2594
  my $errs = $et->GetInfo('Warning', 'Error');
2543
2595
  PrintErrors($et, $errs, $file) and EFile($file);
2596
+ } elsif ($plot) {
2597
+ # add points from this file to the plot
2598
+ my $tagExtra = $$et{TAG_EXTRA};
2599
+ my ($tag, %docNum);
2600
+ foreach $tag (keys %$info) {
2601
+ next unless $$tagExtra{$tag} and $$tagExtra{$tag}{G3};
2602
+ $docNum{$tag} = $1 if $$tagExtra{$tag}{G3} =~ /(\d+)/;
2603
+ }
2604
+ $$plot{DocNum} = \%docNum;
2605
+ $$plot{EE} = 1 if $et->Options('ExtractEmbedded');
2606
+ $plot->AddPoints($info, \@foundTags);
2544
2607
  } elsif (not $disableOutput) {
2545
2608
  my ($tag, $line, %noDups, %csvInfo, $bra, $ket, $sep, $quote);
2546
2609
  if ($fp) {
@@ -3773,8 +3836,10 @@ sub FormatCSV($)
3773
3836
 
3774
3837
  #------------------------------------------------------------------------------
3775
3838
  # Print accumulated CSV information
3776
- sub PrintCSV()
3839
+ # Inputs: 0) file ref
3840
+ sub PrintCSV(;$)
3777
3841
  {
3842
+ my $fp = shift || \*STDOUT;
3778
3843
  my ($file, $lcTag, @tags);
3779
3844
 
3780
3845
  @csvTags or @csvTags = sort keys %csvTags;
@@ -3782,7 +3847,7 @@ sub PrintCSV()
3782
3847
  foreach $lcTag (@csvTags) {
3783
3848
  push @tags, FormatCSV($csvTags{$lcTag}) if $csvTags{$lcTag};
3784
3849
  }
3785
- print join($csvDelim, 'SourceFile', @tags), "\n";
3850
+ print $fp join($csvDelim, 'SourceFile', @tags), "\n";
3786
3851
  my $empty = defined($forcePrint) ? $forcePrint : '';
3787
3852
  foreach $file (@csvFiles) {
3788
3853
  my @vals = (FormatCSV($file)); # start with full file name
@@ -3793,7 +3858,7 @@ sub PrintCSV()
3793
3858
  defined $val or push(@vals,$empty), next;
3794
3859
  push @vals, FormatCSV($val);
3795
3860
  }
3796
- print join($csvDelim, @vals), "\n";
3861
+ print $fp join($csvDelim, @vals), "\n";
3797
3862
  }
3798
3863
  }
3799
3864
 
@@ -4127,9 +4192,8 @@ sub ProcessFiles($;$)
4127
4192
  $filtered = 1;
4128
4193
  Progress($vout, "-------- $file (wrong extension)") if $verbose;
4129
4194
  } else {
4130
- Warn "Error: File not found - $file\n";
4195
+ Error "Error: File not found - $file\n";
4131
4196
  FileNotFound($file);
4132
- $rtnVal = 1;
4133
4197
  }
4134
4198
  } else {
4135
4199
  $validFile = 1;
@@ -5102,6 +5166,7 @@ L<Input-output text formatting|/Input-output text formatting>
5102
5166
  -n (--printConv) No print conversion
5103
5167
  -p[-] STR (-printFormat) Print output in specified format
5104
5168
  -php Export tags as a PHP Array
5169
+ -plot Output tags as SVG plot file
5105
5170
  -s[NUM] (-short) Short output format (-s for tag names)
5106
5171
  -S (-veryShort) Very short output format
5107
5172
  -sep STR (-separator) Set separator string for list items
@@ -5680,14 +5745,16 @@ option may be used to split them back into separate items when importing.
5680
5745
  Special feature: B<-csv>+=I<CSVFILE> may be used to add items to existing
5681
5746
  lists. This affects only list-type tags. Also applies to the B<-j> option.
5682
5747
 
5683
- Note that this option is fundamentally different than all other output
5684
- format options because it requires information from all input files to be
5685
- buffered in memory before the output is written. This may result in
5686
- excessive memory usage when processing a very large number of files with a
5687
- single command. Also, it makes this option incompatible with the B<-w> and
5688
- B<-W> options. When processing a large number of files, it is recommended
5689
- to either use the JSON (B<-j>) or XML (B<-X>) output format, or use B<-p> to
5690
- generate a fixed-column CSV file instead of using the B<-csv> option.
5748
+ Note that this and the B<-plot> options are fundamentally different than all
5749
+ other output format options because they require information from all input
5750
+ files to be buffered in memory before the output is written. This may
5751
+ result in excessive memory usage when processing a very large number of
5752
+ files with a single command. Also, when used with B<-csv>, the B<-w> option
5753
+ changes to specify a complete file name with no filename formatting codes or
5754
+ append mode allowed, and B<-W> may not be used. When processing a large
5755
+ number of files, it is recommended to either use the JSON (B<-j>) or XML
5756
+ (B<-X>) output format, or use B<-p> to generate a fixed-column CSV file
5757
+ instead of using the B<-csv> option.
5691
5758
 
5692
5759
  =item B<-csvDelim> I<STR>
5693
5760
 
@@ -5986,7 +6053,7 @@ with this command:
5986
6053
 
5987
6054
  produces output like this:
5988
6055
 
5989
- -- Generated by ExifTool 13.19 --
6056
+ -- Generated by ExifTool 13.22 --
5990
6057
  File: a.jpg - 2003:10:31 15:44:19
5991
6058
  (f/5.6, 1/60s, ISO 100)
5992
6059
  File: b.jpg - 2006:05:23 11:57:38
@@ -6035,6 +6102,21 @@ showing how this could be used in a PHP script:
6035
6102
  print_r($array);
6036
6103
  ?>
6037
6104
 
6105
+ =item B<-plot>
6106
+
6107
+ Write output for all specified tags and all input files as a single
6108
+ SVG-formatted plot. When combined with this feature, the B<-w> option
6109
+ argument is a complete file name with no format codes and the append feature
6110
+ may not be used. Each tag specified on the command line represents a
6111
+ dataset in the plot (or more for array values or if the Split plot setting
6112
+ is used). Non-numerical values are ignored. Each input file may contribute
6113
+ multiple points to a dataset if it contains sub-documents and the B<-ee>
6114
+ option is used, or if the tag value is a delimited string of numbers (valid
6115
+ delimiters are: space, comma, semicolon, tab and newline). Line, Scatter
6116
+ and Histogram plot types are available. See the API Plot Option and
6117
+ L<https://exiftool.org/plot.html> for more details and information about the
6118
+ plot settings.
6119
+
6038
6120
  =item B<-s>[I<NUM>] (B<-short>)
6039
6121
 
6040
6122
  Short output format. Prints tag names instead of descriptions. Add I<NUM>
@@ -6172,6 +6254,10 @@ ways to create a single output file from multiple source files:
6172
6254
  # 3. With the -W option (see the -W option below)
6173
6255
  exiftool -W+! out.txt FILE1 FILE2 ...
6174
6256
 
6257
+ 3) The B<-w> option changes when used with a multi-file output format
6258
+ (B<-csv> or B<-plot>). With these, the argument of B<-w> is a complete file
6259
+ name with no formatting codes, and the append feature may not be used.
6260
+
6175
6261
  Advanced features:
6176
6262
 
6177
6263
  A substring of the original file name, directory or extension may be taken
@@ -6460,13 +6546,13 @@ across directory boundaries if multiple input directories are specified.
6460
6546
  =item B<-i> I<DIR> (B<-ignore>)
6461
6547
 
6462
6548
  Ignore specified directory name. I<DIR> may be either an individual folder
6463
- name, or a full path. If a full path is specified, it must match the
6464
- Directory tag exactly to be ignored. Use multiple B<-i> options to ignore
6465
- more than one directory name. A special I<DIR> value of C<SYMLINKS> (case
6466
- sensitive) may be specified to avoid recursing into directories which are
6549
+ name, or a full path, and is case sensitive. If a full path is specified,
6550
+ it must match the Directory tag exactly to be ignored. Use multiple B<-i>
6551
+ options to ignore more than one directory name. A special I<DIR> value of
6552
+ C<SYMLINKS> may be specified to avoid recursing into directories which are
6467
6553
  symbolic links when the B<-r> option is used. As well, a value of C<HIDDEN>
6468
- (case sensitive) may be used to ignore files with names that start with a
6469
- "." (ie. hidden files on Unix systems) when scanning a directory.
6554
+ may be used to ignore files with names that start with a "." (ie. hidden
6555
+ files on Unix systems) when scanning a directory.
6470
6556
 
6471
6557
  =item B<-if>[I<NUM>] I<EXPR>
6472
6558