exiftool-vendored.pl 12.76.0 → 12.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/Changes +46 -4
- package/bin/MANIFEST +4 -0
- package/bin/META.json +1 -1
- package/bin/META.yml +1 -1
- package/bin/README +3 -3
- package/bin/config_files/example.config +10 -2
- package/bin/exiftool +49 -14
- package/bin/lib/Image/ExifTool/Canon.pm +12 -9
- package/bin/lib/Image/ExifTool/CanonVRD.pm +7 -1
- package/bin/lib/Image/ExifTool/Exif.pm +52 -4
- package/bin/lib/Image/ExifTool/GPS.pm +5 -3
- package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
- package/bin/lib/Image/ExifTool/Geolocation.pm +237 -0
- package/bin/lib/Image/ExifTool/Geotag.pm +1 -1
- package/bin/lib/Image/ExifTool/HtmlDump.pm +2 -1
- package/bin/lib/Image/ExifTool/Import.pm +5 -2
- package/bin/lib/Image/ExifTool/JSON.pm +9 -9
- package/bin/lib/Image/ExifTool/MWG.pm +1 -0
- package/bin/lib/Image/ExifTool/MacOS.pm +19 -4
- package/bin/lib/Image/ExifTool/Nikon.pm +2 -2
- package/bin/lib/Image/ExifTool/Ogg.pm +3 -2
- package/bin/lib/Image/ExifTool/Olympus.pm +3 -1
- package/bin/lib/Image/ExifTool/PDF.pm +5 -5
- package/bin/lib/Image/ExifTool/Pentax.pm +1 -1
- package/bin/lib/Image/ExifTool/QuickTime.pm +183 -11
- package/bin/lib/Image/ExifTool/QuickTimeStream.pl +253 -237
- package/bin/lib/Image/ExifTool/TagLookup.pm +77 -3
- package/bin/lib/Image/ExifTool/TagNames.pod +113 -4
- package/bin/lib/Image/ExifTool/WriteQuickTime.pl +14 -1
- package/bin/lib/Image/ExifTool/Writer.pl +9 -8
- package/bin/lib/Image/ExifTool.pm +163 -38
- package/bin/lib/Image/ExifTool.pod +44 -25
- package/bin/perl-Image-ExifTool.spec +2 -2
- package/bin/pp_build_exe.args +4 -230
- package/package.json +2 -2
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
#------------------------------------------------------------------------------
|
|
2
|
+
# File: Geolocation.pm
|
|
3
|
+
#
|
|
4
|
+
# Description: Look up geolocation information based on a GPS position
|
|
5
|
+
#
|
|
6
|
+
# Revisions: 2024-03-03 - P. Harvey Created
|
|
7
|
+
#
|
|
8
|
+
# References: https://download.geonames.org/export/
|
|
9
|
+
#
|
|
10
|
+
# Notes: Set $Image::ExifTool::Geolocation::databaseFile to override
|
|
11
|
+
# default database file (lib/Image/ExifTool/Geolocation.dat)
|
|
12
|
+
#
|
|
13
|
+
# Based on data from geonames.org Creative Commons databases,
|
|
14
|
+
# reformatted as follows in the Geolocation.dat file:
|
|
15
|
+
#
|
|
16
|
+
# Header: GeolocationV.VV\tNNNN\n - V.VV=version, NNNN=num city entries
|
|
17
|
+
#
|
|
18
|
+
# NNNN City entries:
|
|
19
|
+
# 1. int16u[2] - longitude.latitude (converted to 0-64k range)
|
|
20
|
+
# 2. int8u - low byte of time zone number
|
|
21
|
+
# 3. int8u - 100's=time zone high bit, population: 10's=num zeros, 1's=sig digit
|
|
22
|
+
# 4. UTF8 City name, terminated by tab
|
|
23
|
+
# 5. 2-character country code
|
|
24
|
+
# 6. Region code, terminated by newline
|
|
25
|
+
# End of section marker - "\0\0\0\0\x01"
|
|
26
|
+
# Country entries:
|
|
27
|
+
# 1. 2-character country code
|
|
28
|
+
# 2. Country name, terminated by newline
|
|
29
|
+
# End of section marker - "\0\0\0\0\x02"
|
|
30
|
+
# Region entries:
|
|
31
|
+
# 1. 2-character country code
|
|
32
|
+
# 2. Region code, terminated by tab
|
|
33
|
+
# 3. Region name, terminated by newline
|
|
34
|
+
# End of section marker - "\0\0\0\0\x03"
|
|
35
|
+
# Time zone entries:
|
|
36
|
+
# 1. Time zone name, terminated by newline
|
|
37
|
+
# End of file marker - "\0\0\0\0\0"
|
|
38
|
+
#------------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
package Image::ExifTool::Geolocation;
|
|
41
|
+
|
|
42
|
+
use strict;
|
|
43
|
+
use vars qw($VERSION $databaseFile);
|
|
44
|
+
|
|
45
|
+
$VERSION = '1.00';
|
|
46
|
+
|
|
47
|
+
my (@cityLookup, %countryLookup, %adminLookup, @timezoneLookup);
|
|
48
|
+
|
|
49
|
+
# get path name for database file from lib/Image/ExifTool/Geolocation.dat by default,
|
|
50
|
+
# or according to $Image::ExifTool::Geolocation::databaseFile if specified
|
|
51
|
+
my $datfile = $databaseFile;
|
|
52
|
+
unless ($datfile) {
|
|
53
|
+
$datfile = $INC{'Image/ExifTool/Geolocation.pm'};
|
|
54
|
+
$datfile or $datfile = 'Geolocation.pm', warn("Error getting Geolocation directory\n");
|
|
55
|
+
$datfile =~ s/\.pm$/\.dat/;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
# open geolocation database and verify header
|
|
59
|
+
open DATFILE, "<$datfile" or warn("Error reading $datfile\n"), return 0;
|
|
60
|
+
binmode DATFILE;
|
|
61
|
+
my $line = <DATFILE>;
|
|
62
|
+
unless ($line =~ /^Geolocation(\d+\.\d+)\t(\d+)/) {
|
|
63
|
+
warn("Bad format Geolocation database\n");
|
|
64
|
+
close(DATFILE);
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
my $ncity = $2;
|
|
68
|
+
|
|
69
|
+
# read city database
|
|
70
|
+
for (;;) {
|
|
71
|
+
$line = <DATFILE>;
|
|
72
|
+
last if length($line) == 6 and $line =~ /\0\0\0\0/;
|
|
73
|
+
$line .= <DATFILE> while length($line) < 7;
|
|
74
|
+
chomp $line;
|
|
75
|
+
push @cityLookup, $line;
|
|
76
|
+
}
|
|
77
|
+
@cityLookup == $ncity or warn("Bad number of entries in Geolocation database\n"), return 0;
|
|
78
|
+
# read countries
|
|
79
|
+
for (;;) {
|
|
80
|
+
$line = <DATFILE>;
|
|
81
|
+
last if length($line) == 6 and $line =~ /\0\0\0\0/;
|
|
82
|
+
chomp $line;
|
|
83
|
+
$countryLookup{substr($line,0,2)} = substr($line,2);
|
|
84
|
+
}
|
|
85
|
+
# read regions
|
|
86
|
+
for (;;) {
|
|
87
|
+
$line = <DATFILE>;
|
|
88
|
+
last if length($line) == 6 and $line =~ /\0\0\0\0/;
|
|
89
|
+
chomp $line;
|
|
90
|
+
my ($code, $region) = split /\t/, $line;
|
|
91
|
+
$adminLookup{$code} = $region;
|
|
92
|
+
}
|
|
93
|
+
# read time zones
|
|
94
|
+
for (;;) {
|
|
95
|
+
$line = <DATFILE>;
|
|
96
|
+
last if length($line) == 6 and $line =~ /\0\0\0\0/;
|
|
97
|
+
chomp $line;
|
|
98
|
+
push @timezoneLookup, $line;
|
|
99
|
+
}
|
|
100
|
+
close DATFILE;
|
|
101
|
+
|
|
102
|
+
#------------------------------------------------------------------------------
|
|
103
|
+
# Look up lat/lon in geolocation database
|
|
104
|
+
# Inputs: 0) Latitude, 1) longitude, 2) optional min population,
|
|
105
|
+
# 3) optional max distance (km)
|
|
106
|
+
# Returns: 0) UTF8 city name (or undef if geolocation is unsuccessful),
|
|
107
|
+
# 1) UTF8 state, province or region (or undef),
|
|
108
|
+
# 2) country code, 3) country name (undef is possible),
|
|
109
|
+
# 4) time zone name (empty string possible), 5) approx population,
|
|
110
|
+
# 6) approx distance (km), 7) approximate compass bearing (or undef),
|
|
111
|
+
# 8/9) approx lat/lon
|
|
112
|
+
sub Geolocate($$;$$)
|
|
113
|
+
{
|
|
114
|
+
my ($lat, $lon, $pop, $km) = @_;
|
|
115
|
+
my ($minPop, $maxDist2);
|
|
116
|
+
my $earthCirc = 40000; # earth circumference in km
|
|
117
|
+
|
|
118
|
+
if ($pop) {
|
|
119
|
+
# convert population minimum to a 2-digit code
|
|
120
|
+
my $dig = substr($pop, 0, 1);
|
|
121
|
+
my $zer = length($pop) - 1;
|
|
122
|
+
# round up if necessary
|
|
123
|
+
if (length($pop) > 1 and substr($pop, 1, 1) >= 5) {
|
|
124
|
+
++$dig > 9 and $dig = 1, ++$zer;
|
|
125
|
+
}
|
|
126
|
+
$minPop = $zer.$dig;
|
|
127
|
+
}
|
|
128
|
+
if ($km) {
|
|
129
|
+
# convert max distance to reduced coordinate units
|
|
130
|
+
my $tmp = $km * 2 * 65536 / $earthCirc;
|
|
131
|
+
$maxDist2 = $tmp * $tmp;
|
|
132
|
+
}
|
|
133
|
+
my $cos = cos($lat * 3.14159 / 180); # cosine factor for longitude distances
|
|
134
|
+
# reduce lat/lon to the range 0-65536
|
|
135
|
+
$lat = int(($lat + 90) / 180 * 65536 + 0.5) & 0xffff;
|
|
136
|
+
$lon = int(($lon + 180) / 360 * 65536 + 0.5) & 0xffff;
|
|
137
|
+
my $coord = pack('n2',$lon,$lat); # pack for comparison with binary database values
|
|
138
|
+
# binary search to find closest longitude
|
|
139
|
+
my ($n0, $n1) = (0, scalar(@cityLookup)-1);
|
|
140
|
+
while ($n1 - $n0 > 1) {
|
|
141
|
+
my $n = int(($n0 + $n1) / 2);
|
|
142
|
+
if ($coord lt $cityLookup[$n]) {
|
|
143
|
+
$n1 = $n;
|
|
144
|
+
} else {
|
|
145
|
+
$n0 = $n;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
# step backward then forward through database to find nearest city
|
|
149
|
+
my ($minDist2, $minN, @dxy);
|
|
150
|
+
my ($inc, $end, $n) = (-1, -1, $n0+1);
|
|
151
|
+
for (;;) {
|
|
152
|
+
if (($n += $inc) == $end) {
|
|
153
|
+
last if $inc == 1;
|
|
154
|
+
($inc, $end, $n) = (1, scalar(@cityLookup), $n1);
|
|
155
|
+
}
|
|
156
|
+
my ($x,$y) = unpack('n2', $cityLookup[$n]);
|
|
157
|
+
my ($dy,$dx) = ($y-$lat, $x-$lon);
|
|
158
|
+
$dx += 65536 if $dx < -32768; # measure the short way around the world
|
|
159
|
+
$dx -= 65536 if $dx > 32768;
|
|
160
|
+
$dx = 2 * $cos * $dx; # adjust for longitude spacing
|
|
161
|
+
my $dx2 = $dx * $dx;
|
|
162
|
+
my $dist2 = $dy * $dy + $dx2;
|
|
163
|
+
if (defined $minDist2) {
|
|
164
|
+
# searched far enough if longitude alone is further than best distance
|
|
165
|
+
$dx2 > $minDist2 and $n = $end - $inc, next;
|
|
166
|
+
} elsif (defined $maxDist2) {
|
|
167
|
+
$dx2 > $maxDist2 and $n = $end - $inc, next;
|
|
168
|
+
next if $dist2 > $maxDist2; # ignore if distance is too great
|
|
169
|
+
}
|
|
170
|
+
# ignore if population is below threshold
|
|
171
|
+
next if $minPop and $minPop > unpack('x5C', $cityLookup[$n]) % 100;
|
|
172
|
+
if (not defined $minDist2 or $minDist2 > $dist2) {
|
|
173
|
+
$minDist2 = $dist2;
|
|
174
|
+
@dxy = ($dx, $dy);
|
|
175
|
+
$minN = $n;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return () unless defined $minN;
|
|
179
|
+
|
|
180
|
+
my ($ln,$lt,$tn,$pc) = unpack('n2C2', $cityLookup[$minN]);
|
|
181
|
+
my ($city, $code) = split /\t/, substr($cityLookup[$minN],6);
|
|
182
|
+
my $ctry = substr($code,0,2);
|
|
183
|
+
my $rgn = $adminLookup{$code};
|
|
184
|
+
my $po2 = substr($pc, -1) . (length($pc) > 1 ? '0' x substr($pc, -2, 1) : '');
|
|
185
|
+
$tn += 256 if $pc > 99;
|
|
186
|
+
my $be; # calculate bearing to geolocated city
|
|
187
|
+
if ($dxy[0] or $dxy[1]) {
|
|
188
|
+
$be = atan2($dxy[0],$dxy[1]) * 180 / 3.14159;
|
|
189
|
+
$be += 360 if $be < 0;
|
|
190
|
+
$be = int($be + 0.5);
|
|
191
|
+
}
|
|
192
|
+
$lt = sprintf('%.3f', $lt * 180 / 65536 - 90);
|
|
193
|
+
$ln = sprintf('%.3f', $ln * 360 / 65536 - 180);
|
|
194
|
+
$km = sprintf('%.1f', sqrt($minDist2) * $earthCirc / (2 * 65536));
|
|
195
|
+
|
|
196
|
+
return($city,$rgn,$ctry,$countryLookup{$ctry},$timezoneLookup[$tn],$po2,$km,$be,$lt,$ln);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
__END__
|
|
200
|
+
|
|
201
|
+
=head1 NAME
|
|
202
|
+
|
|
203
|
+
Image::ExifTool::Geolocation - Look up geolocation based on GPS position
|
|
204
|
+
|
|
205
|
+
=head1 SYNOPSIS
|
|
206
|
+
|
|
207
|
+
This module is used by the Image::ExifTool Geolocation feature.
|
|
208
|
+
|
|
209
|
+
=head1 DESCRIPTION
|
|
210
|
+
|
|
211
|
+
This module contains the code to convert GPS coordinates to city, region,
|
|
212
|
+
country, time zone, etc. It uses a database derived from geonames.org,
|
|
213
|
+
modified to reduce the size as much as possible.
|
|
214
|
+
|
|
215
|
+
=head1 AUTHOR
|
|
216
|
+
|
|
217
|
+
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
|
|
218
|
+
|
|
219
|
+
This library is free software; you can redistribute it and/or modify it
|
|
220
|
+
under the same terms as Perl itself. Geolocation.dat is based on data
|
|
221
|
+
from geonames.org with a Creative Commons license.
|
|
222
|
+
|
|
223
|
+
=head1 REFERENCES
|
|
224
|
+
|
|
225
|
+
=over 4
|
|
226
|
+
|
|
227
|
+
=item L<https://download.geonames.org/export/>
|
|
228
|
+
|
|
229
|
+
=back
|
|
230
|
+
|
|
231
|
+
=head1 SEE ALSO
|
|
232
|
+
|
|
233
|
+
L<Image::ExifTool(3pm)|Image::ExifTool>
|
|
234
|
+
|
|
235
|
+
=cut
|
|
236
|
+
|
|
237
|
+
1; #end
|
|
@@ -1109,7 +1109,7 @@ sub SetGeoValues($$;$)
|
|
|
1109
1109
|
$iExt = $i1;
|
|
1110
1110
|
}
|
|
1111
1111
|
if (abs($time - $tn) > $geoMaxExtSecs) {
|
|
1112
|
-
$err or $err = 'Time is too far from nearest GPS fix'.' '.abs($time-$tn).' '.$geoMaxExtSecs;
|
|
1112
|
+
$err or $err = 'Time is too far from nearest GPS fix'.' '.abs($time-$tn).' > '.$geoMaxExtSecs;
|
|
1113
1113
|
$et->VPrint(2, ' Nearest fix: ', PrintFixTime($tn), "\n") if $verbose > 2;
|
|
1114
1114
|
$fix = { } if $$geotag{DateTimeOnly};
|
|
1115
1115
|
} else {
|
|
@@ -13,7 +13,7 @@ use vars qw($VERSION);
|
|
|
13
13
|
use Image::ExifTool; # only for FinishTiffDump()
|
|
14
14
|
use Image::ExifTool::HTML qw(EscapeHTML);
|
|
15
15
|
|
|
16
|
-
$VERSION = '1.
|
|
16
|
+
$VERSION = '1.42';
|
|
17
17
|
|
|
18
18
|
sub DumpTable($$$;$$$$$$);
|
|
19
19
|
sub Open($$$;@);
|
|
@@ -769,6 +769,7 @@ sub FinishTiffDump($$$)
|
|
|
769
769
|
PreviewImageStart => 'PreviewImageLength',
|
|
770
770
|
JpgFromRawStart => 'JpgFromRawLength',
|
|
771
771
|
OtherImageStart => 'OtherImageLength',
|
|
772
|
+
PreviewJXLStart => 'PreviewJXLLength',
|
|
772
773
|
ImageOffset => 'ImageByteCount',
|
|
773
774
|
AlphaOffset => 'AlphaByteCount',
|
|
774
775
|
MPImageStart => 'MPImageLength',
|
|
@@ -12,7 +12,7 @@ require Exporter;
|
|
|
12
12
|
|
|
13
13
|
use vars qw($VERSION @ISA @EXPORT_OK);
|
|
14
14
|
|
|
15
|
-
$VERSION = '1.
|
|
15
|
+
$VERSION = '1.12';
|
|
16
16
|
@ISA = qw(Exporter);
|
|
17
17
|
@EXPORT_OK = qw(ReadCSV ReadJSON);
|
|
18
18
|
|
|
@@ -238,7 +238,7 @@ Tok: for (;;) {
|
|
|
238
238
|
|
|
239
239
|
#------------------------------------------------------------------------------
|
|
240
240
|
# Read JSON file
|
|
241
|
-
# Inputs: 0) JSON file name, file ref or
|
|
241
|
+
# Inputs: 0) JSON file name, file ref, RAF ref or SCALAR ref, 1) database hash ref,
|
|
242
242
|
# 2) flag to delete "-" tags, 3) character set
|
|
243
243
|
# Returns: undef on success, or error string
|
|
244
244
|
sub ReadJSON($$;$$)
|
|
@@ -255,6 +255,9 @@ sub ReadJSON($$;$$)
|
|
|
255
255
|
} elsif (ref $file eq 'GLOB') {
|
|
256
256
|
$raf = File::RandomAccess->new($file);
|
|
257
257
|
$file = 'JSON file';
|
|
258
|
+
} elsif (ref $file eq 'SCALAR') {
|
|
259
|
+
$raf = File::RandomAccess->new($file);
|
|
260
|
+
$file = 'in memory';
|
|
258
261
|
} else {
|
|
259
262
|
open JSONFILE, $file or return "Error opening JSON file '${file}'";
|
|
260
263
|
binmode JSONFILE;
|
|
@@ -60,15 +60,15 @@ sub FoundTag($$$$%)
|
|
|
60
60
|
# avoid conflict with special table entries
|
|
61
61
|
$tag .= '!' if $Image::ExifTool::specialTags{$tag};
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
unless ($$tagTablePtr{$tag}) {
|
|
64
|
+
my $name = $tag;
|
|
65
|
+
$name =~ tr/:/_/; # use underlines in place of colons in tag name
|
|
66
|
+
AddTagToTable($tagTablePtr, $tag, {
|
|
67
|
+
Name => Image::ExifTool::MakeTagName($name),
|
|
68
|
+
%flags,
|
|
69
|
+
Temporary => 1,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
72
|
$et->HandleTag($tagTablePtr, $tag, $val);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -441,6 +441,7 @@ my %sRegionStruct = (
|
|
|
441
441
|
Writable => 'real',
|
|
442
442
|
Notes => 'not part of MWG 2.0 spec',
|
|
443
443
|
},
|
|
444
|
+
# Title - seen in sample XMP of MWG 2.0 specification, but not in spec itself
|
|
444
445
|
seeAlso => { Namespace => 'rdfs', Resource => 1 },
|
|
445
446
|
);
|
|
446
447
|
my %sKeywordStruct;
|
|
@@ -12,7 +12,7 @@ use strict;
|
|
|
12
12
|
use vars qw($VERSION);
|
|
13
13
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
14
14
|
|
|
15
|
-
$VERSION = '1.
|
|
15
|
+
$VERSION = '1.13';
|
|
16
16
|
|
|
17
17
|
sub MDItemLocalTime($);
|
|
18
18
|
sub ProcessATTR($$$);
|
|
@@ -22,6 +22,11 @@ my %mdDateInfo = (
|
|
|
22
22
|
PrintConv => '$self->ConvertDateTime($val)',
|
|
23
23
|
);
|
|
24
24
|
|
|
25
|
+
my %delXAttr = (
|
|
26
|
+
XAttrQuarantine => 'com.apple.quarantine',
|
|
27
|
+
XAttrMDItemWhereFroms => 'com.apple.metadata:kMDItemWhereFroms',
|
|
28
|
+
);
|
|
29
|
+
|
|
25
30
|
# Information decoded from Mac OS sidecar files
|
|
26
31
|
%Image::ExifTool::MacOS::Main = (
|
|
27
32
|
GROUPS => { 0 => 'File', 1 => 'MacOS' },
|
|
@@ -320,7 +325,17 @@ my %mdDateInfo = (
|
|
|
320
325
|
Groups => { 2 => 'Time' },
|
|
321
326
|
},
|
|
322
327
|
'com.apple.metadata:kMDItemFinderComment' => { Name => 'XAttrMDItemFinderComment' },
|
|
323
|
-
'com.apple.metadata:kMDItemWhereFroms'
|
|
328
|
+
'com.apple.metadata:kMDItemWhereFroms' => {
|
|
329
|
+
Name => 'XAttrMDItemWhereFroms',
|
|
330
|
+
Writable => 1,
|
|
331
|
+
WritePseudo => 1,
|
|
332
|
+
WriteCheck => '"May only delete this tag"',
|
|
333
|
+
Protected => 1,
|
|
334
|
+
Notes => q{
|
|
335
|
+
information about where the file came from. May only be deleted when
|
|
336
|
+
writing
|
|
337
|
+
},
|
|
338
|
+
},
|
|
324
339
|
'com.apple.metadata:kMDLabel' => { Name => 'XAttrMDLabel', Binary => 1 },
|
|
325
340
|
'com.apple.ResourceFork' => { Name => 'XAttrResourceFork', Binary => 1 },
|
|
326
341
|
'com.apple.lastuseddate#PS' => {
|
|
@@ -407,9 +422,9 @@ sub SetMacOSTags($$$)
|
|
|
407
422
|
$et->VPrint(1," - $tag = (all)\n") if $overwrite > 0;
|
|
408
423
|
undef $val if $val eq '';
|
|
409
424
|
}
|
|
410
|
-
} elsif ($tag
|
|
425
|
+
} elsif ($delXAttr{$tag}) {
|
|
411
426
|
($f = $file) =~ s/'/'\\''/g;
|
|
412
|
-
$cmd = "/usr/bin/xattr -d
|
|
427
|
+
$cmd = "/usr/bin/xattr -d $delXAttr{$tag} '${f}'";
|
|
413
428
|
$silentErr = 256; # (will get this error if attribute doesn't exist)
|
|
414
429
|
} else {
|
|
415
430
|
($f = $file) =~ s/(["\\])/\\$1/g; # escape necessary characters for script
|
|
@@ -703,8 +703,8 @@ sub GetAFPointGrid($$;$);
|
|
|
703
703
|
#
|
|
704
704
|
'00 54 56 56 30 30 00 00' => 'Coastal Optical Systems 60mm 1:4 UV-VIS-IR Macro Apo',
|
|
705
705
|
#
|
|
706
|
-
'BF 4E 26 26 1E 1E 01 04' => 'Irix 15mm f/2.4 Firefly', #30
|
|
707
|
-
'BF 3C 1B 1B 30 30 01 04' => 'Irix 11mm f/4 Firefly', #30
|
|
706
|
+
'BF 4E 26 26 1E 1E 01 04' => 'Irix 15mm f/2.4 Firefly', #30 (guessing the Blackstone version may be the same ID - PH)
|
|
707
|
+
'BF 3C 1B 1B 30 30 01 04' => 'Irix 11mm f/4 Firefly', #30 (guessing the Blackstone version may be the same ID - PH)
|
|
708
708
|
#
|
|
709
709
|
'4A 40 11 11 2C 0C 4D 02' => 'Samyang 8mm f/3.5 Fish-Eye CS',
|
|
710
710
|
'4A 48 24 24 24 0C 4D 02.1' => 'Samyang 10mm f/2.8 ED AS NCS CS',
|
|
@@ -17,7 +17,7 @@ use strict;
|
|
|
17
17
|
use vars qw($VERSION);
|
|
18
18
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
19
19
|
|
|
20
|
-
$VERSION = '1.
|
|
20
|
+
$VERSION = '1.04';
|
|
21
21
|
|
|
22
22
|
my $MAX_PACKETS = 2; # maximum packets to scan from each stream at start of file
|
|
23
23
|
|
|
@@ -145,6 +145,7 @@ sub ProcessOGG($$)
|
|
|
145
145
|
# calculate total data length
|
|
146
146
|
my $dataLen = Get8u(\$buff, 27);
|
|
147
147
|
if ($nseg) {
|
|
148
|
+
last unless $raf;
|
|
148
149
|
$raf->Read($buff, $nseg-1) == $nseg-1 or last;
|
|
149
150
|
my @segs = unpack('C*', $buff);
|
|
150
151
|
# could check that all these (but the last) are 255...
|
|
@@ -160,7 +161,7 @@ sub ProcessOGG($$)
|
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
# read page data
|
|
163
|
-
$raf->Read($buff, $dataLen) == $dataLen
|
|
164
|
+
last unless $raf and $raf->Read($buff, $dataLen) == $dataLen;
|
|
164
165
|
if ($verbose > 1) {
|
|
165
166
|
printf $out "Page %d, stream 0x%x, flag 0x%x (%d bytes)\n",
|
|
166
167
|
$pageNum, $stream, $flag, $dataLen;
|
|
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
|
|
|
40
40
|
use Image::ExifTool::Exif;
|
|
41
41
|
use Image::ExifTool::APP12;
|
|
42
42
|
|
|
43
|
-
$VERSION = '2.
|
|
43
|
+
$VERSION = '2.83';
|
|
44
44
|
|
|
45
45
|
sub PrintLensInfo($$$);
|
|
46
46
|
|
|
@@ -117,6 +117,7 @@ my %olympusLensTypes = (
|
|
|
117
117
|
'0 36 10' => 'Olympus M.Zuiko Digital ED 8-25mm F4 Pro', #IB
|
|
118
118
|
'0 37 10' => 'Olympus M.Zuiko Digital ED 40-150mm F4.0 Pro', #forum3833
|
|
119
119
|
'0 39 10' => 'Olympus M.Zuiko Digital ED 90mm F3.5 Macro IS Pro', #forum3833
|
|
120
|
+
'0 40 10' => 'Olympus M.Zuiko Digital ED 150-600mm F5.0-6.3', #forum15652
|
|
120
121
|
# Sigma lenses
|
|
121
122
|
'1 01 00' => 'Sigma 18-50mm F3.5-5.6 DC', #8
|
|
122
123
|
'1 01 10' => 'Sigma 30mm F2.8 EX DN', #NJ
|
|
@@ -442,6 +443,7 @@ my %olympusCameraTypes = (
|
|
|
442
443
|
S0093 => 'E-P7', #IB
|
|
443
444
|
S0095 => 'OM-1', #IB
|
|
444
445
|
S0101 => 'OM-5', #IB
|
|
446
|
+
S0121 => 'OM-1MarkII', #forum15652
|
|
445
447
|
SR45 => 'D220',
|
|
446
448
|
SR55 => 'D320L',
|
|
447
449
|
SR83 => 'D340L',
|
|
@@ -114,11 +114,11 @@ my %supportedFilter = (
|
|
|
114
114
|
Notes => q{
|
|
115
115
|
stored as a string but treated as a comma- or semicolon-separated list of
|
|
116
116
|
items when reading if the string contains commas or semicolons, whichever is
|
|
117
|
-
more numerous, otherwise it is treated a space-separated list of items.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
more numerous, otherwise it is treated a space-separated list of items. The
|
|
118
|
+
list behaviour may be defeated by setting the API NoPDFList option. Written
|
|
119
|
+
as a comma-separated string. Note that the corresponding XMP-pdf:Keywords
|
|
120
|
+
tag is not treated as a list, so the NoPDFList option should be used when
|
|
121
|
+
copying between these two.
|
|
122
122
|
},
|
|
123
123
|
},
|
|
124
124
|
Creator => { },
|
|
@@ -177,7 +177,7 @@ sub DecodeAFPoints($$$$;$);
|
|
|
177
177
|
'4 6' => 'smc PENTAX-FA 35-80mm F4-5.6',
|
|
178
178
|
'4 7' => 'Irix 45mm F1.4', #27
|
|
179
179
|
'4 8' => 'Irix 150mm F2.8 Macro', #exiv2 issue 1084
|
|
180
|
-
'4 9' => 'Irix 11mm F4 Firefly', #27
|
|
180
|
+
'4 9' => 'Irix 11mm F4 Firefly', #27 (guessing the Blackstone version may be the same ID - PH)
|
|
181
181
|
'4 10' => 'Irix 15mm F2.4', #27
|
|
182
182
|
'4 12' => 'smc PENTAX-FA 50mm F1.4', #17
|
|
183
183
|
'4 15' => 'smc PENTAX-FA 28-105mm F4-5.6 [IF]',
|