exiftool_vendored 12.17.1 → 12.32.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 +225 -1
- data/bin/MANIFEST +23 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +45 -43
- data/bin/arg_files/xmp2exif.args +2 -1
- data/bin/config_files/acdsee.config +193 -6
- data/bin/config_files/convert_regions.config +25 -14
- data/bin/config_files/cuepointlist.config +70 -0
- data/bin/config_files/example.config +2 -9
- data/bin/exiftool +142 -87
- data/bin/fmt_files/gpx.fmt +2 -2
- data/bin/fmt_files/gpx_wpt.fmt +2 -2
- data/bin/fmt_files/kml.fmt +1 -1
- data/bin/fmt_files/kml_track.fmt +1 -1
- data/bin/lib/Image/ExifTool/Apple.pm +3 -2
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +30 -12
- data/bin/lib/Image/ExifTool/CBOR.pm +277 -0
- data/bin/lib/Image/ExifTool/Canon.pm +49 -18
- data/bin/lib/Image/ExifTool/DJI.pm +6 -6
- data/bin/lib/Image/ExifTool/DPX.pm +13 -2
- data/bin/lib/Image/ExifTool/DjVu.pm +6 -5
- data/bin/lib/Image/ExifTool/Exif.pm +28 -11
- data/bin/lib/Image/ExifTool/FITS.pm +13 -2
- data/bin/lib/Image/ExifTool/FlashPix.pm +35 -10
- data/bin/lib/Image/ExifTool/FujiFilm.pm +19 -8
- data/bin/lib/Image/ExifTool/GPS.pm +22 -11
- data/bin/lib/Image/ExifTool/Geotag.pm +13 -2
- data/bin/lib/Image/ExifTool/GoPro.pm +16 -1
- data/bin/lib/Image/ExifTool/ICC_Profile.pm +2 -2
- data/bin/lib/Image/ExifTool/ID3.pm +15 -3
- data/bin/lib/Image/ExifTool/JPEG.pm +74 -4
- data/bin/lib/Image/ExifTool/JSON.pm +27 -4
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +393 -16
- data/bin/lib/Image/ExifTool/LIF.pm +153 -0
- data/bin/lib/Image/ExifTool/Lang/nl.pm +60 -59
- data/bin/lib/Image/ExifTool/M2TS.pm +137 -5
- data/bin/lib/Image/ExifTool/MIE.pm +4 -3
- data/bin/lib/Image/ExifTool/MRC.pm +341 -0
- data/bin/lib/Image/ExifTool/MWG.pm +3 -3
- data/bin/lib/Image/ExifTool/MXF.pm +1 -1
- data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
- data/bin/lib/Image/ExifTool/Microsoft.pm +298 -82
- data/bin/lib/Image/ExifTool/Nikon.pm +19 -8
- data/bin/lib/Image/ExifTool/NikonSettings.pm +28 -11
- data/bin/lib/Image/ExifTool/Olympus.pm +6 -3
- data/bin/lib/Image/ExifTool/Other.pm +93 -0
- data/bin/lib/Image/ExifTool/PDF.pm +9 -12
- data/bin/lib/Image/ExifTool/PNG.pm +8 -7
- data/bin/lib/Image/ExifTool/Panasonic.pm +28 -3
- data/bin/lib/Image/ExifTool/Pentax.pm +28 -5
- data/bin/lib/Image/ExifTool/PhaseOne.pm +4 -3
- data/bin/lib/Image/ExifTool/Photoshop.pm +6 -0
- data/bin/lib/Image/ExifTool/QuickTime.pm +247 -88
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +283 -141
- data/bin/lib/Image/ExifTool/README +3 -0
- data/bin/lib/Image/ExifTool/RIFF.pm +89 -12
- data/bin/lib/Image/ExifTool/Samsung.pm +48 -10
- data/bin/lib/Image/ExifTool/Shortcuts.pm +9 -0
- data/bin/lib/Image/ExifTool/Sony.pm +237 -78
- data/bin/lib/Image/ExifTool/TagInfoXML.pm +1 -0
- data/bin/lib/Image/ExifTool/TagLookup.pm +4125 -4028
- data/bin/lib/Image/ExifTool/TagNames.pod +644 -286
- data/bin/lib/Image/ExifTool/Torrent.pm +18 -11
- data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
- data/bin/lib/Image/ExifTool/WritePDF.pl +1 -0
- data/bin/lib/Image/ExifTool/WritePNG.pl +2 -0
- data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -0
- data/bin/lib/Image/ExifTool/WriteQuickTime.pl +55 -21
- data/bin/lib/Image/ExifTool/WriteXMP.pl +7 -3
- data/bin/lib/Image/ExifTool/Writer.pl +47 -10
- data/bin/lib/Image/ExifTool/XMP.pm +39 -14
- data/bin/lib/Image/ExifTool/XMP2.pl +2 -1
- data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
- data/bin/lib/Image/ExifTool/ZISRAW.pm +121 -2
- data/bin/lib/Image/ExifTool.pm +223 -72
- data/bin/lib/Image/ExifTool.pod +114 -93
- data/bin/perl-Image-ExifTool.spec +43 -42
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +28 -13
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
|
|
35
35
|
use Image::ExifTool::Validate;
|
36
36
|
use Image::ExifTool::MacOS;
|
37
37
|
|
38
|
-
$VERSION = '3.
|
38
|
+
$VERSION = '3.45';
|
39
39
|
@ISA = qw(Exporter);
|
40
40
|
|
41
41
|
sub NumbersFirst($$);
|
@@ -68,6 +68,7 @@ my %tweakOrder = (
|
|
68
68
|
IPTC => 'Exif', # put IPTC after EXIF,
|
69
69
|
GPS => 'XMP', # etc...
|
70
70
|
Composite => 'Extra',
|
71
|
+
CBOR => 'JSON',
|
71
72
|
GeoTiff => 'GPS',
|
72
73
|
CanonVRD=> 'CanonCustom',
|
73
74
|
DJI => 'Casio',
|
@@ -141,6 +142,9 @@ my %formatOK = (
|
|
141
142
|
signed => 1,
|
142
143
|
unsigned => 1,
|
143
144
|
utf8 => 1,
|
145
|
+
Unicode => 1, # (Microsoft Xtra)
|
146
|
+
GUID => 1, # (Microsoft Xtra)
|
147
|
+
vt_filetime => 1, # (Microsoft Xtra)
|
144
148
|
);
|
145
149
|
|
146
150
|
# Descriptions for the TagNames documentation
|
@@ -431,11 +435,13 @@ L<UserData|Image::ExifTool::TagNames/QuickTime UserData Tags>, and
|
|
431
435
|
finally in L<Keys|Image::ExifTool::TagNames/QuickTime Keys Tags>,
|
432
436
|
but this order may be changed by setting the PREFERRED level of the
|
433
437
|
appropriate table in the config file (see
|
434
|
-
L<example.config|../config.html#PREF> in the full distribution for
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
438
|
+
L<example.config|../config.html#PREF> in the full distribution for an
|
439
|
+
example). Note that some tags with the same name but different ID's may
|
440
|
+
exist in the same location, but the family 7 group names may be used to
|
441
|
+
differentiate these. ExifTool currently writes only top-level metadata in
|
442
|
+
QuickTime-based files; it extracts other track-specific and timed metadata,
|
443
|
+
but can not yet edit tags in these locations (with the exception of
|
444
|
+
track-level date/time tags).
|
439
445
|
|
440
446
|
Alternate language tags may be accessed for
|
441
447
|
L<ItemList|Image::ExifTool::TagNames/QuickTime ItemList Tags> and
|
@@ -460,8 +466,8 @@ local time when extracting.
|
|
460
466
|
|
461
467
|
When writing string-based date/time tags, the system time zone is added if
|
462
468
|
the PrintConv option is enabled and no time zone is specified. This is
|
463
|
-
because Apple software may display
|
464
|
-
|
469
|
+
because Apple software may display crazy values if the time zone is missing
|
470
|
+
for some tags.
|
465
471
|
|
466
472
|
See
|
467
473
|
L<https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/>
|
@@ -634,7 +640,7 @@ overlapping EXIF, IPTC and XMP tags to be reconciled when reading, and
|
|
634
640
|
synchronized when writing. The MWG Composite tags below are designed to aid
|
635
641
|
in the implementation of these recommendations. As well, the MWG defines
|
636
642
|
new XMP tags which are listed in the subsequent tables below. See
|
637
|
-
L<https://web.archive.org/web/
|
643
|
+
L<https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf>
|
638
644
|
for the official MWG specification.
|
639
645
|
},
|
640
646
|
MacOS => q{
|
@@ -699,10 +705,14 @@ my %shortcutNotes = (
|
|
699
705
|
large binary data tags which may be excluded to reduce memory usage if
|
700
706
|
memory limitations are a problem
|
701
707
|
},
|
708
|
+
'ls-l' => q{
|
709
|
+
mimics columns shown by Unix "ls -l" command. Includes some tags which are
|
710
|
+
extracted only if the API L<SystemTags|../ExifTool.html#SystemTags> option
|
711
|
+
is enabled
|
712
|
+
},
|
702
713
|
);
|
703
714
|
|
704
|
-
|
705
|
-
# same thing for RIFF INFO tags found in the EXIF spec
|
715
|
+
# lookup for RIFF INFO tags which are found in the EXIF spec
|
706
716
|
my %riffSpec = (
|
707
717
|
IARL => 1, ICRD => 1, IGNR => 1, IPLT => 1, ISRC => 1,
|
708
718
|
IART => 1, ICRP => 1, IKEY => 1, IPRD => 1, ISRF => 1,
|
@@ -1320,6 +1330,7 @@ TagID: foreach $tagID (@keys) {
|
|
1320
1330
|
my $count = $$tagInfo{Count} || 1;
|
1321
1331
|
# adjust count to Writable size if different than Format
|
1322
1332
|
if ($writable and $format and $writable ne $format and
|
1333
|
+
$writable ne 'string' and $format ne 'string' and
|
1323
1334
|
$Image::ExifTool::Exif::formatNumber{$writable} and
|
1324
1335
|
$Image::ExifTool::Exif::formatNumber{$format})
|
1325
1336
|
{
|
@@ -2107,7 +2118,7 @@ sub WriteTagNames($$)
|
|
2107
2118
|
$short = $$shortName{$tableName};
|
2108
2119
|
my @names = split ' ', $short;
|
2109
2120
|
my $class = shift @names;
|
2110
|
-
if (@names) {
|
2121
|
+
if (@names and $class ne 'Other') {
|
2111
2122
|
# add heading for tables without a Main
|
2112
2123
|
unless ($heading eq $class) {
|
2113
2124
|
$heading = $class;
|
@@ -2135,6 +2146,13 @@ sub WriteTagNames($$)
|
|
2135
2146
|
$short = $$shortName{$tableName};
|
2136
2147
|
$short = $tableName unless $short;
|
2137
2148
|
$url = "$short.html";
|
2149
|
+
# handle various tables in "Other.pm"
|
2150
|
+
if ($short =~ /^Other (.*)/) {
|
2151
|
+
$short = $1;
|
2152
|
+
$url = 'Other.html#' . $1;
|
2153
|
+
} else {
|
2154
|
+
$url = "$short.html";
|
2155
|
+
}
|
2138
2156
|
print HTMLFILE "<a href='${url}'>$short</a>";
|
2139
2157
|
++$count;
|
2140
2158
|
}
|
@@ -0,0 +1,277 @@
|
|
1
|
+
#------------------------------------------------------------------------------
|
2
|
+
# File: CBOR.pm
|
3
|
+
#
|
4
|
+
# Description: Read CBOR format metadata
|
5
|
+
#
|
6
|
+
# Revisions: 2021-09-30 - P. Harvey Created
|
7
|
+
#
|
8
|
+
# References: 1) https://c2pa.org/public-draft/
|
9
|
+
# 2) https://datatracker.ietf.org/doc/html/rfc7049
|
10
|
+
#------------------------------------------------------------------------------
|
11
|
+
|
12
|
+
package Image::ExifTool::CBOR;
|
13
|
+
use strict;
|
14
|
+
use vars qw($VERSION);
|
15
|
+
use Image::ExifTool qw(:DataAccess :Utils);
|
16
|
+
use Image::ExifTool::JSON;
|
17
|
+
|
18
|
+
$VERSION = '1.00';
|
19
|
+
|
20
|
+
sub ProcessCBOR($$$);
|
21
|
+
sub ReadCBORValue($$$$);
|
22
|
+
|
23
|
+
# optional CBOR type codes
|
24
|
+
my %cborType6 = (
|
25
|
+
0 => 'date/time string',
|
26
|
+
1 => 'epoch-based date/time',
|
27
|
+
2 => 'positive bignum',
|
28
|
+
3 => 'negative bignum',
|
29
|
+
4 => 'decimal fraction',
|
30
|
+
5 => 'bigfloat',
|
31
|
+
21 => 'expected base64url encoding',
|
32
|
+
22 => 'expected base64 encoding',
|
33
|
+
23 => 'expected base16 encoding',
|
34
|
+
24 => 'encoded CBOR data',
|
35
|
+
32 => 'URI',
|
36
|
+
33 => 'base64url',
|
37
|
+
34 => 'base64',
|
38
|
+
35 => 'regular expression',
|
39
|
+
36 => 'MIME message',
|
40
|
+
55799 => 'CBOR magic number',
|
41
|
+
);
|
42
|
+
|
43
|
+
my %cborType7 = (
|
44
|
+
20 => 'False',
|
45
|
+
21 => 'True',
|
46
|
+
22 => 'null',
|
47
|
+
23 => 'undef',
|
48
|
+
);
|
49
|
+
|
50
|
+
%Image::ExifTool::CBOR::Main = (
|
51
|
+
GROUPS => { 0 => 'JUMBF', 1 => 'CBOR', 2 => 'Other' },
|
52
|
+
VARS => { NO_ID => 1 },
|
53
|
+
PROCESS_PROC => \&ProcessCBOR,
|
54
|
+
NOTES => q{
|
55
|
+
The tags below are extracted from CBOR (Concise Binary Object
|
56
|
+
Representation) metadata. The C2PA specification uses this format for some
|
57
|
+
metadata. As well as these tags, ExifTool will read any existing tags.
|
58
|
+
},
|
59
|
+
'dc:title' => 'Title',
|
60
|
+
'dc:format' => 'Format',
|
61
|
+
# my sample file has the following 2 tags in CBOR, but they should be JSON
|
62
|
+
authorName => { Name => 'AuthorName', Groups => { 2 => 'Author' } },
|
63
|
+
authorIdentifier=> { Name => 'AuthorIdentifier', Groups => { 2 => 'Author' } },
|
64
|
+
documentID => { },
|
65
|
+
instanceID => { },
|
66
|
+
thumbnailHash => { List => 1 },
|
67
|
+
thumbnailUrl => { Name => 'ThumbnailURL' },
|
68
|
+
relationship => { }
|
69
|
+
);
|
70
|
+
|
71
|
+
#------------------------------------------------------------------------------
|
72
|
+
# Read CBOR value
|
73
|
+
# Inputs: 0) ExifTool ref, 1) data ref, 2) position in data, 3) data end
|
74
|
+
# Returns: 0) value, 1) error string, 2) new data position
|
75
|
+
sub ReadCBORValue($$$$)
|
76
|
+
{
|
77
|
+
my ($et, $dataPt, $pos, $end) = @_;
|
78
|
+
return(undef, 'Truncated CBOR data', $pos) if $pos >= $end;
|
79
|
+
my $verbose = $$et{OPTIONS}{Verbose};
|
80
|
+
my $indent = $$et{INDENT};
|
81
|
+
my $fmt = Get8u($dataPt, $pos++);
|
82
|
+
my $dat = $fmt & 0x1f;
|
83
|
+
my ($num, $val, $err, $size);
|
84
|
+
$fmt >>= 5;
|
85
|
+
if ($dat < 24) {
|
86
|
+
$num = $dat;
|
87
|
+
} elsif ($dat == 31) { # indefinite count (not used in C2PA)
|
88
|
+
$num = -1; # (flag for indefinite count)
|
89
|
+
$et->VPrint(1, "$$et{INDENT} (indefinite count):\n");
|
90
|
+
} else {
|
91
|
+
my $format = { 24 => 'int8u', 25 => 'int16u', 26 => 'int32u', 27 => 'int64u' }->{$dat};
|
92
|
+
return(undef, "Invalid CBOR integer type $dat", $pos) unless $format;
|
93
|
+
$size = Image::ExifTool::FormatSize($format);
|
94
|
+
return(undef, 'Truncated CBOR integer value', $pos) if $pos + $size > $end;
|
95
|
+
$num = ReadValue($dataPt, $pos, $format, 1, $size);
|
96
|
+
$pos += $size;
|
97
|
+
}
|
98
|
+
my ($pre, $opt) = ('', ':');
|
99
|
+
if ($verbose and $fmt != 6) {
|
100
|
+
if (defined $$et{cbor_pre}) {
|
101
|
+
$pre = "$$et{cbor_pre}";
|
102
|
+
delete $$et{cbor_pre};
|
103
|
+
}
|
104
|
+
if (defined $$et{cbor_opt}) {
|
105
|
+
$opt = ", $$et{cbor_opt}:";
|
106
|
+
delete $$et{cbor_opt};
|
107
|
+
}
|
108
|
+
}
|
109
|
+
if ($fmt == 0) { # positive integer
|
110
|
+
$val = $num;
|
111
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}int+$opt $val\n");
|
112
|
+
} elsif ($fmt == 1) { # negative integer
|
113
|
+
$val = -1 * $num;
|
114
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}int-$opt $val\n");
|
115
|
+
} elsif ($fmt == 2 or $fmt == 3) { # byte/UTF8 string
|
116
|
+
return(undef, 'Truncated CBOR string value', $pos) if $pos + $num > $end;
|
117
|
+
if ($num < 0) { # (should not happen in C2PA)
|
118
|
+
my $string = '';
|
119
|
+
$$et{INDENT} .= ' ';
|
120
|
+
for (;;) {
|
121
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
122
|
+
return(undef, $err, $pos) if $err;
|
123
|
+
last if not defined $val; # hit the break?
|
124
|
+
# (note: strictly we should be checking that this was a string we read)
|
125
|
+
$string .= $val;
|
126
|
+
}
|
127
|
+
$$et{INDENT} = $indent;
|
128
|
+
return($string, undef, $pos); # return concatenated strings
|
129
|
+
} else {
|
130
|
+
$val = substr($$dataPt, $pos, $num);
|
131
|
+
}
|
132
|
+
$pos += $num;
|
133
|
+
if ($fmt == 2) {
|
134
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}byte$opt <binary data ".length($val)." bytes>\n");
|
135
|
+
return(\$val, undef, $pos); # (byte string)
|
136
|
+
}
|
137
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}text$opt '${val}'\n");
|
138
|
+
} elsif ($fmt == 4 or $fmt == 5) { # list/hash
|
139
|
+
if ($fmt == 4) {
|
140
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}list$opt <$num elements>\n");
|
141
|
+
} else {
|
142
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}hash$opt <$num pairs>\n");
|
143
|
+
$num *= 2;
|
144
|
+
}
|
145
|
+
$$et{INDENT} .= ' ';
|
146
|
+
my $i = 0;
|
147
|
+
my @list;
|
148
|
+
while ($num) {
|
149
|
+
$$et{cbor_pre} = "$i) ";
|
150
|
+
if ($fmt == 4) {
|
151
|
+
++$i;
|
152
|
+
} elsif ($num & 0x01) {
|
153
|
+
$$et{cbor_pre} = ' ' x length($$et{cbor_pre});
|
154
|
+
++$i;
|
155
|
+
}
|
156
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
157
|
+
return(undef, $err, $pos) if $err;
|
158
|
+
if (not defined $val) {
|
159
|
+
return(undef, 'Unexpected list terminator', $pos) unless $num < 0;
|
160
|
+
last;
|
161
|
+
}
|
162
|
+
push @list, $val;
|
163
|
+
--$num;
|
164
|
+
}
|
165
|
+
$$et{INDENT} = $indent;
|
166
|
+
if ($fmt == 5) {
|
167
|
+
my ($i, @keys);
|
168
|
+
my %hash = ( _ordered_keys_ => \@keys );
|
169
|
+
for ($i=0; $i<@list-1; $i+=2) {
|
170
|
+
$hash{$list[$i]} = $list[$i+1];
|
171
|
+
push @keys, $list[$i]; # save ordered list of keys
|
172
|
+
}
|
173
|
+
$val = \%hash;
|
174
|
+
} else {
|
175
|
+
$val = \@list;
|
176
|
+
}
|
177
|
+
} elsif ($fmt == 6) { # optional type
|
178
|
+
$$et{cbor_opt} = $cborType6{$num} || "<unknown type $num>";
|
179
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
180
|
+
} elsif ($fmt == 7) {
|
181
|
+
if ($dat == 31) {
|
182
|
+
undef $val; # "break" = end of indefinite array/hash (not used in C2PA)
|
183
|
+
} elsif ($dat < 24) {
|
184
|
+
$val = $cborType7{$num};
|
185
|
+
$val = "Unknown ($val)" unless defined $val;
|
186
|
+
} elsif ($dat == 25) { # half-precision float
|
187
|
+
my $exp = ($num >> 10) & 0x1f;
|
188
|
+
my $mant = $num & 0x3ff;
|
189
|
+
if ($exp == 0) {
|
190
|
+
$val = $mant ** -24;
|
191
|
+
$val *= -1 if $num & 0x8000;
|
192
|
+
} elsif (exp != 31) {
|
193
|
+
$val = ($mant + 1024) ** ($exp - 25);
|
194
|
+
$val *= -1 if $num & 0x8000;
|
195
|
+
} else {
|
196
|
+
$val = $mant == 0 ? '<inf>' : '<nan>';
|
197
|
+
}
|
198
|
+
} elsif ($dat == 26) { # float
|
199
|
+
$val = GetFloat($dataPt, $pos - $size);
|
200
|
+
} elsif ($dat == 27) { # double
|
201
|
+
$val = GetDouble($dataPt, $pos - $size);
|
202
|
+
} else {
|
203
|
+
return(undef, "Invalid CBOR type 7 variant $num", $pos);
|
204
|
+
}
|
205
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}typ7$opt ".(defined $val ? $val : '<break>')."\n");
|
206
|
+
} else {
|
207
|
+
return(undef, "Unknown CBOR format $fmt", $pos);
|
208
|
+
}
|
209
|
+
return($val, $err, $pos);
|
210
|
+
}
|
211
|
+
|
212
|
+
#------------------------------------------------------------------------------
|
213
|
+
# Read CBOR box
|
214
|
+
# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
|
215
|
+
# Returns: 1 on success
|
216
|
+
sub ProcessCBOR($$$)
|
217
|
+
{
|
218
|
+
my ($et, $dirInfo, $tagTablePtr) = @_;
|
219
|
+
my $dataPt = $$dirInfo{DataPt};
|
220
|
+
my $pos = $$dirInfo{DirStart};
|
221
|
+
my $end = $pos + $$dirInfo{DirLen};
|
222
|
+
$et->VerboseDir('CBOR', undef, $$dirInfo{DirLen});
|
223
|
+
my ($val, $err, $tag);
|
224
|
+
require Image::ExifTool::CBOR;
|
225
|
+
while ($pos < $end) {
|
226
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
227
|
+
$err and $et->Warn($err), last;
|
228
|
+
ref $val eq 'HASH' or $et->VPrint(1, "$$et{INDENT} CBOR end: Non-hash encountered\n"), last;
|
229
|
+
foreach $tag (@{$$val{_ordered_keys_}}) {
|
230
|
+
Image::ExifTool::JSON::ProcessTag($et, $tagTablePtr, $tag, $$val{$tag});
|
231
|
+
}
|
232
|
+
}
|
233
|
+
return 1;
|
234
|
+
}
|
235
|
+
|
236
|
+
1; # end
|
237
|
+
|
238
|
+
__END__
|
239
|
+
|
240
|
+
=head1 NAME
|
241
|
+
|
242
|
+
Image::ExifTool::CBOR - Read CBOR format metadata
|
243
|
+
|
244
|
+
=head1 SYNOPSIS
|
245
|
+
|
246
|
+
This module is used by Image::ExifTool
|
247
|
+
|
248
|
+
=head1 DESCRIPTION
|
249
|
+
|
250
|
+
This module contains definitions required by Image::ExifTool read Concise
|
251
|
+
Binary Object Representation (CBOR) formatted metadata, used by the C2PA
|
252
|
+
specification.
|
253
|
+
|
254
|
+
=head1 AUTHOR
|
255
|
+
|
256
|
+
Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
|
257
|
+
|
258
|
+
This library is free software; you can redistribute it and/or modify it
|
259
|
+
under the same terms as Perl itself.
|
260
|
+
|
261
|
+
=head1 REFERENCES
|
262
|
+
|
263
|
+
=over 4
|
264
|
+
|
265
|
+
=item L<https://c2pa.org/public-draft/>
|
266
|
+
|
267
|
+
=item L<https://datatracker.ietf.org/doc/html/rfc7049>
|
268
|
+
|
269
|
+
=back
|
270
|
+
|
271
|
+
=head1 SEE ALSO
|
272
|
+
|
273
|
+
L<Image::ExifTool::TagNames/CBOR Tags>,
|
274
|
+
L<Image::ExifTool(3pm)|Image::ExifTool>
|
275
|
+
|
276
|
+
=cut
|
277
|
+
|
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
|
|
88
88
|
sub ProcessExifInfo($$$);
|
89
89
|
sub SwapWords($);
|
90
90
|
|
91
|
-
$VERSION = '4.
|
91
|
+
$VERSION = '4.51';
|
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)
|
@@ -473,7 +473,8 @@ $VERSION = '4.43';
|
|
473
473
|
253 => 'Canon EF 70-200mm f/2.8L IS II USM + 2x', #PH (NC)
|
474
474
|
253.1 => 'Canon EF 70-200mm f/2.8L IS III USM + 2x', #PH (NC)
|
475
475
|
# 253.2 => 'Tamron SP 70-200mm f/2.8 Di VC USD G2 (A025) + 2x', #forum9367
|
476
|
-
254 => 'Canon EF 100mm f/2.8L Macro IS USM', #42
|
476
|
+
254 => 'Canon EF 100mm f/2.8L Macro IS USM or Tamron Lens', #42
|
477
|
+
254.1 => 'Tamron SP 90mm f/2.8 Di VC USD 1:1 Macro (F017)', #PH
|
477
478
|
255 => 'Sigma 24-105mm f/4 DG OS HSM | A or Other Lens', #50
|
478
479
|
255.1 => 'Sigma 180mm f/2.8 EX DG OS HSM APO Macro', #50
|
479
480
|
255.2 => 'Tamron SP 70-200mm f/2.8 Di VC USD', #exiv issue 1202 (A009)
|
@@ -518,7 +519,8 @@ $VERSION = '4.43';
|
|
518
519
|
507 => 'Canon EF 16-35mm f/4L IS USM', #42
|
519
520
|
508 => 'Canon EF 11-24mm f/4L USM or Tamron Lens', #PH
|
520
521
|
508.1 => 'Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023)', #PH
|
521
|
-
624 => 'Sigma 70-200mm f/2.8 DG OS HSM | S', #IB (018)
|
522
|
+
624 => 'Sigma 70-200mm f/2.8 DG OS HSM | S or other Sigma Lens', #IB (018)
|
523
|
+
624.1 => 'Sigma 150-600mm f/5-6.3 | C', #ChrisSkopec
|
522
524
|
747 => 'Canon EF 100-400mm f/4.5-5.6L IS II USM or Tamron Lens', #JR
|
523
525
|
747.1 => 'Tamron SP 150-600mm f/5-6.3 Di VC USD G2', #50
|
524
526
|
748 => 'Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x or Tamron Lens', #JR (1.4x Mk III)
|
@@ -556,7 +558,8 @@ $VERSION = '4.43';
|
|
556
558
|
4158 => 'Canon EF-S 18-55mm f/4-5.6 IS STM', #PH
|
557
559
|
4159 => 'Canon EF-M 32mm f/1.4 STM', #42
|
558
560
|
4160 => 'Canon EF-S 35mm f/2.8 Macro IS STM', #42
|
559
|
-
4208 => 'Sigma 56mm f/1.4 DC DN | C', #forum10603
|
561
|
+
4208 => 'Sigma 56mm f/1.4 DC DN | C or other Sigma Lens', #forum10603
|
562
|
+
4208.1 => 'Sigma 30mm F1.4 DC DN | C', #git issue#83 (016)
|
560
563
|
# (Nano USM lenses - 0x90xx)
|
561
564
|
36910 => 'Canon EF 70-300mm f/4-5.6 IS II USM', #42
|
562
565
|
36912 => 'Canon EF-S 18-135mm f/3.5-5.6 IS USM', #42
|
@@ -578,17 +581,21 @@ $VERSION = '4.43';
|
|
578
581
|
61182.7 => 'Canon RF 15-35mm F2.8L IS USM',
|
579
582
|
61182.8 => 'Canon RF 24-240mm F4-6.3 IS USM',
|
580
583
|
61182.9 => 'Canon RF 70-200mm F2.8L IS USM',
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
584
|
+
'61182.10' => 'Canon RF 85mm F2 MACRO IS STM',
|
585
|
+
'61182.11' => 'Canon RF 600mm F11 IS STM',
|
586
|
+
'61182.12' => 'Canon RF 600mm F11 IS STM + RF1.4x',
|
587
|
+
'61182.13' => 'Canon RF 600mm F11 IS STM + RF2x',
|
588
|
+
'61182.14' => 'Canon RF 800mm F11 IS STM',
|
589
|
+
'61182.15' => 'Canon RF 800mm F11 IS STM + RF1.4x',
|
590
|
+
'61182.16' => 'Canon RF 800mm F11 IS STM + RF2x',
|
591
|
+
'61182.17' => 'Canon RF 24-105mm F4-7.1 IS STM',
|
592
|
+
'61182.18' => 'Canon RF 100-500mm F4.5-7.1L IS USM',
|
593
|
+
'61182.19' => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
|
594
|
+
'61182.20' => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
|
595
|
+
'61182.21' => 'Canon RF 70-200mm F4L IS USM', #42
|
596
|
+
'61182.22' => 'Canon RF 50mm F1.8 STM', #42
|
597
|
+
'61182.23' => 'Canon RF 14-35mm F4L IS USM', #IB
|
598
|
+
#'61182.xx' => 'Canon RF 100mm F2.8L MACRO IS USM',
|
592
599
|
65535 => 'n/a',
|
593
600
|
);
|
594
601
|
|
@@ -945,6 +952,7 @@ $VERSION = '4.43';
|
|
945
952
|
0x80000437 => 'EOS 90D', #IB
|
946
953
|
0x80000453 => 'EOS R6', #PH
|
947
954
|
0x80000467 => 'PowerShot ZOOM',
|
955
|
+
0x80000468 => 'EOS M50 Mark II / Kiss M2', #IB
|
948
956
|
0x80000520 => 'EOS D2000C', #IB
|
949
957
|
0x80000560 => 'EOS D6000C', #PH (guess)
|
950
958
|
);
|
@@ -4539,6 +4547,16 @@ my %ciMaxFocal = (
|
|
4539
4547
|
2 => 'Rotate 270 CW',
|
4540
4548
|
},
|
4541
4549
|
},
|
4550
|
+
0x3a => { #IB
|
4551
|
+
Name => 'CameraOrientation',
|
4552
|
+
Condition => '$$self{Model} =~ /\b(1200D|REBEL T5|Kiss X70)\b/',
|
4553
|
+
Notes => '1200D only',
|
4554
|
+
PrintConv => {
|
4555
|
+
0 => 'Horizontal (normal)',
|
4556
|
+
1 => 'Rotate 90 CW',
|
4557
|
+
2 => 'Rotate 270 CW',
|
4558
|
+
},
|
4559
|
+
},
|
4542
4560
|
0x55 => {
|
4543
4561
|
Name => 'FocusDistanceUpper',
|
4544
4562
|
Condition => '$$self{Model} =~ /EOS 60D$/',
|
@@ -4679,7 +4697,7 @@ my %ciMaxFocal = (
|
|
4679
4697
|
FIRST_ENTRY => 0,
|
4680
4698
|
PRIORITY => 0,
|
4681
4699
|
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
|
4682
|
-
NOTES => 'CameraInfo tags for the EOS
|
4700
|
+
NOTES => 'CameraInfo tags for the EOS 80D.',
|
4683
4701
|
0x03 => { %ciFNumber },
|
4684
4702
|
0x04 => { %ciExposureTime },
|
4685
4703
|
0x06 => { %ciISO },
|
@@ -5255,6 +5273,14 @@ my %ciMaxFocal = (
|
|
5255
5273
|
0x06 => { %ciISO },
|
5256
5274
|
0x1b => { %ciCameraTemperature }, # (700D + 0)
|
5257
5275
|
0x23 => { %ciFocalLength }, # (700D + 0)
|
5276
|
+
0x96 => { #IB (700D + 0x19)
|
5277
|
+
Name => 'CameraOrientation',
|
5278
|
+
PrintConv => {
|
5279
|
+
0 => 'Horizontal (normal)',
|
5280
|
+
1 => 'Rotate 90 CW',
|
5281
|
+
2 => 'Rotate 270 CW',
|
5282
|
+
},
|
5283
|
+
},
|
5258
5284
|
0xa5 => { # (700D + 0x19)
|
5259
5285
|
Name => 'FocusDistanceUpper',
|
5260
5286
|
%focusDistanceByteSwap,
|
@@ -6736,6 +6762,10 @@ my %ciMaxFocal = (
|
|
6736
6762
|
275 => 'Canon RF 100-500mm F4.5-7.1L IS USM',
|
6737
6763
|
276 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
|
6738
6764
|
277 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
|
6765
|
+
278 => 'Canon RF 70-200mm F4L IS USM', #42
|
6766
|
+
280 => 'Canon RF 50mm F1.8 STM', #42
|
6767
|
+
281 => 'Canon RF 14-35mm F4L IS USM', #42/IB
|
6768
|
+
#xxx => 'Canon RF 100mm F2.8L MACRO IS USM',
|
6739
6769
|
# Note: add new RF lenses to %canonLensTypes with ID 61182
|
6740
6770
|
},
|
6741
6771
|
},
|
@@ -9229,8 +9259,9 @@ sub PrintLensID(@)
|
|
9229
9259
|
push @likely, $tclens;
|
9230
9260
|
if ($maxAperture) {
|
9231
9261
|
# (not 100% sure that TC affects MaxAperture, but it should!)
|
9232
|
-
|
9233
|
-
next if $maxAperture
|
9262
|
+
# (RF 24-105mm F4L IS USM shows a MaxAperture of 4.177)
|
9263
|
+
next if $maxAperture < $sa * $tc - 0.18;
|
9264
|
+
next if $maxAperture > $la * $tc + 0.18;
|
9234
9265
|
}
|
9235
9266
|
push @matches, $tclens;
|
9236
9267
|
}
|
@@ -15,7 +15,7 @@ use Image::ExifTool::Exif;
|
|
15
15
|
use Image::ExifTool::XMP;
|
16
16
|
use Image::ExifTool::GPS;
|
17
17
|
|
18
|
-
$VERSION = '1.
|
18
|
+
$VERSION = '1.04';
|
19
19
|
|
20
20
|
my %convFloat2 = (
|
21
21
|
PrintConv => 'sprintf("%+.2f", $val)',
|
@@ -90,20 +90,20 @@ my %convFloat2 = (
|
|
90
90
|
Writable => 'real',
|
91
91
|
Avoid => 1,
|
92
92
|
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
|
93
|
-
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
|
93
|
+
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lat")',
|
94
94
|
},
|
95
95
|
GpsLongtitude => { # (sic)
|
96
96
|
Name => 'GPSLongtitude',
|
97
97
|
Writable => 'real',
|
98
98
|
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
|
99
|
-
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
|
99
|
+
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lon")',
|
100
100
|
},
|
101
101
|
GpsLongitude => { #PH (NC)
|
102
102
|
Name => 'GPSLongitude',
|
103
103
|
Writable => 'real',
|
104
104
|
Avoid => 1,
|
105
105
|
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
|
106
|
-
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
|
106
|
+
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lon")',
|
107
107
|
},
|
108
108
|
FlightXSpeed => { Writable => 'real' },
|
109
109
|
FlightYSpeed => { Writable => 'real' },
|
@@ -124,13 +124,13 @@ my %convFloat2 = (
|
|
124
124
|
Name => 'Latitude',
|
125
125
|
Writable => 'real',
|
126
126
|
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
|
127
|
-
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
|
127
|
+
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lat")',
|
128
128
|
},
|
129
129
|
Longitude => {
|
130
130
|
Name => 'Longitude',
|
131
131
|
Writable => 'real',
|
132
132
|
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
|
133
|
-
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
|
133
|
+
PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lon")',
|
134
134
|
},
|
135
135
|
);
|
136
136
|
|
@@ -15,7 +15,7 @@ use strict;
|
|
15
15
|
use vars qw($VERSION);
|
16
16
|
use Image::ExifTool qw(:DataAccess :Utils);
|
17
17
|
|
18
|
-
$VERSION = '1.
|
18
|
+
$VERSION = '1.06';
|
19
19
|
|
20
20
|
# DPX tags
|
21
21
|
%Image::ExifTool::DPX::Main = (
|
@@ -156,7 +156,18 @@ $VERSION = '1.05';
|
|
156
156
|
1532=> { Name => 'SourceCreateDate', Format => 'string[24]' },
|
157
157
|
1556=> { Name => 'InputDeviceName', Format => 'string[32]' },
|
158
158
|
1588=> { Name => 'InputDeviceSerialNumber', Format => 'string[32]' },
|
159
|
-
# 1620=> { Name => '
|
159
|
+
# 1620 => { Name => 'Border', Format => 'int16u[4]' },
|
160
|
+
1628 => {
|
161
|
+
Name => 'AspectRatio',
|
162
|
+
Format => 'int32u[2]',
|
163
|
+
RawConv => '$val =~ /4294967295/ ? undef : $val', # ignore undefined values
|
164
|
+
PrintConv => q{
|
165
|
+
return 'undef' if $val eq '0 0';
|
166
|
+
return 'inf' if $val=~/ 0$/;
|
167
|
+
my @a=split(' ',$val);
|
168
|
+
return join(':', Rationalize($a[0]/$a[1]));
|
169
|
+
},
|
170
|
+
},
|
160
171
|
1724 => { Name => 'OriginalFrameRate',Format => 'float' },
|
161
172
|
1728 => { Name => 'ShutterAngle', Format => 'float', RawConv => '($val =~ /\d/ and $val !~ /nan/i) ? $val : undef' }, #2
|
162
173
|
1732 => { Name => 'FrameID', Format => 'string[32]' },
|
@@ -18,7 +18,7 @@ use strict;
|
|
18
18
|
use vars qw($VERSION);
|
19
19
|
use Image::ExifTool qw(:DataAccess :Utils);
|
20
20
|
|
21
|
-
$VERSION = '1.
|
21
|
+
$VERSION = '1.07';
|
22
22
|
|
23
23
|
sub ParseAnt($);
|
24
24
|
sub ProcessAnt($$$);
|
@@ -227,10 +227,11 @@ Tok: for (;;) {
|
|
227
227
|
last unless $tok =~ /(\\+)$/ and length($1) & 0x01;
|
228
228
|
$tok .= '"'; # quote is part of the string
|
229
229
|
}
|
230
|
-
#
|
231
|
-
|
232
|
-
|
233
|
-
|
230
|
+
# convert C escape sequences, allowed in quoted text
|
231
|
+
# (note: this only converts a few of them!)
|
232
|
+
my %esc = ( a => "\a", b => "\b", f => "\f", n => "\n",
|
233
|
+
r => "\r", t => "\t", '"' => '"', '\\' => '\\' );
|
234
|
+
$tok =~ s/\\(.)/$esc{$1}||'\\'.$1/egs;
|
234
235
|
} else { # key name
|
235
236
|
pos($$dataPt) = pos($$dataPt) - 1;
|
236
237
|
# allow anything in key but whitespace, braces and double quotes
|