exiftool_vendored 12.99.0 → 13.02.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 +56 -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 +82 -40
- 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 +8 -9
- data/bin/lib/Image/ExifTool/FlashPix.pm +5 -9
- 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/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/Nikon.pm +5 -2
- data/bin/lib/Image/ExifTool/PDF.pm +7 -3
- data/bin/lib/Image/ExifTool/PhaseOne.pm +2 -1
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +69 -7
- data/bin/lib/Image/ExifTool/TagLookup.pm +11 -8
- data/bin/lib/Image/ExifTool/TagNames.pod +33 -18
- data/bin/lib/Image/ExifTool/Text.pm +3 -2
- data/bin/lib/Image/ExifTool/Validate.pm +2 -2
- data/bin/lib/Image/ExifTool/Writer.pl +26 -55
- data/bin/lib/Image/ExifTool/XMP.pm +13 -3
- data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -2
- data/bin/lib/Image/ExifTool.pm +167 -76
- data/bin/lib/Image/ExifTool.pod +42 -28
- 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: 3b02d7fc208b8d2296a64a11ab1c08e1a82eb9d2f3e04443dcef0b2c0cd0a7d6
|
4
|
+
data.tar.gz: 02d7d674c3975c9462c8adfc139e81c692c5f4a1d5dc298a5b83e1f9c1a4def0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04f78c57d35f72c974d88c53b3a900ccd3f25528b5506e6b5b6fb4f9f9b73f509d01b740184e24bc9f445cee9cde5cfd0fefa71b628497bbbf2c20ef142fe723
|
7
|
+
data.tar.gz: 8db5ada7fdd6e765139fbda15720cf1bbf5fb61b015055a9249d18270bc05849aa79ddf20d4107e5de1d4260e68ece57a05d730449cb0b5c3aa1f3fb8b5fbc40
|
data/bin/Changes
CHANGED
@@ -4,9 +4,62 @@ 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. 5, 2024 - Version 13.02
|
11
|
+
|
12
|
+
- Enhanced -j -l output to add optional "fmt" and "hex" fields
|
13
|
+
- Enhanced -geotag option to support Android "Export Timeline data" JSON
|
14
|
+
format
|
15
|
+
- Changed ProductVersion of Windows launcher to match ExifTool version
|
16
|
+
- Patched to use empty group name instead of "Copy0" for family 4 group name
|
17
|
+
of missing tag when the -f option is used
|
18
|
+
- Patched to avoid showing "Unknown" for group of primary tag when -g4 or -G4
|
19
|
+
was used with the -j or -csv option
|
20
|
+
- Patched to avoid using Encode module in Windows because it can hang if run
|
21
|
+
from a working directory with a long path name
|
22
|
+
- Patched to use -csv output if -j also used
|
23
|
+
- Fixed problem setting FileCreateDate on MacOS Sequoia if the date/time
|
24
|
+
contains a time zone
|
25
|
+
- Fixed problem in -csv output when combined with -g
|
26
|
+
- API Changes:
|
27
|
+
- Added BinVal option
|
28
|
+
|
29
|
+
Nov. 1, 2024 - Version 13.01
|
30
|
+
|
31
|
+
- NOTE: Please test the new API WindowsLongPath option because the idea is to
|
32
|
+
enable this by default if everything works out well
|
33
|
+
- Fixed bug which could result in runtime warning if when API IgnoreTags
|
34
|
+
option is set to "all" when reading a TXT file format
|
35
|
+
- Fixed problem reading some information from LNK files
|
36
|
+
- Fixed verbose output to show "Binary data" message for SCALAR values
|
37
|
+
- Fixed bug where part of the hex dump from a -v3 output could go to stdout
|
38
|
+
instead of the file specified by a -w option
|
39
|
+
- API Changes:
|
40
|
+
- Added WindowsLongPath option for testing
|
41
|
+
- Changed CharsetFileName option to automatically assume UTF8 if the file
|
42
|
+
name contains special characters and is valid UTF8
|
43
|
+
|
44
|
+
Oct. 29, 2024 - Version 13.00 (production release)
|
45
|
+
|
46
|
+
- Added support for reading GPS from Autel Evo II drone videos
|
47
|
+
- Added a new PhaseOne RawFormat value
|
48
|
+
- Updated XMP-exifEX tags, exif2xmp.args and xmp2exif.args according to the
|
49
|
+
2024 EXIF for XMP specification
|
50
|
+
- Updated Geolocation databases from current geonames.org files
|
51
|
+
- Updated the MIME types for a couple of font formats
|
52
|
+
- Enhanced -diff option to work with -ec (C-style escape of special chars)
|
53
|
+
- Changed name of EXIF Title tag to ImageTitle to correspond with specifiation
|
54
|
+
- Reverted a geotag warning message to remove debugging information that was
|
55
|
+
added in version 12.67 and moved this information into a -v3 verbose message
|
56
|
+
- Patched Perl bug which gave "Can't spawn" warning in Windows if control-C
|
57
|
+
was pressed while displaying the exiftool application help
|
58
|
+
- Fixed API StructFormat JSONQ setting to properly quote values in structures
|
59
|
+
- Fixed incorrect AudioStreamType for M2TS videos containing a PGS stream
|
60
|
+
- Fixed -diff option so "same tags" messages are only shown when -v is added
|
61
|
+
(as per the documentation)
|
62
|
+
|
10
63
|
Oct. 18, 2024 - Version 12.99
|
11
64
|
|
12
65
|
- Added -diff option to compare the metadata in two files
|
@@ -23,8 +76,8 @@ Oct. 18, 2024 - Version 12.99
|
|
23
76
|
- Structured values returned as HASH references with the Struct option may
|
24
77
|
contain a new "_ordered_keys_" entry used to preserve the order of the
|
25
78
|
entries
|
26
|
-
- Added the OrderedKeys method to
|
27
|
-
|
79
|
+
- Added the OrderedKeys method to return the ordered or sorted keys from a
|
80
|
+
returned structure value
|
28
81
|
|
29
82
|
Oct. 8, 2024 - Version 12.98
|
30
83
|
|
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.02.tar.gz | tar -xf -
|
113
|
+
cd Image-ExifTool-13.02
|
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.02';
|
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;
|
@@ -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,9 @@ 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{'hex'} = join ' ', unpack '(H2)*', $$ex{BinVal} if defined $$ex{BinVal};
|
2856
|
+
$$val{'fmt'} = $$ex{G6} if defined $$ex{G6};
|
2846
2857
|
}
|
2847
2858
|
}
|
2848
2859
|
FormatJSON($fp, $val, $ind, $quote);
|
@@ -3638,7 +3649,7 @@ sub FormatJSON($$$;$)
|
|
3638
3649
|
print $fp $bra;
|
3639
3650
|
foreach (@$val) {
|
3640
3651
|
print $fp ',' if $comma;
|
3641
|
-
FormatJSON($fp, $_, $ind);
|
3652
|
+
FormatJSON($fp, $_, $ind, $quote);
|
3642
3653
|
$comma = 1,
|
3643
3654
|
}
|
3644
3655
|
print $fp $ket,
|
@@ -3654,7 +3665,7 @@ sub FormatJSON($$$;$)
|
|
3654
3665
|
if ($showTagID and $_ eq 'id' and $showTagID eq 'H' and $$val{$_} =~ /^\d+\.\d+$/) {
|
3655
3666
|
print $fp qq{"$$val{$_}"};
|
3656
3667
|
} else {
|
3657
|
-
FormatJSON($fp, $$val{$_}, "$ind ");
|
3668
|
+
FormatJSON($fp, $$val{$_}, "$ind ", $quote);
|
3658
3669
|
}
|
3659
3670
|
$comma = 1,
|
3660
3671
|
}
|
@@ -3820,7 +3831,14 @@ sub Printable($)
|
|
3820
3831
|
$val = '(Binary data '.length($$val).' bytes)';
|
3821
3832
|
}
|
3822
3833
|
}
|
3823
|
-
$
|
3834
|
+
if ($escapeC) {
|
3835
|
+
$val =~ s/([\0-\x1f\\\x7f])/$escC{$1} || sprintf('\x%.2x', ord $1)/eg;
|
3836
|
+
} else {
|
3837
|
+
# translate unprintable chars in value and remove trailing spaces
|
3838
|
+
$val =~ tr/\x01-\x1f\x7f/./;
|
3839
|
+
$val =~ s/\x00//g;
|
3840
|
+
$val =~ s/\s+$//;
|
3841
|
+
}
|
3824
3842
|
return $val;
|
3825
3843
|
}
|
3826
3844
|
|
@@ -3831,17 +3849,23 @@ sub Printable($)
|
|
3831
3849
|
sub LengthUTF8($)
|
3832
3850
|
{
|
3833
3851
|
my $str = shift;
|
3852
|
+
return length $str unless $fixLen;
|
3853
|
+
local $SIG{'__WARN__'} = sub { };
|
3854
|
+
if (not $$mt{OPTIONS}{EncodeHangs} and eval { require Encode }) {
|
3855
|
+
$str = Encode::decode_utf8($str);
|
3856
|
+
} else {
|
3857
|
+
$str = pack('U0C*', unpack 'C*', $str);
|
3858
|
+
}
|
3834
3859
|
my $len;
|
3835
|
-
if (
|
3860
|
+
if ($fixLen == 1) {
|
3836
3861
|
$len = length $str;
|
3837
|
-
} elsif ($fixLen == 1) {
|
3838
|
-
$len = length Encode::decode_utf8($str);
|
3839
3862
|
} else {
|
3840
|
-
my $gcstr = eval { Unicode::GCString->new(
|
3863
|
+
my $gcstr = eval { Unicode::GCString->new($str) };
|
3841
3864
|
if ($gcstr) {
|
3842
3865
|
$len = $gcstr->columns;
|
3843
3866
|
} else {
|
3844
|
-
$len = length
|
3867
|
+
$len = length $str;
|
3868
|
+
delete $SIG{'__WARN__'};
|
3845
3869
|
Warning($mt, 'Unicode::GCString problem. Columns may be misaligned');
|
3846
3870
|
$fixLen = 1;
|
3847
3871
|
}
|
@@ -3944,6 +3968,19 @@ sub CleanFilename($)
|
|
3944
3968
|
$_[0] =~ tr/\\/\// if Image::ExifTool::IsPC();
|
3945
3969
|
}
|
3946
3970
|
|
3971
|
+
#------------------------------------------------------------------------------
|
3972
|
+
# Does path name contain wildcards
|
3973
|
+
# Inputs: 0) path name
|
3974
|
+
# Returns: true if path contains wildcards
|
3975
|
+
sub HasWildcards($)
|
3976
|
+
{
|
3977
|
+
my $path = shift;
|
3978
|
+
|
3979
|
+
# if this is a Windows path with the long path prefix, then wildcards are not supported
|
3980
|
+
return 0 if $^O eq 'MSWin32' and $path =~ m{^[\\/]{2}\?[\\/]};
|
3981
|
+
return $path =~ /[*?]/;
|
3982
|
+
}
|
3983
|
+
|
3947
3984
|
#------------------------------------------------------------------------------
|
3948
3985
|
# Check for valid UTF-8 of a file name
|
3949
3986
|
# Inputs: 0) string, 1) original encoding
|
@@ -4064,7 +4101,7 @@ sub ScanDir($$;$)
|
|
4064
4101
|
return if $ignore{$dir};
|
4065
4102
|
# use Win32::FindFile on Windows if available
|
4066
4103
|
# (ReadDir will croak if there is a wildcard, so check for this)
|
4067
|
-
if ($^O eq 'MSWin32' and $dir
|
4104
|
+
if ($^O eq 'MSWin32' and not HasWildcards($dir)) {
|
4068
4105
|
undef $evalWarning;
|
4069
4106
|
local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] };;
|
4070
4107
|
if (CheckUTF8($dir, $enc) >= 0) {
|
@@ -4190,7 +4227,7 @@ sub FindFileWindows($$)
|
|
4190
4227
|
$wildfile = $et->Decode($wildfile, $enc, undef, 'UTF8') if $enc and $enc ne 'UTF8';
|
4191
4228
|
$wildfile =~ tr/\\/\//; # use forward slashes
|
4192
4229
|
my ($dir, $wildname) = ($wildfile =~ m{(.*[:/])(.*)}) ? ($1, $2) : ('', $wildfile);
|
4193
|
-
if ($dir
|
4230
|
+
if (HasWildcards($dir)) {
|
4194
4231
|
Warn "Wildcards don't work in the directory specification\n";
|
4195
4232
|
return ();
|
4196
4233
|
}
|
@@ -5130,13 +5167,13 @@ may be used to to indicate any XMP namespace (eg. C<--xmp-all:dabs>).
|
|
5130
5167
|
Write a new value for the specified tag (eg. C<-comment=wow>), or delete the
|
5131
5168
|
tag if no I<VALUE> is given (eg. C<-comment=>). C<+=> and C<-=> are used to
|
5132
5169
|
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.)
|
5170
|
+
(see L<Image::ExifTool::Shift.pl|Image::ExifTool::Shift.pl> and notes 6 and
|
5171
|
+
7 below for more details). C<+=> may also be used to increment numerical
|
5172
|
+
values (or decrement if I<VALUE> is negative), and C<-=> may be used to
|
5173
|
+
conditionally delete or replace a tag (see L</WRITING EXAMPLES> for
|
5174
|
+
examples). C<^=> is used to write an empty string instead of deleting the
|
5175
|
+
tag when no I<VALUE> is given, but otherwise it is equivalent to C<=>.
|
5176
|
+
(Note that the caret must be quoted on the Windows command line.)
|
5140
5177
|
|
5141
5178
|
I<TAG> may contain one or more leading family 0, 1, 2 or 7 group names,
|
5142
5179
|
prefixed by optional family numbers, and separated colons. If no group name
|
@@ -5211,6 +5248,10 @@ tag, overriding any other values previously assigned to the tag on the same
|
|
5211
5248
|
command line. To shift a date/time value and copy it to another tag in the
|
5212
5249
|
same operation, use the B<-globalTimeShift> option.
|
5213
5250
|
|
5251
|
+
7) The C<+=> operator may not be used to shift a List-type date/time tag
|
5252
|
+
(eg. XMP-dc:Date) because C<+=> is used to add elements to the list.
|
5253
|
+
Instead, the B<-globalTimeShift> option should be used.
|
5254
|
+
|
5214
5255
|
Special feature: Integer values may be specified in hexadecimal with a
|
5215
5256
|
leading C<0x>, and simple rational values may be specified as fractions.
|
5216
5257
|
|
@@ -5671,16 +5712,17 @@ output as simple strings). The B<-a> option is implied when B<-json> is
|
|
5671
5712
|
used, but entries with identical JSON names are suppressed in the output.
|
5672
5713
|
(B<-G4> may be used to ensure that all tags have unique JSON names.) Adding
|
5673
5714
|
the B<-D> or B<-H> option changes tag values to JSON objects with "val" and
|
5674
|
-
"id" fields
|
5675
|
-
numerical value is different from the converted "val"
|
5676
|
-
|
5677
|
-
|
5678
|
-
|
5679
|
-
|
5680
|
-
|
5681
|
-
|
5682
|
-
|
5683
|
-
|
5715
|
+
"id" fields. Adding B<-l> adds a "desc" field, and a "num" field if the
|
5716
|
+
numerical value is different from the converted "val", and "fmt" and "hex"
|
5717
|
+
fields for EXIF metadata if the API SaveFormat and SaveBin options are set
|
5718
|
+
respectively. The B<-b> option may be added to output binary data, encoded
|
5719
|
+
in base64 if necessary (indicated by ASCII "base64:" as the first 7 bytes of
|
5720
|
+
the value), and B<-t> may be added to include tag table information (see
|
5721
|
+
B<-t> for details). The JSON output is UTF-8 regardless of any B<-L> or
|
5722
|
+
B<-charset> option setting, but the UTF-8 validation is disabled if a
|
5723
|
+
character set other than UTF-8 is specified. Note that ExifTool quotes JSON
|
5724
|
+
values only if they don't look like numbers (regardless of the original
|
5725
|
+
storage format or the relevant metadata specification).
|
5684
5726
|
|
5685
5727
|
If I<JSONFILE> is specified, the file is imported and the tag definitions
|
5686
5728
|
from the file are used to set tag values on a per-file basis. The special
|
@@ -5834,7 +5876,7 @@ with this command:
|
|
5834
5876
|
|
5835
5877
|
produces output like this:
|
5836
5878
|
|
5837
|
-
-- Generated by ExifTool
|
5879
|
+
-- Generated by ExifTool 13.02 --
|
5838
5880
|
File: a.jpg - 2003:10:31 15:44:19
|
5839
5881
|
(f/5.6, 1/60s, ISO 100)
|
5840
5882
|
File: b.jpg - 2006:05:23 11:57:38
|
@@ -6683,8 +6725,8 @@ The B<-g> and B<-G> options may be used to organize the output by the
|
|
6683
6725
|
specified family of groups, with B<-G1> being the default. The B<-a> option
|
6684
6726
|
is implied. Adding B<-v> includes a count of the number of tags that are
|
6685
6727
|
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>.
|
6728
|
+
when B<-diff> is used: B<-c>, B<-charset>, B<-d>, B<-E>, B<-ec>, B<-ex>,
|
6729
|
+
B<-L>, B<-lang>, B<-n>, B<-s>, B<-sep>, B<-struct> and B<-w>.
|
6688
6730
|
|
6689
6731
|
=item B<-geotag> I<TRKFILE>
|
6690
6732
|
|
@@ -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
|
}
|
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
|
|
88
88
|
sub ProcessExifInfo($$$);
|
89
89
|
sub SwapWords($);
|
90
90
|
|
91
|
-
$VERSION = '4.
|
91
|
+
$VERSION = '4.84';
|
92
92
|
|
93
93
|
# Note: Removed 'USM' from 'L' lenses since it is redundant - PH
|
94
94
|
# (or is it? Ref 32 shows 5 non-USM L-type lenses)
|
@@ -9830,35 +9830,39 @@ sub LensWithTC($$)
|
|
9830
9830
|
|
9831
9831
|
#------------------------------------------------------------------------------
|
9832
9832
|
# Attempt to calculate sensor size for Canon cameras
|
9833
|
-
# Inputs: 0
|
9833
|
+
# Inputs: 0) ExifTool ref
|
9834
9834
|
# Returns: Sensor diagonal size in mm, or undef
|
9835
9835
|
# Notes: This algorithm is fairly reliable, but has been found to give incorrect
|
9836
9836
|
# values for some firmware versions of the EOS 20D, A310, SD40 and IXUS 65
|
9837
9837
|
# (ref http://wyw.dcweb.cn/download.asp?path=&file=jhead-2.96-ccdwidth_hack.zip)
|
9838
|
-
sub CalcSensorDiag(
|
9838
|
+
sub CalcSensorDiag($)
|
9839
9839
|
{
|
9840
|
-
my
|
9841
|
-
#
|
9842
|
-
|
9843
|
-
|
9844
|
-
|
9845
|
-
|
9846
|
-
|
9847
|
-
|
9848
|
-
|
9849
|
-
|
9850
|
-
|
9851
|
-
|
9852
|
-
|
9853
|
-
|
9854
|
-
|
9855
|
-
|
9856
|
-
|
9857
|
-
|
9858
|
-
|
9859
|
-
|
9860
|
-
|
9861
|
-
|
9840
|
+
my $et = shift;
|
9841
|
+
# calculation is based on the rational value of FocalPlaneX/YResolution
|
9842
|
+
# (most Canon cameras store the sensor size in the denominator)
|
9843
|
+
return undef unless $$et{TAG_EXTRA}{FocalPlaneXResolution} and
|
9844
|
+
$$et{TAG_EXTRA}{FocalPlaneYResolution};
|
9845
|
+
my $xres = $$et{TAG_EXTRA}{FocalPlaneXResolution}{Rational};
|
9846
|
+
my $yres = $$et{TAG_EXTRA}{FocalPlaneYResolution}{Rational};
|
9847
|
+
return undef unless $xres and $yres;
|
9848
|
+
# assumptions: 1) numerators are image width/height * 1000
|
9849
|
+
# 2) denominators are sensor width/height in inches * 1000
|
9850
|
+
my @xres = split /[ \/]/, $xres;
|
9851
|
+
my @yres = split /[ \/]/, $yres;
|
9852
|
+
# verify assumptions as best we can:
|
9853
|
+
# numerators are always divisible by 1000
|
9854
|
+
if ($xres[0] % 1000 == 0 and $yres[0] % 1000 == 0 and
|
9855
|
+
# at least 640x480 pixels (DC models - PH)
|
9856
|
+
$xres[0] >= 640000 and $yres[0] >= 480000 and
|
9857
|
+
# ... but not too big!
|
9858
|
+
$xres[0] < 10000000 and $yres[0] < 10000000 and
|
9859
|
+
# minimum sensor size is 0.061 inches (DC models - PH)
|
9860
|
+
$xres[1] >= 61 and $xres[1] < 1500 and
|
9861
|
+
$yres[1] >= 61 and $yres[1] < 1000 and
|
9862
|
+
# sensor isn't square (may happen if rationals have been reduced)
|
9863
|
+
$xres[1] != $yres[1])
|
9864
|
+
{
|
9865
|
+
return sqrt($xres[1]*$xres[1] + $yres[1]*$yres[1]) * 0.0254;
|
9862
9866
|
}
|
9863
9867
|
return undef;
|
9864
9868
|
}
|
@@ -10251,7 +10255,11 @@ sub ProcessSerialData($$$)
|
|
10251
10255
|
$et->ProcessDirectory(\%dirInfo, $subTablePtr);
|
10252
10256
|
} elsif (not $$tagInfo{Unknown} or $unknown) {
|
10253
10257
|
# don't extract zero-length information
|
10254
|
-
$et->FoundTag($tagInfo, $val) if $count;
|
10258
|
+
my $key = $et->FoundTag($tagInfo, $val) if $count;
|
10259
|
+
if ($key) {
|
10260
|
+
$$et{TAG_EXTRA}{$key}{G6} = $format if $$et{OPTIONS}{SaveFormat};
|
10261
|
+
$$et{TAG_EXTRA}{$key}{BinVal} = substr($$dataPt, $pos+$offset, $len) if $$et{OPTIONS}{SaveBin};
|
10262
|
+
}
|
10255
10263
|
}
|
10256
10264
|
$pos += $len;
|
10257
10265
|
}
|
@@ -10448,6 +10456,7 @@ sub ProcessCTMD($$$)
|
|
10448
10456
|
Start => $pos + 6,
|
10449
10457
|
Addr => $$dirInfo{Base} + $pos + 6,
|
10450
10458
|
Prefix => $$et{INDENT},
|
10459
|
+
Out => $et->Options('TextOut'),
|
10451
10460
|
) if $verbose > 2;
|
10452
10461
|
if ($$tagTablePtr{$type}) {
|
10453
10462
|
$et->HandleTag($tagTablePtr, $type, undef,
|
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
|
|
57
57
|
use Image::ExifTool qw(:DataAccess :Utils);
|
58
58
|
use Image::ExifTool::MakerNotes;
|
59
59
|
|
60
|
-
$VERSION = '4.
|
60
|
+
$VERSION = '4.53';
|
61
61
|
|
62
62
|
sub ProcessExif($$$);
|
63
63
|
sub WriteExif($$$);
|
@@ -2931,7 +2931,7 @@ my %opcodeInfo = (
|
|
2931
2931
|
0xa433 => { Name => 'LensMake', Writable => 'string' }, #24
|
2932
2932
|
0xa434 => { Name => 'LensModel', Writable => 'string' }, #24
|
2933
2933
|
0xa435 => { Name => 'LensSerialNumber', Writable => 'string' }, #24
|
2934
|
-
0xa436 => { Name => '
|
2934
|
+
0xa436 => { Name => 'ImageTitle', Writable => 'string' }, #33
|
2935
2935
|
0xa437 => { Name => 'Photographer', Writable => 'string' }, #33
|
2936
2936
|
0xa438 => { Name => 'ImageEditor', Writable => 'string' }, #33
|
2937
2937
|
0xa439 => { Name => 'CameraFirmware', Writable => 'string' }, #33
|
@@ -5346,10 +5346,7 @@ sub CalcScaleFactor35efl
|
|
5346
5346
|
# calculate Canon sensor size using a dedicated algorithm
|
5347
5347
|
if ($$et{Make} eq 'Canon') {
|
5348
5348
|
require Image::ExifTool::Canon;
|
5349
|
-
my $canonDiag = Image::ExifTool::Canon::CalcSensorDiag(
|
5350
|
-
$$et{RATIONAL}{FocalPlaneXResolution},
|
5351
|
-
$$et{RATIONAL}{FocalPlaneYResolution},
|
5352
|
-
);
|
5349
|
+
my $canonDiag = Image::ExifTool::Canon::CalcSensorDiag($et);
|
5353
5350
|
$diag = $canonDiag if $canonDiag;
|
5354
5351
|
}
|
5355
5352
|
unless ($diag and Image::ExifTool::IsFloat($diag)) {
|
@@ -6171,7 +6168,7 @@ sub ProcessExif($$$)
|
|
6171
6168
|
my $base = $$dirInfo{Base} || 0;
|
6172
6169
|
my $firstBase = $base;
|
6173
6170
|
my $raf = $$dirInfo{RAF};
|
6174
|
-
my ($verbose,$validate,$saveFormat) = @{$$et{OPTIONS}}{qw(Verbose Validate SaveFormat)};
|
6171
|
+
my ($verbose,$validate,$saveFormat,$saveBin) = @{$$et{OPTIONS}}{qw(Verbose Validate SaveFormat SaveBin)};
|
6175
6172
|
my $htmlDump = $$et{HTML_DUMP};
|
6176
6173
|
my $success = 1;
|
6177
6174
|
my ($tagKey, $dirSize, $makerAddr, $strEnc, %offsetInfo, $offName, $nextOffName, $doHash);
|
@@ -6361,7 +6358,7 @@ sub ProcessExif($$$)
|
|
6361
6358
|
my $valueDataLen = $dataLen;
|
6362
6359
|
my $valuePtr = $entry + 8; # pointer to value within $$dataPt
|
6363
6360
|
my $tagInfo = $et->GetTagInfo($tagTablePtr, $tagID);
|
6364
|
-
my ($origFormStr, $bad, $rational, $subOffName);
|
6361
|
+
my ($origFormStr, $bad, $rational, $binVal, $subOffName);
|
6365
6362
|
# save the EXIF format codes if requested
|
6366
6363
|
$$et{SaveFormat}{$saveFormat = $formatStr} = 1 if $saveFormat;
|
6367
6364
|
# hack to patch incorrect count in Kodak SubIFD3 tags
|
@@ -6658,6 +6655,7 @@ sub ProcessExif($$$)
|
|
6658
6655
|
} else {
|
6659
6656
|
# convert according to specified format
|
6660
6657
|
$val = ReadValue($valueDataPt,$valuePtr,$formatStr,$count,$readSize,\$rational);
|
6658
|
+
$binVal = substr($$valueDataPt,$valuePtr,$readSize) if $saveBin;
|
6661
6659
|
# re-code if necessary
|
6662
6660
|
if (defined $val) {
|
6663
6661
|
if ($formatStr eq 'utf8') {
|
@@ -7055,7 +7053,8 @@ sub ProcessExif($$$)
|
|
7055
7053
|
# set the group 1 name for tags in specified tables
|
7056
7054
|
$et->SetGroup($tagKey, $dirName) if $$tagTablePtr{SET_GROUP1};
|
7057
7055
|
# save original components of rational numbers (used when copying)
|
7058
|
-
$$et{
|
7056
|
+
$$et{TAG_EXTRA}{$tagKey}{Rational} = $rational if defined $rational;
|
7057
|
+
$$et{TAG_EXTRA}{$tagKey}{BinVal} = $binVal if defined $binVal;
|
7059
7058
|
$$et{TAG_EXTRA}{$tagKey}{G6} = $saveFormat if $saveFormat;
|
7060
7059
|
if ($$et{MAKER_NOTE_FIXUP}) {
|
7061
7060
|
$$et{TAG_EXTRA}{$tagKey}{Fixup} = $$et{MAKER_NOTE_FIXUP};
|