exiftool_vendored 12.22.0 → 12.34.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 +201 -5
- data/bin/MANIFEST +22 -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 +1 -1
- data/bin/exiftool +89 -70
- data/bin/fmt_files/gpx.fmt +1 -1
- data/bin/fmt_files/gpx_wpt.fmt +1 -1
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +17 -4
- data/bin/lib/Image/ExifTool/CBOR.pm +331 -0
- data/bin/lib/Image/ExifTool/Canon.pm +53 -21
- data/bin/lib/Image/ExifTool/Charset.pm +2 -0
- 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 +120 -12
- data/bin/lib/Image/ExifTool/FlashPix.pm +35 -10
- data/bin/lib/Image/ExifTool/FujiFilm.pm +19 -8
- 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 +96 -4
- 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 +30 -5
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +395 -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 +103 -7
- data/bin/lib/Image/ExifTool/MIE.pm +2 -1
- 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 +3 -3
- data/bin/lib/Image/ExifTool/Microsoft.pm +5 -3
- data/bin/lib/Image/ExifTool/Nikon.pm +17 -5
- data/bin/lib/Image/ExifTool/NikonSettings.pm +19 -2
- data/bin/lib/Image/ExifTool/Olympus.pm +9 -2
- data/bin/lib/Image/ExifTool/Other.pm +93 -0
- data/bin/lib/Image/ExifTool/PDF.pm +11 -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 +210 -65
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +280 -139
- data/bin/lib/Image/ExifTool/README +9 -2
- data/bin/lib/Image/ExifTool/RIFF.pm +89 -12
- data/bin/lib/Image/ExifTool/Samsung.pm +48 -10
- data/bin/lib/Image/ExifTool/Sony.pm +204 -61
- data/bin/lib/Image/ExifTool/TagLookup.pm +206 -19
- data/bin/lib/Image/ExifTool/TagNames.pod +634 -195
- data/bin/lib/Image/ExifTool/Torrent.pm +18 -11
- 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 +58 -16
- data/bin/lib/Image/ExifTool/WriteXMP.pl +7 -3
- data/bin/lib/Image/ExifTool/Writer.pl +44 -0
- data/bin/lib/Image/ExifTool/XMP.pm +51 -18
- data/bin/lib/Image/ExifTool/XMP2.pl +4 -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 +188 -61
- data/bin/lib/Image/ExifTool.pod +89 -68
- data/bin/perl-Image-ExifTool.spec +43 -42
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +10 -9
@@ -0,0 +1,331 @@
|
|
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.01';
|
19
|
+
|
20
|
+
sub ProcessCBOR($$$);
|
21
|
+
sub ReadCBORValue($$$$);
|
22
|
+
|
23
|
+
# optional CBOR type code
|
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 $dumpStart = $pos;
|
82
|
+
my $fmt = Get8u($dataPt, $pos++);
|
83
|
+
my $dat = $fmt & 0x1f;
|
84
|
+
my ($num, $val, $err, $size);
|
85
|
+
$fmt >>= 5;
|
86
|
+
if ($dat < 24) {
|
87
|
+
$num = $dat;
|
88
|
+
} elsif ($dat == 31) { # indefinite count (not used in C2PA)
|
89
|
+
$num = -1; # (flag for indefinite count)
|
90
|
+
$et->VPrint(1, "$$et{INDENT} (indefinite count):\n");
|
91
|
+
} else {
|
92
|
+
my $format = { 24 => 'int8u', 25 => 'int16u', 26 => 'int32u', 27 => 'int64u' }->{$dat};
|
93
|
+
return(undef, "Invalid CBOR integer type $dat", $pos) unless $format;
|
94
|
+
$size = Image::ExifTool::FormatSize($format);
|
95
|
+
return(undef, 'Truncated CBOR integer value', $pos) if $pos + $size > $end;
|
96
|
+
$num = ReadValue($dataPt, $pos, $format, 1, $size);
|
97
|
+
$pos += $size;
|
98
|
+
}
|
99
|
+
my $pre = '';
|
100
|
+
if (defined $$et{cbor_pre} and $fmt != 6) {
|
101
|
+
$pre = $$et{cbor_pre};
|
102
|
+
delete $$et{cbor_pre};
|
103
|
+
}
|
104
|
+
if ($fmt == 0) { # positive integer
|
105
|
+
$val = $num;
|
106
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}int+: $val\n");
|
107
|
+
} elsif ($fmt == 1) { # negative integer
|
108
|
+
$val = -1 * $num;
|
109
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}int-: $val\n");
|
110
|
+
} elsif ($fmt == 2 or $fmt == 3) { # byte/UTF8 string
|
111
|
+
return(undef, 'Truncated CBOR string value', $pos) if $pos + $num > $end;
|
112
|
+
if ($num < 0) { # (should not happen in C2PA)
|
113
|
+
my $string = '';
|
114
|
+
$$et{INDENT} .= ' ';
|
115
|
+
for (;;) {
|
116
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
117
|
+
return(undef, $err, $pos) if $err;
|
118
|
+
last if not defined $val; # hit the break?
|
119
|
+
# (note: strictly we should be checking that this was a string we read)
|
120
|
+
$string .= $val;
|
121
|
+
}
|
122
|
+
$$et{INDENT} = $indent;
|
123
|
+
return($string, undef, $pos); # return concatenated byte/text string
|
124
|
+
} else {
|
125
|
+
$val = substr($$dataPt, $pos, $num);
|
126
|
+
}
|
127
|
+
$pos += $num;
|
128
|
+
if ($fmt == 2) { # (byte string)
|
129
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}byte: <binary data ".length($val)." bytes>\n");
|
130
|
+
my $dat = $val;
|
131
|
+
$val = \$dat; # use scalar reference for binary data
|
132
|
+
} else { # (text string)
|
133
|
+
$val = $et->Decode($val, 'UTF8');
|
134
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}text: '${val}'\n");
|
135
|
+
}
|
136
|
+
} elsif ($fmt == 4 or $fmt == 5) { # list/hash
|
137
|
+
if ($fmt == 4) {
|
138
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}list: <$num elements>\n");
|
139
|
+
} else {
|
140
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}hash: <$num pairs>\n");
|
141
|
+
$num *= 2;
|
142
|
+
}
|
143
|
+
$$et{INDENT} .= ' ';
|
144
|
+
my $i = 0;
|
145
|
+
my @list;
|
146
|
+
Image::ExifTool::HexDump($dataPt, $pos - $dumpStart,
|
147
|
+
Start => $dumpStart,
|
148
|
+
DataPos => $$et{cbor_datapos},
|
149
|
+
Prefix => $$et{INDENT},
|
150
|
+
) if $verbose > 2;
|
151
|
+
while ($num) {
|
152
|
+
$$et{cbor_pre} = "$i) ";
|
153
|
+
if ($fmt == 4) {
|
154
|
+
++$i;
|
155
|
+
} elsif ($num & 0x01) {
|
156
|
+
$$et{cbor_pre} = ' ' x length($$et{cbor_pre});
|
157
|
+
++$i;
|
158
|
+
}
|
159
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
160
|
+
return(undef, $err, $pos) if $err;
|
161
|
+
if (not defined $val) {
|
162
|
+
return(undef, 'Unexpected list terminator', $pos) unless $num < 0;
|
163
|
+
last;
|
164
|
+
}
|
165
|
+
push @list, $val;
|
166
|
+
--$num;
|
167
|
+
}
|
168
|
+
$dumpStart = $pos;
|
169
|
+
$$et{INDENT} = $indent;
|
170
|
+
if ($fmt == 5) {
|
171
|
+
my ($i, @keys);
|
172
|
+
my %hash = ( _ordered_keys_ => \@keys );
|
173
|
+
for ($i=0; $i<@list-1; $i+=2) {
|
174
|
+
$hash{$list[$i]} = $list[$i+1];
|
175
|
+
push @keys, $list[$i]; # save ordered list of keys
|
176
|
+
}
|
177
|
+
$val = \%hash;
|
178
|
+
} else {
|
179
|
+
$val = \@list;
|
180
|
+
}
|
181
|
+
} elsif ($fmt == 6) { # optional tag
|
182
|
+
if ($verbose) {
|
183
|
+
my $str = "$num (" . ($cborType6{$num} || 'unknown') . ')';
|
184
|
+
my $spc = $$et{cbor_pre} ? (' ' x length $$et{cbor_pre}) : '';
|
185
|
+
$et->VPrint(1, "$$et{INDENT} $spc<CBOR optional type $str>\n");
|
186
|
+
Image::ExifTool::HexDump($dataPt, $pos - $dumpStart,
|
187
|
+
Start => $dumpStart,
|
188
|
+
DataPos => $$et{cbor_datapos},
|
189
|
+
Prefix => $$et{INDENT} . ' ',
|
190
|
+
) if $verbose > 2;
|
191
|
+
}
|
192
|
+
# read next value (note: in the case of multiple tags,
|
193
|
+
# this nesting will apply the tags in the correct order)
|
194
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
195
|
+
$dumpStart = $pos;
|
196
|
+
# convert some values according to the optional tag number (untested)
|
197
|
+
if ($num == 0 and not ref $val) { # date/time string
|
198
|
+
require Image::ExifTool::XMP;
|
199
|
+
$val = Image::ExifTool::XMP::ConvertXMPDate($val);
|
200
|
+
} elsif ($num == 1 and not ref $val) { # epoch-based date/time
|
201
|
+
if (Image::ExifTool::IsFloat($val)) {
|
202
|
+
my $dec = ($val == int($val)) ? undef : 6;
|
203
|
+
$val = Image::ExifTool::ConvertUnixTime($val, 1, $dec);
|
204
|
+
}
|
205
|
+
} elsif (($num == 2 or $num == 3) and ref($val) eq 'SCALAR') { # pos/neg bignum
|
206
|
+
my $big = 0;
|
207
|
+
$big = 256 * $big + Get8u($val,$_) foreach 0..(length($$val) - 1);
|
208
|
+
$val = $num==2 ? $big : -$big;
|
209
|
+
} elsif (($num == 4 or $num == 5) and # decimal fraction or bigfloat
|
210
|
+
ref($val) eq 'ARRAY' and @$val == 2 and
|
211
|
+
Image::ExifTool::IsInt($$val[0]) and Image::ExifTool::IsInt($$val[1]))
|
212
|
+
{
|
213
|
+
$val = $$val[1] * ($num == 4 ? 10 : 2) ** $$val[0];
|
214
|
+
}
|
215
|
+
} elsif ($fmt == 7) {
|
216
|
+
if ($dat == 31) {
|
217
|
+
undef $val; # "break" = end of indefinite array/hash (not used in C2PA)
|
218
|
+
} elsif ($dat < 24) {
|
219
|
+
$val = $cborType7{$num};
|
220
|
+
$val = "Unknown ($val)" unless defined $val;
|
221
|
+
} elsif ($dat == 25) { # half-precision float
|
222
|
+
my $exp = ($num >> 10) & 0x1f;
|
223
|
+
my $mant = $num & 0x3ff;
|
224
|
+
if ($exp == 0) {
|
225
|
+
$val = $mant ** -24;
|
226
|
+
$val *= -1 if $num & 0x8000;
|
227
|
+
} elsif (exp != 31) {
|
228
|
+
$val = ($mant + 1024) ** ($exp - 25);
|
229
|
+
$val *= -1 if $num & 0x8000;
|
230
|
+
} else {
|
231
|
+
$val = $mant == 0 ? '<inf>' : '<nan>';
|
232
|
+
}
|
233
|
+
} elsif ($dat == 26) { # float
|
234
|
+
$val = GetFloat($dataPt, $pos - $size);
|
235
|
+
} elsif ($dat == 27) { # double
|
236
|
+
$val = GetDouble($dataPt, $pos - $size);
|
237
|
+
} else {
|
238
|
+
return(undef, "Invalid CBOR type 7 variant $num", $pos);
|
239
|
+
}
|
240
|
+
$et->VPrint(1, "$$et{INDENT} ${pre}typ7: ".(defined $val ? $val : '<break>')."\n");
|
241
|
+
} else {
|
242
|
+
return(undef, "Unknown CBOR format $fmt", $pos);
|
243
|
+
}
|
244
|
+
Image::ExifTool::HexDump($dataPt, $pos - $dumpStart,
|
245
|
+
Start => $dumpStart,
|
246
|
+
DataPos => $$et{cbor_datapos},
|
247
|
+
Prefix => $$et{INDENT} . ' ',
|
248
|
+
MaxLen => $verbose < 5 ? ($verbose == 3 ? 96 : 2048) : undef,
|
249
|
+
) if $verbose > 2;
|
250
|
+
return($val, $err, $pos);
|
251
|
+
}
|
252
|
+
|
253
|
+
#------------------------------------------------------------------------------
|
254
|
+
# Read CBOR box
|
255
|
+
# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
|
256
|
+
# Returns: 1 on success
|
257
|
+
sub ProcessCBOR($$$)
|
258
|
+
{
|
259
|
+
my ($et, $dirInfo, $tagTablePtr) = @_;
|
260
|
+
my $dataPt = $$dirInfo{DataPt};
|
261
|
+
my $pos = $$dirInfo{DirStart};
|
262
|
+
my $end = $pos + $$dirInfo{DirLen};
|
263
|
+
my ($val, $err, $tag, $i);
|
264
|
+
|
265
|
+
$et->VerboseDir('CBOR', undef, $$dirInfo{DirLen});
|
266
|
+
|
267
|
+
$$et{cbor_datapos} = $$dirInfo{DataPos} + $$dirInfo{Base};
|
268
|
+
|
269
|
+
while ($pos < $end) {
|
270
|
+
($val, $err, $pos) = ReadCBORValue($et, $dataPt, $pos, $end);
|
271
|
+
$err and $et->Warn($err), last;
|
272
|
+
if (ref $val eq 'HASH') {
|
273
|
+
foreach $tag (@{$$val{_ordered_keys_}}) {
|
274
|
+
Image::ExifTool::JSON::ProcessTag($et, $tagTablePtr, $tag, $$val{$tag});
|
275
|
+
}
|
276
|
+
} elsif (ref $val eq 'ARRAY') {
|
277
|
+
for ($i=0; $i<@$val; ++$i) {
|
278
|
+
Image::ExifTool::JSON::ProcessTag($et, $tagTablePtr, "Item$i", $$val[$i]);
|
279
|
+
}
|
280
|
+
} elsif ($val eq '0') {
|
281
|
+
$et->VPrint(1, "$$et{INDENT} <CBOR end>\n");
|
282
|
+
last; # (treat as padding)
|
283
|
+
} else {
|
284
|
+
$et->VPrint(1, "$$et{INDENT} Unknown value: $val\n");
|
285
|
+
}
|
286
|
+
}
|
287
|
+
return 1;
|
288
|
+
}
|
289
|
+
|
290
|
+
1; # end
|
291
|
+
|
292
|
+
__END__
|
293
|
+
|
294
|
+
=head1 NAME
|
295
|
+
|
296
|
+
Image::ExifTool::CBOR - Read CBOR format metadata
|
297
|
+
|
298
|
+
=head1 SYNOPSIS
|
299
|
+
|
300
|
+
This module is used by Image::ExifTool
|
301
|
+
|
302
|
+
=head1 DESCRIPTION
|
303
|
+
|
304
|
+
This module contains definitions required by Image::ExifTool read Concise
|
305
|
+
Binary Object Representation (CBOR) formatted metadata, used by the C2PA
|
306
|
+
specification.
|
307
|
+
|
308
|
+
=head1 AUTHOR
|
309
|
+
|
310
|
+
Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
|
311
|
+
|
312
|
+
This library is free software; you can redistribute it and/or modify it
|
313
|
+
under the same terms as Perl itself.
|
314
|
+
|
315
|
+
=head1 REFERENCES
|
316
|
+
|
317
|
+
=over 4
|
318
|
+
|
319
|
+
=item L<https://c2pa.org/public-draft/>
|
320
|
+
|
321
|
+
=item L<https://datatracker.ietf.org/doc/html/rfc7049>
|
322
|
+
|
323
|
+
=back
|
324
|
+
|
325
|
+
=head1 SEE ALSO
|
326
|
+
|
327
|
+
L<Image::ExifTool::TagNames/CBOR Tags>,
|
328
|
+
L<Image::ExifTool(3pm)|Image::ExifTool>
|
329
|
+
|
330
|
+
=cut
|
331
|
+
|
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
|
|
88
88
|
sub ProcessExifInfo($$$);
|
89
89
|
sub SwapWords($);
|
90
90
|
|
91
|
-
$VERSION = '4.
|
91
|
+
$VERSION = '4.53';
|
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)
|
@@ -187,7 +187,7 @@ $VERSION = '4.46';
|
|
187
187
|
37.2 => 'Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro (A20)', #38
|
188
188
|
37.3 => 'Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical [IF]', #34
|
189
189
|
37.4 => 'Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical [IF] Macro', #forum2937
|
190
|
-
38 => 'Canon EF 80-200mm f/4.5-5.6', #32
|
190
|
+
38 => 'Canon EF 80-200mm f/4.5-5.6 II', #32 (II added ref https://github.com/Exiv2/exiv2/issues/1906)
|
191
191
|
39 => 'Canon EF 75-300mm f/4-5.6',
|
192
192
|
40 => 'Canon EF 28-80mm f/3.5-5.6',
|
193
193
|
41 => 'Canon EF 28-90mm f/4-5.6', #32
|
@@ -473,7 +473,8 @@ $VERSION = '4.46';
|
|
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.46';
|
|
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.46';
|
|
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,19 +581,25 @@ $VERSION = '4.46';
|
|
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
|
-
|
592
|
-
|
593
|
-
|
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.24' => 'Canon RF 100-400mm F5.6-8 IS USM', #42
|
599
|
+
'61182.25' => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42 (NC)
|
600
|
+
'61182.26' => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42 (NC)
|
601
|
+
'61182.27' => 'Canon RF 16mm F2.8 STM', #42
|
602
|
+
#'61182.xx' => 'Canon RF 100mm F2.8L MACRO IS USM',
|
594
603
|
65535 => 'n/a',
|
595
604
|
);
|
596
605
|
|
@@ -6726,7 +6735,17 @@ my %ciMaxFocal = (
|
|
6726
6735
|
PrintConvInv => '$val =~ s/ ?m$//; IsFloat($val) ? $val : 655.35',
|
6727
6736
|
},
|
6728
6737
|
# 22 - values: 0, 1
|
6729
|
-
|
6738
|
+
23 => { #JohnMoyer (forum12925)
|
6739
|
+
Name => 'ShutterMode',
|
6740
|
+
PrintConv => {
|
6741
|
+
0 => 'Mechanical',
|
6742
|
+
1 => 'Electronic First Curtain',
|
6743
|
+
2 => 'Electronic',
|
6744
|
+
# 3 => ?
|
6745
|
+
# 21 => ?
|
6746
|
+
# 22 => ?
|
6747
|
+
},
|
6748
|
+
},
|
6730
6749
|
25 => { #PH
|
6731
6750
|
Name => 'FlashExposureLock',
|
6732
6751
|
PrintConv => \%offOn,
|
@@ -6759,6 +6778,12 @@ my %ciMaxFocal = (
|
|
6759
6778
|
277 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
|
6760
6779
|
278 => 'Canon RF 70-200mm F4L IS USM', #42
|
6761
6780
|
280 => 'Canon RF 50mm F1.8 STM', #42
|
6781
|
+
281 => 'Canon RF 14-35mm F4L IS USM', #42/IB
|
6782
|
+
283 => 'Canon RF 100-400mm F5.6-8 IS USM', #42
|
6783
|
+
284 => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42 (NC)
|
6784
|
+
285 => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42 (NC)
|
6785
|
+
288 => 'Canon RF 16mm F2.8 STM', #42
|
6786
|
+
#xxx => 'Canon RF 100mm F2.8L MACRO IS USM',
|
6762
6787
|
# Note: add new RF lenses to %canonLensTypes with ID 61182
|
6763
6788
|
},
|
6764
6789
|
},
|
@@ -8733,6 +8758,7 @@ my %filterConv = (
|
|
8733
8758
|
# --> ignored when reading, but offsets are updated when writing
|
8734
8759
|
CMT1 => { # (CR3 files)
|
8735
8760
|
Name => 'IFD0',
|
8761
|
+
PreservePadding => 1,
|
8736
8762
|
SubDirectory => {
|
8737
8763
|
TagTable => 'Image::ExifTool::Exif::Main',
|
8738
8764
|
ProcessProc => \&Image::ExifTool::ProcessTIFF,
|
@@ -8741,6 +8767,7 @@ my %filterConv = (
|
|
8741
8767
|
},
|
8742
8768
|
CMT2 => { # (CR3 files)
|
8743
8769
|
Name => 'ExifIFD',
|
8770
|
+
PreservePadding => 1,
|
8744
8771
|
SubDirectory => {
|
8745
8772
|
TagTable => 'Image::ExifTool::Exif::Main',
|
8746
8773
|
ProcessProc => \&Image::ExifTool::ProcessTIFF,
|
@@ -8749,6 +8776,7 @@ my %filterConv = (
|
|
8749
8776
|
},
|
8750
8777
|
CMT3 => { # (CR3 files)
|
8751
8778
|
Name => 'MakerNoteCanon',
|
8779
|
+
PreservePadding => 1,
|
8752
8780
|
SubDirectory => {
|
8753
8781
|
TagTable => 'Image::ExifTool::Canon::Main',
|
8754
8782
|
ProcessProc => \&ProcessCMT3,
|
@@ -8757,6 +8785,7 @@ my %filterConv = (
|
|
8757
8785
|
},
|
8758
8786
|
CMT4 => { # (CR3 files)
|
8759
8787
|
Name => 'GPSInfo',
|
8788
|
+
PreservePadding => 1,
|
8760
8789
|
SubDirectory => {
|
8761
8790
|
TagTable => 'Image::ExifTool::GPS::Main',
|
8762
8791
|
ProcessProc => \&Image::ExifTool::ProcessTIFF,
|
@@ -8767,6 +8796,7 @@ my %filterConv = (
|
|
8767
8796
|
THMB => {
|
8768
8797
|
Name => 'ThumbnailImage',
|
8769
8798
|
Groups => { 2 => 'Preview' },
|
8799
|
+
PreservePadding => 1,
|
8770
8800
|
RawConv => 'substr($val, 16)',
|
8771
8801
|
Binary => 1,
|
8772
8802
|
},
|
@@ -8781,6 +8811,7 @@ my %filterConv = (
|
|
8781
8811
|
WRITE_PROC => 'Image::ExifTool::QuickTime::WriteQuickTime',
|
8782
8812
|
CNOP => {
|
8783
8813
|
Name => 'CanonVRD',
|
8814
|
+
PreservePadding => 1,
|
8784
8815
|
SubDirectory => {
|
8785
8816
|
TagTable => 'Image::ExifTool::CanonVRD::Main',
|
8786
8817
|
WriteProc => 'Image::ExifTool::CanonVRD::WriteCanonDR4',
|
@@ -9252,8 +9283,9 @@ sub PrintLensID(@)
|
|
9252
9283
|
push @likely, $tclens;
|
9253
9284
|
if ($maxAperture) {
|
9254
9285
|
# (not 100% sure that TC affects MaxAperture, but it should!)
|
9255
|
-
|
9256
|
-
next if $maxAperture
|
9286
|
+
# (RF 24-105mm F4L IS USM shows a MaxAperture of 4.177)
|
9287
|
+
next if $maxAperture < $sa * $tc - 0.18;
|
9288
|
+
next if $maxAperture > $la * $tc + 0.18;
|
9257
9289
|
}
|
9258
9290
|
push @matches, $tclens;
|
9259
9291
|
}
|
@@ -6,6 +6,8 @@
|
|
6
6
|
# Revisions: 2009/08/28 - P. Harvey created
|
7
7
|
# 2010/01/20 - P. Harvey complete re-write
|
8
8
|
# 2010/07/16 - P. Harvey added UTF-16 support
|
9
|
+
#
|
10
|
+
# Notes: Charset lookups are generated using my convertCharset script
|
9
11
|
#------------------------------------------------------------------------------
|
10
12
|
|
11
13
|
package Image::ExifTool::Charset;
|
@@ -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
|