exiftool_vendored 12.83.0 → 12.85.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.
- checksums.yaml +4 -4
- data/bin/Changes +40 -1
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +46 -46
- data/bin/build_geolocation +99 -21
- data/bin/config_files/example.config +2 -2
- data/bin/exiftool +52 -50
- data/bin/lib/Image/ExifTool/Apple.pm +52 -7
- data/bin/lib/Image/ExifTool/Canon.pm +11 -2
- data/bin/lib/Image/ExifTool/CanonVRD.pm +13 -1
- data/bin/lib/Image/ExifTool/DPX.pm +3 -3
- data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
- data/bin/lib/Image/ExifTool/Geolocation.pm +132 -79
- data/bin/lib/Image/ExifTool/Geotag.pm +18 -10
- data/bin/lib/Image/ExifTool/ID3.pm +28 -6
- data/bin/lib/Image/ExifTool/Nikon.pm +19 -1
- data/bin/lib/Image/ExifTool/Pentax.pm +64 -13
- data/bin/lib/Image/ExifTool/QuickTime.pm +25 -9
- data/bin/lib/Image/ExifTool/TagLookup.pm +3552 -3541
- data/bin/lib/Image/ExifTool/TagNames.pod +45 -10
- data/bin/lib/Image/ExifTool/WriteQuickTime.pl +2 -1
- data/bin/lib/Image/ExifTool/Writer.pl +5 -5
- data/bin/lib/Image/ExifTool/XMP.pm +2 -0
- data/bin/lib/Image/ExifTool.pm +48 -23
- data/bin/lib/Image/ExifTool.pod +75 -64
- data/bin/perl-Image-ExifTool.spec +45 -45
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7358ec4db6649c211751f80b5aa3b036eb822b43a01cd043ad1ea7c4b0a3ebaa
|
|
4
|
+
data.tar.gz: 42b5dca7143001edc0d163ac8aa9da3815b2494130728e245a4d531a17ef4cf8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa9b04d5c595bacd9e007c80eb11c171f7f00b22c9de6c5c1b7615b776a9d6b74bbab4d21c7bb38b75b6dfd5ec50fc108a4e3392190fadabc68cfdf54f31be1d
|
|
7
|
+
data.tar.gz: 2651bb2da28b582eacc78167dec78d9d512661351cc3f8c0c748e85e420ddd773a8f095858af4d46668f7b20da8d47cb826561c3d06e3035f00b52a640650055
|
data/bin/Changes
CHANGED
|
@@ -7,6 +7,45 @@ RSS feed: https://exiftool.org/rss.xml
|
|
|
7
7
|
Note: The most recent production release is Version 12.76. (Other versions are
|
|
8
8
|
considered development releases, and are not uploaded to MetaCPAN.)
|
|
9
9
|
|
|
10
|
+
May 21, 2024 - Version 12.85
|
|
11
|
+
|
|
12
|
+
- Added GeolocationFeatureType tag
|
|
13
|
+
- Added read support for Nikon NKA and NXD adjustment files
|
|
14
|
+
- Added a new Apple:ImageCaptureType value, and changed another one
|
|
15
|
+
- Decode a few new Pentax tags
|
|
16
|
+
- Decode a few new Canon tags
|
|
17
|
+
- Decode some Ricoh Exif metadata from MOV videos
|
|
18
|
+
- Extract ID3 UserDefinedText and UserDefinedURL tags by name
|
|
19
|
+
- Make $advFmtSelf available for user-defined helper functions
|
|
20
|
+
- Documented API GeoDir pseudo option feature
|
|
21
|
+
- Tolerate pad byte at end of HIF file when writing
|
|
22
|
+
- Raised priority of FileName, BaseName, Directory and FileType tags so they
|
|
23
|
+
don't get hidden by other tags in the file which may have these names
|
|
24
|
+
- Changed decoding of QuickTime Rotation (irot) to correspond with
|
|
25
|
+
EXIF:Orientation (previously this was oddly reported as degrees of
|
|
26
|
+
counterclockwise rotation)
|
|
27
|
+
- Fixed a typo in the print conversion value for a couple of DPX tags
|
|
28
|
+
- Fixed problem writing some QuickTime tags with very large (> 16 MB) values
|
|
29
|
+
- Fixed bug in build_geolocation utility that resulted in incorrect population
|
|
30
|
+
numbers when run under ActivePerl
|
|
31
|
+
|
|
32
|
+
Apr. 23, 2024 - Version 12.84
|
|
33
|
+
|
|
34
|
+
- Added ability to read speed and accuracy_horizontal when geotagging from
|
|
35
|
+
OpenTracks GPX files
|
|
36
|
+
- Decode a few more Apple tags and a new CanonVRD tag
|
|
37
|
+
- Enhanced Geolocation feature with the ability to return any number of nearby
|
|
38
|
+
cities
|
|
39
|
+
- Fixed long-standing bug in Windows version that didn't properly handle dates
|
|
40
|
+
older than 50 years when writing FileModifyDate or FileCreateDate
|
|
41
|
+
- Fixed API TimeZone option to work in Windows
|
|
42
|
+
- Fixed problem where the SetTags helper function didn't properly copy tags
|
|
43
|
+
which have print conversions
|
|
44
|
+
- Fixed problem where a new subregion couldn't be added through a user-defined
|
|
45
|
+
Geolocation database entry
|
|
46
|
+
- Fixed problem where the API GeolocFeature option didn't work for some
|
|
47
|
+
features if a user-generated custom database was used
|
|
48
|
+
|
|
10
49
|
Apr. 18, 2024 - Version 12.83
|
|
11
50
|
|
|
12
51
|
- Added SetTags helper function for use in advanced formatting expressions
|
|
@@ -14,7 +53,7 @@ Apr. 18, 2024 - Version 12.83
|
|
|
14
53
|
- Added a new Nikon Z lens
|
|
15
54
|
- Added a couple of new QuickTime tags
|
|
16
55
|
- Added a few more XMP-GCamera tags
|
|
17
|
-
- Added build_geolocation to the full distribution
|
|
56
|
+
- Added build_geolocation utility to the full distribution
|
|
18
57
|
- Decode a new CanonVRD tag and rename another one
|
|
19
58
|
- Updates to Sony maker note decoding for newer models (thanks Jos Roost)
|
|
20
59
|
- Minor change in -p option to avoid adding the trailing newline if the -b
|
data/bin/META.json
CHANGED
data/bin/META.yml
CHANGED
data/bin/README
CHANGED
|
@@ -14,50 +14,50 @@ supported by ExifTool (r = read, w = write, c = create):
|
|
|
14
14
|
|
|
15
15
|
File Types
|
|
16
16
|
------------+-------------+-------------+-------------+------------
|
|
17
|
-
360 r/w | DOCX r | ITC r |
|
|
18
|
-
3FR r | DPX r | J2C r |
|
|
19
|
-
3G2 r/w | DR4 r/w/c | JNG r/w |
|
|
20
|
-
3GP r/w | DSS r | JP2 r/w |
|
|
21
|
-
7Z r | DV r | JPEG r/w |
|
|
22
|
-
A r | DVB r/w | JSON r |
|
|
23
|
-
AA r | DVR-MS r | JXL r/w |
|
|
24
|
-
AAC r | DYLIB r | K25 r |
|
|
25
|
-
AAE r | EIP r | KDC r |
|
|
26
|
-
AAX r/w | EPS r/w | KEY r |
|
|
27
|
-
ACR r | EPUB r | LA r |
|
|
28
|
-
AFM r | ERF r/w | LFP r |
|
|
29
|
-
AI r/w | EXE r | LIF r |
|
|
30
|
-
AIFF r | EXIF r/w/c | LNK r |
|
|
31
|
-
APE r | EXR r | LRV r/w |
|
|
32
|
-
ARQ r/w | EXV r/w/c | M2TS r |
|
|
33
|
-
ARW r/w | F4A/V r/w | M4A/V r/w |
|
|
34
|
-
ASF r | FFF r/w | MACOS r |
|
|
35
|
-
AVI r | FITS r | MAX r |
|
|
36
|
-
AVIF r/w | FLA r | MEF r/w |
|
|
37
|
-
AZW r | FLAC r | MIE r/w/c |
|
|
38
|
-
BMP r | FLIF r/w | MIFF r |
|
|
39
|
-
BPG r | FLV r | MKA r |
|
|
40
|
-
BTF r | FPF r | MKS r |
|
|
41
|
-
C2PA r | FPX r | MKV r |
|
|
42
|
-
CHM r | GIF r/w | MNG r/w |
|
|
43
|
-
COS r | GLV r/w | MOBI r |
|
|
44
|
-
CR2 r/w | GPR r/w | MODD r |
|
|
45
|
-
CR3 r/w | GZ r | MOI r |
|
|
46
|
-
CRM r/w | HDP r/w | MOS r/w |
|
|
47
|
-
CRW r/w | HDR r | MOV r/w |
|
|
48
|
-
CS1 r/w | HEIC r/w | MP3 r |
|
|
49
|
-
CSV r | HEIF r/w | MP4 r/w |
|
|
50
|
-
CUR r | HTML r | MPC r |
|
|
51
|
-
CZI r | ICC r/w/c | MPG r |
|
|
52
|
-
DCM r | ICO r | MPO r/w |
|
|
53
|
-
DCP r/w | ICS r | MQV r/w |
|
|
54
|
-
DCR r | IDML r | MRC r |
|
|
55
|
-
DFONT r | IIQ r/w | MRW r/w |
|
|
56
|
-
DIVX r | IND r/w | MXF r |
|
|
57
|
-
DJVU r | INSP r/w | NEF r/w |
|
|
58
|
-
DLL r | INSV r |
|
|
59
|
-
DNG r/w | INX r |
|
|
60
|
-
DOC r | ISO r |
|
|
17
|
+
360 r/w | DOCX r | ITC r | NUMBERS r | RAW r/w
|
|
18
|
+
3FR r | DPX r | J2C r | NXD r | RIFF r
|
|
19
|
+
3G2 r/w | DR4 r/w/c | JNG r/w | O r | RSRC r
|
|
20
|
+
3GP r/w | DSS r | JP2 r/w | ODP r | RTF r
|
|
21
|
+
7Z r | DV r | JPEG r/w | ODS r | RW2 r/w
|
|
22
|
+
A r | DVB r/w | JSON r | ODT r | RWL r/w
|
|
23
|
+
AA r | DVR-MS r | JXL r/w | OFR r | RWZ r
|
|
24
|
+
AAC r | DYLIB r | K25 r | OGG r | RM r
|
|
25
|
+
AAE r | EIP r | KDC r | OGV r | SEQ r
|
|
26
|
+
AAX r/w | EPS r/w | KEY r | ONP r | SKETCH r
|
|
27
|
+
ACR r | EPUB r | LA r | OPUS r | SO r
|
|
28
|
+
AFM r | ERF r/w | LFP r | ORF r/w | SR2 r/w
|
|
29
|
+
AI r/w | EXE r | LIF r | ORI r/w | SRF r
|
|
30
|
+
AIFF r | EXIF r/w/c | LNK r | OTF r | SRW r/w
|
|
31
|
+
APE r | EXR r | LRV r/w | PAC r | SVG r
|
|
32
|
+
ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SWF r
|
|
33
|
+
ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | THM r/w
|
|
34
|
+
ASF r | FFF r/w | MACOS r | PCD r | TIFF r/w
|
|
35
|
+
AVI r | FITS r | MAX r | PCX r | TORRENT r
|
|
36
|
+
AVIF r/w | FLA r | MEF r/w | PDB r | TTC r
|
|
37
|
+
AZW r | FLAC r | MIE r/w/c | PDF r/w | TTF r
|
|
38
|
+
BMP r | FLIF r/w | MIFF r | PEF r/w | TXT r
|
|
39
|
+
BPG r | FLV r | MKA r | PFA r | VCF r
|
|
40
|
+
BTF r | FPF r | MKS r | PFB r | VNT r
|
|
41
|
+
C2PA r | FPX r | MKV r | PFM r | VRD r/w/c
|
|
42
|
+
CHM r | GIF r/w | MNG r/w | PGF r | VSD r
|
|
43
|
+
COS r | GLV r/w | MOBI r | PGM r/w | WAV r
|
|
44
|
+
CR2 r/w | GPR r/w | MODD r | PLIST r | WDP r/w
|
|
45
|
+
CR3 r/w | GZ r | MOI r | PICT r | WEBP r/w
|
|
46
|
+
CRM r/w | HDP r/w | MOS r/w | PMP r | WEBM r
|
|
47
|
+
CRW r/w | HDR r | MOV r/w | PNG r/w | WMA r
|
|
48
|
+
CS1 r/w | HEIC r/w | MP3 r | PPM r/w | WMV r
|
|
49
|
+
CSV r | HEIF r/w | MP4 r/w | PPT r | WPG r
|
|
50
|
+
CUR r | HTML r | MPC r | PPTX r | WTV r
|
|
51
|
+
CZI r | ICC r/w/c | MPG r | PS r/w | WV r
|
|
52
|
+
DCM r | ICO r | MPO r/w | PSB r/w | X3F r/w
|
|
53
|
+
DCP r/w | ICS r | MQV r/w | PSD r/w | XCF r
|
|
54
|
+
DCR r | IDML r | MRC r | PSP r | XISF r
|
|
55
|
+
DFONT r | IIQ r/w | MRW r/w | QTIF r/w | XLS r
|
|
56
|
+
DIVX r | IND r/w | MXF r | R3D r | XLSX r
|
|
57
|
+
DJVU r | INSP r/w | NEF r/w | RA r | XMP r/w/c
|
|
58
|
+
DLL r | INSV r | NKA r | RAF r/w | ZIP r
|
|
59
|
+
DNG r/w | INX r | NKSC r/w | RAM r |
|
|
60
|
+
DOC r | ISO r | NRW r/w | RAR r |
|
|
61
61
|
|
|
62
62
|
Meta Information
|
|
63
63
|
----------------------+----------------------+---------------------
|
|
@@ -109,8 +109,8 @@ your home directory, then you would type the following commands in a
|
|
|
109
109
|
terminal window to extract and run ExifTool:
|
|
110
110
|
|
|
111
111
|
cd ~/Desktop
|
|
112
|
-
gzip -dc Image-ExifTool-12.
|
|
113
|
-
cd Image-ExifTool-12.
|
|
112
|
+
gzip -dc Image-ExifTool-12.85.tar.gz | tar -xf -
|
|
113
|
+
cd Image-ExifTool-12.85
|
|
114
114
|
./exiftool t/images/ExifTool.jpg
|
|
115
115
|
|
|
116
116
|
Note: These commands extract meta information from one of the test images.
|
data/bin/build_geolocation
CHANGED
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
#
|
|
11
11
|
# Created: 2024-03-03 - P. Harvey
|
|
12
12
|
# 2024-04-15 - PH Clean up and add options for public release
|
|
13
|
+
# 2024-04-22 - PH Increased number of possible feature codes from
|
|
14
|
+
# 32 to 64. Convert backslashes in directory names
|
|
15
|
+
# 2024-04-24 - PH Fixed problem with population exponent when run
|
|
16
|
+
# under ActivePerl
|
|
17
|
+
# 2024-04-29 - PH Added feature types and default to db v1.03
|
|
13
18
|
#
|
|
14
19
|
# Notes: Requires these files from https://download.geonames.org/export/
|
|
15
20
|
#
|
|
@@ -17,6 +22,7 @@
|
|
|
17
22
|
# countryInfo.txt
|
|
18
23
|
# admin1CodesASCII.txt
|
|
19
24
|
# admin2Codes.txt
|
|
25
|
+
# featureCodes_XX.txt (optional)
|
|
20
26
|
# alternateNamesV2.txt (optional)
|
|
21
27
|
#
|
|
22
28
|
# Output datbase format (Geolocation.dat):
|
|
@@ -35,7 +41,7 @@
|
|
|
35
41
|
# 9 int16u - v1.02: 0x7fff = index in subregion (admin2), 0x8000 = high bit of time zone
|
|
36
42
|
# 9 int16u - v1.03: index in subregion (admin2)
|
|
37
43
|
# 11 int8u - low byte of time zone index
|
|
38
|
-
# 12 int8u -
|
|
44
|
+
# 12 int8u - 0x3f = feature code index (see below), v1.03: 0x80 = high bit of time zone
|
|
39
45
|
# 13 string - UTF8 City name, terminated by newline
|
|
40
46
|
# "\0\0\0\0\x01"
|
|
41
47
|
# Country entries:
|
|
@@ -52,7 +58,7 @@
|
|
|
52
58
|
# 1. Time zone name, terminated by newline
|
|
53
59
|
# "\0\0\0\0\x05" (feature codes added in v1.03)
|
|
54
60
|
# Feature codes:
|
|
55
|
-
# 1. Feature code,
|
|
61
|
+
# 1. Feature code, optional space-followed-by-feature-name, then newline
|
|
56
62
|
# "\0\0\0\0\0"
|
|
57
63
|
#
|
|
58
64
|
# Feature Codes v1.02: (see http://www.geonames.org/export/codes.html#P for descriptions)
|
|
@@ -66,12 +72,12 @@
|
|
|
66
72
|
|
|
67
73
|
use strict;
|
|
68
74
|
|
|
69
|
-
my $dbVer = '1.
|
|
70
|
-
|
|
75
|
+
my $dbVer = '1.03'; # default output database version
|
|
71
76
|
my $dbFile = 'allCountries.txt'; # default database file
|
|
72
77
|
my $countryFile = 'countryInfo.txt'; # mandatory country names file
|
|
73
78
|
my $regionFile = 'admin1CodesASCII.txt'; # mandatory region names file
|
|
74
79
|
my $admin2File = 'admin2Codes.txt'; # mandatory subregion names file
|
|
80
|
+
my $featureFile = 'featureCodes_en.txt'; # optional feature names file
|
|
75
81
|
my $altNamesFile = 'alternateNamesV2.txt'; # optional alternate names file
|
|
76
82
|
my $outFile = 'Geolocation.dat'; # output ExifTool database file
|
|
77
83
|
my $outAltNames = 'AltNames.dat'; # output alternate names file
|
|
@@ -101,6 +107,7 @@ my @fc103 = qw(
|
|
|
101
107
|
my $i = 0;
|
|
102
108
|
my @featureCodes = $dbVer eq '1.02' ? @fc102 : @fc103;
|
|
103
109
|
my %featureCodes = map { $_ => $i++ } @featureCodes;
|
|
110
|
+
my %featureNames;
|
|
104
111
|
|
|
105
112
|
my ($dbfile, @dbfiles, $outDir, $verbose, $noLang, %needRgn);
|
|
106
113
|
my %optArgs = ( p => 1, c => 1, cp => 1, l => 1, o => 1, ver => 1 );
|
|
@@ -110,6 +117,9 @@ my $opts = { };
|
|
|
110
117
|
while (@ARGV) {
|
|
111
118
|
my $opt = shift;
|
|
112
119
|
if (not $opt =~ s/^-//) {
|
|
120
|
+
$opt = '.' unless length $opt;
|
|
121
|
+
$opt =~ tr(\\)(/); # use forward slashes
|
|
122
|
+
$opt =~ s(/$)(); # remove trailing slash
|
|
113
123
|
$opt = "$opt/$defaults{file}" if -d $opt;
|
|
114
124
|
-e $opt or die "Error opening database $opt\n";
|
|
115
125
|
push @dbfiles, { %defaults, %$opts, file => $opt };
|
|
@@ -235,12 +245,13 @@ Options:
|
|
|
235
245
|
-h - Show this help.
|
|
236
246
|
|
|
237
247
|
Input files (download from https://download.geonames.org/export/dump/):
|
|
238
|
-
|
|
248
|
+
$dbFile - default database file (smaller files with names
|
|
239
249
|
like "cities###.txt" may be specified instead)
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
250
|
+
$countryFile - mandatory country names file
|
|
251
|
+
$regionFile - mandatory region names file
|
|
252
|
+
$admin2File - mandatory subregion names file
|
|
253
|
+
$featureFile - optional feature codes file
|
|
254
|
+
$altNamesFile - optional alternate names file (must exist to
|
|
244
255
|
to generate $outAltNames and $geoLang files)
|
|
245
256
|
|
|
246
257
|
Output files:
|
|
@@ -369,7 +380,7 @@ my @supportedLangs = qw(cs de en-ca en-gb es fi fr it ja ko nl pl ru sk sv tr zh
|
|
|
369
380
|
|
|
370
381
|
# supported country-specific languages
|
|
371
382
|
my %ccLang = ( TW => 'zh', CN => 'zh', CA => 'en', GB => 'en' );
|
|
372
|
-
my (%lang, %haveCountry, %cityFlags, %rgnFlags, %subFlags, %ccFlags, %flags);
|
|
383
|
+
my (%lang, %featureLang, %haveCountry, %cityFlags, %rgnFlags, %subFlags, %ccFlags, %flags);
|
|
373
384
|
my (%haveRegion, %haveSubRgn, $filesize, $percent);
|
|
374
385
|
|
|
375
386
|
sub GetFileSize($)
|
|
@@ -381,7 +392,8 @@ sub GetFileSize($)
|
|
|
381
392
|
return $size;
|
|
382
393
|
}
|
|
383
394
|
|
|
384
|
-
# pre-scan database to determine which countries, regions
|
|
395
|
+
# pre-scan database to determine which countries, regions subregions and
|
|
396
|
+
# feature codes we will be using
|
|
385
397
|
foreach $dbfile (@dbfiles) {
|
|
386
398
|
my $database = $$dbfile{file};
|
|
387
399
|
my $upgraded;
|
|
@@ -417,7 +429,7 @@ foreach $dbfile (@dbfiles) {
|
|
|
417
429
|
}
|
|
418
430
|
# keep regardless of population
|
|
419
431
|
if ($needRgn{$cc} and $$dbfile{keep}{"$cc$rgn"}) {
|
|
420
|
-
$keep = $$dbfile{keep}{"$cc$rgn"}{$code}
|
|
432
|
+
$keep = $$dbfile{keep}{"$cc$rgn"}{$code};
|
|
421
433
|
} elsif ($$dbfile{keep}{$cc}) {
|
|
422
434
|
$keep = $$dbfile{keep}{$cc}{$code};
|
|
423
435
|
} else {
|
|
@@ -437,8 +449,8 @@ foreach $dbfile (@dbfiles) {
|
|
|
437
449
|
$haveCountry{$cc} = 1;
|
|
438
450
|
$haveRegion{"$cc$rgn"} = 1;
|
|
439
451
|
$haveSubRgn{"$cc$rgn.$sub"} = 1;
|
|
440
|
-
# add new feature codes (up to maximum index of
|
|
441
|
-
unless ($featureCodes{$code} or @featureCodes >
|
|
452
|
+
# add new feature codes (up to maximum index of 0x3f)
|
|
453
|
+
unless ($featureCodes{$code} or @featureCodes > 0x3f) {
|
|
442
454
|
if ($dbVer eq '1.02') {
|
|
443
455
|
next if $code =~ /^(PPLH|PPLQ|PPLW)$/; # (stored as "Other" in v1.02)
|
|
444
456
|
$dbVer = '1.03';
|
|
@@ -457,9 +469,27 @@ foreach $dbfile (@dbfiles) {
|
|
|
457
469
|
warn "Some feature codes not supported by version 1.02, writing as 1.03 instead.\n" if $upgraded;
|
|
458
470
|
}
|
|
459
471
|
|
|
472
|
+
# read feature names
|
|
473
|
+
if (open INFILE, '<', "$dbdir/$featureFile") {
|
|
474
|
+
print "Reading $dbdir/$featureFile\n";
|
|
475
|
+
while (<INFILE>) {
|
|
476
|
+
my @items = split /\t/;
|
|
477
|
+
$items[0] =~ s/^.\.//; # remove feature group and "." separator
|
|
478
|
+
next unless $featureCodes{$items[0]};
|
|
479
|
+
my $name = ucfirst $items[1];
|
|
480
|
+
$name =~ s/ ([a-z])/ \U$1/g;
|
|
481
|
+
$featureNames{$items[0]} = $name;
|
|
482
|
+
}
|
|
483
|
+
close INFILE;
|
|
484
|
+
} else {
|
|
485
|
+
print "Not found: $dbdir/$featureFile\n";
|
|
486
|
+
print "--> Not storing feature type names\n";
|
|
487
|
+
}
|
|
488
|
+
|
|
460
489
|
# read country names
|
|
461
490
|
$i = 0;
|
|
462
491
|
open INFILE, '<', "$dbdir/$countryFile" or die "Error opening $dbdir/$countryFile\n";
|
|
492
|
+
print "Reading $dbdir/$countryFile\n";
|
|
463
493
|
while (<INFILE>) {
|
|
464
494
|
next if /^#/;
|
|
465
495
|
my @items = split /\t/;
|
|
@@ -474,6 +504,7 @@ die "Too many countries!\n" if $i > 0x100; # (no default 0 entry)
|
|
|
474
504
|
# read region (admin1) names
|
|
475
505
|
$i = 0;
|
|
476
506
|
open REGION, '<', "$dbdir/$regionFile" or die "Error opening $dbdir/$regionFile\n";
|
|
507
|
+
print "Reading $dbdir/$regionFile\n";
|
|
477
508
|
while (<REGION>) {
|
|
478
509
|
chomp;
|
|
479
510
|
my @items = split /\t/;
|
|
@@ -489,6 +520,7 @@ die "Too many regions!\n" if $i > 0x0fff; # (account for default 0 entry)
|
|
|
489
520
|
# read subregion (admin2) names
|
|
490
521
|
$i = 0;
|
|
491
522
|
open ADMIN2, '<', "$dbdir/$admin2File" or die "Error opening $dbdir/$admin2File\n";
|
|
523
|
+
print "Reading $dbdir/$admin2File\n";
|
|
492
524
|
while (<ADMIN2>) {
|
|
493
525
|
chomp;
|
|
494
526
|
my @items = split /\t/;
|
|
@@ -539,8 +571,35 @@ if (not $noLang and open INFILE, '<', "$dbdir/$altNamesFile") {
|
|
|
539
571
|
}
|
|
540
572
|
print "\b\b\b\bDone.\n";
|
|
541
573
|
close INFILE;
|
|
574
|
+
# read alternate feature names
|
|
575
|
+
if (%featureNames) {
|
|
576
|
+
my $lng;
|
|
577
|
+
foreach $lng (@languages) {
|
|
578
|
+
next if $lng eq 'en' or not $languages{$lng};
|
|
579
|
+
my $file = "$dbdir/$featureFile";
|
|
580
|
+
$file =~ s/_en\./_$lng./ or next;
|
|
581
|
+
next unless open INFILE, '<', $file;
|
|
582
|
+
print "Reading $file\n";
|
|
583
|
+
while (<INFILE>) {
|
|
584
|
+
my @items = split /\t/;
|
|
585
|
+
$items[0] =~ s/^.\.//; # remove feature group and "." separator
|
|
586
|
+
next unless $featureNames{$items[0]};
|
|
587
|
+
utf8::decode($items[1]);
|
|
588
|
+
my $name = ucfirst $items[1];
|
|
589
|
+
$name =~ s/ (.)/ \U$1/g;
|
|
590
|
+
# change $name back to byte string
|
|
591
|
+
if ($] >= 5.006 and (eval { require Encode; Encode::is_utf8($name) } or $@)) {
|
|
592
|
+
$name = $@ ? pack('C*',unpack($] < 5.010000 ? 'U0C*' : 'C0C*',$name)) : Encode::encode('utf8',$name);
|
|
593
|
+
}
|
|
594
|
+
next if $name eq $featureNames{$items[0]};
|
|
595
|
+
$featureLang{$lng}{$items[0]} = $name;
|
|
596
|
+
}
|
|
597
|
+
close INFILE;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
542
600
|
} else {
|
|
543
|
-
print "Not
|
|
601
|
+
print "Not found: $dbdir/$altNamesFile\n--> " unless $noLang;
|
|
602
|
+
print "Not writing alternate languages\n";
|
|
544
603
|
$noLang = 1;
|
|
545
604
|
}
|
|
546
605
|
|
|
@@ -549,7 +608,7 @@ my (%coords, %langLookups);
|
|
|
549
608
|
foreach $dbfile (@dbfiles) {
|
|
550
609
|
my $database = $$dbfile{file};
|
|
551
610
|
|
|
552
|
-
print "Processing
|
|
611
|
+
print "Processing database entries... 0%";
|
|
553
612
|
my $i = 0;
|
|
554
613
|
my $num = scalar @{$$dbfile{kept}};
|
|
555
614
|
|
|
@@ -618,6 +677,7 @@ foreach (sort { $a cmp $b } keys %coords) {
|
|
|
618
677
|
my $items = $coords{$_};
|
|
619
678
|
# @$items=(0.lat,1.lon,2.city,3.cc,4.rgn,5.admin2,6.population,7.timezone,8.feature code,9.alt names)
|
|
620
679
|
my $iCC = $orderCC{$$items[3]};
|
|
680
|
+
defined $iCC or warn("Unknown country code $$items[3]\n"), next;
|
|
621
681
|
my $iRgn = $orderRgn{"$$items[3]$$items[4]"} || 0;
|
|
622
682
|
my $iSub = $orderSub{"$$items[3]$$items[4].$$items[5]"} || 0;
|
|
623
683
|
my $tn = $tz{$$items[7]};
|
|
@@ -626,9 +686,12 @@ foreach (sort { $a cmp $b } keys %coords) {
|
|
|
626
686
|
$tn = $tz{$$items[7]} = $tzNum++;
|
|
627
687
|
}
|
|
628
688
|
# convert population to our binary format
|
|
629
|
-
|
|
689
|
+
# Note: format in ActivePerl is "3.1e+004", but "3.1+04" in other Perls,
|
|
690
|
+
# but other Perls will round 34500 to "3.4e+04", so add 1 to get "3.5e+04"
|
|
691
|
+
$$items[6] += 1 if $$items[6] > 100 and not $$items[6] % 10;
|
|
692
|
+
my $pop = sprintf('%.1e',$$items[6]);
|
|
630
693
|
# pack CC, population and region index into a 32-bit integer
|
|
631
|
-
my $code = ($iCC << 24) | (substr($pop,
|
|
694
|
+
my $code = ($iCC << 24) | (substr($pop,-1,1)<<20) | (substr($pop,0,1)<<16) | (substr($pop,2,1)<<12) | $iRgn;
|
|
632
695
|
$fcodes{$$items[8]} = ($fcodes{$$items[8]} || 0) + 1;
|
|
633
696
|
my $fc = $featureCodes{$$items[8]} || 0;
|
|
634
697
|
# store high bit of timezone index
|
|
@@ -756,8 +819,12 @@ print OUTFILE $_,"\n" foreach @tz;
|
|
|
756
819
|
|
|
757
820
|
print OUTFILE "\0\0\0\0\x05\n"; # section terminator
|
|
758
821
|
|
|
759
|
-
# write feature codes
|
|
760
|
-
|
|
822
|
+
# write feature codes and optional names
|
|
823
|
+
foreach (@featureCodes) {
|
|
824
|
+
print OUTFILE $_;
|
|
825
|
+
print OUTFILE ' ', $featureNames{$_} if $featureNames{$_};
|
|
826
|
+
print OUTFILE "\n";
|
|
827
|
+
}
|
|
761
828
|
|
|
762
829
|
# write terminator and close Geolocation.dat
|
|
763
830
|
print OUTFILE "\0\0\0\0\0\n"; # file terminator
|
|
@@ -769,7 +836,9 @@ my $langSize = 0;
|
|
|
769
836
|
my $langDir = "$outDir/$geoLang";
|
|
770
837
|
# delete existing languages
|
|
771
838
|
unlink <"$langDir/*.pm">;
|
|
772
|
-
|
|
839
|
+
if ($noLang) {
|
|
840
|
+
rmdir $langDir;
|
|
841
|
+
} else {
|
|
773
842
|
my $n = scalar(keys %langLookups);
|
|
774
843
|
print "Writing $n language files to $outDir/$geoLang...\n";
|
|
775
844
|
mkdir $langDir, 0777;
|
|
@@ -780,6 +849,7 @@ unless ($noLang) {
|
|
|
780
849
|
my $lkup = $langLookups{$lng};
|
|
781
850
|
my $file = "$myLng.pm";
|
|
782
851
|
open OUT, ">$langDir/$file" or die "Error creating $file\n";
|
|
852
|
+
binmode OUT;
|
|
783
853
|
print OUT "# Geolocation language translations for $myLng\n";
|
|
784
854
|
print OUT "#\n# Based on Creative Commons database from geonames.org\n\n";
|
|
785
855
|
print OUT "%Image::ExifTool::GeoLang::${myLng}::Translate = (\n";
|
|
@@ -837,6 +907,14 @@ unless ($noLang) {
|
|
|
837
907
|
}
|
|
838
908
|
}
|
|
839
909
|
}
|
|
910
|
+
if ($featureLang{$lng}) {
|
|
911
|
+
print OUT "\n\t# feature types\n";
|
|
912
|
+
foreach (sort keys %{$featureLang{$lng}}) {
|
|
913
|
+
my $ftype = $featureLang{$lng}{$_};
|
|
914
|
+
$ftype =~ s/'/\\'/g;
|
|
915
|
+
print OUT "\t$_ => '$ftype',\n"
|
|
916
|
+
}
|
|
917
|
+
}
|
|
840
918
|
print OUT ");\n\n1; #end\n";
|
|
841
919
|
$langSize += tell OUT;
|
|
842
920
|
close OUT;
|
|
@@ -364,8 +364,8 @@ $Image::ExifTool::QuickTime::Keys{PREFERRED} = 3;
|
|
|
364
364
|
|
|
365
365
|
# Add user-defined cities to the Geolocation lookup
|
|
366
366
|
@Image::ExifTool::UserDefined::Geolocation = (
|
|
367
|
-
# (city,region,
|
|
368
|
-
['Sinemorets','
|
|
367
|
+
# (city,region,subregion,country_code,country,timezone,feature_code,population,lat,lon)
|
|
368
|
+
['Sinemorets','burgas','Obshtina Tsarevo','BG','','Europe/Sofia','PPL',400,42.06115,27.97833],
|
|
369
369
|
);
|
|
370
370
|
|
|
371
371
|
#------------------------------------------------------------------------------
|
data/bin/exiftool
CHANGED
|
@@ -11,7 +11,7 @@ use strict;
|
|
|
11
11
|
use warnings;
|
|
12
12
|
require 5.004;
|
|
13
13
|
|
|
14
|
-
my $version = '12.
|
|
14
|
+
my $version = '12.85';
|
|
15
15
|
|
|
16
16
|
# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
|
|
17
17
|
my $exePath;
|
|
@@ -735,6 +735,7 @@ for (;;) {
|
|
|
735
735
|
push @isUTF8, 10 if $isAlt;
|
|
736
736
|
for ($i=0; ; ++$i) {
|
|
737
737
|
my @entry = Image::ExifTool::Geolocation::GetEntry($i,$langOpt,1) or last;
|
|
738
|
+
$#entry = 9; # remove everything after latitude (eg. feature type)
|
|
738
739
|
next if $minPop and $entry[7] < $minPop;
|
|
739
740
|
next if %fcodes and $neg ? $fcodes{lc $entry[6]} : not $fcodes{lc $entry[6]};
|
|
740
741
|
push @entry, Image::ExifTool::Geolocation::GetAltNames($i,1) if $isAlt;
|
|
@@ -2304,8 +2305,8 @@ sub GetImageInfo($$)
|
|
|
2304
2305
|
# output using print format file (-p) option
|
|
2305
2306
|
my ($type, $doc, $grp, $lastDoc, $cache);
|
|
2306
2307
|
$fileTrailer = '';
|
|
2307
|
-
# repeat for each
|
|
2308
|
-
if (
|
|
2308
|
+
# repeat for each sub-document if necessary
|
|
2309
|
+
if ($$et{DOC_COUNT}) {
|
|
2309
2310
|
# (cache tag keys if there are sub-documents)
|
|
2310
2311
|
$lastDoc = $$et{DOC_COUNT} and $cache = { };
|
|
2311
2312
|
} else {
|
|
@@ -4720,50 +4721,50 @@ supported by ExifTool (r = read, w = write, c = create):
|
|
|
4720
4721
|
|
|
4721
4722
|
File Types
|
|
4722
4723
|
------------+-------------+-------------+-------------+------------
|
|
4723
|
-
360 r/w | DOCX r | ITC r |
|
|
4724
|
-
3FR r | DPX r | J2C r |
|
|
4725
|
-
3G2 r/w | DR4 r/w/c | JNG r/w |
|
|
4726
|
-
3GP r/w | DSS r | JP2 r/w |
|
|
4727
|
-
7Z r | DV r | JPEG r/w |
|
|
4728
|
-
A r | DVB r/w | JSON r |
|
|
4729
|
-
AA r | DVR-MS r | JXL r/w |
|
|
4730
|
-
AAC r | DYLIB r | K25 r |
|
|
4731
|
-
AAE r | EIP r | KDC r |
|
|
4732
|
-
AAX r/w | EPS r/w | KEY r |
|
|
4733
|
-
ACR r | EPUB r | LA r |
|
|
4734
|
-
AFM r | ERF r/w | LFP r |
|
|
4735
|
-
AI r/w | EXE r | LIF r |
|
|
4736
|
-
AIFF r | EXIF r/w/c | LNK r |
|
|
4737
|
-
APE r | EXR r | LRV r/w |
|
|
4738
|
-
ARQ r/w | EXV r/w/c | M2TS r |
|
|
4739
|
-
ARW r/w | F4A/V r/w | M4A/V r/w |
|
|
4740
|
-
ASF r | FFF r/w | MACOS r |
|
|
4741
|
-
AVI r | FITS r | MAX r |
|
|
4742
|
-
AVIF r/w | FLA r | MEF r/w |
|
|
4743
|
-
AZW r | FLAC r | MIE r/w/c |
|
|
4744
|
-
BMP r | FLIF r/w | MIFF r |
|
|
4745
|
-
BPG r | FLV r | MKA r |
|
|
4746
|
-
BTF r | FPF r | MKS r |
|
|
4747
|
-
C2PA r | FPX r | MKV r |
|
|
4748
|
-
CHM r | GIF r/w | MNG r/w |
|
|
4749
|
-
COS r | GLV r/w | MOBI r |
|
|
4750
|
-
CR2 r/w | GPR r/w | MODD r |
|
|
4751
|
-
CR3 r/w | GZ r | MOI r |
|
|
4752
|
-
CRM r/w | HDP r/w | MOS r/w |
|
|
4753
|
-
CRW r/w | HDR r | MOV r/w |
|
|
4754
|
-
CS1 r/w | HEIC r/w | MP3 r |
|
|
4755
|
-
CSV r | HEIF r/w | MP4 r/w |
|
|
4756
|
-
CUR r | HTML r | MPC r |
|
|
4757
|
-
CZI r | ICC r/w/c | MPG r |
|
|
4758
|
-
DCM r | ICO r | MPO r/w |
|
|
4759
|
-
DCP r/w | ICS r | MQV r/w |
|
|
4760
|
-
DCR r | IDML r | MRC r |
|
|
4761
|
-
DFONT r | IIQ r/w | MRW r/w |
|
|
4762
|
-
DIVX r | IND r/w | MXF r |
|
|
4763
|
-
DJVU r | INSP r/w | NEF r/w |
|
|
4764
|
-
DLL r | INSV r |
|
|
4765
|
-
DNG r/w | INX r |
|
|
4766
|
-
DOC r | ISO r |
|
|
4724
|
+
360 r/w | DOCX r | ITC r | NUMBERS r | RAW r/w
|
|
4725
|
+
3FR r | DPX r | J2C r | NXD r | RIFF r
|
|
4726
|
+
3G2 r/w | DR4 r/w/c | JNG r/w | O r | RSRC r
|
|
4727
|
+
3GP r/w | DSS r | JP2 r/w | ODP r | RTF r
|
|
4728
|
+
7Z r | DV r | JPEG r/w | ODS r | RW2 r/w
|
|
4729
|
+
A r | DVB r/w | JSON r | ODT r | RWL r/w
|
|
4730
|
+
AA r | DVR-MS r | JXL r/w | OFR r | RWZ r
|
|
4731
|
+
AAC r | DYLIB r | K25 r | OGG r | RM r
|
|
4732
|
+
AAE r | EIP r | KDC r | OGV r | SEQ r
|
|
4733
|
+
AAX r/w | EPS r/w | KEY r | ONP r | SKETCH r
|
|
4734
|
+
ACR r | EPUB r | LA r | OPUS r | SO r
|
|
4735
|
+
AFM r | ERF r/w | LFP r | ORF r/w | SR2 r/w
|
|
4736
|
+
AI r/w | EXE r | LIF r | ORI r/w | SRF r
|
|
4737
|
+
AIFF r | EXIF r/w/c | LNK r | OTF r | SRW r/w
|
|
4738
|
+
APE r | EXR r | LRV r/w | PAC r | SVG r
|
|
4739
|
+
ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SWF r
|
|
4740
|
+
ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | THM r/w
|
|
4741
|
+
ASF r | FFF r/w | MACOS r | PCD r | TIFF r/w
|
|
4742
|
+
AVI r | FITS r | MAX r | PCX r | TORRENT r
|
|
4743
|
+
AVIF r/w | FLA r | MEF r/w | PDB r | TTC r
|
|
4744
|
+
AZW r | FLAC r | MIE r/w/c | PDF r/w | TTF r
|
|
4745
|
+
BMP r | FLIF r/w | MIFF r | PEF r/w | TXT r
|
|
4746
|
+
BPG r | FLV r | MKA r | PFA r | VCF r
|
|
4747
|
+
BTF r | FPF r | MKS r | PFB r | VNT r
|
|
4748
|
+
C2PA r | FPX r | MKV r | PFM r | VRD r/w/c
|
|
4749
|
+
CHM r | GIF r/w | MNG r/w | PGF r | VSD r
|
|
4750
|
+
COS r | GLV r/w | MOBI r | PGM r/w | WAV r
|
|
4751
|
+
CR2 r/w | GPR r/w | MODD r | PLIST r | WDP r/w
|
|
4752
|
+
CR3 r/w | GZ r | MOI r | PICT r | WEBP r/w
|
|
4753
|
+
CRM r/w | HDP r/w | MOS r/w | PMP r | WEBM r
|
|
4754
|
+
CRW r/w | HDR r | MOV r/w | PNG r/w | WMA r
|
|
4755
|
+
CS1 r/w | HEIC r/w | MP3 r | PPM r/w | WMV r
|
|
4756
|
+
CSV r | HEIF r/w | MP4 r/w | PPT r | WPG r
|
|
4757
|
+
CUR r | HTML r | MPC r | PPTX r | WTV r
|
|
4758
|
+
CZI r | ICC r/w/c | MPG r | PS r/w | WV r
|
|
4759
|
+
DCM r | ICO r | MPO r/w | PSB r/w | X3F r/w
|
|
4760
|
+
DCP r/w | ICS r | MQV r/w | PSD r/w | XCF r
|
|
4761
|
+
DCR r | IDML r | MRC r | PSP r | XISF r
|
|
4762
|
+
DFONT r | IIQ r/w | MRW r/w | QTIF r/w | XLS r
|
|
4763
|
+
DIVX r | IND r/w | MXF r | R3D r | XLSX r
|
|
4764
|
+
DJVU r | INSP r/w | NEF r/w | RA r | XMP r/w/c
|
|
4765
|
+
DLL r | INSV r | NKA r | RAF r/w | ZIP r
|
|
4766
|
+
DNG r/w | INX r | NKSC r/w | RAM r |
|
|
4767
|
+
DOC r | ISO r | NRW r/w | RAR r |
|
|
4767
4768
|
|
|
4768
4769
|
Meta Information
|
|
4769
4770
|
----------------------+----------------------+---------------------
|
|
@@ -5677,7 +5678,7 @@ with this command:
|
|
|
5677
5678
|
|
|
5678
5679
|
produces output like this:
|
|
5679
5680
|
|
|
5680
|
-
-- Generated by ExifTool 12.
|
|
5681
|
+
-- Generated by ExifTool 12.85 --
|
|
5681
5682
|
File: a.jpg - 2003:10:31 15:44:19
|
|
5682
5683
|
(f/5.6, 1/60s, ISO 100)
|
|
5683
5684
|
File: b.jpg - 2006:05:23 11:57:38
|
|
@@ -5916,7 +5917,8 @@ processed file by using %C (upper case) instead of %c. This allows a
|
|
|
5916
5917
|
sequential number to be added to output file names, even if the names are
|
|
5917
5918
|
different. For %C, a copy number of zero is not omitted as it is with %c.
|
|
5918
5919
|
A leading '-' causes the number to be reset at the start of each new
|
|
5919
|
-
directory
|
|
5920
|
+
directory (in the original directory structure if the files are being
|
|
5921
|
+
moved), and '+' has no effect. The number before the decimal place gives
|
|
5920
5922
|
the starting index, the number after the decimal place gives the field
|
|
5921
5923
|
width. The following examples show the output filenames when used with the
|
|
5922
5924
|
command C<exiftool rose.jpg star.jpg jet.jpg ...>:
|
|
@@ -6922,7 +6924,7 @@ Arguments may be added to copy or set specific tags. Arguments take exactly
|
|
|
6922
6924
|
the same form as those on the command line when copying or writing tags,
|
|
6923
6925
|
but without the leading dash. For example:
|
|
6924
6926
|
|
|
6925
|
-
exiftool -p '${previewimage;SetTags("comment=test","title<filename"}' ...
|
|
6927
|
+
exiftool -p '${previewimage;SetTags("comment=test","title<filename")}' ...
|
|
6926
6928
|
|
|
6927
6929
|
=head1 WINDOWS UNICODE FILE NAMES
|
|
6928
6930
|
|