exiftool_vendored 12.25.0 → 12.35.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 +174 -7
- data/bin/MANIFEST +11 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +44 -43
- data/bin/arg_files/xmp2exif.args +2 -1
- data/bin/config_files/convert_regions.config +25 -14
- data/bin/config_files/example.config +1 -1
- data/bin/exiftool +118 -92
- data/bin/fmt_files/gpx.fmt +1 -1
- data/bin/fmt_files/gpx_wpt.fmt +1 -1
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +16 -3
- data/bin/lib/Image/ExifTool/CBOR.pm +331 -0
- data/bin/lib/Image/ExifTool/Canon.pm +52 -20
- data/bin/lib/Image/ExifTool/Charset.pm +2 -0
- data/bin/lib/Image/ExifTool/DPX.pm +13 -2
- data/bin/lib/Image/ExifTool/Exif.pm +107 -8
- data/bin/lib/Image/ExifTool/FLIR.pm +33 -8
- data/bin/lib/Image/ExifTool/FlashPix.pm +35 -10
- data/bin/lib/Image/ExifTool/FujiFilm.pm +1 -0
- 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 +68 -2
- data/bin/lib/Image/ExifTool/JSON.pm +7 -3
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +164 -36
- 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 +1 -1
- data/bin/lib/Image/ExifTool/MacOS.pm +2 -2
- data/bin/lib/Image/ExifTool/Nikon.pm +50 -6
- data/bin/lib/Image/ExifTool/NikonSettings.pm +10 -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 +7 -6
- data/bin/lib/Image/ExifTool/Panasonic.pm +14 -2
- data/bin/lib/Image/ExifTool/Pentax.pm +28 -5
- data/bin/lib/Image/ExifTool/Photoshop.pm +6 -0
- data/bin/lib/Image/ExifTool/QuickTime.pm +123 -25
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +203 -121
- data/bin/lib/Image/ExifTool/README +9 -2
- data/bin/lib/Image/ExifTool/RIFF.pm +7 -2
- data/bin/lib/Image/ExifTool/Samsung.pm +47 -10
- data/bin/lib/Image/ExifTool/Sony.pm +113 -42
- data/bin/lib/Image/ExifTool/TagLookup.pm +4599 -4451
- data/bin/lib/Image/ExifTool/TagNames.pod +276 -41
- 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/WriteQuickTime.pl +21 -4
- data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
- data/bin/lib/Image/ExifTool/Writer.pl +47 -2
- data/bin/lib/Image/ExifTool/XMP.pm +32 -12
- data/bin/lib/Image/ExifTool/XMP2.pl +5 -2
- data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
- data/bin/lib/Image/ExifTool/ZISRAW.pm +121 -2
- data/bin/lib/Image/ExifTool.pm +153 -52
- data/bin/lib/Image/ExifTool.pod +70 -60
- data/bin/perl-Image-ExifTool.spec +43 -42
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +6 -3
@@ -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.54';
|
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.47';
|
|
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
|
@@ -519,7 +519,8 @@ $VERSION = '4.47';
|
|
519
519
|
507 => 'Canon EF 16-35mm f/4L IS USM', #42
|
520
520
|
508 => 'Canon EF 11-24mm f/4L USM or Tamron Lens', #PH
|
521
521
|
508.1 => 'Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023)', #PH
|
522
|
-
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
|
523
524
|
747 => 'Canon EF 100-400mm f/4.5-5.6L IS II USM or Tamron Lens', #JR
|
524
525
|
747.1 => 'Tamron SP 150-600mm f/5-6.3 Di VC USD G2', #50
|
525
526
|
748 => 'Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x or Tamron Lens', #JR (1.4x Mk III)
|
@@ -557,7 +558,8 @@ $VERSION = '4.47';
|
|
557
558
|
4158 => 'Canon EF-S 18-55mm f/4-5.6 IS STM', #PH
|
558
559
|
4159 => 'Canon EF-M 32mm f/1.4 STM', #42
|
559
560
|
4160 => 'Canon EF-S 35mm f/2.8 Macro IS STM', #42
|
560
|
-
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)
|
561
563
|
# (Nano USM lenses - 0x90xx)
|
562
564
|
36910 => 'Canon EF 70-300mm f/4-5.6 IS II USM', #42
|
563
565
|
36912 => 'Canon EF-S 18-135mm f/3.5-5.6 IS USM', #42
|
@@ -579,19 +581,25 @@ $VERSION = '4.47';
|
|
579
581
|
61182.7 => 'Canon RF 15-35mm F2.8L IS USM',
|
580
582
|
61182.8 => 'Canon RF 24-240mm F4-6.3 IS USM',
|
581
583
|
61182.9 => 'Canon RF 70-200mm F2.8L IS USM',
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
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',
|
595
603
|
65535 => 'n/a',
|
596
604
|
);
|
597
605
|
|
@@ -946,6 +954,7 @@ $VERSION = '4.47';
|
|
946
954
|
0x80000435 => 'EOS Rebel T8i / 850D / X10i', #JR/PH
|
947
955
|
0x80000436 => 'EOS SL3 / 250D / Kiss X10', #25
|
948
956
|
0x80000437 => 'EOS 90D', #IB
|
957
|
+
0x80000450 => 'EOS R3', #42
|
949
958
|
0x80000453 => 'EOS R6', #PH
|
950
959
|
0x80000467 => 'PowerShot ZOOM',
|
951
960
|
0x80000468 => 'EOS M50 Mark II / Kiss M2', #IB
|
@@ -6727,7 +6736,17 @@ my %ciMaxFocal = (
|
|
6727
6736
|
PrintConvInv => '$val =~ s/ ?m$//; IsFloat($val) ? $val : 655.35',
|
6728
6737
|
},
|
6729
6738
|
# 22 - values: 0, 1
|
6730
|
-
|
6739
|
+
23 => { #JohnMoyer (forum12925)
|
6740
|
+
Name => 'ShutterMode',
|
6741
|
+
PrintConv => {
|
6742
|
+
0 => 'Mechanical',
|
6743
|
+
1 => 'Electronic First Curtain',
|
6744
|
+
2 => 'Electronic',
|
6745
|
+
# 3 => ?
|
6746
|
+
# 21 => ?
|
6747
|
+
# 22 => ?
|
6748
|
+
},
|
6749
|
+
},
|
6731
6750
|
25 => { #PH
|
6732
6751
|
Name => 'FlashExposureLock',
|
6733
6752
|
PrintConv => \%offOn,
|
@@ -6760,6 +6779,12 @@ my %ciMaxFocal = (
|
|
6760
6779
|
277 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
|
6761
6780
|
278 => 'Canon RF 70-200mm F4L IS USM', #42
|
6762
6781
|
280 => 'Canon RF 50mm F1.8 STM', #42
|
6782
|
+
281 => 'Canon RF 14-35mm F4L IS USM', #42/IB
|
6783
|
+
283 => 'Canon RF 100-400mm F5.6-8 IS USM', #42
|
6784
|
+
284 => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42 (NC)
|
6785
|
+
285 => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42 (NC)
|
6786
|
+
288 => 'Canon RF 16mm F2.8 STM', #42
|
6787
|
+
#xxx => 'Canon RF 100mm F2.8L MACRO IS USM',
|
6763
6788
|
# Note: add new RF lenses to %canonLensTypes with ID 61182
|
6764
6789
|
},
|
6765
6790
|
},
|
@@ -8734,6 +8759,7 @@ my %filterConv = (
|
|
8734
8759
|
# --> ignored when reading, but offsets are updated when writing
|
8735
8760
|
CMT1 => { # (CR3 files)
|
8736
8761
|
Name => 'IFD0',
|
8762
|
+
PreservePadding => 1,
|
8737
8763
|
SubDirectory => {
|
8738
8764
|
TagTable => 'Image::ExifTool::Exif::Main',
|
8739
8765
|
ProcessProc => \&Image::ExifTool::ProcessTIFF,
|
@@ -8742,6 +8768,7 @@ my %filterConv = (
|
|
8742
8768
|
},
|
8743
8769
|
CMT2 => { # (CR3 files)
|
8744
8770
|
Name => 'ExifIFD',
|
8771
|
+
PreservePadding => 1,
|
8745
8772
|
SubDirectory => {
|
8746
8773
|
TagTable => 'Image::ExifTool::Exif::Main',
|
8747
8774
|
ProcessProc => \&Image::ExifTool::ProcessTIFF,
|
@@ -8750,6 +8777,7 @@ my %filterConv = (
|
|
8750
8777
|
},
|
8751
8778
|
CMT3 => { # (CR3 files)
|
8752
8779
|
Name => 'MakerNoteCanon',
|
8780
|
+
PreservePadding => 1,
|
8753
8781
|
SubDirectory => {
|
8754
8782
|
TagTable => 'Image::ExifTool::Canon::Main',
|
8755
8783
|
ProcessProc => \&ProcessCMT3,
|
@@ -8758,6 +8786,7 @@ my %filterConv = (
|
|
8758
8786
|
},
|
8759
8787
|
CMT4 => { # (CR3 files)
|
8760
8788
|
Name => 'GPSInfo',
|
8789
|
+
PreservePadding => 1,
|
8761
8790
|
SubDirectory => {
|
8762
8791
|
TagTable => 'Image::ExifTool::GPS::Main',
|
8763
8792
|
ProcessProc => \&Image::ExifTool::ProcessTIFF,
|
@@ -8768,6 +8797,7 @@ my %filterConv = (
|
|
8768
8797
|
THMB => {
|
8769
8798
|
Name => 'ThumbnailImage',
|
8770
8799
|
Groups => { 2 => 'Preview' },
|
8800
|
+
PreservePadding => 1,
|
8771
8801
|
RawConv => 'substr($val, 16)',
|
8772
8802
|
Binary => 1,
|
8773
8803
|
},
|
@@ -8782,6 +8812,7 @@ my %filterConv = (
|
|
8782
8812
|
WRITE_PROC => 'Image::ExifTool::QuickTime::WriteQuickTime',
|
8783
8813
|
CNOP => {
|
8784
8814
|
Name => 'CanonVRD',
|
8815
|
+
PreservePadding => 1,
|
8785
8816
|
SubDirectory => {
|
8786
8817
|
TagTable => 'Image::ExifTool::CanonVRD::Main',
|
8787
8818
|
WriteProc => 'Image::ExifTool::CanonVRD::WriteCanonDR4',
|
@@ -9253,8 +9284,9 @@ sub PrintLensID(@)
|
|
9253
9284
|
push @likely, $tclens;
|
9254
9285
|
if ($maxAperture) {
|
9255
9286
|
# (not 100% sure that TC affects MaxAperture, but it should!)
|
9256
|
-
|
9257
|
-
next if $maxAperture
|
9287
|
+
# (RF 24-105mm F4L IS USM shows a MaxAperture of 4.177)
|
9288
|
+
next if $maxAperture < $sa * $tc - 0.18;
|
9289
|
+
next if $maxAperture > $la * $tc + 0.18;
|
9258
9290
|
}
|
9259
9291
|
push @matches, $tclens;
|
9260
9292
|
}
|
@@ -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]' },
|