exiftool-vendored.pl 12.97.0 → 13.0.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.
- package/bin/Changes +48 -2
- package/bin/META.json +1 -1
- package/bin/META.yml +1 -1
- package/bin/README +2 -2
- package/bin/arg_files/exif2xmp.args +4 -0
- package/bin/arg_files/xmp2exif.args +4 -0
- package/bin/config_files/example.config +2 -1
- package/bin/exiftool +255 -54
- package/bin/lib/File/RandomAccess.pm +5 -2
- package/bin/lib/Image/ExifTool/APP12.pm +3 -2
- package/bin/lib/Image/ExifTool/Canon.pm +2 -1
- package/bin/lib/Image/ExifTool/Exif.pm +1 -1
- package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
- package/bin/lib/Image/ExifTool/Geotag.pm +4 -3
- package/bin/lib/Image/ExifTool/Import.pm +7 -3
- package/bin/lib/Image/ExifTool/InDesign.pm +4 -3
- package/bin/lib/Image/ExifTool/JSON.pm +3 -4
- package/bin/lib/Image/ExifTool/Jpeg2000.pm +2 -1
- package/bin/lib/Image/ExifTool/Lytro.pm +2 -2
- package/bin/lib/Image/ExifTool/M2TS.pm +10 -2
- package/bin/lib/Image/ExifTool/PhaseOne.pm +2 -1
- package/bin/lib/Image/ExifTool/QuickTime.pm +17 -6
- package/bin/lib/Image/ExifTool/QuickTimeStream.pl +88 -9
- package/bin/lib/Image/ExifTool/Sony.pm +6 -1
- package/bin/lib/Image/ExifTool/TagLookup.pm +14 -9
- package/bin/lib/Image/ExifTool/TagNames.pod +40 -23
- package/bin/lib/Image/ExifTool/WritePDF.pl +47 -21
- package/bin/lib/Image/ExifTool/WriteXMP.pl +16 -4
- package/bin/lib/Image/ExifTool/Writer.pl +16 -6
- package/bin/lib/Image/ExifTool/XMP.pm +19 -4
- package/bin/lib/Image/ExifTool/XMPStruct.pl +15 -7
- package/bin/lib/Image/ExifTool.pm +37 -12
- package/bin/lib/Image/ExifTool.pod +31 -8
- package/bin/perl-Image-ExifTool.spec +1 -1
- package/bin/pp_build_exe.args +4 -4
- package/bin/windows_exiftool.txt +32 -10
- package/package.json +3 -3
|
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
|
|
|
29
29
|
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
|
|
30
30
|
%static_vars $advFmtSelf);
|
|
31
31
|
|
|
32
|
-
$VERSION = '
|
|
32
|
+
$VERSION = '13.00';
|
|
33
33
|
$RELEASE = '';
|
|
34
34
|
@ISA = qw(Exporter);
|
|
35
35
|
%EXPORT_TAGS = (
|
|
@@ -37,7 +37,7 @@ $RELEASE = '';
|
|
|
37
37
|
Public => [qw(
|
|
38
38
|
ImageInfo AvailableOptions GetTagName GetShortcuts GetAllTags
|
|
39
39
|
GetWritableTags GetAllGroups GetDeleteGroups GetFileType CanWrite
|
|
40
|
-
CanCreate AddUserDefinedTags
|
|
40
|
+
CanCreate AddUserDefinedTags OrderedKeys
|
|
41
41
|
)],
|
|
42
42
|
# exports not part of the public API, but used by ExifTool modules:
|
|
43
43
|
DataAccess => [qw(
|
|
@@ -740,7 +740,7 @@ my %fileDescription = (
|
|
|
740
740
|
OGV => 'video/ogg',
|
|
741
741
|
ONP => 'application/on1',
|
|
742
742
|
ORF => 'image/x-olympus-orf',
|
|
743
|
-
OTF => 'application/
|
|
743
|
+
OTF => 'application/font-otf',
|
|
744
744
|
PAGES=> 'application/x-iwork-pages-sffpages',
|
|
745
745
|
PBM => 'image/x-portable-bitmap',
|
|
746
746
|
PCD => 'image/x-photo-cd',
|
|
@@ -798,8 +798,8 @@ my %fileDescription = (
|
|
|
798
798
|
THMX => 'application/vnd.ms-officetheme',
|
|
799
799
|
TIFF => 'image/tiff',
|
|
800
800
|
Torrent => 'application/x-bittorrent',
|
|
801
|
-
TTC => 'application/
|
|
802
|
-
TTF => 'application/
|
|
801
|
+
TTC => 'application/font-ttf',
|
|
802
|
+
TTF => 'application/font-ttf',
|
|
803
803
|
TXT => 'text/plain',
|
|
804
804
|
VCard=> 'text/vcard',
|
|
805
805
|
VRD => 'application/octet-stream', #PH (NC)
|
|
@@ -1466,12 +1466,12 @@ my %systemTagsNotes = (
|
|
|
1466
1466
|
PrintConv => sub {
|
|
1467
1467
|
my ($mask, $val) = (0400, oct(shift));
|
|
1468
1468
|
my %types = (
|
|
1469
|
-
0010000 => 'p',
|
|
1470
|
-
0020000 => 'c',
|
|
1471
|
-
0040000 => 'd',
|
|
1472
|
-
0060000 => 'b',
|
|
1473
|
-
0120000 => 'l',
|
|
1474
|
-
0140000 => 's',
|
|
1469
|
+
0010000 => 'p', # FIFO
|
|
1470
|
+
0020000 => 'c', # character special file
|
|
1471
|
+
0040000 => 'd', # directory
|
|
1472
|
+
0060000 => 'b', # block special file
|
|
1473
|
+
0120000 => 'l', # sym link
|
|
1474
|
+
0140000 => 's', # socket link
|
|
1475
1475
|
);
|
|
1476
1476
|
my $str = $types{$val & 0170000} || '-';
|
|
1477
1477
|
while ($mask) {
|
|
@@ -2292,6 +2292,7 @@ sub new
|
|
|
2292
2292
|
$$self{PATH} = [ ]; # (this too)
|
|
2293
2293
|
$$self{DEL_GROUP} = { }; # lookup for groups to delete when writing
|
|
2294
2294
|
$$self{SAVE_COUNT} = 0; # count calls to SaveNewValues()
|
|
2295
|
+
$$self{NV_COUNT} = 0; # count of NEW_VALUE entries
|
|
2295
2296
|
$$self{FILE_SEQUENCE} = 0; # sequence number for files when reading
|
|
2296
2297
|
$$self{FILES_WRITTEN} = 0; # count of files successfully written
|
|
2297
2298
|
$$self{INDENT2} = ''; # indentation of verbose messages from SetNewValue
|
|
@@ -2517,6 +2518,8 @@ sub Options($$;@)
|
|
|
2517
2518
|
# set Compact and XMPShorthand options, preserving backward compatibility
|
|
2518
2519
|
my ($p, %compact);
|
|
2519
2520
|
foreach $p ('Compact','XMPShorthand') {
|
|
2521
|
+
# (allow setting from a HASH (undocumented)
|
|
2522
|
+
ref $newVal eq 'HASH' and %compact = %{$newVal}, next;
|
|
2520
2523
|
my $val = $param eq $p ? $newVal : $$options{Compact}{$p};
|
|
2521
2524
|
if (defined $val) {
|
|
2522
2525
|
my @v = ($val =~ /\w+/g);
|
|
@@ -4195,6 +4198,16 @@ sub CanCreate($)
|
|
|
4195
4198
|
return 0;
|
|
4196
4199
|
}
|
|
4197
4200
|
|
|
4201
|
+
#------------------------------------------------------------------------------
|
|
4202
|
+
# Return list of ordered keys if available, otherwise just sort alphabetically
|
|
4203
|
+
# Inputs: 0) hash ref
|
|
4204
|
+
# Returns: List of ordered/sorted keys
|
|
4205
|
+
sub OrderedKeys($)
|
|
4206
|
+
{
|
|
4207
|
+
my $hash = shift;
|
|
4208
|
+
return $$hash{_ordered_keys_} ? @{$$hash{_ordered_keys_}} : sort keys %$hash;
|
|
4209
|
+
}
|
|
4210
|
+
|
|
4198
4211
|
#==============================================================================
|
|
4199
4212
|
# Functions below this are not part of the public API
|
|
4200
4213
|
|
|
@@ -7290,7 +7303,10 @@ sub ProcessJPEG($$;$)
|
|
|
7290
7303
|
last; # all done parsing file
|
|
7291
7304
|
} elsif (defined $markerLenBytes{$marker}) {
|
|
7292
7305
|
# handle other stand-alone markers and segments we skipped over
|
|
7293
|
-
$verbose and $marker
|
|
7306
|
+
if ($verbose and $marker) {
|
|
7307
|
+
next if $verbose < 4 and ($marker & 0xf8) == 0xd0;
|
|
7308
|
+
print $out "${indent}JPEG $markerName\n";
|
|
7309
|
+
}
|
|
7294
7310
|
next;
|
|
7295
7311
|
} elsif ($marker == 0xdb and length($$segDataPt) and # DQT
|
|
7296
7312
|
# save the DQT data only if JPEGDigest has been requested
|
|
@@ -7901,8 +7917,17 @@ sub ProcessJPEG($$;$)
|
|
|
7901
7917
|
my $seq = Get32u($segDataPt, 4);
|
|
7902
7918
|
my $len = Get32u($segDataPt, 8);
|
|
7903
7919
|
my $type = substr($$segDataPt, 12, 4);
|
|
7920
|
+
# a Microsoft bug writes $len and $type incorrectly as little-endian
|
|
7921
|
+
if ($type eq 'bmuj') {
|
|
7922
|
+
$self->WarnOnce('Wrong byte order in C2PA APP11 JUMBF header');
|
|
7923
|
+
$type = 'jumb';
|
|
7924
|
+
$len = unpack('x8V', $$segDataPt);
|
|
7925
|
+
# fix the header
|
|
7926
|
+
substr($$segDataPt, 8, 8) = Set32u($len) . $type;
|
|
7927
|
+
}
|
|
7904
7928
|
my $hdrLen;
|
|
7905
7929
|
if ($len == 1 and length($$segDataPt) >= 24) {
|
|
7930
|
+
# (haven't seen this with the Microsoft bug)
|
|
7906
7931
|
$len = Get64u($$segDataPt, 16);
|
|
7907
7932
|
$hdrLen = 16;
|
|
7908
7933
|
} else {
|
|
@@ -332,13 +332,14 @@ L</ImageInfo>:
|
|
|
332
332
|
|
|
333
333
|
Values of the returned hash are usually simple scalars, but a scalar
|
|
334
334
|
reference is used to indicate binary data and an array reference may be used
|
|
335
|
-
to indicate a list. Also, a hash reference may be returned if the
|
|
336
|
-
option is used
|
|
337
|
-
|
|
338
|
-
enabled
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
335
|
+
to indicate a list. Also, a hash reference may be returned if the
|
|
336
|
+
L</Struct> option is used (see the L</OrderedKeys> option to obtain the hash
|
|
337
|
+
keys). Lists of values are joined by commas into a single string only if
|
|
338
|
+
the PrintConv option is enabled and the ListJoin option is enabled (which
|
|
339
|
+
are the defaults). Note that binary values are not necessarily extracted
|
|
340
|
+
unless specifically requested, or the Binary option is enabled and the tag
|
|
341
|
+
is not specifically excluded. If not extracted the value is a reference to
|
|
342
|
+
a string of the form "Binary data ##### bytes".
|
|
342
343
|
|
|
343
344
|
The code below gives an example of how to handle these return values, as
|
|
344
345
|
well as illustrating the use of other ExifTool functions:
|
|
@@ -1089,7 +1090,9 @@ values in standard format).
|
|
|
1089
1090
|
|
|
1090
1091
|
Flag to return XMP structures as hash references instead of flattening into
|
|
1091
1092
|
individual tags. Has no effect when writing since both flattened and
|
|
1092
|
-
structured tags may always be written.
|
|
1093
|
+
structured tags may always be written. A special "_ordered_keys_" element
|
|
1094
|
+
containing a list of ordered keys may exist if the structure elements are
|
|
1095
|
+
ordered (see the L<OrderedKeys> method). Possible values are:
|
|
1093
1096
|
|
|
1094
1097
|
undef - (default) Same as 0 for reading, 2 for copying
|
|
1095
1098
|
0 - Read/copy flattened tags
|
|
@@ -2749,6 +2752,26 @@ details on the elements of the tag information hash.
|
|
|
2749
2752
|
|
|
2750
2753
|
=back
|
|
2751
2754
|
|
|
2755
|
+
=head2 OrderedKeys [static]
|
|
2756
|
+
|
|
2757
|
+
Return a list of ordered keys from a tag value that is a HASH reference
|
|
2758
|
+
when the Struct option is used.
|
|
2759
|
+
|
|
2760
|
+
use Image::ExifTool ':Public';
|
|
2761
|
+
my @keys = OrderedKeys($structRef);
|
|
2762
|
+
|
|
2763
|
+
=over 4
|
|
2764
|
+
|
|
2765
|
+
=item Inputs:
|
|
2766
|
+
|
|
2767
|
+
0) Structure HASH reference
|
|
2768
|
+
|
|
2769
|
+
=item Return Value:
|
|
2770
|
+
|
|
2771
|
+
List of ordered keys, or sorted alphabetically if not ordered.
|
|
2772
|
+
|
|
2773
|
+
=back
|
|
2774
|
+
|
|
2752
2775
|
=head1 CHARACTER ENCODINGS
|
|
2753
2776
|
|
|
2754
2777
|
Certain meta information formats allow coded character sets other than plain
|
package/bin/pp_build_exe.args
CHANGED
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
# 10) Copy zip archive to web servers.
|
|
22
22
|
# 11) Update zip file version in link and text of html/index.html.
|
|
23
23
|
#------------------------------------------------------------------------------
|
|
24
|
-
-T exiftool-12.
|
|
25
|
-
#--info=FileVersion=12.
|
|
26
|
-
#--info=ProductVersion=12.
|
|
27
|
-
##"--info=Build Date=2024:
|
|
24
|
+
-T exiftool-12.99p
|
|
25
|
+
#--info=FileVersion=12.9.9.0
|
|
26
|
+
#--info=ProductVersion=12.9.9.0
|
|
27
|
+
##"--info=Build Date=2024:10:10 16:54:18-04:00"
|
|
28
28
|
##"--info=Bundled Perl Version=ActivePerl 5.24.0"
|
|
29
29
|
##"--info=LegalCopyright=Copyright (c) 2003-2024, Phil Harvey"
|
|
30
30
|
##"--info=ProductName=ExifTool"
|
package/bin/windows_exiftool.txt
CHANGED
|
@@ -222,6 +222,7 @@ OPTIONS
|
|
|
222
222
|
|
|
223
223
|
Special features
|
|
224
224
|
|
|
225
|
+
-diff FILE2 Compare metadata with another file
|
|
225
226
|
-geotag TRKFILE Geotag images from specified GPS log
|
|
226
227
|
-globalTimeShift SHIFT Shift all formatted date/time values
|
|
227
228
|
-use MODULE Add features from plug-in module
|
|
@@ -311,8 +312,8 @@ OPTIONS
|
|
|
311
312
|
Write a new value for the specified tag (eg. "-comment=wow"), or
|
|
312
313
|
delete the tag if no *VALUE* is given (eg. "-comment="). "+=" and
|
|
313
314
|
"-=" are used to add or remove existing entries from a list, or to
|
|
314
|
-
shift date/time values (see Image::ExifTool::Shift.pl and
|
|
315
|
-
below for more details). "+=" may also be used to increment
|
|
315
|
+
shift date/time values (see Image::ExifTool::Shift.pl and notes 6
|
|
316
|
+
and 7 below for more details). "+=" may also be used to increment
|
|
316
317
|
numerical values (or decrement if *VALUE* is negative), and "-="
|
|
317
318
|
may be used to conditionally delete or replace a tag (see "WRITING
|
|
318
319
|
EXAMPLES" for examples). "^=" is used to write an empty string
|
|
@@ -398,6 +399,10 @@ OPTIONS
|
|
|
398
399
|
copy it to another tag in the same operation, use the
|
|
399
400
|
-globalTimeShift option.
|
|
400
401
|
|
|
402
|
+
7) The "+=" operator may not be used to shift a List-type date/time
|
|
403
|
+
tag (eg. XMP-dc:Date) because "+=" is used to add elements to the
|
|
404
|
+
list. Instead, the -globalTimeShift option should be used.
|
|
405
|
+
|
|
401
406
|
Special feature: Integer values may be specified in hexadecimal
|
|
402
407
|
with a leading "0x", and simple rational values may be specified as
|
|
403
408
|
fractions.
|
|
@@ -1034,7 +1039,7 @@ OPTIONS
|
|
|
1034
1039
|
|
|
1035
1040
|
produces output like this:
|
|
1036
1041
|
|
|
1037
|
-
-- Generated by ExifTool
|
|
1042
|
+
-- Generated by ExifTool 13.00 --
|
|
1038
1043
|
File: a.jpg - 2003:10:31 15:44:19
|
|
1039
1044
|
(f/5.6, 1/60s, ISO 100)
|
|
1040
1045
|
File: b.jpg - 2006:05:23 11:57:38
|
|
@@ -1584,10 +1589,10 @@ OPTIONS
|
|
|
1584
1589
|
the corresponding family 8 group name is specified for the tag. See
|
|
1585
1590
|
the -fileNUM option details for more information.
|
|
1586
1591
|
|
|
1587
|
-
5) The -a option
|
|
1588
|
-
and the values of duplicate tags are accessible
|
|
1589
|
-
a group name (such as a family 4
|
|
1590
|
-
$Copy2:TAG, etc).
|
|
1592
|
+
5) The -a (Duplicates) option is implied when -if is used without a
|
|
1593
|
+
fast *NUM*, and the values of duplicate tags are accessible by
|
|
1594
|
+
specifying a group name in the expression (such as a family 4
|
|
1595
|
+
instance number, eg. $Copy1:TAG, $Copy2:TAG, etc).
|
|
1591
1596
|
|
|
1592
1597
|
6) A special "OK" UserParam is available to test the success of the
|
|
1593
1598
|
previous command when -execute was used, and may be used like any
|
|
@@ -1849,9 +1854,9 @@ OPTIONS
|
|
|
1849
1854
|
The flags are formatted as a comma-separated list of the following
|
|
1850
1855
|
possible values: Avoid, Binary, List, Mandatory, Permanent,
|
|
1851
1856
|
Protected, Unknown and Unsafe (see the Tag Name documentation). For
|
|
1852
|
-
XMP List tags, the list type (Alt, Bag or Seq) is
|
|
1853
|
-
|
|
1854
|
-
|
|
1857
|
+
XMP List tags, the list type (Alt, Bag or Seq) is also given, and
|
|
1858
|
+
flattened structure tags are indicated by a Flattened flag with
|
|
1859
|
+
'struct' giving the ID of the parent structure.
|
|
1855
1860
|
|
|
1856
1861
|
Note that none of the -list options require an input *FILE*.
|
|
1857
1862
|
|
|
@@ -1864,6 +1869,23 @@ OPTIONS
|
|
|
1864
1869
|
as file names, even if they begin with a dash ("-").
|
|
1865
1870
|
|
|
1866
1871
|
Special features
|
|
1872
|
+
-diff *FILE2*
|
|
1873
|
+
Compare metadata in *FILE* with *FILE2*. The *FILE2* name may
|
|
1874
|
+
include filename formatting codes (see the -w option). All
|
|
1875
|
+
extracted tags from the files are compared, but the extracted tags
|
|
1876
|
+
may be controlled by adding -TAG or --TAG options. For example,
|
|
1877
|
+
below is a command to compare all the same-named files in two
|
|
1878
|
+
different directories, ignoring the System tags:
|
|
1879
|
+
|
|
1880
|
+
exiftool DIR1 -diff DIR2/%f.%e --system:all
|
|
1881
|
+
|
|
1882
|
+
The -g and -G options may be used to organize the output by the
|
|
1883
|
+
specified family of groups, with -G1 being the default. The -a
|
|
1884
|
+
option is implied. Adding -v includes a count of the number of tags
|
|
1885
|
+
that are the same in each group. The following text formatting
|
|
1886
|
+
options are valid when -diff is used: -c, -charset, -d, -E, -ec,
|
|
1887
|
+
-ex, -L, -lang, -n, -s, -sep, -struct and -w.
|
|
1888
|
+
|
|
1867
1889
|
-geotag *TRKFILE*
|
|
1868
1890
|
Geotag images from the specified GPS track log file. Using the
|
|
1869
1891
|
-geotag option is equivalent to writing a value to the "Geotag"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exiftool-vendored.pl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Vendored perl ExifTool for Node.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"homepage": "https://github.com/mceachen/exiftool-vendored.pl#readme",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"mocha": "^10.
|
|
45
|
-
"npm-check-updates": "^17.1.
|
|
44
|
+
"mocha": "^10.8.0",
|
|
45
|
+
"npm-check-updates": "^17.1.9",
|
|
46
46
|
"prettier": "^3.3.3"
|
|
47
47
|
}
|
|
48
48
|
}
|