exiftool_vendored 11.63.0 → 11.64.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 +4 -4
- data/bin/Changes +18 -0
- data/bin/MANIFEST +5 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +3 -2
- data/bin/config_files/blueskysea.config +101 -0
- data/bin/exiftool +13 -10
- data/bin/lib/Image/ExifTool.pm +10 -10
- data/bin/lib/Image/ExifTool.pod +38 -6
- data/bin/lib/Image/ExifTool/Canon.pm +3 -2
- data/bin/lib/Image/ExifTool/Font.pm +6 -6
- data/bin/lib/Image/ExifTool/Nikon.pm +15 -1
- data/bin/lib/Image/ExifTool/PNG.pm +7 -4
- data/bin/lib/Image/ExifTool/QuickTime.pm +12 -6
- data/bin/lib/Image/ExifTool/TagLookup.pm +1 -1
- data/bin/lib/Image/ExifTool/TagNames.pod +6 -5
- data/bin/lib/Image/ExifTool/WriteXMP.pl +80 -13
- data/bin/lib/Image/ExifTool/Writer.pl +6 -0
- data/bin/perl-Image-ExifTool.spec +1 -1
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed8e2593ed82c4f03352524a9533ca0b8f58b029
|
|
4
|
+
data.tar.gz: da4126b33c5a53e17233ee3edf5977f0b676ec97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed09f33b6a3cff1381aa1e443ee3745e5d2ceb50746eb684bb3963128c283f3de519ed4850b992739f39ea7e4e5252f9a152c0362df7d61891a1d4be4c747e04
|
|
7
|
+
data.tar.gz: 2df102f545c23263b6549115915df802023d9bc1c9c75992edda90d9b61e312b94180434e2f7599a38e9bf883046359f9535e812b9b47eb88edefb9c28929940
|
data/bin/Changes
CHANGED
|
@@ -7,6 +7,24 @@ RSS feed: http://owl.phy.queensu.ca/~phil/exiftool/rss.xml
|
|
|
7
7
|
Note: The most recent production release is Version 11.50. (Other versions are
|
|
8
8
|
considered development releases, and are not uploaded to CPAN.)
|
|
9
9
|
|
|
10
|
+
[I will be on vacation and without access to my computer
|
|
11
|
+
from Sept. 3-24, so don't expect any updates or email/forum responses from
|
|
12
|
+
me during this time - PH]
|
|
13
|
+
|
|
14
|
+
Aug. 28, 2019 - Version 11.64
|
|
15
|
+
|
|
16
|
+
- Added a new Canon LensType (thanks LibRaw)
|
|
17
|
+
- Added a new Nikon LensID (thanks Bruno)
|
|
18
|
+
- Added config file for converting streaming GPS from BlueSkySea dashcam
|
|
19
|
+
- Decode FocusDistance for Nikon Z6/Z7
|
|
20
|
+
- Documented groups in families 5 and 6 (available but undocumented since
|
|
21
|
+
Exiftool version 8.22 and 11.50 respectively)
|
|
22
|
+
- Fixed some ordering problems when writing/copying nested XMP lang-alt lists
|
|
23
|
+
- Fixed some minor quirks with QuickTime language codes (thanks Hayo Baan)
|
|
24
|
+
- Fixed a CanonModelID value (thanks Dmitry)
|
|
25
|
+
- API Changes:
|
|
26
|
+
- Documented SavePath and SaveFormat options
|
|
27
|
+
|
|
10
28
|
Aug. 20, 2019 - Version 11.63 - "PNG Early Text"
|
|
11
29
|
|
|
12
30
|
- Added a few new Sigma lenses (thanks LibRaw)
|
data/bin/MANIFEST
CHANGED
|
@@ -17,6 +17,7 @@ arg_files/xmp2iptc.args
|
|
|
17
17
|
arg_files/xmp2pdf.args
|
|
18
18
|
config_files/age.config
|
|
19
19
|
config_files/bibble.config
|
|
20
|
+
config_files/blueskysea.config
|
|
20
21
|
config_files/convert_regions.config
|
|
21
22
|
config_files/dji.config
|
|
22
23
|
config_files/example.config
|
|
@@ -885,6 +886,9 @@ t/XMP_47.out
|
|
|
885
886
|
t/XMP_48.out
|
|
886
887
|
t/XMP_49.out
|
|
887
888
|
t/XMP_5.out
|
|
889
|
+
t/XMP_50.out
|
|
890
|
+
t/XMP_52.out
|
|
891
|
+
t/XMP_53.out
|
|
888
892
|
t/XMP_6.out
|
|
889
893
|
t/XMP_7.out
|
|
890
894
|
t/XMP_8.out
|
|
@@ -1061,6 +1065,7 @@ t/images/XMP5.xmp
|
|
|
1061
1065
|
t/images/XMP6.xmp
|
|
1062
1066
|
t/images/XMP7.xmp
|
|
1063
1067
|
t/images/XMP8.xmp
|
|
1068
|
+
t/images/XMP9.xmp
|
|
1064
1069
|
t/images/ZIP.gz
|
|
1065
1070
|
t/images/ZIP.zip
|
|
1066
1071
|
t/images/iWork.numbers
|
data/bin/META.json
CHANGED
data/bin/META.yml
CHANGED
data/bin/README
CHANGED
|
@@ -104,8 +104,8 @@ your home directory, then you would type the following commands in a
|
|
|
104
104
|
terminal window to extract and run ExifTool:
|
|
105
105
|
|
|
106
106
|
cd ~/Desktop
|
|
107
|
-
gzip -dc Image-ExifTool-11.
|
|
108
|
-
cd Image-ExifTool-11.
|
|
107
|
+
gzip -dc Image-ExifTool-11.64.tar.gz | tar -xf -
|
|
108
|
+
cd Image-ExifTool-11.64
|
|
109
109
|
./exiftool t/images/ExifTool.jpg
|
|
110
110
|
|
|
111
111
|
Note: These commands extract meta information from one of the test images.
|
|
@@ -190,6 +190,7 @@ distribution package:
|
|
|
190
190
|
config_files/ - Sample ExifTool configuration files:
|
|
191
191
|
age.config - Calculate Age of person in photo
|
|
192
192
|
bibble.config - Definitions for writing Bibble XMP tags
|
|
193
|
+
blueskysea.config - Convert GPS from BlueSkySea dashcam
|
|
193
194
|
convert_regions.config - Convert between MWG and MP face regions
|
|
194
195
|
dji.config - Composite tags for metadata in DJI videos
|
|
195
196
|
example.config - General example showing config features
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#------------------------------------------------------------------------------
|
|
2
|
+
# File: blueskysea.config
|
|
3
|
+
#
|
|
4
|
+
# Description: This config file defines Composite tags to convert embedded
|
|
5
|
+
# metadata in videos from BlueSkySea traffic cameras
|
|
6
|
+
#
|
|
7
|
+
# Usage: exiftool -config blueskysea.config -ee FILE
|
|
8
|
+
#
|
|
9
|
+
# Example command to create .gpx log file from BlueSkySea video
|
|
10
|
+
# (requires gpx.fmt available in the full Exiftool distribution):
|
|
11
|
+
#
|
|
12
|
+
# exiftool -config blueskysea.config -p gpx.fmt -ee FILE
|
|
13
|
+
#
|
|
14
|
+
# Requires: ExifTool version 10.75 or later
|
|
15
|
+
#
|
|
16
|
+
# Revisions: 2019/08/23 - P. Harvey Created
|
|
17
|
+
#------------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
%Image::ExifTool::UserDefined = (
|
|
20
|
+
'Image::ExifTool::Composite' => {
|
|
21
|
+
GROUPS => { 2 => 'Location' },
|
|
22
|
+
#
|
|
23
|
+
# Note: SubDoc flag is set for all these tags so they will be generated for
|
|
24
|
+
# all embedded documents
|
|
25
|
+
#
|
|
26
|
+
GPSDateTime => {
|
|
27
|
+
Description => 'GPS Date/Time',
|
|
28
|
+
Groups => { 2 => 'Time' },
|
|
29
|
+
SubDoc => 1,
|
|
30
|
+
Require => 'Text',
|
|
31
|
+
RawConv => q{
|
|
32
|
+
$val = pack('C*', map { $_ ^ 0xaa } unpack('C*', substr($val[0], 8, 14)));
|
|
33
|
+
return undef unless $val =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/;
|
|
34
|
+
return "$1:$2:$3 $4:$5:$6";
|
|
35
|
+
},
|
|
36
|
+
PrintConv => '$self->ConvertDateTime($val)',
|
|
37
|
+
},
|
|
38
|
+
GPSLatitude => {
|
|
39
|
+
SubDoc => 1,
|
|
40
|
+
Require => 'Text',
|
|
41
|
+
RawConv => q{
|
|
42
|
+
$val = pack('C*', map { $_ ^ 0xaa } unpack('C*', substr($val[0], 38, 9)));
|
|
43
|
+
return undef unless $val =~ /^([NS])(\d{2})(\d+$)$/;
|
|
44
|
+
return ($2 + $3 / 600000) * ($1 eq 'S' ? -1 : 1);
|
|
45
|
+
},
|
|
46
|
+
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
|
|
47
|
+
},
|
|
48
|
+
GPSLongitude => {
|
|
49
|
+
SubDoc => 1,
|
|
50
|
+
Require => 'Text',
|
|
51
|
+
RawConv => q{
|
|
52
|
+
$val = pack('C*', map { $_ ^ 0xaa } unpack('C*', substr($val[0], 47, 10)));
|
|
53
|
+
return undef unless $val =~ /^([EW])(\d{3})(\d+$)$/;
|
|
54
|
+
return ($2 + $3 / 600000) * ($1 eq 'W' ? -1 : 1);
|
|
55
|
+
},
|
|
56
|
+
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
|
|
57
|
+
},
|
|
58
|
+
GPSSpeed => {
|
|
59
|
+
SubDoc => 1,
|
|
60
|
+
Require => 'Text',
|
|
61
|
+
RawConv => q{
|
|
62
|
+
$val = pack('C*', map { $_ ^ 0xaa } unpack('C*', substr($val[0], 62, 3)));
|
|
63
|
+
return undef unless $val =~ /^\d+$/;
|
|
64
|
+
return $val + 0;
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
Accelerometer => {
|
|
68
|
+
SubDoc => 1,
|
|
69
|
+
Require => 'Text',
|
|
70
|
+
Notes => q{
|
|
71
|
+
the first X,Y,Z accelerometer readings from the AccelerometerData, stored in
|
|
72
|
+
text format
|
|
73
|
+
},
|
|
74
|
+
RawConv => q{
|
|
75
|
+
$val = pack('C*', map { $_ ^ 0xaa } unpack('C*', substr($val[0], 0xad, 12)));
|
|
76
|
+
return undef unless $val =~ /^([-+]\d{3})([-+]\d{3})([-+]\d{3})$/;
|
|
77
|
+
return "$1 $2 $3";
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
AccelerometerData => {
|
|
81
|
+
SubDoc => 1,
|
|
82
|
+
Require => 'Text',
|
|
83
|
+
Notes => q{
|
|
84
|
+
24 values in 6 groups of 4 values each. For each group, the first value is
|
|
85
|
+
zero and the next 3 are the X,Y,Z components of acceleration. The first 5
|
|
86
|
+
groups are likely samples taken at 5 Hz. The last group often has zero
|
|
87
|
+
entries, and its meaning is unknown
|
|
88
|
+
},
|
|
89
|
+
RawConv => q{
|
|
90
|
+
$val = pack('C*', map { $_ ^ 0xaa } unpack('C*', substr($val[0], 0xba, 96)));
|
|
91
|
+
my $order = GetByteOrder();
|
|
92
|
+
SetByteOrder('II');
|
|
93
|
+
$val = ReadValue(\$val, 0, 'float');
|
|
94
|
+
SetByteOrder($order);
|
|
95
|
+
return $val;
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
1; #end
|
data/bin/exiftool
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
use strict;
|
|
11
11
|
require 5.004;
|
|
12
12
|
|
|
13
|
-
my $version = '11.
|
|
13
|
+
my $version = '11.64';
|
|
14
14
|
|
|
15
15
|
# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
|
|
16
16
|
my $exeDir;
|
|
@@ -4961,14 +4961,17 @@ B<-csv>=I<CSVFILE> feature.
|
|
|
4961
4961
|
|
|
4962
4962
|
Organize output by tag group. I<NUM> specifies a group family number, and
|
|
4963
4963
|
may be 0 (general location), 1 (specific location), 2 (category), 3
|
|
4964
|
-
(document number)
|
|
4965
|
-
|
|
4966
|
-
mentioned in the documentation.
|
|
4967
|
-
separating them with colons. By
|
|
4968
|
-
simplified by removing any leading
|
|
4969
|
-
identical group names, but this can be
|
|
4970
|
-
first family number (eg. B<-g:3:1>).
|
|
4971
|
-
names for a specified family.
|
|
4964
|
+
(document number), 4 (instance number), 5 (metadata path) or 6 (EXIF/TIFF
|
|
4965
|
+
format). B<-g0> is assumed if a family number is not specified, and family
|
|
4966
|
+
numbers may be added wherever B<-g> is mentioned in the documentation.
|
|
4967
|
+
Multiple families may be specified by separating them with colons. By
|
|
4968
|
+
default the resulting group name is simplified by removing any leading
|
|
4969
|
+
C<Main:> and collapsing adjacent identical group names, but this can be
|
|
4970
|
+
avoided by placing a colon before the first family number (eg. B<-g:3:1>).
|
|
4971
|
+
Use the B<-listg> option to list group names for a specified family. The
|
|
4972
|
+
SavePath and SaveFormat API options are automatically enabled if the
|
|
4973
|
+
respective family 5 or 6 group names are requested. See the
|
|
4974
|
+
L<API GetGroup documentation|Image::ExifTool/GetGroup> for more information.
|
|
4972
4975
|
|
|
4973
4976
|
=item B<-G>[I<NUM>][:I<NUM>...] (B<-groupNames>)
|
|
4974
4977
|
|
|
@@ -5168,7 +5171,7 @@ with this command:
|
|
|
5168
5171
|
|
|
5169
5172
|
produces output like this:
|
|
5170
5173
|
|
|
5171
|
-
-- Generated by ExifTool 11.
|
|
5174
|
+
-- Generated by ExifTool 11.64 --
|
|
5172
5175
|
File: a.jpg - 2003:10:31 15:44:19
|
|
5173
5176
|
(f/5.6, 1/60s, ISO 100)
|
|
5174
5177
|
File: b.jpg - 2006:05:23 11:57:38
|
data/bin/lib/Image/ExifTool.pm
CHANGED
|
@@ -27,7 +27,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
|
|
|
27
27
|
%mimeType $swapBytes $swapWords $currentByteOrder %unpackStd
|
|
28
28
|
%jpegMarker %specialTags %fileTypeLookup);
|
|
29
29
|
|
|
30
|
-
$VERSION = '11.
|
|
30
|
+
$VERSION = '11.64';
|
|
31
31
|
$RELEASE = '';
|
|
32
32
|
@ISA = qw(Exporter);
|
|
33
33
|
%EXPORT_TAGS = (
|
|
@@ -1636,7 +1636,7 @@ my %systemTagsNotes = (
|
|
|
1636
1636
|
causes GPS information to be written into the EXIF or XMP of the target
|
|
1637
1637
|
files. The local system timezone is assumed if the date/time value does not
|
|
1638
1638
|
contain a timezone. May be deleted to delete associated GPS tags. A group
|
|
1639
|
-
name of
|
|
1639
|
+
name of "EXIF" or "XMP" may be specified to write or delete only EXIF or XMP
|
|
1640
1640
|
GPS tags
|
|
1641
1641
|
},
|
|
1642
1642
|
DelCheck => q{
|
|
@@ -1674,12 +1674,12 @@ my %systemTagsNotes = (
|
|
|
1674
1674
|
Writable => 1,
|
|
1675
1675
|
WriteOnly => 1,
|
|
1676
1676
|
Notes => q{
|
|
1677
|
-
write-only tag used to force
|
|
1678
|
-
|
|
1679
|
-
corresponding metadata type to be rewritten, "FixBase" to cause
|
|
1680
|
-
rewritten only if the MakerNotes offset base was fixed, or "All"
|
|
1681
|
-
all of these metadata types. Values are case insensitive, and
|
|
1682
|
-
values may be separated with commas, eg. C<-ForceWrite=exif,xmp>
|
|
1677
|
+
write-only tag used to force metadata in a file to be rewritten even if no
|
|
1678
|
+
tag values are changed. May be set to "EXIF", "IPTC", "XMP" or "PNG" to
|
|
1679
|
+
force the corresponding metadata type to be rewritten, "FixBase" to cause
|
|
1680
|
+
EXIF to be rewritten only if the MakerNotes offset base was fixed, or "All"
|
|
1681
|
+
to rewrite all of these metadata types. Values are case insensitive, and
|
|
1682
|
+
multiple values may be separated with commas, eg. C<-ForceWrite=exif,xmp>
|
|
1683
1683
|
},
|
|
1684
1684
|
},
|
|
1685
1685
|
EmbeddedVideo => { Groups => { 2 => 'Video' } },
|
|
@@ -2194,8 +2194,8 @@ sub ClearOptions($)
|
|
|
2194
2194
|
QuickTimeUTC=> undef, # assume that QuickTime date/time tags are stored as UTC
|
|
2195
2195
|
RequestAll => undef, # extract all tags that must be specifically requested
|
|
2196
2196
|
RequestTags => undef, # extra tags to request (on top of those in the tag list)
|
|
2197
|
-
SaveFormat => undef, #
|
|
2198
|
-
SavePath => undef, #
|
|
2197
|
+
SaveFormat => undef, # save family 6 tag TIFF format
|
|
2198
|
+
SavePath => undef, # save family 5 location path
|
|
2199
2199
|
ScanForXMP => undef, # flag to scan for XMP information in all files
|
|
2200
2200
|
Sort => 'Input', # order to sort found tags (Input, File, Tag, Descr, Group#)
|
|
2201
2201
|
Sort2 => 'File', # secondary sort order for tags in a group (File, Tag, Descr)
|
data/bin/lib/Image/ExifTool.pod
CHANGED
|
@@ -853,6 +853,19 @@ current RequestTags list. Groups are requested by adding a colon after the
|
|
|
853
853
|
name (eg. "MacOS:"). Names are converted to lower case as they are added to
|
|
854
854
|
the list. Default is undef.
|
|
855
855
|
|
|
856
|
+
=item SaveFormat
|
|
857
|
+
|
|
858
|
+
Flag to save EXIF/TIFF format type as the family 6 group name when
|
|
859
|
+
extracting information. Without this option set, the family 6 group names
|
|
860
|
+
are not generated. Default is undef. See the L</GetGroup> option for more
|
|
861
|
+
details.
|
|
862
|
+
|
|
863
|
+
=item SavePath
|
|
864
|
+
|
|
865
|
+
Flag to save the metadata path as the family 5 group name when extracting
|
|
866
|
+
information. Without this option set, the family 5 group names are not
|
|
867
|
+
generated. Default is undef. See the L</GetGroup> option for more details.
|
|
868
|
+
|
|
856
869
|
=item ScanForXMP
|
|
857
870
|
|
|
858
871
|
Flag to scan all files (even unrecognized formats) for XMP information
|
|
@@ -1044,8 +1057,8 @@ CharsetPhotoshop, CharsetQuickTime, CharsetRIFF, Composite, ExtendedXMP,
|
|
|
1044
1057
|
ExtractEmbedded, FastScan, FixBase, HtmlDump, HtmlDumpBase,
|
|
1045
1058
|
IgnoreMinorErrors, Lang, LargeFileSupport, MakerNotes, MDItemTags,
|
|
1046
1059
|
NoPDFList, Password, QuickTimeUTC (enforced 1904 time zero), RequestAll,
|
|
1047
|
-
RequestTags, ScanForXMP, Struct, TextOut, Unknown,
|
|
1048
|
-
XMPAutoConv.
|
|
1060
|
+
RequestTags, SaveFormat, SavePath, ScanForXMP, Struct, TextOut, Unknown,
|
|
1061
|
+
Verbose, XAttrTags and XMPAutoConv.
|
|
1049
1062
|
|
|
1050
1063
|
=item Return Value:
|
|
1051
1064
|
|
|
@@ -1451,9 +1464,9 @@ hash reference or a serialized string (see the last two examples above).
|
|
|
1451
1464
|
=item AddValue
|
|
1452
1465
|
|
|
1453
1466
|
Specifies that the value be added to an existing list in a file rather than
|
|
1454
|
-
overwriting. Valid settings are 0 (overwrite any
|
|
1455
|
-
(add to an existing list and warn for non-list tags)
|
|
1456
|
-
list and overwrite non-list tags). Default is 0.
|
|
1467
|
+
overwriting the existing values. Valid settings are 0 (overwrite any
|
|
1468
|
+
existing tag value), 1 (add to an existing list and warn for non-list tags)
|
|
1469
|
+
or 2 (add to existing list and overwrite non-list tags). Default is 0.
|
|
1457
1470
|
|
|
1458
1471
|
=item DelValue
|
|
1459
1472
|
|
|
@@ -1516,7 +1529,7 @@ set in previous calls to L</SetNewValue>). This option is most commonly
|
|
|
1516
1529
|
used to replace previously-set new values for list-type tags. Valid values
|
|
1517
1530
|
are 0 (set new value normally -- adds to new values for list-type tags), 1
|
|
1518
1531
|
(reset any previous new values before setting new value) or 2 (reset
|
|
1519
|
-
previous new values only; new value argument is ignored).
|
|
1532
|
+
previous new values only; new value argument is ignored). Default is 0.
|
|
1520
1533
|
|
|
1521
1534
|
=item Shift
|
|
1522
1535
|
|
|
@@ -1999,6 +2012,8 @@ The group family numbers are currently available:
|
|
|
1999
2012
|
2) Category (eg. Author, Time)
|
|
2000
2013
|
3) Document Number (eg. Main, Doc1, Doc3-2)
|
|
2001
2014
|
4) Instance Number (eg. Copy1, Copy2, Copy3...)
|
|
2015
|
+
5) Metadata Path (eg. JPEG-APP1-IFD0-ExifIFD)
|
|
2016
|
+
6) EXIF/TIFF Format (eg. int8u, int32u, undef, string)
|
|
2002
2017
|
|
|
2003
2018
|
Families 0 and 1 are based on the file structure, and are similar except
|
|
2004
2019
|
that family 1 is more specific and sub-divides some groups to give more
|
|
@@ -2034,6 +2049,14 @@ specified) has no family 4 group name, but additional instances have have
|
|
|
2034
2049
|
family 4 group names of 'Copy1', 'Copy2', 'Copy3', etc. For convenience,
|
|
2035
2050
|
the primary tag may also be accessed using a group name of 'Copy0'.
|
|
2036
2051
|
|
|
2052
|
+
Family 5 is experimental, and gives the complete path for the metadata in
|
|
2053
|
+
the file. Generated only if the L</SavePath> option is used when
|
|
2054
|
+
extracting.
|
|
2055
|
+
|
|
2056
|
+
Family 6 is currently used only for EXIF/TIFF metadata, and gives the format
|
|
2057
|
+
type of the extracted value. Generated only if the L</SaveFormat> option is
|
|
2058
|
+
used when extracting.
|
|
2059
|
+
|
|
2037
2060
|
See L</GetAllGroups [static]> for complete lists of group names.
|
|
2038
2061
|
|
|
2039
2062
|
=back
|
|
@@ -2267,6 +2290,15 @@ Doc#, Main
|
|
|
2267
2290
|
|
|
2268
2291
|
Copy#
|
|
2269
2292
|
|
|
2293
|
+
=item Family 5 (Metadata Path):
|
|
2294
|
+
|
|
2295
|
+
eg. JPEG-APP1-IFD0-ExifIFD
|
|
2296
|
+
|
|
2297
|
+
=item Family 6 (EXIF/TIFF Format):
|
|
2298
|
+
|
|
2299
|
+
int8u, string, int16u, int32u, rational64u, int8s, undef, int16s, int32s,
|
|
2300
|
+
rational64s, float, double, ifd, unicode, complex, int64u, int64s, ifd64
|
|
2301
|
+
|
|
2270
2302
|
=back
|
|
2271
2303
|
|
|
2272
2304
|
=head2 GetDeleteGroups [static]
|
|
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
|
|
|
88
88
|
sub ProcessExifInfo($$$);
|
|
89
89
|
sub SwapWords($);
|
|
90
90
|
|
|
91
|
-
$VERSION = '4.
|
|
91
|
+
$VERSION = '4.23';
|
|
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)
|
|
@@ -562,6 +562,7 @@ $VERSION = '4.22';
|
|
|
562
562
|
61182.2 => 'Canon RF 24-105mm F4 L IS USM', #IB
|
|
563
563
|
61182.3 => 'Canon RF 28-70mm F2 L USM', #IB
|
|
564
564
|
61182.4 => 'Canon RF 85mm F1.2L USM', #IB
|
|
565
|
+
61182.5 => 'Canon RF 24-240mm F4-6.3 IS USM', #IB
|
|
565
566
|
65535 => 'n/a',
|
|
566
567
|
);
|
|
567
568
|
|
|
@@ -794,7 +795,7 @@ $VERSION = '4.22';
|
|
|
794
795
|
0x4020000 => 'PowerShot SX420 IS',
|
|
795
796
|
0x4030000 => 'PowerShot ELPH 190 IS / IXUS 180 / IXY 190',
|
|
796
797
|
0x4040000 => 'PowerShot G1',
|
|
797
|
-
0x4040001 => 'IXY 180', #
|
|
798
|
+
0x4040001 => 'PowerShot ELPH 180 IS / IXUS 175 / IXY 180', #forum10402
|
|
798
799
|
0x4050000 => 'PowerShot SX720 HS',
|
|
799
800
|
0x4060000 => 'PowerShot SX620 HS',
|
|
800
801
|
0x4070000 => 'EOS M6',
|
|
@@ -19,7 +19,7 @@ use strict;
|
|
|
19
19
|
use vars qw($VERSION %ttLang);
|
|
20
20
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
21
21
|
|
|
22
|
-
$VERSION = '1.
|
|
22
|
+
$VERSION = '1.09';
|
|
23
23
|
|
|
24
24
|
sub ProcessOTF($$);
|
|
25
25
|
|
|
@@ -88,20 +88,20 @@ my %ttCharset = (
|
|
|
88
88
|
1 => 'fr', 25 => 'pl', 49 => 'az', 73 => 'kn', 130 => 'ca',
|
|
89
89
|
2 => 'de', 26 => 'hu', 50 => 'az', 74 => 'ta', 131 => 'la',
|
|
90
90
|
3 => 'it', 27 => 'et', 51 => 'hy', 75 => 'te', 132 => 'qu',
|
|
91
|
-
4 => 'nl',
|
|
91
|
+
4 => 'nl-NL', 28 => 'lv', 52 => 'ka', 76 => 'si', 133 => 'gn',
|
|
92
92
|
5 => 'sv', 29 => 'smi', 53 => 'ro', 77 => 'my', 134 => 'ay',
|
|
93
93
|
6 => 'es', 30 => 'fo', 54 => 'ky', 78 => 'km', 135 => 'tt',
|
|
94
94
|
7 => 'da', 31 => 'fa', 55 => 'tg', 79 => 'lo', 136 => 'ug',
|
|
95
95
|
8 => 'pt', 32 => 'ru', 56 => 'tk', 80 => 'vi', 137 => 'dz',
|
|
96
96
|
9 => 'no', 33 => 'zh-CN', 57 => 'mn-MN', 81 => 'id', 138 => 'jv',
|
|
97
|
-
10 => 'he', 34 => 'nl',
|
|
97
|
+
10 => 'he', 34 => 'nl-BE', 58 => 'mn-CN', 82 => 'tl', 139 => 'su',
|
|
98
98
|
11 => 'ja', 35 => 'ga', 59 => 'ps', 83 => 'ms-MY', 140 => 'gl',
|
|
99
99
|
12 => 'ar', 36 => 'sq', 60 => 'ku', 84 => 'ms-BN', 141 => 'af',
|
|
100
100
|
13 => 'fi', 37 => 'ro', 61 => 'ks', 85 => 'am', 142 => 'br',
|
|
101
|
-
14 => '
|
|
102
|
-
15 => 'is', 39 => 'sk', 63 => 'bo', 87 => 'om', 145 => '
|
|
101
|
+
14 => 'el', 38 => 'cs', 62 => 'sd', 86 => 'ti', 144 => 'gd',
|
|
102
|
+
15 => 'is', 39 => 'sk', 63 => 'bo', 87 => 'om', 145 => 'gv',
|
|
103
103
|
16 => 'mt', 40 => 'sl', 64 => 'ne', 88 => 'so', 146 => 'ga',
|
|
104
|
-
17 => 'tr', 41 => 'yi', 65 => 'sa', 89 => 'sw', 147 => '
|
|
104
|
+
17 => 'tr', 41 => 'yi', 65 => 'sa', 89 => 'sw', 147 => 'to',
|
|
105
105
|
18 => 'hr', 42 => 'sr', 66 => 'mr', 90 => 'rw', 148 => 'el',
|
|
106
106
|
19 => 'zh-TW', 43 => 'mk', 67 => 'bn', 91 => 'rn', 149 => 'kl',
|
|
107
107
|
20 => 'ur', 44 => 'bg', 68 => 'as', 92 => 'ny', 150 => 'az',
|
|
@@ -60,7 +60,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
|
|
|
60
60
|
use Image::ExifTool::Exif;
|
|
61
61
|
use Image::ExifTool::GPS;
|
|
62
62
|
|
|
63
|
-
$VERSION = '3.
|
|
63
|
+
$VERSION = '3.70';
|
|
64
64
|
|
|
65
65
|
sub LensIDConv($$$);
|
|
66
66
|
sub ProcessNikonAVI($$$);
|
|
@@ -379,6 +379,7 @@ sub GetAFPointGrid($$;$);
|
|
|
379
379
|
'99 48 76 76 24 24 4B 0E' => 'Sigma APO Macro 150mm F2.8 EX DG OS HSM', #(Christian Hesse)
|
|
380
380
|
'48 4C 7C 7C 2C 2C 4B 02' => 'Sigma APO Macro 180mm F3.5 EX DG HSM',
|
|
381
381
|
'48 4C 7D 7D 2C 2C 4B 02' => 'Sigma APO Macro 180mm F3.5 EX DG HSM',
|
|
382
|
+
'F4 4C 7C 7C 2C 2C 4B 02' => 'Sigma APO Macro 180mm F3.5 EX DG HSM', #Bruno
|
|
382
383
|
'94 48 7C 7C 24 24 4B 0E' => 'Sigma APO Macro 180mm F2.8 EX DG OS HSM', #MichaelTapes (HSM from ref 8)
|
|
383
384
|
'48 54 8E 8E 24 24 4B 02' => 'Sigma APO 300mm F2.8 EX DG HSM',
|
|
384
385
|
'FB 54 8E 8E 24 24 4B 02' => 'Sigma APO 300mm F2.8 EX DG HSM', #26
|
|
@@ -4470,6 +4471,7 @@ my %nikonFocalConversions = (
|
|
|
4470
4471
|
0x30 => {
|
|
4471
4472
|
Name => 'LensID',
|
|
4472
4473
|
Condition => '$$self{NewLensData}',
|
|
4474
|
+
Notes => 'tags from here onward used for Nikkor Z lenses only',
|
|
4473
4475
|
Format => 'int16u',
|
|
4474
4476
|
PrintConv => {
|
|
4475
4477
|
1 => 'Nikkor Z 24-70mm f/4 S',
|
|
@@ -4477,6 +4479,9 @@ my %nikonFocalConversions = (
|
|
|
4477
4479
|
4 => 'Nikkor Z 35mm f/1.8 S',
|
|
4478
4480
|
9 => 'Nikkor Z 50mm f/1.8 S',
|
|
4479
4481
|
13 => 'Nikkor Z 24-70mm f/2.8 S',
|
|
4482
|
+
# missing from this list:
|
|
4483
|
+
# Nikkor Z 85mm f/1.8 S
|
|
4484
|
+
# Nikkor Z 58mm f/0.95 S Noct (coming soon)
|
|
4480
4485
|
},
|
|
4481
4486
|
},
|
|
4482
4487
|
0x36 => {
|
|
@@ -4507,6 +4512,15 @@ my %nikonFocalConversions = (
|
|
|
4507
4512
|
PrintConv => '"$val mm"',
|
|
4508
4513
|
PrintConvInv => '$val=~s/\s*mm$//;$val',
|
|
4509
4514
|
},
|
|
4515
|
+
0x4f => {
|
|
4516
|
+
Name => 'FocusDistance',
|
|
4517
|
+
Condition => '$$self{NewLensData}',
|
|
4518
|
+
# (perhaps int16u Format? -- although upper byte would always be zero)
|
|
4519
|
+
ValueConv => '0.01 * 10**($val/40)', # in m
|
|
4520
|
+
ValueConvInv => '$val>0 ? 40*log($val*100)/log(10) : 0',
|
|
4521
|
+
PrintConv => '$val ? sprintf("%.2f m",$val) : "inf"',
|
|
4522
|
+
PrintConvInv => '$val eq "inf" ? 0 : $val =~ s/\s*m$//, $val',
|
|
4523
|
+
},
|
|
4510
4524
|
);
|
|
4511
4525
|
|
|
4512
4526
|
# Unknown Nikon lens data (note: data may need decrypting after byte 4)
|
|
@@ -114,10 +114,10 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
|
|
|
114
114
|
Also according to the PNG specification, there is no restriction on the
|
|
115
115
|
location of text-type chunks (tEXt, zTXt and iTXt). However, certain
|
|
116
116
|
utilities (including some Apple and Adobe utilities) won't read the XMP iTXt
|
|
117
|
-
chunk
|
|
118
|
-
|
|
119
|
-
text chunks (including XMP) before IDAT, and will move existing
|
|
120
|
-
up from after IDAT.
|
|
117
|
+
chunk if it comes after the IDAT chunk, and at least one utility won't read
|
|
118
|
+
other text chunks like this. For this reason, ExifTool 11.63 and later
|
|
119
|
+
create new text chunks (including XMP) before IDAT, and will move existing
|
|
120
|
+
text chunks up from after IDAT.
|
|
121
121
|
},
|
|
122
122
|
bKGD => {
|
|
123
123
|
Name => 'BackgroundColor',
|
|
@@ -376,14 +376,17 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
|
|
|
376
376
|
0 => {
|
|
377
377
|
Name => 'PixelsPerUnitX',
|
|
378
378
|
Format => 'int32u',
|
|
379
|
+
Notes => 'default 2834',
|
|
379
380
|
},
|
|
380
381
|
4 => {
|
|
381
382
|
Name => 'PixelsPerUnitY',
|
|
382
383
|
Format => 'int32u',
|
|
384
|
+
Notes => 'default 2834',
|
|
383
385
|
},
|
|
384
386
|
8 => {
|
|
385
387
|
Name => 'PixelUnits',
|
|
386
388
|
PrintConv => { 0 => 'Unknown', 1 => 'meters' },
|
|
389
|
+
Notes => 'default meters',
|
|
387
390
|
},
|
|
388
391
|
);
|
|
389
392
|
|
|
@@ -44,7 +44,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
|
|
|
44
44
|
use Image::ExifTool::Exif;
|
|
45
45
|
use Image::ExifTool::GPS;
|
|
46
46
|
|
|
47
|
-
$VERSION = '2.
|
|
47
|
+
$VERSION = '2.37';
|
|
48
48
|
|
|
49
49
|
sub ProcessMOV($$;$);
|
|
50
50
|
sub ProcessKeys($$$);
|
|
@@ -6021,7 +6021,7 @@ my %eeBox = (
|
|
|
6021
6021
|
Format => 'int16u',
|
|
6022
6022
|
RawConv => '$val ? $val : undef',
|
|
6023
6023
|
# allow both Macintosh (for MOV files) and ISO (for MP4 files) language codes
|
|
6024
|
-
ValueConv => '$val < 0x400 ? $val : pack "C*", map { (($val>>$_)&0x1f)+0x60 } 10, 5, 0',
|
|
6024
|
+
ValueConv => '($val < 0x400 or $val == 0x7fff) ? $val : pack "C*", map { (($val>>$_)&0x1f)+0x60 } 10, 5, 0',
|
|
6025
6025
|
PrintConv => q{
|
|
6026
6026
|
return $val unless $val =~ /^\d+$/;
|
|
6027
6027
|
require Image::ExifTool::Font;
|
|
@@ -8658,13 +8658,19 @@ ItemID: foreach $id (keys %$items) {
|
|
|
8658
8658
|
next if not $len and $pos;
|
|
8659
8659
|
my $str = substr($val, $pos, $len);
|
|
8660
8660
|
my $langInfo;
|
|
8661
|
-
if ($lang < 0x400 and $str !~ /^\xfe\xff/) {
|
|
8661
|
+
if (($lang < 0x400 or $lang == 0x7fff) and $str !~ /^\xfe\xff/) {
|
|
8662
8662
|
# this is a Macintosh language code
|
|
8663
8663
|
# a language code of 0 is Macintosh english, so treat as default
|
|
8664
8664
|
if ($lang) {
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8665
|
+
if ($lang == 0x7fff) {
|
|
8666
|
+
# technically, ISO 639-2 doesn't have a 2-character
|
|
8667
|
+
# equivalent for 'und', but use 'un' anyway
|
|
8668
|
+
$lang = 'un';
|
|
8669
|
+
} else {
|
|
8670
|
+
# use Font.pm to look up language string
|
|
8671
|
+
require Image::ExifTool::Font;
|
|
8672
|
+
$lang = $Image::ExifTool::Font::ttLang{Macintosh}{$lang};
|
|
8673
|
+
}
|
|
8668
8674
|
}
|
|
8669
8675
|
# the spec says only "Macintosh text encoding", but
|
|
8670
8676
|
# allow this to be configured by the user
|
|
@@ -2588,7 +2588,7 @@ my %tagLookup = (
|
|
|
2588
2588
|
'focusareaselection' => { 273 => '15.2' },
|
|
2589
2589
|
'focuscontinuous' => { 34 => 0x20 },
|
|
2590
2590
|
'focusdisplayaiservoandmf' => { 79 => 0x515 },
|
|
2591
|
-
'focusdistance' => { 155 => 'FocusDistance', 172 => 0x13, 178 => 0x49bb, 208 => 0x9, 209 => 0xa, 213 => 0xb, 282 => 0x305, 296 => 0x0, 300 => 0x304, 301 => 0x304 },
|
|
2591
|
+
'focusdistance' => { 155 => 'FocusDistance', 172 => 0x13, 178 => 0x49bb, 208 => 0x9, 209 => 0xa, 213 => [0xb,0x4f], 282 => 0x305, 296 => 0x0, 300 => 0x304, 301 => 0x304 },
|
|
2592
2592
|
'focusdistancelower' => { 7 => 0x45, 9 => 0x8e, 11 => 0x45, 13 => 0x56, 14 => 0x45, 15 => 0x45, 16 => 0x52, 17 => 0x52, 18 => 0x56, 20 => 0x52, 21 => 0x8e, 22 => 0x59, 23 => 0x57, 24 => 0x8e, 25 => 0x94, 26 => 0x95, 27 => 0xa7, 28 => 0x56, 29 => 0xa7, 55 => 0x15, 73 => 0x14 },
|
|
2593
2593
|
'focusdistanceupper' => { 7 => 0x43, 9 => 0x8c, 11 => 0x43, 13 => 0x54, 14 => 0x43, 15 => 0x43, 16 => 0x50, 17 => 0x50, 18 => 0x54, 20 => 0x50, 21 => 0x8c, 22 => 0x57, 23 => 0x55, 24 => 0x8c, 25 => 0x92, 26 => 0x93, 27 => 0xa5, 28 => 0x54, 29 => 0xa5, 55 => 0x14, 73 => 0x13 },
|
|
2594
2594
|
'focusholdbutton' => { 175 => 0x44 },
|
|
@@ -12,7 +12,7 @@ meta information extracted from or written to a file.
|
|
|
12
12
|
=head1 TAG TABLES
|
|
13
13
|
|
|
14
14
|
The tables listed below give the names of all tags recognized by ExifTool.
|
|
15
|
-
They contain a total of
|
|
15
|
+
They contain a total of 22997 tags, with 15044 unique tag names.
|
|
16
16
|
|
|
17
17
|
B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
|
|
18
18
|
table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
|
|
@@ -12070,6 +12070,7 @@ Tags found in the encrypted LensData from cameras such as the Z6 and Z7.
|
|
|
12070
12070
|
54 MaxAperture int16u
|
|
12071
12071
|
56 FNumber int16u
|
|
12072
12072
|
60 FocalLength int16u
|
|
12073
|
+
79 FocusDistance int8u
|
|
12073
12074
|
|
|
12074
12075
|
=head3 Nikon LensDataUnknown Tags
|
|
12075
12076
|
|
|
@@ -22535,10 +22536,10 @@ this data as additional PNG chunks.
|
|
|
22535
22536
|
Also according to the PNG specification, there is no restriction on the
|
|
22536
22537
|
location of text-type chunks (tEXt, zTXt and iTXt). However, certain
|
|
22537
22538
|
utilities (including some Apple and Adobe utilities) won't read the XMP iTXt
|
|
22538
|
-
chunk
|
|
22539
|
-
|
|
22540
|
-
text chunks (including XMP) before IDAT, and will move existing
|
|
22541
|
-
up from after IDAT.
|
|
22539
|
+
chunk if it comes after the IDAT chunk, and at least one utility won't read
|
|
22540
|
+
other text chunks like this. For this reason, ExifTool 11.63 and later
|
|
22541
|
+
create new text chunks (including XMP) before IDAT, and will move existing
|
|
22542
|
+
text chunks up from after IDAT.
|
|
22542
22543
|
|
|
22543
22544
|
Tag ID Tag Name Writable
|
|
22544
22545
|
------ -------- --------
|
|
@@ -892,7 +892,7 @@ sub WriteXMP($$;$)
|
|
|
892
892
|
# get hash of all information we want to change
|
|
893
893
|
# (sorted by tag name so alternate languages come last, but with structures
|
|
894
894
|
# first so flattened tags may be used to override individual structure elements)
|
|
895
|
-
my @tagInfoList;
|
|
895
|
+
my (@tagInfoList, $delLangPath, %delLangPaths, %delAllLang, $firstNewPath);
|
|
896
896
|
my $writeGroup = $$dirInfo{WriteGroup};
|
|
897
897
|
foreach $tagInfo (sort ByTagName $et->GetNewTagInfoList()) {
|
|
898
898
|
next unless $et->GetGroup($tagInfo, 0) eq 'XMP';
|
|
@@ -1021,7 +1021,30 @@ sub WriteXMP($$;$)
|
|
|
1021
1021
|
my $nvHash = $et->GetNewValueHash($tagInfo);
|
|
1022
1022
|
my $overwrite = $et->IsOverwriting($nvHash);
|
|
1023
1023
|
my $writable = $$tagInfo{Writable} || '';
|
|
1024
|
-
my (%attrs, $deleted, $added, $existed);
|
|
1024
|
+
my (%attrs, $deleted, $added, $existed, $newLang);
|
|
1025
|
+
# set up variables to save/restore paths of deleted lang-alt tags
|
|
1026
|
+
if ($writable eq 'lang-alt') {
|
|
1027
|
+
$newLang = lc($$tagInfo{LangCode} || 'x-default');
|
|
1028
|
+
if ($delLangPath and $delLangPath eq $path) {
|
|
1029
|
+
# restore paths of deleted entries for this language
|
|
1030
|
+
@delPaths = @{$delLangPaths{$newLang}} if $delLangPaths{$newLang};
|
|
1031
|
+
} else {
|
|
1032
|
+
undef %delLangPaths;
|
|
1033
|
+
$delLangPath = $path; # base path for deleted lang-alt tags
|
|
1034
|
+
undef %delAllLang;
|
|
1035
|
+
undef $firstNewPath; # reset first path for new lang-alt tag
|
|
1036
|
+
}
|
|
1037
|
+
if (%delAllLang) {
|
|
1038
|
+
# add missing paths to delete list for entries where all languages were deleted
|
|
1039
|
+
my ($prefix, $reSort);
|
|
1040
|
+
foreach $prefix (keys %delAllLang) {
|
|
1041
|
+
next if grep /^$prefix/, @delPaths;
|
|
1042
|
+
push @delPaths, "${prefix}10";
|
|
1043
|
+
$reSort = 1;
|
|
1044
|
+
}
|
|
1045
|
+
@delPaths = sort @delPaths if $reSort;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1025
1048
|
# delete existing entry if necessary
|
|
1026
1049
|
if ($isStruct) {
|
|
1027
1050
|
# delete all structure (or pseudo-structure) elements
|
|
@@ -1034,7 +1057,7 @@ sub WriteXMP($$;$)
|
|
|
1034
1057
|
# take attributes from old values if they exist
|
|
1035
1058
|
%attrs = %{$$cap[1]};
|
|
1036
1059
|
if ($overwrite) {
|
|
1037
|
-
my ($oldLang, $delLang, $addLang, @matchingPaths, $langPathPat);
|
|
1060
|
+
my ($oldLang, $delLang, $addLang, @matchingPaths, $langPathPat, %langsHere);
|
|
1038
1061
|
# check to see if this is an indexed list item
|
|
1039
1062
|
if ($path =~ / /) {
|
|
1040
1063
|
my $pp;
|
|
@@ -1047,19 +1070,20 @@ sub WriteXMP($$;$)
|
|
|
1047
1070
|
foreach $path (@matchingPaths) {
|
|
1048
1071
|
my ($val, $attrs) = @{$capture{$path}};
|
|
1049
1072
|
if ($writable eq 'lang-alt') {
|
|
1073
|
+
# get original language code (lc for comparisons)
|
|
1074
|
+
$oldLang = lc($$attrs{'xml:lang'} || 'x-default');
|
|
1050
1075
|
# revert to original overwrite flag if this is in a different structure
|
|
1051
1076
|
if (not $langPathPat or $path !~ /^$langPathPat$/) {
|
|
1052
1077
|
$overwrite = $oldOverwrite;
|
|
1053
1078
|
($langPathPat = $path) =~ s/\d+$/\\d+/;
|
|
1054
1079
|
}
|
|
1080
|
+
# remember languages in this lang-alt list
|
|
1081
|
+
$langsHere{$langPathPat}{$oldLang} = 1;
|
|
1055
1082
|
unless (defined $addLang) {
|
|
1056
1083
|
# add to lang-alt list by default if creating this tag from scratch
|
|
1057
1084
|
$addLang = $$nvHash{IsCreating} ? 1 : 0;
|
|
1058
1085
|
}
|
|
1059
|
-
# get original language code (lc for comparisons)
|
|
1060
|
-
$oldLang = lc($$attrs{'xml:lang'} || 'x-default');
|
|
1061
1086
|
if ($overwrite < 0) {
|
|
1062
|
-
my $newLang = lc($$tagInfo{LangCode} || 'x-default');
|
|
1063
1087
|
next unless $oldLang eq $newLang;
|
|
1064
1088
|
# only add new tag if we are overwriting this one
|
|
1065
1089
|
# (note: this won't match if original XML contains CDATA!)
|
|
@@ -1100,7 +1124,23 @@ sub WriteXMP($$;$)
|
|
|
1100
1124
|
# save attributes and path from first deleted property
|
|
1101
1125
|
# so we can replace it exactly
|
|
1102
1126
|
%attrs = %$attrs unless @delPaths;
|
|
1103
|
-
|
|
1127
|
+
if ($writable eq 'lang-alt') {
|
|
1128
|
+
$langsHere{$langPathPat}{$oldLang} = 0; # (lang was deleted)
|
|
1129
|
+
}
|
|
1130
|
+
# save deleted paths so we can replace the same elements
|
|
1131
|
+
# (separately for each language of a lang-alt list)
|
|
1132
|
+
if ($writable ne 'lang-alt' or $oldLang eq $newLang) {
|
|
1133
|
+
push @delPaths, $path;
|
|
1134
|
+
} else {
|
|
1135
|
+
$delLangPaths{$oldLang} or $delLangPaths{$oldLang} = [ ];
|
|
1136
|
+
push @{$delLangPaths{$oldLang}}, $path;
|
|
1137
|
+
}
|
|
1138
|
+
# keep track of paths where we deleted all languages of a lang-alt tag
|
|
1139
|
+
if ($delLang) {
|
|
1140
|
+
my $p;
|
|
1141
|
+
($p = $path) =~ s/\d+$//;
|
|
1142
|
+
$delAllLang{$p} = 1;
|
|
1143
|
+
}
|
|
1104
1144
|
# delete this tag
|
|
1105
1145
|
delete $capture{$path};
|
|
1106
1146
|
++$changed;
|
|
@@ -1114,11 +1154,25 @@ sub WriteXMP($$;$)
|
|
|
1114
1154
|
next unless @delPaths or $$tagInfo{List} or $addLang;
|
|
1115
1155
|
if (@delPaths) {
|
|
1116
1156
|
$path = shift @delPaths;
|
|
1157
|
+
# make sure new path is unique
|
|
1158
|
+
while ($capture{$path}) {
|
|
1159
|
+
last unless $path =~ s/ \d(\d+)$/' '.length($1+1).($1+1)/e;
|
|
1160
|
+
}
|
|
1117
1161
|
$deleted = 1;
|
|
1118
1162
|
} else {
|
|
1119
1163
|
# don't change tag if we couldn't delete old copy
|
|
1120
1164
|
# unless this is a list or an lang-alt tag
|
|
1121
1165
|
next unless $$tagInfo{List} or $oldLang;
|
|
1166
|
+
# avoid adding duplicate entry to lang-alt in a list
|
|
1167
|
+
if ($writable eq 'lang-alt' and %langsHere) {
|
|
1168
|
+
foreach (sort keys %langsHere) {
|
|
1169
|
+
next unless $path =~ /^$_$/;
|
|
1170
|
+
last unless $langsHere{$_}{$newLang};
|
|
1171
|
+
$path =~ /(.* )\d(\d+)(.*? \d+)$/ or $et->Error('Internal error writing lang-alt list'), last;
|
|
1172
|
+
my $nxt = $2 + 1;
|
|
1173
|
+
$path = $1 . length($nxt) . ($nxt) . $3; # step to next index
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1122
1176
|
# (match last index to put in same lang-alt list for Bag of lang-alt items)
|
|
1123
1177
|
$path =~ m/.* (\d+)/g or warn "Internal error: no list index!\n", next;
|
|
1124
1178
|
$added = $1;
|
|
@@ -1126,7 +1180,15 @@ sub WriteXMP($$;$)
|
|
|
1126
1180
|
} else {
|
|
1127
1181
|
# we are never overwriting, so we must be adding to a list
|
|
1128
1182
|
# match the last index unless this is a list of lang-alt lists
|
|
1129
|
-
my $pat =
|
|
1183
|
+
my $pat = '.* (\d+)';
|
|
1184
|
+
if ($writable eq 'lang-alt') {
|
|
1185
|
+
if ($firstNewPath) {
|
|
1186
|
+
$path = $firstNewPath;
|
|
1187
|
+
$overwrite = 1; # necessary to put x-default entry first below
|
|
1188
|
+
} else {
|
|
1189
|
+
$pat = '.* (\d+)(.*? \d+)';
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1130
1192
|
if ($path =~ m/$pat/g) {
|
|
1131
1193
|
$added = $1;
|
|
1132
1194
|
# set position to end of matching index number
|
|
@@ -1143,7 +1205,7 @@ sub WriteXMP($$;$)
|
|
|
1143
1205
|
$$tagInfo{LangCode} eq 'x-default'))
|
|
1144
1206
|
{
|
|
1145
1207
|
my $saveCap = $capture{$path};
|
|
1146
|
-
|
|
1208
|
+
while ($saveCap) {
|
|
1147
1209
|
my $p = $path;
|
|
1148
1210
|
substr($p, $pos, $len) = length($nxt) . $nxt;
|
|
1149
1211
|
# increment index in the path of the existing item
|
|
@@ -1155,10 +1217,9 @@ sub WriteXMP($$;$)
|
|
|
1155
1217
|
}
|
|
1156
1218
|
} else {
|
|
1157
1219
|
# add to end of list
|
|
1158
|
-
|
|
1220
|
+
while ($capture{$path}) {
|
|
1159
1221
|
my $try = length($nxt) . $nxt;
|
|
1160
1222
|
substr($path, $pos, $len) = $try;
|
|
1161
|
-
last unless $capture{$path};
|
|
1162
1223
|
$len = length $try;
|
|
1163
1224
|
++$nxt;
|
|
1164
1225
|
}
|
|
@@ -1181,8 +1242,10 @@ sub WriteXMP($$;$)
|
|
|
1181
1242
|
my @newValues = $et->GetNewValue($nvHash) or next;
|
|
1182
1243
|
|
|
1183
1244
|
# set language attribute for lang-alt lists
|
|
1184
|
-
|
|
1185
|
-
|
|
1245
|
+
if ($writable eq 'lang-alt') {
|
|
1246
|
+
$attrs{'xml:lang'} = $$tagInfo{LangCode} || 'x-default';
|
|
1247
|
+
$firstNewPath = $path if defined $added; # save path of first lang-alt tag added
|
|
1248
|
+
}
|
|
1186
1249
|
# add new value(s) to %capture hash
|
|
1187
1250
|
my $subIdx;
|
|
1188
1251
|
for (;;) {
|
|
@@ -1234,6 +1297,10 @@ sub WriteXMP($$;$)
|
|
|
1234
1297
|
$subIdx = length($subIdx) . $subIdx;
|
|
1235
1298
|
} elsif (@delPaths) {
|
|
1236
1299
|
$path = shift @delPaths;
|
|
1300
|
+
# make sure new path is unique
|
|
1301
|
+
while ($capture{$path}) {
|
|
1302
|
+
last unless $path =~ s/ \d(\d+)$/' '.length($1+1).($1+1)/e;
|
|
1303
|
+
}
|
|
1237
1304
|
next;
|
|
1238
1305
|
} else {
|
|
1239
1306
|
$subIdx = '10';
|
|
@@ -1273,6 +1273,8 @@ sub SetNewValuesFromFile($$;@)
|
|
|
1273
1273
|
QuickTimeUTC => $$options{QuickTimeUTC},
|
|
1274
1274
|
RequestAll => $$options{RequestAll} || 1, # (is this still necessary now that RequestTags are being set?)
|
|
1275
1275
|
RequestTags => $$options{RequestTags},
|
|
1276
|
+
SaveFormat => $$options{SaveFormat},
|
|
1277
|
+
SavePath => $$options{SavePath},
|
|
1276
1278
|
ScanForXMP => $$options{ScanForXMP},
|
|
1277
1279
|
StrictDate => defined $$options{StrictDate} ? $$options{StrictDate} : 1,
|
|
1278
1280
|
Struct => $structOpt,
|
|
@@ -1738,6 +1740,8 @@ sub SaveNewValues($)
|
|
|
1738
1740
|
# Notes: Restores saved new values, but currently doesn't restore them in the
|
|
1739
1741
|
# original order, so there may be some minor side-effects when restoring tags
|
|
1740
1742
|
# with overlapping groups. eg) XMP:Identifier, XMP-dc:Identifier
|
|
1743
|
+
# Also, this doesn't do the right thing for list-type tags which accumulate
|
|
1744
|
+
# values across a save point
|
|
1741
1745
|
sub RestoreNewValues($)
|
|
1742
1746
|
{
|
|
1743
1747
|
my $self = shift;
|
|
@@ -2621,6 +2625,8 @@ sub GetAllGroups($)
|
|
|
2621
2625
|
|
|
2622
2626
|
$family == 3 and return('Doc#', 'Main');
|
|
2623
2627
|
$family == 4 and return('Copy#');
|
|
2628
|
+
$family == 5 and return('[too many possibilities to list]');
|
|
2629
|
+
$family == 6 and return(@Image::ExifTool::Exif::formatName[1..$#Image::ExifTool::Exif::formatName]);
|
|
2624
2630
|
|
|
2625
2631
|
LoadAllTables(); # first load all our tables
|
|
2626
2632
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: exiftool_vendored
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 11.
|
|
4
|
+
version: 11.64.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthew McEachen
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-08-
|
|
12
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: exiftool
|
|
@@ -192,6 +192,7 @@ files:
|
|
|
192
192
|
- bin/arg_files/xmp2pdf.args
|
|
193
193
|
- bin/config_files/age.config
|
|
194
194
|
- bin/config_files/bibble.config
|
|
195
|
+
- bin/config_files/blueskysea.config
|
|
195
196
|
- bin/config_files/convert_regions.config
|
|
196
197
|
- bin/config_files/dji.config
|
|
197
198
|
- bin/config_files/example.config
|