exiftool-vendored.pl 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/Changes CHANGED
@@ -7,6 +7,41 @@ 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
+ Mar. 19, 2024 - Version 12.80
11
+
12
+ - Added GeolocationFeatureCode tag
13
+ - Added XMP-acdsee-rs tags and a new XMP-xmpDM tag
14
+ - Added ACDSeeRegion2MWGRegion conversion to config_files/acdsee.config
15
+ - Added GPSAltitudeRef to XMP-iptcExt LocationDetails structure
16
+ - Added a couple of new FujiFilm tags and a new CropMode value
17
+ - Added conversion for XMP-aux:ApproximateFocusDistance "infinity"
18
+ - Improved Geolocation regular expressions to allow negative matches
19
+ - Improved accuracy of Geolocation distance/bearing calculations
20
+ - Changed structure of Geolocation database (now version 1.02)
21
+ - Minor change to key format for user-defined Geolocation name translations
22
+ - Fixed case/spacing of "C2PA" in some CBOR tag descriptions
23
+ - Fixed bug extracting binary data from EXR files
24
+ - API Changes:
25
+ - Added GeolocFeature option
26
+
27
+ Mar. 15, 2024 - Version 12.79
28
+
29
+ - Improvements to new Geolocation feature:
30
+ - Added reverse Geolocation ability (obtain GPS coordinates from city
31
+ name), with support for regular expressions
32
+ - Added -listgeo option to list the Geolocation database
33
+ - Added the ability to include user-defined cities in the Geolocation
34
+ database
35
+ - Added the ability to write XMP-iptcExt LocationShown tags using Geolocate
36
+ feature
37
+ - Added the ability to specify which tags to read from file for the API
38
+ Geolocation option
39
+ - Added language translations for Geolocation names
40
+ - Increased resolution of Geolocation GPS positions and stored populations
41
+ - API Changes:
42
+ - Save necessary data members to allow GetInfo to be accessed by
43
+ user-defined tags
44
+
10
45
  Mar. 5, 2024 - Version 12.78 - "Geolocation"
11
46
 
12
47
  - Added new Geolocation feature and write-only Geolocate tag
@@ -32,9 +67,7 @@ Mar. 5, 2024 - Version 12.78 - "Geolocation"
32
67
  - Fixed issue where some tags from alternate files using the -fileNUM option
33
68
  weren't generated as requested
34
69
  - API Changes:
35
- - Added Geolocation,
36
- GeolocMaxDist and
37
- GeolocMinPop API options
70
+ - Added Geolocation, GeolocMaxDist and GeolocMinPop API options
38
71
 
39
72
  Feb. 16, 2024 - Version 12.77
40
73
 
package/bin/MANIFEST CHANGED
@@ -195,6 +195,7 @@ html/data_members.html
195
195
  html/exiftool_pod.html
196
196
  html/faq.html
197
197
  html/filename.html
198
+ html/geolocation.html
198
199
  html/geotag.html
199
200
  html/history.html
200
201
  html/htmldump.html
@@ -293,6 +294,24 @@ lib/Image/ExifTool/GE.pm
293
294
  lib/Image/ExifTool/GIF.pm
294
295
  lib/Image/ExifTool/GIMP.pm
295
296
  lib/Image/ExifTool/GPS.pm
297
+ lib/Image/ExifTool/GeoLang/cs.pm
298
+ lib/Image/ExifTool/GeoLang/de.pm
299
+ lib/Image/ExifTool/GeoLang/en_ca.pm
300
+ lib/Image/ExifTool/GeoLang/en_gb.pm
301
+ lib/Image/ExifTool/GeoLang/es.pm
302
+ lib/Image/ExifTool/GeoLang/fi.pm
303
+ lib/Image/ExifTool/GeoLang/fr.pm
304
+ lib/Image/ExifTool/GeoLang/it.pm
305
+ lib/Image/ExifTool/GeoLang/ja.pm
306
+ lib/Image/ExifTool/GeoLang/ko.pm
307
+ lib/Image/ExifTool/GeoLang/nl.pm
308
+ lib/Image/ExifTool/GeoLang/pl.pm
309
+ lib/Image/ExifTool/GeoLang/ru.pm
310
+ lib/Image/ExifTool/GeoLang/sk.pm
311
+ lib/Image/ExifTool/GeoLang/sv.pm
312
+ lib/Image/ExifTool/GeoLang/tr.pm
313
+ lib/Image/ExifTool/GeoLang/zh_cn.pm
314
+ lib/Image/ExifTool/GeoLang/zh_tw.pm
296
315
  lib/Image/ExifTool/GeoTiff.pm
297
316
  lib/Image/ExifTool/Geolocation.dat
298
317
  lib/Image/ExifTool/Geolocation.pm
@@ -545,7 +564,6 @@ t/ExifTool_32.out
545
564
  t/ExifTool_33.out
546
565
  t/ExifTool_34.out
547
566
  t/ExifTool_35.out
548
- t/ExifTool_36.out
549
567
  t/ExifTool_4.out
550
568
  t/ExifTool_5.out
551
569
  t/ExifTool_6.out
@@ -602,6 +620,12 @@ t/GeoTiff.t
602
620
  t/GeoTiff_2.out
603
621
  t/GeoTiff_3.out
604
622
  t/GeoTiff_4.out
623
+ t/Geolocation.t
624
+ t/Geolocation_2.out
625
+ t/Geolocation_3.out
626
+ t/Geolocation_4.out
627
+ t/Geolocation_5.out
628
+ t/Geolocation_6.out
605
629
  t/Geotag.t
606
630
  t/Geotag_10.out
607
631
  t/Geotag_11.out
@@ -923,7 +947,6 @@ t/Writer_58.out
923
947
  t/Writer_59.out
924
948
  t/Writer_6.out
925
949
  t/Writer_60.out
926
- t/Writer_61.out
927
950
  t/Writer_7.out
928
951
  t/Writer_9.out
929
952
  t/XISF.t
package/bin/META.json CHANGED
@@ -50,5 +50,5 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "12.78"
53
+ "version" : "12.80"
54
54
  }
package/bin/META.yml CHANGED
@@ -31,4 +31,4 @@ recommends:
31
31
  Time::HiRes: 0
32
32
  requires:
33
33
  perl: 5.004
34
- version: 12.78
34
+ version: 12.80
package/bin/README CHANGED
@@ -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.78.tar.gz | tar -xf -
113
- cd Image-ExifTool-12.78
112
+ gzip -dc Image-ExifTool-12.80.tar.gz | tar -xf -
113
+ cd Image-ExifTool-12.80
114
114
  ./exiftool t/images/ExifTool.jpg
115
115
 
116
116
  Note: These commands extract meta information from one of the test images.
@@ -41,7 +41,8 @@
41
41
  # type tags to ACDSee regions.
42
42
  # MPRegion2ACDSeeRegion : Converts a Microsoft RegionInfoMP
43
43
  # IPTCRegion2ACDSeeRegion : Converts an IPTC ImageRegion
44
- # MWGRegion2ACDSeeRegion : Converts a MWG RegionInfo
44
+ # MWGRegion2ACDSeeRegion : Converts from a MWG RegionInfo
45
+ # ACDSeeRegion2MWGRegion : Converts to a MWG RegionInfo
45
46
  #
46
47
  # Usage: To set individual tags
47
48
  # exiftool -config acdsee.config -ACDSEETAG=VALUE FILE ...
@@ -52,6 +53,8 @@
52
53
  # exiftool -config acdsee.config "-RegionInfoACDSee<IPTCRegion2ACDSeeRegion" File ...
53
54
  # To convert MWG Regions to ACDSee regions
54
55
  # exiftool -config acdsee.config "-RegionInfoACDSee<MWGRegion2ACDSeeRegion" File ...
56
+ # To convert ACDSee Regions to MWG regions
57
+ # exiftool -config acdsee.config "-RegionInfo<ACDSeeRegion2MWGRegion" File ...
55
58
  #
56
59
  # Requires: ExifTool version 10.28 or later
57
60
  #
@@ -64,45 +67,12 @@
64
67
  # "RegionInfoACDSeeAppliedToDimensions*" -> "ACDSeeRegionAppliedToDimensions*"
65
68
  # "RegionInfoACDSeeRegionList* -> "ACDSeeRegion*"
66
69
  # 2022/10/03 - PH Set group name properly to XMP-acdsee-rs
70
+ # 2024/03/19 - PH Moved XMP-acdsee-rs tags into the standard distribution,
71
+ # and added ACDSeeRegion2MWGRegion conversion
67
72
  #------------------------------------------------------------------------------
68
73
  use Data::Dumper;
69
74
 
70
- my %sACDSeeDimensions = (
71
- STRUCT_NAME => 'ACDSee Dimensions',
72
- NAMESPACE => {'acdsee-stDim' => 'http://ns.acdsee.com/sType/Dimensions#'},
73
- 'w' => { Writable => 'real' },
74
- 'h' => { Writable => 'real' },
75
- 'unit' => { },
76
- );
77
-
78
- my %sACDSeeArea = (
79
- STRUCT_NAME => 'ACDSee Area',
80
- NAMESPACE => { 'acdsee-stArea' => 'http://ns.acdsee.com/sType/Area#' },
81
- 'x' => { Writable => 'real' },
82
- 'y' => { Writable => 'real' },
83
- w => { Writable => 'real' },
84
- h => { Writable => 'real' },
85
- );
86
-
87
- my %sACDSeeRegionStruct = (
88
- STRUCT_NAME => 'ACDSee Regions',
89
- NAMESPACE => { 'acdsee-rs' => 'http://ns.acdsee.com/regions/' },
90
- ALGArea => { Struct => \%sACDSeeArea },
91
- DLYArea => { Struct => \%sACDSeeArea },
92
- Name => { },
93
- NameAssignType => { },
94
- Type => { },
95
- );
96
-
97
75
  %Image::ExifTool::UserDefined = (
98
- # new XMP namespaces for ACDSee regions
99
- 'Image::ExifTool::XMP::Main' => {
100
- 'acdsee-rs' => { # <-- must be the same as the NAMESPACE prefix
101
- SubDirectory => {
102
- TagTable => 'Image::ExifTool::UserDefined::ACDSeeRegions'
103
- },
104
- },
105
- },
106
76
  'Image::ExifTool::Composite' => {
107
77
  # create an ACDSee RegionInfo structure from a Microsoft RegionInfoMP structure
108
78
  MPRegion2ACDSeeRegion => {
@@ -176,7 +146,7 @@ my %sACDSeeRegionStruct = (
176
146
  },
177
147
  },
178
148
 
179
- # create an MWG RegionInfo structure from an IPTC ImageRegion list
149
+ # create an ACDSee RegionInfo structure from an MWG RegionInfo structure
180
150
  MWGRegion2ACDSeeRegion => {
181
151
  Require => {
182
152
  0 => 'RegionInfo',
@@ -207,29 +177,39 @@ my %sACDSeeRegionStruct = (
207
177
  }
208
178
  },
209
179
  },
210
- ####
211
- },
212
- );
213
180
 
214
- %Image::ExifTool::UserDefined::ACDSeeRegions = (
215
- GROUPS => { 0 => 'XMP', 1 => 'XMP-acdsee-rs', 2 => 'Image' },
216
- NAMESPACE => { 'acdsee-rs' => 'http://ns.acdsee.com/regions/' },
217
- WRITABLE => 'string', # (default to string-type tags)
218
- Regions => {
219
- Name => 'RegionInfoACDSee',
220
- FlatName => 'ACDSee',
221
- # the "Struct" entry defines the structure fields
222
- Struct => {
223
- # optional structure name (used for warning messages only)
224
- STRUCT_NAME => 'ACDSee RegionInfo',
225
- RegionList => {
226
- FlatName => 'Region',
227
- Struct => \%sACDSeeRegionStruct,
228
- List => 'Bag',
181
+ # create an MWG RegionInfo structure from an ACDSee RegionInfo
182
+ ACDSeeRegion2MWGRegion => {
183
+ Require => {
184
+ 0 => 'RegionInfoACDSee',
185
+ 1 => 'ImageWidth',
186
+ 2 => 'ImageHeight',
187
+ },
188
+ ValueConv => q{
189
+ my ($rgn, @newRgns);
190
+ my %newRgn;
191
+ foreach $rgn (@{$val[0]{RegionList}}) {
192
+ next unless $$rgn{Area} or defined $$rgn{Name};
193
+ my %newRgn;
194
+ if ($$rgn{DLYArea}) {
195
+ $newRgn{Area} = {
196
+ 'X' => $$rgn{DLYArea}{'X'},
197
+ 'Y' => $$rgn{DLYArea}{'Y'},
198
+ 'W' => $$rgn{DLYArea}{'W'},
199
+ 'H' => $$rgn{DLYArea}{'H'},
200
+ };
201
+ };
202
+ $newRgn{Name} = $$rgn{Name} if defined $$rgn{Name};
203
+ $newRgn{'Type'} = $$rgn{'Type'} if defined $$rgn{'Type'};
204
+ push @newRgns, \%newRgn;
205
+ }
206
+ return {
207
+ 'AppliedToDimensions' => $val[0]{'AppliedToDimensions'},
208
+ RegionList => \@newRgns,
209
+ }
229
210
  },
230
- AppliedToDimensions => {
231
- FlatName => 'RegionAppliedToDimensions',Struct => \%sACDSeeDimensions },
232
211
  },
212
+ ####
233
213
  },
234
214
  );
235
215
 
@@ -362,5 +362,11 @@ $Image::ExifTool::QuickTime::Keys{PREFERRED} = 3;
362
362
  '-i', 'HIDDEN', # ignore hidden files by default (names beginning with ".")
363
363
  );
364
364
 
365
+ # Add user-defined cities to the Geolocation lookup
366
+ @Image::ExifTool::UserDefined::Geolocation = (
367
+ # (city,region,country code,country,timezone,population,lat,lon)
368
+ ['Sinemorets','Burgas','BG','Bulgaria','Europe/Sofia',400,42.06115,27.97833],
369
+ );
370
+
365
371
  #------------------------------------------------------------------------------
366
372
  1; #end
package/bin/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.78';
14
+ my $version = '12.80';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -670,7 +670,7 @@ for (;;) {
670
670
  next;
671
671
  }
672
672
  my $a = lc $_;
673
- if (/^list([wfrdx]|wf|g(\d*))?$/i) {
673
+ if (/^list([wfrdx]|wf|g(\d*)|geo)?$/i) {
674
674
  $pass or push @nextPass, "-$_";
675
675
  my $type = lc($1 || '');
676
676
  if (not $type or $type eq 'w' or $type eq 'x') {
@@ -719,6 +719,23 @@ for (;;) {
719
719
  PrintTagList('Recognized file extensions', GetFileType(undef, 0));
720
720
  } elsif ($type eq 'd') {
721
721
  PrintTagList('Deletable groups', GetDeleteGroups());
722
+ } elsif ($type eq 'geo') {
723
+ require Image::ExifTool::Geolocation;
724
+ my ($i, $entry);
725
+ print "Geolocation database:\n" unless $quiet;
726
+ print "City,Region,Subregion,CountryCode,Country,TimeZone,FeatureCode,Population,Latitude,Longitude\n";
727
+ Image::ExifTool::Geolocation::SortDatabase('City') if $sortOpt;
728
+ my $minPop = $mt->Options('GeolocMinPop');
729
+ my $feature = $mt->Options('GeolocFeature') || '';
730
+ my $neg = $feature =~ s/^-//;
731
+ my %fcodes = map { lc($_) => 1 } split /\s*,\s*/, $feature;
732
+ for ($i=0; ; ++$i) {
733
+ my @entry = Image::ExifTool::Geolocation::GetEntry($i,$langOpt) or last;
734
+ next if $minPop and $entry[7] < $minPop;
735
+ next if %fcodes and $neg ? $fcodes{lc $entry[6]} : not $fcodes{lc $entry[6]};
736
+ $_ = defined $_ ? $mt->Decode($_, 'UTF8') : '' foreach @entry[0,1,2,4];
737
+ print join(',', @entry), "\n";
738
+ }
722
739
  } else { # 'g(\d*)'
723
740
  # list all groups in specified family
724
741
  my $family = $2 || 0;
@@ -1109,7 +1126,7 @@ for (;;) {
1109
1126
  } else {
1110
1127
  $pass or push(@nextPass, '-lang'), next;
1111
1128
  }
1112
- my $langs = "Available languages:\n";
1129
+ my $langs = $quiet ? '' : "Available languages:\n";
1113
1130
  $langs .= " $_ - $Image::ExifTool::langName{$_}\n" foreach @Image::ExifTool::langs;
1114
1131
  $langs =~ tr/_/-/; # display dashes instead of underlines in language codes
1115
1132
  $langs = Image::ExifTool::HTML::EscapeHTML($langs) if $escapeHTML;
@@ -1425,11 +1442,11 @@ if ($useMWG and not defined $mt->Options('CharsetEXIF')) {
1425
1442
  if (not @files and not $outOpt and not @newValues) {
1426
1443
  my $loc = $mt->Options('Geolocation');
1427
1444
  # use undocumented feature to input JSON file directly from command line
1428
- $loc and $loc =~ /,/ and push(@files, qq(\@JSON:{})), $geoOnly = 1;
1445
+ $loc and $loc ne '1' and push(@files, qq(\@JSON:{})), $geoOnly = 1;
1429
1446
  }
1430
1447
 
1431
1448
  # print help
1432
- unless ((@tags and not $outOpt) or @files or @newValues) {
1449
+ unless ((@tags and not $outOpt) or @files or @newValues or $geoOnly) {
1433
1450
  if ($doGlob and $doGlob == 2) {
1434
1451
  Warn "No matching files\n";
1435
1452
  $rtnVal = 1;
@@ -2131,7 +2148,7 @@ sub GetImageInfo($$)
2131
2148
  # read JSON file from command line
2132
2149
  my $dat = $2;
2133
2150
  $info = $et->ImageInfo(\$dat, \@foundTags);
2134
- if ($geoOnly) { /^Geolocation/ or delete $$info{$_} foreach keys %$info }
2151
+ if ($geoOnly) { /^Geolocation/ or delete $$info{$_} foreach keys %$info; $file = ' ' }
2135
2152
  }
2136
2153
  if (defined $deleteOrig) {
2137
2154
  Progress($vout, "======== $file") if defined $verbose;
@@ -4648,7 +4665,7 @@ B<exiftool> [I<OPTIONS>] B<-tagsFromFile> I<SRCFILE>
4648
4665
  =head2 Other
4649
4666
 
4650
4667
  B<exiftool> [ B<-ver> |
4651
- B<-list>[B<w>|B<f>|B<r>|B<wf>|B<g>[I<NUM>]|B<d>|B<x>] ]
4668
+ B<-list>[B<w>|B<f>|B<r>|B<wf>|B<g>[I<NUM>]|B<d>|B<x>|B<geo>] ]
4652
4669
 
4653
4670
  For specific examples, see the L<EXAMPLES|/READING EXAMPLES> sections below.
4654
4671
 
@@ -5640,7 +5657,7 @@ with this command:
5640
5657
 
5641
5658
  produces output like this:
5642
5659
 
5643
- -- Generated by ExifTool 12.78 --
5660
+ -- Generated by ExifTool 12.80 --
5644
5661
  File: a.jpg - 2003:10:31 15:44:19
5645
5662
  (f/5.6, 1/60s, ISO 100)
5646
5663
  File: b.jpg - 2006:05:23 11:57:38
@@ -6402,22 +6419,24 @@ prevent the command window from closing when run as a Windows drag and drop
6402
6419
  application.
6403
6420
 
6404
6421
  =item B<-list>, B<-listw>, B<-listf>, B<-listr>, B<-listwf>,
6405
- B<-listg>[I<NUM>], B<-listd>, B<-listx>
6422
+ B<-listg>[I<NUM>], B<-listd>, B<-listx>, B<-listgeo>
6406
6423
 
6407
6424
  Print a list of all valid tag names (B<-list>), all writable tag names
6408
6425
  (B<-listw>), all supported file extensions (B<-listf>), all recognized file
6409
6426
  extensions (B<-listr>), all writable file extensions (B<-listwf>), all tag
6410
6427
  groups [in a specified family] (B<-listg>[I<NUM>]), all deletable tag groups
6411
- (B<-listd>), or an XML database of tag details including language
6412
- translations (B<-listx>). The B<-list>, B<-listw> and B<-listx> options may
6413
- be followed by an additional argument of the form C<-GROUP:All> to list only
6414
- tags in a specific group, where C<GROUP> is one or more family 0-2 group
6415
- names (excepting EXIF IFD groups) separated by colons. With B<-listg>,
6416
- I<NUM> may be given to specify the group family, otherwise family 0 is
6417
- assumed. The B<-l> option may be combined with B<-listf>, B<-listr> or
6418
- B<-listwf> to add file descriptions to the list. The B<-lang> option may be
6419
- combined with B<-listx> to output descriptions in a single language. Here
6420
- are some examples:
6428
+ (B<-listd>), an XML database of tag details including language translations
6429
+ (B<-listx>), or the Geolocation database (B<-listgeo>). The B<-list>,
6430
+ B<-listw> and B<-listx> options may be followed by an additional argument of
6431
+ the form C<-GROUP:All> to list only tags in a specific group, where C<GROUP>
6432
+ is one or more family 0-2 group names (excepting EXIF IFD groups) separated
6433
+ by colons. With B<-listg>, I<NUM> may be given to specify the group family,
6434
+ otherwise family 0 is assumed. The B<-l> option may be combined with
6435
+ B<-listf>, B<-listr> or B<-listwf> to add file descriptions to the list.
6436
+ The B<-lang> option may be combined with B<-listx> to output descriptions in
6437
+ a single language, and the B<-sort> and/or B<-lang> options may be combined
6438
+ with B<-listgeo>. Also, the API GeolocMinPop and GeolocFeature options
6439
+ apply to the B<-listgeo> output. Here are some examples:
6421
6440
 
6422
6441
  -list # list all tag names
6423
6442
  -list -EXIF:All # list all EXIF tags
@@ -6430,6 +6449,7 @@ are some examples:
6430
6449
  -listd # list all deletable groups
6431
6450
  -listx -EXIF:All # list database of EXIF tags in XML format
6432
6451
  -listx -XMP:All -s # list short XML database of XMP tags
6452
+ -listgeo -lang de # list geolocation database in German
6433
6453
 
6434
6454
  When combined with B<-listx>, the B<-s> option shortens the output by
6435
6455
  omitting the descriptions and values (as in the last example above), and
@@ -528,6 +528,7 @@ my %faceCategories = (
528
528
  1 => 'Full-frame on GFX', #IB
529
529
  2 => 'Sports Finder Mode', # (mechanical shutter)
530
530
  4 => 'Electronic Shutter 1.25x Crop', # (continuous high)
531
+ 8 => 'Digital Tele-Conv', #forum15784
531
532
  },
532
533
  },
533
534
  0x104e => { #forum10800 (X-Pro3)
@@ -549,6 +550,8 @@ my %faceCategories = (
549
550
  3 => 'Electronic Front Curtain', #10
550
551
  },
551
552
  },
553
+ 0x1051 => { Name => 'CropTopLeft', Writable => 'int32u' }, #forum15784
554
+ 0x1052 => { Name => 'CropCenter', Writable => 'int32u' }, #forum15784
552
555
  # 0x1100 - This may not work well for newer cameras (ref forum12682)
553
556
  0x1100 => [{
554
557
  Name => 'AutoBracketing',