exiftool-vendored.exe 12.78.0 → 12.80.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/exiftool_files/Changes +36 -3
- package/bin/exiftool_files/README +2 -2
- package/bin/exiftool_files/config_files/acdsee.config +37 -57
- package/bin/exiftool_files/config_files/example.config +6 -0
- package/bin/exiftool_files/exiftool.pl +41 -19
- package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +3 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/cs.pm +978 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/de.pm +1975 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/en_ca.pm +44 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/en_gb.pm +124 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/es.pm +2921 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/fi.pm +1116 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/fr.pm +3171 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/it.pm +2750 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ja.pm +10256 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ko.pm +4499 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/nl.pm +1270 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/pl.pm +3019 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ru.pm +18220 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/sk.pm +441 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/sv.pm +714 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/tr.pm +452 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/zh_cn.pm +2225 -0
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/zh_tw.pm +72 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat +0 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +678 -140
- package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +7 -0
- package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +7 -2
- package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +17 -17
- package/bin/exiftool_files/lib/Image/ExifTool/README +6 -5
- package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +2547 -2517
- package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +72 -1
- package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +1 -0
- package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +50 -0
- package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +17 -2
- package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +64 -0
- package/bin/exiftool_files/lib/Image/ExifTool.pm +165 -88
- package/bin/exiftool_files/lib/Image/ExifTool.pod +20 -7
- package/package.json +2 -2
|
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
|
|
|
29
29
|
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
|
|
30
30
|
%static_vars);
|
|
31
31
|
|
|
32
|
-
$VERSION = '12.
|
|
32
|
+
$VERSION = '12.80';
|
|
33
33
|
$RELEASE = '';
|
|
34
34
|
@ISA = qw(Exporter);
|
|
35
35
|
%EXPORT_TAGS = (
|
|
@@ -103,6 +103,7 @@ sub VerboseValue($$$;$);
|
|
|
103
103
|
sub VPrint($$@);
|
|
104
104
|
sub Rationalize($;$);
|
|
105
105
|
sub Write($@);
|
|
106
|
+
sub GetGeolocateTags($$;$);
|
|
106
107
|
sub WriteTrailerBuffer($$$);
|
|
107
108
|
sub AddNewTrailers($;@);
|
|
108
109
|
sub Tell($);
|
|
@@ -1102,6 +1103,7 @@ my @availableOptions = (
|
|
|
1102
1103
|
[ 'FilterW', undef, 'input filter when writing tag values' ],
|
|
1103
1104
|
[ 'FixBase', undef, 'fix maker notes base offsets' ],
|
|
1104
1105
|
[ 'Geolocation', undef, 'generate geolocation tags' ],
|
|
1106
|
+
[ 'GeolocFeature', undef, 'regular expression of geolocation features to match' ],
|
|
1105
1107
|
[ 'GeolocMinPop', undef, 'minimum geolocation population' ],
|
|
1106
1108
|
[ 'GeolocMaxDist', undef, 'maximum geolocation distance' ],
|
|
1107
1109
|
[ 'GeoMaxIntSecs', 1800, 'geotag maximum interpolation time (secs)' ],
|
|
@@ -1171,7 +1173,7 @@ my @defaultWriteGroups = qw(
|
|
|
1171
1173
|
|
|
1172
1174
|
# group hash for ExifTool-generated tags
|
|
1173
1175
|
my %allGroupsExifTool = ( 0 => 'ExifTool', 1 => 'ExifTool', 2 => 'ExifTool' );
|
|
1174
|
-
my %
|
|
1176
|
+
my %geoInfo = ( Groups => { 0 => 'ExifTool', 1 => 'ExifTool', 2 => 'Location' }, Priority => 0 );
|
|
1175
1177
|
|
|
1176
1178
|
# special tag names (not used for tag info)
|
|
1177
1179
|
%specialTags = map { $_ => 1 } qw(
|
|
@@ -1201,7 +1203,7 @@ sub DummyWriteProc { return 1; }
|
|
|
1201
1203
|
|
|
1202
1204
|
my %systemTagsNotes = (
|
|
1203
1205
|
Notes => q{
|
|
1204
|
-
extracted only if specifically requested or the L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1206
|
+
extracted only if specifically requested or the API L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1205
1207
|
option is set
|
|
1206
1208
|
},
|
|
1207
1209
|
);
|
|
@@ -1484,7 +1486,7 @@ my %systemTagsNotes = (
|
|
|
1484
1486
|
FileAttributes => {
|
|
1485
1487
|
Groups => { 1 => 'System', 2 => 'Other' },
|
|
1486
1488
|
Notes => q{
|
|
1487
|
-
extracted only if specifically requested or the L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1489
|
+
extracted only if specifically requested or the API L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1488
1490
|
option is set. 2 or 3 values: 0. File type, 1. Attribute bits, 2. Windows
|
|
1489
1491
|
attribute bits if Win32API::File is available
|
|
1490
1492
|
},
|
|
@@ -1539,7 +1541,7 @@ my %systemTagsNotes = (
|
|
|
1539
1541
|
FileUserID => {
|
|
1540
1542
|
Groups => { 1 => 'System', 2 => 'Other' },
|
|
1541
1543
|
Notes => q{
|
|
1542
|
-
extracted only if specifically requested or the L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1544
|
+
extracted only if specifically requested or the API L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1543
1545
|
option is set. Returns user ID number with the -n option, or name
|
|
1544
1546
|
otherwise. May be written with either user name or number
|
|
1545
1547
|
},
|
|
@@ -1553,7 +1555,7 @@ my %systemTagsNotes = (
|
|
|
1553
1555
|
FileGroupID => {
|
|
1554
1556
|
Groups => { 1 => 'System', 2 => 'Other' },
|
|
1555
1557
|
Notes => q{
|
|
1556
|
-
extracted only if specifically requested or the L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1558
|
+
extracted only if specifically requested or the API L<SystemTags|../ExifTool.html#SystemTags> or L<RequestAll|../ExifTool.html#RequestAll>
|
|
1557
1559
|
option is set. Returns group ID number with the -n option, or name
|
|
1558
1560
|
otherwise. May be written with either group name or number
|
|
1559
1561
|
},
|
|
@@ -1796,7 +1798,7 @@ my %systemTagsNotes = (
|
|
|
1796
1798
|
Groups => { 0 => 'ExifTool', 1 => 'ExifTool', 2 => 'Other' },
|
|
1797
1799
|
Notes => q{
|
|
1798
1800
|
the clock time in seconds taken by ExifTool to extract information from this
|
|
1799
|
-
file. Not generated unless specifically requested or the L<RequestAll|../ExifTool.html#RequestAll>
|
|
1801
|
+
file. Not generated unless specifically requested or the API L<RequestAll|../ExifTool.html#RequestAll>
|
|
1800
1802
|
option is set. Requires Time::HiRes
|
|
1801
1803
|
},
|
|
1802
1804
|
PrintConv => 'sprintf("%.3g s", $val)',
|
|
@@ -1937,7 +1939,7 @@ my %systemTagsNotes = (
|
|
|
1937
1939
|
Groups => { 0 => 'Trailer' },
|
|
1938
1940
|
Notes => q{
|
|
1939
1941
|
the full JPEG trailer data block. Extracted only if specifically requested
|
|
1940
|
-
or the API RequestAll option is set to 3 or higher
|
|
1942
|
+
or the API L<RequestAll|../ExifTool.html#RequestAll> option is set to 3 or higher
|
|
1941
1943
|
},
|
|
1942
1944
|
Writable => 1,
|
|
1943
1945
|
Protected => 1,
|
|
@@ -1970,78 +1972,79 @@ my %systemTagsNotes = (
|
|
|
1970
1972
|
Writable => 1,
|
|
1971
1973
|
WriteOnly => 1,
|
|
1972
1974
|
WriteNothing => 1,
|
|
1973
|
-
AllowGroup => '(xmp|iptc)',
|
|
1975
|
+
AllowGroup => '(exif|gps|xmp|xmp-exif|xmp-iptcext|xmp-iptccore|xmp-photoshop|iptc|quicktime|itemlist|keys|userdata)',
|
|
1974
1976
|
Notes => q{
|
|
1975
|
-
this write-only tag
|
|
1976
|
-
and
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
regardless of the API Geolocation
|
|
1977
|
+
this write-only tag may be used to write geolocation city, region, country
|
|
1978
|
+
code and country based in input GPS coordinates, or to write GPS
|
|
1979
|
+
coordinates based on geolocation name. See the
|
|
1980
|
+
L<Writing section of the Geolocation page|../geolocation.html#Write> for
|
|
1981
|
+
details. This tag is writable regardless of the API L<Geolocation|../ExifTool.html#Geolocation>
|
|
1982
|
+
option setting
|
|
1980
1983
|
},
|
|
1981
1984
|
DelCheck => q{
|
|
1982
|
-
my
|
|
1983
|
-
|
|
1984
|
-
$self->SetNewValue('XMP:'.$_) foreach qw(City State CountryCode Country);
|
|
1985
|
-
} elsif ($grp eq 'iptc') {
|
|
1986
|
-
$self->SetNewValue('IPTC:'.$_) foreach qw(City Province-State Country-PrimaryLocationCode Country-PrimaryLocationName);
|
|
1987
|
-
}
|
|
1985
|
+
my @tags = $self->GetGeolocateTags($wantGroup);
|
|
1986
|
+
$self->SetNewValue($_) foreach @tags;
|
|
1988
1987
|
return '';
|
|
1989
1988
|
},
|
|
1990
1989
|
ValueConvInv => q{
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
my $
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
}
|
|
1990
|
+
require Image::ExifTool::Geolocation;
|
|
1991
|
+
return $val if lc($val) eq 'geotag';
|
|
1992
|
+
my $opts = $$self{OPTIONS};
|
|
1993
|
+
my $geo = Image::ExifTool::Geolocation::Geolocate($self->Encode($val,'UTF8'),
|
|
1994
|
+
$$opts{GeolocMinPop}, $$opts{GeolocMaxDist}, $$opts{Lang}, undef, $$opts{GeolocFeature});
|
|
1995
|
+
return '' unless $geo;
|
|
1996
|
+
if ($$geo[12] and $self->Warn('Multiple matching cities found',2)) {
|
|
1997
|
+
warn "$$self{VALUE}{Warning}\n";
|
|
1998
|
+
return '';
|
|
1999
|
+
}
|
|
2000
|
+
my @tags = $self->GetGeolocateTags($wantGroup, defined $$geo[10] ? 0 : 1);
|
|
2001
|
+
my %geoNum = ( City => 0, Province => 1, State => 1, Code => 3, Country => 4,
|
|
2002
|
+
Coordinates => 89, Latitude => 8, Longitude => 9 );
|
|
2003
|
+
my ($tag, $value);
|
|
2004
|
+
foreach $tag (@tags) {
|
|
2005
|
+
if ($tag =~ /GPS(Coordinates|Latitude|Longitude)?/) {
|
|
2006
|
+
$value = $geoNum{$1} == 89 ? "$$geo[8],$$geo[9]" : $$geo[$geoNum{$1}];
|
|
2007
|
+
} elsif ($tag =~ /(Code)/ or $tag =~ /(City|Province|State|Country)/) {
|
|
2008
|
+
$value = $$geo[$geoNum{$1}];
|
|
2009
|
+
next unless defined $value;
|
|
2010
|
+
$value = $self->Decode($value,'UTF8');
|
|
2011
|
+
$value .= ' ' if $tag eq 'iptc:Country-PrimaryLocationCode'; # (IPTC requires 3-char code)
|
|
2008
2012
|
} else {
|
|
2009
|
-
|
|
2010
|
-
foreach (qw(City Province-State Country-PrimaryLocationCode Country-PrimaryLocationName)) {
|
|
2011
|
-
next unless defined $a[$i++];
|
|
2012
|
-
$self->SetNewValue('IPTC:'.$_, $self->Decode($a[$i-1],'UTF8'));
|
|
2013
|
-
}
|
|
2013
|
+
next; # (shouldn't happen)
|
|
2014
2014
|
}
|
|
2015
|
+
$self->SetNewValue($tag => $value, Type => 'PrintConv');
|
|
2015
2016
|
}
|
|
2016
2017
|
return '';
|
|
2017
2018
|
},
|
|
2018
2019
|
PrintConvInv => q{
|
|
2019
|
-
return
|
|
2020
|
+
return $val unless $val =~ /^([-+]?\d.*?[NS]?), ?([-+]?\d.*?[EW]?)$/ or
|
|
2020
2021
|
$val =~ /^\s*(-?\d+(?:\.\d+)?)\s*(-?\d+(?:\.\d+)?)\s*$/;
|
|
2021
2022
|
my ($lat, $lon) = ($1, $2);
|
|
2022
2023
|
require Image::ExifTool::GPS;
|
|
2023
2024
|
$lat = Image::ExifTool::GPS::ToDegrees($lat, 1, "lat");
|
|
2024
2025
|
$lon = Image::ExifTool::GPS::ToDegrees($lon, 1, "lon");
|
|
2025
|
-
return "$lat $lon";
|
|
2026
|
+
return "$lat, $lon";
|
|
2026
2027
|
},
|
|
2027
2028
|
},
|
|
2028
|
-
|
|
2029
|
-
%geoGroups,
|
|
2029
|
+
GeolocationBearing => { %geoInfo,
|
|
2030
2030
|
Notes => q{
|
|
2031
|
-
|
|
2032
|
-
generated only if API Geolocation option is set
|
|
2031
|
+
compass bearing to GeolocationCity center. Geolocation tags are
|
|
2032
|
+
generated only if API L<Geolocation|../ExifTool.html#Geolocation> option is set
|
|
2033
2033
|
},
|
|
2034
2034
|
},
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2035
|
+
GeolocationCity => { %geoInfo, Notes => 'name of city nearest to the current GPS coordinates', ValueConv => '$self->Decode($val,"UTF8")' },
|
|
2036
|
+
GeolocationRegion => { %geoInfo, Notes => 'geolocation state, province or region', ValueConv => '$self->Decode($val,"UTF8")' },
|
|
2037
|
+
GeolocationSubregion=> { %geoInfo, Notes => 'geolocation county or subregion', ValueConv => '$self->Decode($val,"UTF8")' },
|
|
2038
|
+
GeolocationCountry => { %geoInfo, Notes => 'geolocation country name', ValueConv => '$self->Decode($val,"UTF8")' },
|
|
2039
|
+
GeolocationCountryCode=>{%geoInfo, Notes => 'geolocation country code' },
|
|
2040
|
+
GeolocationTimeZone => { %geoInfo, Notes => 'geolocation time zone name' },
|
|
2041
|
+
GeolocationFeatureCode=>{%geoInfo, Notes => 'feature code, see L<http://www.geonames.org/export/codes.html#P>' },
|
|
2042
|
+
GeolocationPopulation=>{ %geoInfo, Notes => 'city population rounded to 2 significant digits' },
|
|
2043
|
+
GeolocationDistance => { %geoInfo, Notes => 'distance in km from current GPS to city', PrintConv => '"$val km"' },
|
|
2044
|
+
GeolocationPosition => { %geoInfo, Notes => 'approximate GPS coordinates of city',
|
|
2043
2045
|
PrintConv => '$val =~ s/ /, /; $val',
|
|
2044
2046
|
},
|
|
2047
|
+
GeolocationWarning => { %geoInfo },
|
|
2045
2048
|
);
|
|
2046
2049
|
|
|
2047
2050
|
# tags defined by UserParam option (added at runtime)
|
|
@@ -2648,6 +2651,7 @@ sub ExtractInfo($;@)
|
|
|
2648
2651
|
}
|
|
2649
2652
|
# initialize ExifTool object members
|
|
2650
2653
|
$self->Init();
|
|
2654
|
+
$$self{InExtract} = 1; # set flag indicating we are inside ExtractInfo
|
|
2651
2655
|
|
|
2652
2656
|
delete $$self{MAKER_NOTE_FIXUP}; # fixup information for extracted maker notes
|
|
2653
2657
|
delete $$self{MAKER_NOTE_BYTE_ORDER};
|
|
@@ -2825,6 +2829,7 @@ sub ExtractInfo($;@)
|
|
|
2825
2829
|
$self->FoundTag('FileTypeExtension', '');
|
|
2826
2830
|
$self->DoneExtract();
|
|
2827
2831
|
$raf->Close() if $raf;
|
|
2832
|
+
delete $$self{InExtract} unless $reEntry;
|
|
2828
2833
|
return 1;
|
|
2829
2834
|
}
|
|
2830
2835
|
# get list of file types to check
|
|
@@ -3056,6 +3061,7 @@ sub ExtractInfo($;@)
|
|
|
3056
3061
|
$$self{$_} = $$reEntry{$_} foreach keys %$reEntry;
|
|
3057
3062
|
SetByteOrder($saveOrder);
|
|
3058
3063
|
}
|
|
3064
|
+
delete $$self{InExtract} unless $reEntry;
|
|
3059
3065
|
|
|
3060
3066
|
# ($type may be undef without an Error when processing sub-documents)
|
|
3061
3067
|
return 0 if not defined $type or exists $$self{VALUE}{Error};
|
|
@@ -3075,8 +3081,13 @@ sub GetInfo($;@)
|
|
|
3075
3081
|
{
|
|
3076
3082
|
local $_;
|
|
3077
3083
|
my $self = shift;
|
|
3078
|
-
my %saveOptions;
|
|
3084
|
+
my (%saveOptions, @saveMembers, @savedMembers);
|
|
3079
3085
|
|
|
3086
|
+
# save necessary members to allow GetInfo to be called from within ExtractInfo
|
|
3087
|
+
if ($$self{InExtract}) {
|
|
3088
|
+
@saveMembers = qw(REQUESTED_TAGS REQ_TAG_LOOKUP IO_TAG_LIST);
|
|
3089
|
+
@savedMembers = @$self{@saveMembers};
|
|
3090
|
+
}
|
|
3080
3091
|
unless (@_ and not defined $_[0]) {
|
|
3081
3092
|
%saveOptions = %{$$self{OPTIONS}}; # save original options
|
|
3082
3093
|
# must set FILENAME so it isn't parsed from the arguments
|
|
@@ -3159,8 +3170,9 @@ sub GetInfo($;@)
|
|
|
3159
3170
|
@{$$self{IO_TAG_LIST}} = $self->GetTagList($rtnTags, $sort, $$self{OPTIONS}{Sort2});
|
|
3160
3171
|
}
|
|
3161
3172
|
|
|
3162
|
-
# restore original options
|
|
3173
|
+
# restore original options and member variables
|
|
3163
3174
|
%saveOptions and $$self{OPTIONS} = \%saveOptions;
|
|
3175
|
+
@$self{@saveMembers} = @savedMembers if @saveMembers;
|
|
3164
3176
|
|
|
3165
3177
|
return \%info;
|
|
3166
3178
|
}
|
|
@@ -4253,36 +4265,101 @@ sub DoneExtract($)
|
|
|
4253
4265
|
Image::ExifTool::Validate::FinishValidate($self, $$self{REQ_TAG_LOOKUP}{validate});
|
|
4254
4266
|
}
|
|
4255
4267
|
# generate geolocation tags if requested
|
|
4256
|
-
if ($$opts{Geolocation}
|
|
4257
|
-
|
|
4258
|
-
$$opts{Geolocation}
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
}
|
|
4273
|
-
|
|
4268
|
+
if ($$opts{Geolocation}) {
|
|
4269
|
+
my ($arg, @defaults, @tags, $tag, @coord, @ref, @city, $doneCity, $both);
|
|
4270
|
+
my $geoOpt = $$opts{Geolocation};
|
|
4271
|
+
my @args = split /\s*,\s*/, $$opts{Geolocation};
|
|
4272
|
+
foreach $arg (@args) {
|
|
4273
|
+
lc $arg eq 'both' and $both = 1, next;
|
|
4274
|
+
$arg !~ s/^\$// and push(@defaults, $arg), next;
|
|
4275
|
+
push @tags, $arg; # argument is a tag name
|
|
4276
|
+
}
|
|
4277
|
+
unless (@tags) {
|
|
4278
|
+
# default tags to read if not specified
|
|
4279
|
+
@tags = qw(GPSLatitude GPSLongitude GPSLatitudeRef GPSLongitudeRef
|
|
4280
|
+
GPSCoordinates LocationShownGPSLatitude LocationShownGPSLongitude
|
|
4281
|
+
XMP:City State CountryCode Country
|
|
4282
|
+
IPTC:City Province-State Country-PrimaryLocationCode Country-PrimaryLocationName
|
|
4283
|
+
LocationShownCity LocationShownProvinceState LocationShownCountryCode LocationShownCountryName);
|
|
4284
|
+
}
|
|
4285
|
+
# get information for specified tags
|
|
4286
|
+
my $info = $self->GetInfo(\@tags, { PrintConv => 0, Duplicates => 0 }); # (returns tags in proper case)
|
|
4287
|
+
$opts = $$self{OPTIONS}; # (necessary because GetInfo changes the OPTIONS hash)
|
|
4288
|
+
foreach $tag (@tags) {
|
|
4289
|
+
my $val = $$info{$tag};
|
|
4290
|
+
next unless defined $val;
|
|
4291
|
+
$self->VPrint(0, "Found $tag ($val)\n");
|
|
4292
|
+
if ($tag =~ /Coordinates/) {
|
|
4293
|
+
next if defined $coord[0] and defined $coord[1];
|
|
4294
|
+
@coord = split ' ', $val;
|
|
4295
|
+
next;
|
|
4296
|
+
}
|
|
4297
|
+
my $n = $tag =~ /Latitude/ ? 0 : ($tag =~ /Longitude/ ? 1 : undef);
|
|
4298
|
+
if (defined $n) {
|
|
4299
|
+
if ($tag =~ /Ref$/) {
|
|
4300
|
+
$ref[$n] = $val unless $ref[$n];
|
|
4301
|
+
} else {
|
|
4302
|
+
$coord[$n] = $val unless defined $coord[$n];
|
|
4303
|
+
}
|
|
4304
|
+
next;
|
|
4305
|
+
}
|
|
4306
|
+
# handle city tags (save info for first city found)
|
|
4307
|
+
if ($tag =~ /City/) {
|
|
4308
|
+
@city and $doneCity = 1, next;
|
|
4309
|
+
push @city, $val;
|
|
4310
|
+
} elsif (@city) {
|
|
4311
|
+
push @city, $val unless $doneCity;
|
|
4312
|
+
next if $doneCity;
|
|
4313
|
+
}
|
|
4314
|
+
}
|
|
4315
|
+
if (defined $coord[0] and defined $coord[1]) {
|
|
4316
|
+
$coord[0] = -$coord[0] if $ref[0] and $coord[0] > 0 and $ref[0] eq 'S';
|
|
4317
|
+
$coord[1] = -$coord[1] if $ref[1] and $coord[1] > 0 and $ref[1] eq 'W';
|
|
4318
|
+
$arg = join ',', @coord;
|
|
4319
|
+
} elsif (@city) {
|
|
4320
|
+
$arg = join ',', @city;
|
|
4321
|
+
}
|
|
4322
|
+
if (not defined $arg) {
|
|
4323
|
+
# use specified default values if no tags found
|
|
4324
|
+
$arg = join ',', @defaults;
|
|
4325
|
+
undef $arg if $arg eq '1';
|
|
4326
|
+
$both = 1; # use 'both' GPS and place names if provided
|
|
4327
|
+
}
|
|
4328
|
+
if ($arg) {
|
|
4329
|
+
$arg .= ',both' if $both;
|
|
4330
|
+
$arg = $self->Encode($arg, 'UTF8');
|
|
4274
4331
|
require Image::ExifTool::Geolocation;
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4332
|
+
if ($$opts{Verbose}) {
|
|
4333
|
+
if ($Image::ExifTool::Geolocation::dbInfo) {
|
|
4334
|
+
print "Loaded $Image::ExifTool::Geolocation::dbInfo\n";
|
|
4335
|
+
} else {
|
|
4336
|
+
print "Error loading Geolocation.dat\n";
|
|
4337
|
+
}
|
|
4338
|
+
}
|
|
4339
|
+
local $SIG{'__WARN__'} = \&SetWarning;
|
|
4340
|
+
undef $evalWarning;
|
|
4341
|
+
my $geo = Image::ExifTool::Geolocation::Geolocate($arg, $$opts{GeolocMinPop},
|
|
4342
|
+
$$opts{GeolocMaxDist}, $$opts{Lang}, $$opts{Duplicates},
|
|
4343
|
+
$$opts{GeolocFeature});
|
|
4344
|
+
# ($$geo[0] will be an ARRAY ref if multiple matches were found and the Duplicates option is set)
|
|
4345
|
+
if ($geo and (ref $$geo[0] or not $$geo[12] or not $self->Warn('Multiple Geolocation cities are possible',2))) {
|
|
4346
|
+
my $geoList = ref $$geo[0] ? $geo : [ $geo ]; # make a list if not done alreaday
|
|
4347
|
+
foreach $geo (@$geoList) {
|
|
4348
|
+
$self->FoundTag(GeolocationCity => $$geo[0]);
|
|
4349
|
+
$self->FoundTag(GeolocationRegion => $$geo[1]) if $$geo[1];
|
|
4350
|
+
$self->FoundTag(GeolocationSubregion => $$geo[2]) if $$geo[2];
|
|
4351
|
+
$self->FoundTag(GeolocationCountryCode => $$geo[3]);
|
|
4352
|
+
$self->FoundTag(GeolocationCountry => $$geo[4]) if $$geo[4];
|
|
4353
|
+
$self->FoundTag(GeolocationTimeZone => $$geo[5]) if $$geo[5];
|
|
4354
|
+
$self->FoundTag(GeolocationFeatureCode => $$geo[6]);
|
|
4355
|
+
$self->FoundTag(GeolocationPopulation => $$geo[7]);
|
|
4356
|
+
$self->FoundTag(GeolocationPosition => "$$geo[8] $$geo[9]");
|
|
4357
|
+
$self->FoundTag(GeolocationDistance => $$geo[10]) if defined $$geo[10];
|
|
4358
|
+
$self->FoundTag(GeolocationBearing => $$geo[11]) if defined $$geo[11];
|
|
4359
|
+
$self->FoundTag(GeolocationWarning => "Search matched $$geo[12] cities") if $$geo[12] and $geo eq $$geoList[0];
|
|
4360
|
+
}
|
|
4361
|
+
} elsif ($evalWarning) {
|
|
4362
|
+
$self->Warn(CleanWarning());
|
|
4286
4363
|
}
|
|
4287
4364
|
}
|
|
4288
4365
|
}
|
|
@@ -6017,8 +6094,8 @@ sub MakeTagName($)
|
|
|
6017
6094
|
my $name = shift;
|
|
6018
6095
|
$name =~ tr/-_a-zA-Z0-9//dc; # remove illegal characters
|
|
6019
6096
|
$name = ucfirst $name; # capitalize first letter
|
|
6020
|
-
$name = "Tag$name" if length($name) < 2 or $name =~ /^[-0-9]/;
|
|
6021
6097
|
# must at least 2 characters long and not start with - or 0-9-
|
|
6098
|
+
$name = "Tag$name" if length($name) < 2 or $name =~ /^[-0-9]/;
|
|
6022
6099
|
return $name;
|
|
6023
6100
|
}
|
|
6024
6101
|
|
|
@@ -717,12 +717,24 @@ or undef (the default) for no base adjustment.
|
|
|
717
717
|
|
|
718
718
|
=item Geolocation
|
|
719
719
|
|
|
720
|
-
Flag to generate geolocation tags based on
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
"44.56,-72.33")
|
|
724
|
-
|
|
725
|
-
|
|
720
|
+
Flag to generate geolocation tags based on the GPSLatitude/GPSLongitude or
|
|
721
|
+
City/State/Province/Country read from a file. This feature uses an included
|
|
722
|
+
database with cities over a population of 2000 from geonames.org. May be set
|
|
723
|
+
to a string of the form "Lat,Lon" (eg. "44.56,-72.33") or city with optional
|
|
724
|
+
state/province, country and/or country code (eg. "Paris,France") to act as a
|
|
725
|
+
default for files not containing GPS or geolocation information, or include
|
|
726
|
+
tag names with leading dollar signs separated by commas to specify the tags
|
|
727
|
+
to use for the geolocation input. May also include regular expressions for
|
|
728
|
+
more flexible matching. See L<https://exiftool.org/geolocation.html> for
|
|
729
|
+
more details. Default is undef.
|
|
730
|
+
|
|
731
|
+
=item GeolocFeature
|
|
732
|
+
|
|
733
|
+
Comma-separated list of feature codes to include in city search, or exclude
|
|
734
|
+
if the list begins with a dash (-). Valid feature codes are PPL, PPLA,
|
|
735
|
+
PPLA2, PPLA3, PPLA4, PPLA5, PPLC, PPLCH, PPLF, PPLG, PPLL, PPLR, PPLS, STLMT
|
|
736
|
+
and Other. See L<http://www.geonames.org/export/codes.html#P> for a
|
|
737
|
+
description of these codes. Default is undef.
|
|
726
738
|
|
|
727
739
|
=item GeolocMaxDist
|
|
728
740
|
|
|
@@ -731,7 +743,8 @@ not generated if the distance is greater than this. Default is undef.
|
|
|
731
743
|
|
|
732
744
|
=item GeolocMinPop
|
|
733
745
|
|
|
734
|
-
Minimum population for the Geolocation city.
|
|
746
|
+
Minimum population for the Geolocation city. Cities smaller than this are
|
|
747
|
+
ignored. Default is undef.
|
|
735
748
|
|
|
736
749
|
=item GeoMaxIntSecs
|
|
737
750
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exiftool-vendored.exe",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.80.0",
|
|
4
4
|
"description": "Vendored win32 ExifTool for Node.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"homepage": "https://github.com/mceachen/exiftool-vendored.exe#readme",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"mocha": "^10.3.0",
|
|
45
|
-
"npm-check-updates": "^16.14.
|
|
45
|
+
"npm-check-updates": "^16.14.17",
|
|
46
46
|
"prettier": "^3.2.5",
|
|
47
47
|
"release-it": "^17.1.1"
|
|
48
48
|
}
|