exiftool_vendored 12.99.0 → 13.03.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/Changes +76 -3
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +2 -2
- data/bin/arg_files/exif2xmp.args +4 -0
- data/bin/arg_files/xmp2exif.args +4 -0
- data/bin/exiftool +121 -50
- data/bin/lib/Image/ExifTool/Apple.pm +2 -2
- data/bin/lib/Image/ExifTool/CBOR.pm +4 -1
- data/bin/lib/Image/ExifTool/Canon.pm +35 -26
- data/bin/lib/Image/ExifTool/Exif.pm +15 -9
- data/bin/lib/Image/ExifTool/FlashPix.pm +5 -9
- data/bin/lib/Image/ExifTool/GIF.pm +143 -92
- data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
- data/bin/lib/Image/ExifTool/Geotag.pm +6 -5
- data/bin/lib/Image/ExifTool/GoPro.pm +2 -2
- data/bin/lib/Image/ExifTool/JPEG.pm +9 -1
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +2 -2
- data/bin/lib/Image/ExifTool/LNK.pm +1 -1
- data/bin/lib/Image/ExifTool/M2TS.pm +2 -2
- data/bin/lib/Image/ExifTool/MIE.pm +9 -3
- data/bin/lib/Image/ExifTool/MacOS.pm +2 -1
- data/bin/lib/Image/ExifTool/Matroska.pm +10 -2
- data/bin/lib/Image/ExifTool/Nikon.pm +5 -2
- data/bin/lib/Image/ExifTool/PDF.pm +35 -4
- data/bin/lib/Image/ExifTool/PNG.pm +14 -3
- data/bin/lib/Image/ExifTool/PPM.pm +11 -2
- data/bin/lib/Image/ExifTool/PhaseOne.pm +2 -1
- data/bin/lib/Image/ExifTool/QuickTime.pm +6 -1
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +69 -7
- data/bin/lib/Image/ExifTool/RIFF.pm +7 -2
- data/bin/lib/Image/ExifTool/TagLookup.pm +5596 -5582
- data/bin/lib/Image/ExifTool/TagNames.pod +75 -21
- data/bin/lib/Image/ExifTool/Text.pm +3 -2
- data/bin/lib/Image/ExifTool/Validate.pm +2 -2
- data/bin/lib/Image/ExifTool/WriteRIFF.pl +13 -4
- data/bin/lib/Image/ExifTool/Writer.pl +42 -66
- data/bin/lib/Image/ExifTool/XMP.pm +19 -4
- data/bin/lib/Image/ExifTool/XMP2.pl +60 -0
- data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -2
- data/bin/lib/Image/ExifTool.pm +204 -86
- data/bin/lib/Image/ExifTool.pod +58 -31
- data/bin/perl-Image-ExifTool.spec +1 -1
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beee9d5cf55d8f0cdbe040a87bcccb203cb39721065957785486ef6bc02380ca
|
4
|
+
data.tar.gz: b5023cb0b5f82e8c4798256b34ea31bc3e99dc805af96d7595f2727ef1b9ce90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e8b38e7fa81625bb834f7f419100eb4116514d6e3f667b80b486e449b36f849ee26dfb9878caab0b0d937b59a803e1177ed459cbf0e6df4a949427b7e87347d
|
7
|
+
data.tar.gz: 36865cb5c13daac876f068af94f9d7b50b16338b0159fadcdd365bb15bf98791956bfe5c2fb25d6ab9521f02126bfc918184f4d12b264e54a24718ab93808f53
|
data/bin/Changes
CHANGED
@@ -4,9 +4,82 @@ ExifTool Version History
|
|
4
4
|
|
5
5
|
RSS feed: https://exiftool.org/rss.xml
|
6
6
|
|
7
|
-
Note: The most recent production release is Version
|
7
|
+
Note: The most recent production release is Version 13.00. (Other versions are
|
8
8
|
considered development releases, and are not uploaded to MetaCPAN.)
|
9
9
|
|
10
|
+
Nov. 12, 2024 - Version 13.03
|
11
|
+
|
12
|
+
- Added ability to include or exclude tags from CSV and JSON imports
|
13
|
+
(-csv=CSVFILE and -json=JSONFILE) by adding -TAG or --TAG options
|
14
|
+
- Added read/delete support for SEAL metadata in JPG, TIFF, XMP, PNG, WEBP,
|
15
|
+
HEIC, PPM, MOV and MP4 files, and read support in PDF, MKV and WAV files
|
16
|
+
- Added support for user-defined application extensions in GIF images
|
17
|
+
- Added print conversion for QuickTime VideoFullRangeFlag
|
18
|
+
- Apply API LimitLongValues option to hex field in -j output
|
19
|
+
- Avoid extracting some large AES-encrypted data from PDF files for
|
20
|
+
performance reasons unless the -m option is used (current limits are 100 kB
|
21
|
+
for XMP and 10 kB for everything else)
|
22
|
+
- Fixed WindowsLongPath option to support wide characters (thanks Frank B)
|
23
|
+
- Fixed problem writing ICC_Profile to a GIF image which already had one
|
24
|
+
- Fixed problem writing Apple:FocusDistanceRange
|
25
|
+
- API Changes:
|
26
|
+
- Enchanced GlobalTimeShift option to allow the base tag to be specified,
|
27
|
+
otherwise use the first specified source date/time tag when copying tags
|
28
|
+
|
29
|
+
Nov. 5, 2024 - Version 13.02
|
30
|
+
|
31
|
+
- Enhanced -j -l output to add optional "fmt" and "hex" fields
|
32
|
+
- Enhanced -geotag option to support Android "Export Timeline data" JSON
|
33
|
+
format
|
34
|
+
- Changed ProductVersion of Windows launcher to match ExifTool version
|
35
|
+
- Patched to use empty group name instead of "Copy0" for family 4 group name
|
36
|
+
of missing tag when the -f option is used
|
37
|
+
- Patched to avoid showing "Unknown" for group of primary tag when -g4 or -G4
|
38
|
+
was used with the -j or -csv option
|
39
|
+
- Patched to avoid using Encode module in Windows because it can hang if run
|
40
|
+
from a working directory with a long path name
|
41
|
+
- Patched to use -csv output if -j also used
|
42
|
+
- Fixed a few problems with the new WindowsLongPath option
|
43
|
+
- Fixed problem setting FileCreateDate with Xcode 16 command line tools if the
|
44
|
+
date/time contains a time zone
|
45
|
+
- Fixed problem in -csv output when combined with -g
|
46
|
+
- API Changes:
|
47
|
+
- Added SaveBin option
|
48
|
+
|
49
|
+
Nov. 1, 2024 - Version 13.01
|
50
|
+
|
51
|
+
- NOTE: Please test the new API WindowsLongPath option because the idea is to
|
52
|
+
enable this by default if everything works out well
|
53
|
+
- Fixed bug which could result in runtime warning if when API IgnoreTags
|
54
|
+
option is set to "all" when reading a TXT file format
|
55
|
+
- Fixed problem reading some information from LNK files
|
56
|
+
- Fixed verbose output to show "Binary data" message for SCALAR values
|
57
|
+
- Fixed bug where part of the hex dump from a -v3 output could go to stdout
|
58
|
+
instead of the file specified by a -w option
|
59
|
+
- API Changes:
|
60
|
+
- Added WindowsLongPath option for testing
|
61
|
+
- Changed CharsetFileName option to automatically assume UTF8 if the file
|
62
|
+
name contains special characters and is valid UTF8
|
63
|
+
|
64
|
+
Oct. 29, 2024 - Version 13.00 (production release)
|
65
|
+
|
66
|
+
- Added support for reading GPS from Autel Evo II drone videos
|
67
|
+
- Added a new PhaseOne RawFormat value
|
68
|
+
- Updated XMP-exifEX tags, exif2xmp.args and xmp2exif.args according to the
|
69
|
+
2024 EXIF for XMP specification
|
70
|
+
- Updated Geolocation databases from current geonames.org files
|
71
|
+
- Updated the MIME types for a couple of font formats
|
72
|
+
- Enhanced -diff option to work with -ec (C-style escape of special chars)
|
73
|
+
- Changed name of EXIF Title tag to ImageTitle to correspond with specifiation
|
74
|
+
- Reverted a geotag warning message to remove debugging information that was
|
75
|
+
added in version 12.67 and moved this information into a -v3 verbose message
|
76
|
+
- Patched Perl bug which gave "Can't spawn" warning in Windows if control-C
|
77
|
+
was pressed while displaying the exiftool application help
|
78
|
+
- Fixed API StructFormat JSONQ setting to properly quote values in structures
|
79
|
+
- Fixed incorrect AudioStreamType for M2TS videos containing a PGS stream
|
80
|
+
- Fixed -diff option so "same tags" messages are only shown when -v is added
|
81
|
+
(as per the documentation)
|
82
|
+
|
10
83
|
Oct. 18, 2024 - Version 12.99
|
11
84
|
|
12
85
|
- Added -diff option to compare the metadata in two files
|
@@ -23,8 +96,8 @@ Oct. 18, 2024 - Version 12.99
|
|
23
96
|
- Structured values returned as HASH references with the Struct option may
|
24
97
|
contain a new "_ordered_keys_" entry used to preserve the order of the
|
25
98
|
entries
|
26
|
-
- Added the OrderedKeys method to
|
27
|
-
|
99
|
+
- Added the OrderedKeys method to return the ordered or sorted keys from a
|
100
|
+
returned structure value
|
28
101
|
|
29
102
|
Oct. 8, 2024 - Version 12.98
|
30
103
|
|
data/bin/META.json
CHANGED
data/bin/META.yml
CHANGED
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-
|
113
|
-
cd Image-ExifTool-
|
112
|
+
gzip -dc Image-ExifTool-13.03.tar.gz | tar -xf -
|
113
|
+
cd Image-ExifTool-13.03
|
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/arg_files/exif2xmp.args
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
# 2015/01/12 - PH Avoid copying to non-standard namespaces
|
14
14
|
# 2018/05/07 - PH Added support for GPSDestXxxRef tags
|
15
15
|
# 2022/03/31 - PH IPTC Photometadata Mapping Guidelines 2202.1 update
|
16
|
+
# 2024/10/24 - PH Additions for the 2024 EXIF for XMP spec
|
16
17
|
#
|
17
18
|
# References: http://www.metadataworkinggroup.org/specs/
|
18
19
|
# https://iptc.org/std/photometadata/documentation/mappingguidelines/
|
@@ -50,4 +51,7 @@
|
|
50
51
|
-XMP:GPSDestLatitude < Composite:GPSDestLatitude
|
51
52
|
-XMP:GPSDestLongitude < Composite:GPSDestLongitude
|
52
53
|
-XMP:GPSDateTime < Composite:GPSDateTime
|
54
|
+
# new for the 2024 EXIF for XMP specification
|
55
|
+
-XMP-exifEX:PhotographicSensitivity < EXIF:ISO
|
56
|
+
-XMP-exif:DateTimeDigitized < EXIF:CreateDate
|
53
57
|
# end
|
data/bin/arg_files/xmp2exif.args
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
# 2022/03/31 - PH IPTC Photometadata Mapping Guidelines 2202.1 update
|
18
18
|
# 2023/01/30 - PH Also write Composite:SubSecDateTimeOriginal from
|
19
19
|
# XMP-exif:DateTimeOriginal
|
20
|
+
# 2024/10/24 - PH Additions for the 2024 EXIF for XMP spec
|
20
21
|
#
|
21
22
|
# References: http://www.metadataworkinggroup.org/specs/
|
22
23
|
# https://iptc.org/std/photometadata/documentation/mappingguidelines/
|
@@ -36,6 +37,9 @@
|
|
36
37
|
-EXIF:all < XMP-tiff:all
|
37
38
|
-EXIF:ImageDescription < XMP-dc:Description
|
38
39
|
-EXIF:DateTimeOriginal < XMP-photoshop:DateCreated
|
40
|
+
# new for the 2024 EXIF for XMP specification
|
41
|
+
-EXIF:ISO < XMP-exifEX:PhotographicSensitivity
|
42
|
+
-EXIF:CreateDate < XMP-exif:DateTimeDigitized
|
39
43
|
# the following SubSec tags also write/delete the corresponding EXIF
|
40
44
|
# SubSecTime and OffsetTime tags as appropriate
|
41
45
|
-Composite:SubSecDateTimeOriginal < XMP-exif:DateTimeOriginal
|
data/bin/exiftool
CHANGED
@@ -11,7 +11,7 @@ use strict;
|
|
11
11
|
use warnings;
|
12
12
|
require 5.004;
|
13
13
|
|
14
|
-
my $version = '
|
14
|
+
my $version = '13.03';
|
15
15
|
|
16
16
|
# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
|
17
17
|
my $exePath;
|
@@ -63,6 +63,7 @@ sub AddSetTagsFile($;$);
|
|
63
63
|
sub Warning($$);
|
64
64
|
sub DoSetFromFile($$$);
|
65
65
|
sub CleanFilename($);
|
66
|
+
sub HasWildcards($);
|
66
67
|
sub SetWindowTitle($);
|
67
68
|
sub ProcessFiles($;$);
|
68
69
|
sub ScanDir($$;$);
|
@@ -856,7 +857,7 @@ for (;;) {
|
|
856
857
|
} else {
|
857
858
|
print "Available API Options:\n";
|
858
859
|
my $availableOptions = Image::ExifTool::AvailableOptions();
|
859
|
-
printf(" %-17s - %s\n", $$_[0], $$_[2]) foreach @$availableOptions;
|
860
|
+
$$_[3] or printf(" %-17s - %s\n", $$_[0], $$_[2]) foreach @$availableOptions;
|
860
861
|
$helped = 1;
|
861
862
|
}
|
862
863
|
next;
|
@@ -1039,7 +1040,7 @@ for (;;) {
|
|
1039
1040
|
}
|
1040
1041
|
$trkfile or Error("Expecting file name for -geotag option\n"), $badCmd=1, next;
|
1041
1042
|
# allow wildcards in filename
|
1042
|
-
if ($trkfile
|
1043
|
+
if (HasWildcards($trkfile)) {
|
1043
1044
|
# CORE::glob() splits on white space, so use File::Glob if possible
|
1044
1045
|
my @trks;
|
1045
1046
|
if ($^O eq 'MSWin32' and eval { require Win32::FindFile }) {
|
@@ -1425,7 +1426,7 @@ for (;;) {
|
|
1425
1426
|
push @nextPass, $_;
|
1426
1427
|
next;
|
1427
1428
|
}
|
1428
|
-
if ($doGlob and
|
1429
|
+
if ($doGlob and HasWildcards($_)) {
|
1429
1430
|
if ($^O eq 'MSWin32' and eval { require Win32::FindFile }) {
|
1430
1431
|
push @files, FindFileWindows($mt, $_);
|
1431
1432
|
} else {
|
@@ -1522,6 +1523,7 @@ if (($tagOut or defined $diff) and ($csv or $json or %printFmt or $tabFormat or
|
|
1522
1523
|
}
|
1523
1524
|
|
1524
1525
|
if ($csv and $csv eq 'CSV' and not $isWriting) {
|
1526
|
+
undef $json; # (not compatible)
|
1525
1527
|
if ($textOut) {
|
1526
1528
|
Warn "Sorry, -w may not be combined with -csv\n";
|
1527
1529
|
$rtnVal = 1;
|
@@ -1775,7 +1777,7 @@ if ($isWriting) {
|
|
1775
1777
|
if (defined $diff) {
|
1776
1778
|
Error "Can't use -diff option when writing tags\n";
|
1777
1779
|
next;
|
1778
|
-
} elsif (@tags and not $outOpt) {
|
1780
|
+
} elsif (@tags and not $outOpt and not $csv) {
|
1779
1781
|
my ($tg, $s) = @tags > 1 ? ("$tags[0] ...", 's') : ($tags[0], '');
|
1780
1782
|
Warn "Ignored superfluous tag name$s or invalid option$s: -$tg\n";
|
1781
1783
|
}
|
@@ -1802,7 +1804,7 @@ if ($binaryOutput) {
|
|
1802
1804
|
}
|
1803
1805
|
|
1804
1806
|
# sort by groups to look nicer depending on options
|
1805
|
-
if (defined $showGroup and not (@tags and $allGroup) and ($sortOpt or not defined $sortOpt)) {
|
1807
|
+
if (defined $showGroup and not (@tags and ($allGroup or $csv)) and ($sortOpt or not defined $sortOpt)) {
|
1806
1808
|
$mt->Options(Sort => "Group$showGroup");
|
1807
1809
|
}
|
1808
1810
|
|
@@ -1840,7 +1842,7 @@ $altEnc = $mt->Options('Charset');
|
|
1840
1842
|
undef $altEnc if $altEnc eq 'UTF8';
|
1841
1843
|
|
1842
1844
|
# set flag to fix description lengths if necessary
|
1843
|
-
if (not $altEnc and $mt->Options('Lang') ne 'en'
|
1845
|
+
if (not $altEnc and $mt->Options('Lang') ne 'en') {
|
1844
1846
|
# (note that Unicode::GCString is part of the Unicode::LineBreak package)
|
1845
1847
|
$fixLen = eval { require Unicode::GCString } ? 2 : 1;
|
1846
1848
|
}
|
@@ -2378,7 +2380,7 @@ sub GetImageInfo($$)
|
|
2378
2380
|
$done2{$t2} = 1;
|
2379
2381
|
}
|
2380
2382
|
my $str = '';
|
2381
|
-
|
2383
|
+
$v and ($same or $v > 1) and $str = " ($same same tag" . ($same==1 ? '' : 's') . ')';
|
2382
2384
|
if (not $allGroup) {
|
2383
2385
|
print $fp "---- $g2 ----$str\n" if $g2 and ($str or @diffs);
|
2384
2386
|
} elsif ($str and $g2) {
|
@@ -2418,12 +2420,12 @@ sub GetImageInfo($$)
|
|
2418
2420
|
$grp .= ' ' x (15 - length($grp)) if length($grp) < 15 and $outFormat < 2;
|
2419
2421
|
push @diffs, sprintf "< %s %s%s: %s\n", $grp, $name, $pad, Printable($val);
|
2420
2422
|
if (defined $val2) {
|
2421
|
-
$
|
2423
|
+
$grp = ' ' x length($grp), $name = ' ' x $len if $v < 3;
|
2422
2424
|
push @diffs, sprintf "> %s %s%s: %s\n", $grp, $name, $pad, Printable($val2);
|
2423
2425
|
}
|
2424
2426
|
} else {
|
2425
2427
|
push @diffs, sprintf "< %s%s: %s\n", $name, $pad, Printable($val);
|
2426
|
-
$
|
2428
|
+
$name = ' ' x $len if $v < 3;
|
2427
2429
|
push @diffs, sprintf "> %s%s %s\n", $name, $pad, Printable($val2) if defined $val2;
|
2428
2430
|
}
|
2429
2431
|
}
|
@@ -2621,7 +2623,13 @@ TAG: foreach $tag (@foundTags) {
|
|
2621
2623
|
# (note that the tag key may look like "TAG #(1)" when the "#" feature is used)
|
2622
2624
|
next if $noDups and $tag =~ /^(.*?) ?\(/ and defined $$info{$1} and
|
2623
2625
|
$group eq $et->GetGroup($1, $showGroup);
|
2624
|
-
|
2626
|
+
if (not $group and ($xml or $json or $csv)) {
|
2627
|
+
if ($showGroup !~ /\b4\b/) {
|
2628
|
+
$group = 'Unknown';
|
2629
|
+
} elsif ($json and not $allGroup) {
|
2630
|
+
$group = 'Copy0';
|
2631
|
+
}
|
2632
|
+
}
|
2625
2633
|
if ($fp and not ($allGroup or $csv)) {
|
2626
2634
|
if ($lastGroup ne $group) {
|
2627
2635
|
if ($html) {
|
@@ -2843,6 +2851,17 @@ TAG: foreach $tag (@foundTags) {
|
|
2843
2851
|
my $num = $et->GetValue($tag, 'ValueConv');
|
2844
2852
|
$$val{num} = $num if defined $num and not IsEqual($num, $$val{val});
|
2845
2853
|
}
|
2854
|
+
my $ex = $$et{TAG_EXTRA}{$tag};
|
2855
|
+
$$val{'fmt'} = $$ex{G6} if defined $$ex{G6};
|
2856
|
+
if (defined $$ex{BinVal}) {
|
2857
|
+
my $max = ($$et{OPTIONS}{LimitLongValues} - 5) / 3;
|
2858
|
+
if ($max >= 0 and length($$ex{BinVal}) > int($max)) {
|
2859
|
+
$max = int $max;
|
2860
|
+
$$val{'hex'} = join ' ', unpack("(H2)$max", $$ex{BinVal}), '[...]';
|
2861
|
+
} else {
|
2862
|
+
$$val{'hex'} = join ' ', unpack '(H2)*', $$ex{BinVal};
|
2863
|
+
}
|
2864
|
+
}
|
2846
2865
|
}
|
2847
2866
|
}
|
2848
2867
|
FormatJSON($fp, $val, $ind, $quote);
|
@@ -3137,9 +3156,15 @@ sub SetImageInfo($$$)
|
|
3137
3156
|
next unless defined $absPath and $csvInfo = $database{$absPath};
|
3138
3157
|
}
|
3139
3158
|
$found = 1;
|
3140
|
-
$verbose
|
3159
|
+
if ($verbose) {
|
3160
|
+
print $vout "Setting new values from $csv database\n";
|
3161
|
+
print $vout 'Including tags: ',join(' ',@tags),"\n" if @tags;
|
3162
|
+
print $vout 'Excluding tags: ',join(' ',@exclude),"\n" if @exclude;
|
3163
|
+
}
|
3141
3164
|
foreach $tag (OrderedKeys($csvInfo)) {
|
3142
3165
|
next if $tag =~ /\b(SourceFile|Directory|FileName)$/i; # don't write these
|
3166
|
+
next if @tags and not grep /^\Q$tag\E$/i, @tags;
|
3167
|
+
next if @exclude and grep /^\Q$tag\E$/i, @exclude;
|
3143
3168
|
my ($rtn, $wrn) = $et->SetNewValue($tag, $$csvInfo{$tag},
|
3144
3169
|
Protected => 1, AddValue => $csvAdd,
|
3145
3170
|
ProtectSaved => $csvSaveCount);
|
@@ -3638,7 +3663,7 @@ sub FormatJSON($$$;$)
|
|
3638
3663
|
print $fp $bra;
|
3639
3664
|
foreach (@$val) {
|
3640
3665
|
print $fp ',' if $comma;
|
3641
|
-
FormatJSON($fp, $_, $ind);
|
3666
|
+
FormatJSON($fp, $_, $ind, $quote);
|
3642
3667
|
$comma = 1,
|
3643
3668
|
}
|
3644
3669
|
print $fp $ket,
|
@@ -3654,7 +3679,7 @@ sub FormatJSON($$$;$)
|
|
3654
3679
|
if ($showTagID and $_ eq 'id' and $showTagID eq 'H' and $$val{$_} =~ /^\d+\.\d+$/) {
|
3655
3680
|
print $fp qq{"$$val{$_}"};
|
3656
3681
|
} else {
|
3657
|
-
FormatJSON($fp, $$val{$_}, "$ind ");
|
3682
|
+
FormatJSON($fp, $$val{$_}, "$ind ", $quote);
|
3658
3683
|
}
|
3659
3684
|
$comma = 1,
|
3660
3685
|
}
|
@@ -3820,7 +3845,14 @@ sub Printable($)
|
|
3820
3845
|
$val = '(Binary data '.length($$val).' bytes)';
|
3821
3846
|
}
|
3822
3847
|
}
|
3823
|
-
$
|
3848
|
+
if ($escapeC) {
|
3849
|
+
$val =~ s/([\0-\x1f\\\x7f])/$escC{$1} || sprintf('\x%.2x', ord $1)/eg;
|
3850
|
+
} else {
|
3851
|
+
# translate unprintable chars in value and remove trailing spaces
|
3852
|
+
$val =~ tr/\x01-\x1f\x7f/./;
|
3853
|
+
$val =~ s/\x00//g;
|
3854
|
+
$val =~ s/\s+$//;
|
3855
|
+
}
|
3824
3856
|
return $val;
|
3825
3857
|
}
|
3826
3858
|
|
@@ -3831,17 +3863,23 @@ sub Printable($)
|
|
3831
3863
|
sub LengthUTF8($)
|
3832
3864
|
{
|
3833
3865
|
my $str = shift;
|
3866
|
+
return length $str unless $fixLen;
|
3867
|
+
local $SIG{'__WARN__'} = sub { };
|
3868
|
+
if (not $$mt{OPTIONS}{EncodeHangs} and eval { require Encode }) {
|
3869
|
+
$str = Encode::decode_utf8($str);
|
3870
|
+
} else {
|
3871
|
+
$str = pack('U0C*', unpack 'C*', $str);
|
3872
|
+
}
|
3834
3873
|
my $len;
|
3835
|
-
if (
|
3874
|
+
if ($fixLen == 1) {
|
3836
3875
|
$len = length $str;
|
3837
|
-
} elsif ($fixLen == 1) {
|
3838
|
-
$len = length Encode::decode_utf8($str);
|
3839
3876
|
} else {
|
3840
|
-
my $gcstr = eval { Unicode::GCString->new(
|
3877
|
+
my $gcstr = eval { Unicode::GCString->new($str) };
|
3841
3878
|
if ($gcstr) {
|
3842
3879
|
$len = $gcstr->columns;
|
3843
3880
|
} else {
|
3844
|
-
$len = length
|
3881
|
+
$len = length $str;
|
3882
|
+
delete $SIG{'__WARN__'};
|
3845
3883
|
Warning($mt, 'Unicode::GCString problem. Columns may be misaligned');
|
3846
3884
|
$fixLen = 1;
|
3847
3885
|
}
|
@@ -3944,6 +3982,19 @@ sub CleanFilename($)
|
|
3944
3982
|
$_[0] =~ tr/\\/\// if Image::ExifTool::IsPC();
|
3945
3983
|
}
|
3946
3984
|
|
3985
|
+
#------------------------------------------------------------------------------
|
3986
|
+
# Does path name contain wildcards
|
3987
|
+
# Inputs: 0) path name
|
3988
|
+
# Returns: true if path contains wildcards
|
3989
|
+
sub HasWildcards($)
|
3990
|
+
{
|
3991
|
+
my $path = shift;
|
3992
|
+
|
3993
|
+
# if this is a Windows path with the long path prefix, then wildcards are not supported
|
3994
|
+
return 0 if $^O eq 'MSWin32' and $path =~ m{^[\\/]{2}\?[\\/]};
|
3995
|
+
return $path =~ /[*?]/;
|
3996
|
+
}
|
3997
|
+
|
3947
3998
|
#------------------------------------------------------------------------------
|
3948
3999
|
# Check for valid UTF-8 of a file name
|
3949
4000
|
# Inputs: 0) string, 1) original encoding
|
@@ -4064,7 +4115,7 @@ sub ScanDir($$;$)
|
|
4064
4115
|
return if $ignore{$dir};
|
4065
4116
|
# use Win32::FindFile on Windows if available
|
4066
4117
|
# (ReadDir will croak if there is a wildcard, so check for this)
|
4067
|
-
if ($^O eq 'MSWin32' and $dir
|
4118
|
+
if ($^O eq 'MSWin32' and not HasWildcards($dir)) {
|
4068
4119
|
undef $evalWarning;
|
4069
4120
|
local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] };;
|
4070
4121
|
if (CheckUTF8($dir, $enc) >= 0) {
|
@@ -4190,7 +4241,7 @@ sub FindFileWindows($$)
|
|
4190
4241
|
$wildfile = $et->Decode($wildfile, $enc, undef, 'UTF8') if $enc and $enc ne 'UTF8';
|
4191
4242
|
$wildfile =~ tr/\\/\//; # use forward slashes
|
4192
4243
|
my ($dir, $wildname) = ($wildfile =~ m{(.*[:/])(.*)}) ? ($1, $2) : ('', $wildfile);
|
4193
|
-
if ($dir
|
4244
|
+
if (HasWildcards($dir)) {
|
4194
4245
|
Warn "Wildcards don't work in the directory specification\n";
|
4195
4246
|
return ();
|
4196
4247
|
}
|
@@ -5106,7 +5157,7 @@ information. Use the B<-s> option to see the tag names instead.
|
|
5106
5157
|
=item B<-->I<TAG>
|
5107
5158
|
|
5108
5159
|
Exclude specified tag from extracted information. Same as the B<-x> option.
|
5109
|
-
Group names and wildcards are permitted as described above for B
|
5160
|
+
Group names and wildcards are permitted as described above for B<->I<TAG>.
|
5110
5161
|
Once excluded from the output, a tag may not be re-included by a subsequent
|
5111
5162
|
option. May also be used following a B<-tagsFromFile> option to exclude
|
5112
5163
|
tags from being copied (when redirecting to another tag, it is the source
|
@@ -5130,13 +5181,13 @@ may be used to to indicate any XMP namespace (eg. C<--xmp-all:dabs>).
|
|
5130
5181
|
Write a new value for the specified tag (eg. C<-comment=wow>), or delete the
|
5131
5182
|
tag if no I<VALUE> is given (eg. C<-comment=>). C<+=> and C<-=> are used to
|
5132
5183
|
add or remove existing entries from a list, or to shift date/time values
|
5133
|
-
(see L<Image::ExifTool::Shift.pl|Image::ExifTool::Shift.pl> and
|
5134
|
-
for more details). C<+=> may also be used to increment numerical
|
5135
|
-
decrement if I<VALUE> is negative), and C<-=> may be used to
|
5136
|
-
delete or replace a tag (see L</WRITING EXAMPLES> for
|
5137
|
-
used to write an empty string instead of deleting the
|
5138
|
-
is given, but otherwise it is equivalent to C<=>.
|
5139
|
-
be quoted on the Windows command line.)
|
5184
|
+
(see L<Image::ExifTool::Shift.pl|Image::ExifTool::Shift.pl> and notes 6 and
|
5185
|
+
7 below for more details). C<+=> may also be used to increment numerical
|
5186
|
+
values (or decrement if I<VALUE> is negative), and C<-=> may be used to
|
5187
|
+
conditionally delete or replace a tag (see L</WRITING EXAMPLES> for
|
5188
|
+
examples). C<^=> is used to write an empty string instead of deleting the
|
5189
|
+
tag when no I<VALUE> is given, but otherwise it is equivalent to C<=>.
|
5190
|
+
(Note that the caret must be quoted on the Windows command line.)
|
5140
5191
|
|
5141
5192
|
I<TAG> may contain one or more leading family 0, 1, 2 or 7 group names,
|
5142
5193
|
prefixed by optional family numbers, and separated colons. If no group name
|
@@ -5211,6 +5262,10 @@ tag, overriding any other values previously assigned to the tag on the same
|
|
5211
5262
|
command line. To shift a date/time value and copy it to another tag in the
|
5212
5263
|
same operation, use the B<-globalTimeShift> option.
|
5213
5264
|
|
5265
|
+
7) The C<+=> operator may not be used to shift a List-type date/time tag
|
5266
|
+
(eg. XMP-dc:Date) because C<+=> is used to add elements to the list.
|
5267
|
+
Instead, the B<-globalTimeShift> option should be used.
|
5268
|
+
|
5214
5269
|
Special feature: Integer values may be specified in hexadecimal with a
|
5215
5270
|
leading C<0x>, and simple rational values may be specified as fractions.
|
5216
5271
|
|
@@ -5533,7 +5588,9 @@ deleted). Also, FileName and Directory columns are ignored if they exist
|
|
5533
5588
|
all other columns are imported. To force a tag to be deleted, use the B<-f>
|
5534
5589
|
option and set the value to "-" in the CSV file (or to the MissingTagValue
|
5535
5590
|
if this API option was used). Multiple databases may be imported in a
|
5536
|
-
single command.
|
5591
|
+
single command. Specific tags may be imported from the database by adding
|
5592
|
+
B<->I<TAG> options to the command, or excluded with B<-->I<TAG> options.
|
5593
|
+
If no tags are specified, then all except FileName and Directory are used.
|
5537
5594
|
|
5538
5595
|
When exporting a CSV file, the B<-g> or B<-G> option adds group names to the
|
5539
5596
|
tag headings. If the B<-a> option is used to allow duplicate tag names, the
|
@@ -5669,18 +5726,28 @@ preserved with the B<-struct> option (this also causes all list-type XMP
|
|
5669
5726
|
tags to be output as JSON arrays, otherwise single-item lists would be
|
5670
5727
|
output as simple strings). The B<-a> option is implied when B<-json> is
|
5671
5728
|
used, but entries with identical JSON names are suppressed in the output.
|
5672
|
-
(B<-G4> may be used to ensure that all tags have unique JSON names.)
|
5673
|
-
|
5674
|
-
|
5675
|
-
|
5676
|
-
|
5677
|
-
|
5678
|
-
|
5679
|
-
|
5680
|
-
|
5681
|
-
|
5682
|
-
|
5683
|
-
|
5729
|
+
(B<-G4> may be used to ensure that all tags have unique JSON names.)
|
5730
|
+
|
5731
|
+
Adding the B<-D> or B<-H> option changes tag values to JSON objects with
|
5732
|
+
"val" and "id" fields. Adding B<-l> adds a "desc" field, and a "num" field
|
5733
|
+
if the numerical value is different from the converted "val", and "fmt" and
|
5734
|
+
"hex" fields for EXIF metadata if the API SaveFormat and SaveBin options are
|
5735
|
+
set respectively, and the length of the "hex" output is limited by the API
|
5736
|
+
LimitLongValues setting. The B<-b> option may be added to output binary
|
5737
|
+
data, encoded in base64 if necessary (indicated by ASCII "base64:" as the
|
5738
|
+
first 7 bytes of the value), and B<-t> may be added to include tag table
|
5739
|
+
information (see B<-t> for details). The JSON output is UTF-8 regardless of
|
5740
|
+
any B<-L> or B<-charset> option setting, but the UTF-8 validation is
|
5741
|
+
disabled if a character set other than UTF-8 is specified.
|
5742
|
+
|
5743
|
+
Note that ExifTool quotes JSON values only if they don't look like numbers
|
5744
|
+
(regardless of the original storage format or the relevant metadata
|
5745
|
+
specification). This may be a problem when reading the JSON via a strongly
|
5746
|
+
typed language. However, the API StructFormat option may be set to "JSONQ"
|
5747
|
+
to force quoting of numbers. As well, the B<-sep> option may be used to
|
5748
|
+
convert arrays into strings. For example:
|
5749
|
+
|
5750
|
+
exiftool -j -api structformat=jsonq -sep ", " ...
|
5684
5751
|
|
5685
5752
|
If I<JSONFILE> is specified, the file is imported and the tag definitions
|
5686
5753
|
from the file are used to set tag values on a per-file basis. The special
|
@@ -5693,7 +5760,9 @@ that options exporting JSON objects instead of simple values are not
|
|
5693
5760
|
compatible with the import file format (ie. export with B<-D>, B<-H>, B<-l>,
|
5694
5761
|
or B<-T> is not compatible, and use B<-G> instead of B<-g>). Additionally,
|
5695
5762
|
tag names in the input JSON file may be suffixed with a C<#> to disable
|
5696
|
-
print conversion.
|
5763
|
+
print conversion. Specific tags may be imported from the database by adding
|
5764
|
+
B<->I<TAG> options to the command, or excluded with B<-->I<TAG> options.
|
5765
|
+
If no tags are specified, then all except FileName and Directory are used.
|
5697
5766
|
|
5698
5767
|
Unlike CSV import, empty values are not ignored, and will cause an empty
|
5699
5768
|
value to be written if supported by the specific metadata type. Tags are
|
@@ -5834,7 +5903,7 @@ with this command:
|
|
5834
5903
|
|
5835
5904
|
produces output like this:
|
5836
5905
|
|
5837
|
-
-- Generated by ExifTool
|
5906
|
+
-- Generated by ExifTool 13.03 --
|
5838
5907
|
File: a.jpg - 2003:10:31 15:44:19
|
5839
5908
|
(f/5.6, 1/60s, ISO 100)
|
5840
5909
|
File: b.jpg - 2006:05:23 11:57:38
|
@@ -6263,7 +6332,8 @@ ExifTool will not scan to the end of a JPEG image to check for an AFCP or
|
|
6263
6332
|
PreviewImage trailer, or past the first comment in GIF images or the
|
6264
6333
|
audio/video data in WAV/AVI files to search for additional metadata. These
|
6265
6334
|
speed benefits are small when reading images directly from disk, but can be
|
6266
|
-
substantial if piping images through a network connection.
|
6335
|
+
substantial if piping images through a network connection. Also bypasses
|
6336
|
+
CRC validation when writing PNG images which can be very slow. For more
|
6267
6337
|
substantial speed benefits, B<-fast2> also causes exiftool to avoid
|
6268
6338
|
extracting any EXIF MakerNote information, and to stop processing at the
|
6269
6339
|
IDAT chunk of PNG images and the mdat atom of QuickTime-format files (but
|
@@ -6674,8 +6744,9 @@ names, even if they begin with a dash (C<->).
|
|
6674
6744
|
Compare metadata in I<FILE> with I<FILE2>. The I<FILE2> name may include
|
6675
6745
|
filename formatting codes (see the B<-w> option). All extracted tags from
|
6676
6746
|
the files are compared, but the extracted tags may be controlled by adding
|
6677
|
-
B
|
6678
|
-
the same-named files in two different directories, ignoring the
|
6747
|
+
B<->I<TAG> or B<-->I<TAG> options. For example, below is a command to
|
6748
|
+
compare all the same-named files in two different directories, ignoring the
|
6749
|
+
System tags:
|
6679
6750
|
|
6680
6751
|
exiftool DIR1 -diff DIR2/%f.%e --system:all
|
6681
6752
|
|
@@ -6683,8 +6754,8 @@ The B<-g> and B<-G> options may be used to organize the output by the
|
|
6683
6754
|
specified family of groups, with B<-G1> being the default. The B<-a> option
|
6684
6755
|
is implied. Adding B<-v> includes a count of the number of tags that are
|
6685
6756
|
the same in each group. The following text formatting options are valid
|
6686
|
-
when B<-diff> is used: B<-c>, B<-charset>, B<-d>, B<-E>, B<-
|
6687
|
-
B<-n>, B<-s>, B<-sep>, B<-struct> and B<-w>.
|
6757
|
+
when B<-diff> is used: B<-c>, B<-charset>, B<-d>, B<-E>, B<-ec>, B<-ex>,
|
6758
|
+
B<-L>, B<-lang>, B<-n>, B<-s>, B<-sep>, B<-struct> and B<-w>.
|
6688
6759
|
|
6689
6760
|
=item B<-geotag> I<TRKFILE>
|
6690
6761
|
|
@@ -16,7 +16,7 @@ use vars qw($VERSION);
|
|
16
16
|
use Image::ExifTool::Exif;
|
17
17
|
use Image::ExifTool::PLIST;
|
18
18
|
|
19
|
-
$VERSION = '1.
|
19
|
+
$VERSION = '1.13';
|
20
20
|
|
21
21
|
sub ConvertPLIST($$);
|
22
22
|
|
@@ -99,7 +99,7 @@ sub ConvertPLIST($$);
|
|
99
99
|
my @a = split ' ', $val;
|
100
100
|
sprintf('%.2f - %.2f m', $a[0] <= $a[1] ? @a : reverse @a);
|
101
101
|
},
|
102
|
-
PrintConvInv => '$val =~ s/ -
|
102
|
+
PrintConvInv => '$val =~ s/ - / /; $val =~ s/ ?m$//; $val',
|
103
103
|
},
|
104
104
|
# 0x000d - int32s: 0,1,6,20,24,32,40 (SphereHealthAverageCurrent, ref 2)
|
105
105
|
# 0x000e - int32s: 0,1,4,12 (Orientation? 0=landscape? 4=portrait? ref 1) (SphereMotionDataStatus, ref 2)
|
@@ -16,7 +16,7 @@ use vars qw($VERSION);
|
|
16
16
|
use Image::ExifTool qw(:DataAccess :Utils);
|
17
17
|
use Image::ExifTool::JSON;
|
18
18
|
|
19
|
-
$VERSION = '1.
|
19
|
+
$VERSION = '1.03';
|
20
20
|
|
21
21
|
sub ProcessCBOR($$$);
|
22
22
|
sub ReadCBORValue($$$$);
|
@@ -160,6 +160,7 @@ sub ReadCBORValue($$$$)
|
|
160
160
|
Start => $dumpStart,
|
161
161
|
DataPos => $$et{cbor_datapos},
|
162
162
|
Prefix => $$et{INDENT},
|
163
|
+
Out => $et->Options('TextOut'),
|
163
164
|
) if $verbose > 2;
|
164
165
|
while ($num) {
|
165
166
|
$$et{cbor_pre} = "$i) ";
|
@@ -200,6 +201,7 @@ sub ReadCBORValue($$$$)
|
|
200
201
|
Start => $dumpStart,
|
201
202
|
DataPos => $$et{cbor_datapos},
|
202
203
|
Prefix => $$et{INDENT} . ' ',
|
204
|
+
Out => $et->Options('TextOut'),
|
203
205
|
) if $verbose > 2;
|
204
206
|
}
|
205
207
|
# read next value (note: in the case of multiple tags,
|
@@ -259,6 +261,7 @@ sub ReadCBORValue($$$$)
|
|
259
261
|
DataPos => $$et{cbor_datapos},
|
260
262
|
Prefix => $$et{INDENT} . ' ',
|
261
263
|
MaxLen => $verbose < 5 ? ($verbose == 3 ? 96 : 2048) : undef,
|
264
|
+
Out => $et->Options('TextOut'),
|
262
265
|
) if $verbose > 2;
|
263
266
|
return($val, $err, $pos);
|
264
267
|
}
|