exiftool-vendored.exe 12.78.0 → 12.82.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.
Files changed (53) hide show
  1. package/bin/exiftool_files/Changes +80 -3
  2. package/bin/exiftool_files/README +3 -2
  3. package/bin/exiftool_files/config_files/acdsee.config +37 -57
  4. package/bin/exiftool_files/config_files/example.config +6 -0
  5. package/bin/exiftool_files/exiftool.pl +70 -26
  6. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +44 -31
  7. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +2 -2
  8. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +21 -5
  9. package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +543 -0
  10. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/cs.pm +978 -0
  11. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/de.pm +1975 -0
  12. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/en_ca.pm +44 -0
  13. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/en_gb.pm +124 -0
  14. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/es.pm +2921 -0
  15. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/fi.pm +1116 -0
  16. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/fr.pm +3171 -0
  17. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/it.pm +2750 -0
  18. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ja.pm +10256 -0
  19. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ko.pm +4499 -0
  20. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/nl.pm +1270 -0
  21. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/pl.pm +3019 -0
  22. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ru.pm +18220 -0
  23. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/sk.pm +441 -0
  24. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/sv.pm +714 -0
  25. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/tr.pm +452 -0
  26. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/zh_cn.pm +2225 -0
  27. package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/zh_tw.pm +72 -0
  28. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat +0 -0
  29. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +867 -146
  30. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +13 -1
  31. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +7 -2
  32. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +32 -4
  33. package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +2 -2
  34. package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
  35. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +331 -22
  36. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +55 -1
  37. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -0
  38. package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +37 -19
  39. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +3 -3
  40. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +40 -24
  41. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +61 -30
  42. package/bin/exiftool_files/lib/Image/ExifTool/README +8 -5
  43. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +1 -1
  44. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4820 -4750
  45. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +1000 -615
  46. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +31 -8
  47. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +1 -1
  48. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +58 -2
  49. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +20 -3
  50. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +64 -0
  51. package/bin/exiftool_files/lib/Image/ExifTool.pm +210 -97
  52. package/bin/exiftool_files/lib/Image/ExifTool.pod +44 -18
  53. package/package.json +3 -3
@@ -7,6 +7,85 @@ 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
+ Apr. 5, 2024 - Version 12.82 - "GM PDR"
11
+
12
+ - Added support for reading GM PDR data from MP4 videos written by cars such
13
+ as Corvettes and Cameros
14
+ - Added support for reading timed GPS from Wolfbox dashcam videos
15
+ - Added "Unknown trailer" to QuickTime warnings originating from an unknown
16
+ trailer
17
+ - Added a new Nikon LensID
18
+ - Extract PreviewImage from Chigee AIO-5 dashcam videos
19
+ - Changed name and print conversion of a recently added FujiFilm tag
20
+ - Only issue "Tag not defined" warnings for the first sub-document when using
21
+ the -p option
22
+ - Fixed a Nikon Z lens name (github #250)
23
+ - Fixed Windows version so -sort works properly with -listgeo
24
+ - API Changes:
25
+ - Added PrintCSV option for optimized extraction of GM PDR data in CSV
26
+ format
27
+
28
+ Mar. 27, 2024 - Version 12.81
29
+
30
+ - Added ability to read EXIF and XMP from EXR images
31
+ - Added ability to delete unknown trailer when writing MOV/MP4 videos
32
+ - Added ability to write a couple of Stable Diffusion PNG tags
33
+ - Added ability to write one of the Microsoft Xtra Description tags (github
34
+ #248)
35
+ - Added support for using alternate city names in reverse Geolocation
36
+ - Added support for reading timed GPS from DOD LS600W TS videos
37
+ - Added support for new version of Canon DR4 files
38
+ - Added a number of new iTunesInfo tags
39
+ - Added a new Olympus LensType
40
+ - Decode a number of new Nikon tags (thanks Warren Hatch)
41
+ - Allow regular expressions to be used when writing Geolocate tag
42
+ - Enhanced writing of Geolocate tag to also write Keys:LocationName
43
+ - Cache the results of the last reverse geolocation search to speed batch
44
+ processing when multiple files have the same search parameters
45
+ - Patched problem that could cause runtime errors with some invaid tag names
46
+ - Fixed a couple of newly added FujiFilm tags
47
+ - Fixed decoding of FujiFilm AFAreaZoneSize
48
+ - API Changes:
49
+ - Added GeolocAltNames option
50
+
51
+ Mar. 19, 2024 - Version 12.80
52
+
53
+ - Added GeolocationFeatureCode tag
54
+ - Added XMP-acdsee-rs tags and a new XMP-xmpDM tag
55
+ - Added ACDSeeRegion2MWGRegion conversion to config_files/acdsee.config
56
+ - Added GPSAltitudeRef to XMP-iptcExt LocationDetails structure
57
+ - Added a couple of new FujiFilm tags and a new CropMode value
58
+ - Added conversion for XMP-aux:ApproximateFocusDistance "infinity"
59
+ - Improved Geolocation regular expressions to allow negative matches
60
+ - Improved accuracy of Geolocation distance/bearing calculations
61
+ - Changed structure of Geolocation database (now version 1.02)
62
+ - Minor change to key format for user-defined Geolocation name translations
63
+ - Ignore API Geolocation option when copying tags if none of the Geolocation
64
+ tags are being copied
65
+ - Fixed case/spacing of "C2PA" in some CBOR tag descriptions
66
+ - Fixed bug extracting binary data from EXR files
67
+ - API Changes:
68
+ - Added GeolocFeature option
69
+
70
+ Mar. 15, 2024 - Version 12.79
71
+
72
+ - Improvements to new Geolocation feature:
73
+ - Added reverse Geolocation ability (obtain GPS coordinates from city
74
+ name), with support for regular expressions
75
+ - Added ability to geolocate while geotagging
76
+ - Added -listgeo option to list the Geolocation database
77
+ - Added the ability to include user-defined cities in the Geolocation
78
+ database
79
+ - Added the ability to write XMP-iptcExt LocationShown tags using Geolocate
80
+ feature
81
+ - Added the ability to specify which tags to read from file for the API
82
+ Geolocation option
83
+ - Added language translations for Geolocation names
84
+ - Increased resolution of Geolocation GPS positions and stored populations
85
+ - API Changes:
86
+ - Save necessary data members to allow GetInfo to be accessed by
87
+ user-defined tags
88
+
10
89
  Mar. 5, 2024 - Version 12.78 - "Geolocation"
11
90
 
12
91
  - Added new Geolocation feature and write-only Geolocate tag
@@ -32,9 +111,7 @@ Mar. 5, 2024 - Version 12.78 - "Geolocation"
32
111
  - Fixed issue where some tags from alternate files using the -fileNUM option
33
112
  weren't generated as requested
34
113
  - API Changes:
35
- - Added Geolocation,
36
- GeolocMaxDist and
37
- GeolocMinPop API options
114
+ - Added Geolocation, GeolocMaxDist and GeolocMinPop API options
38
115
 
39
116
  Feb. 16, 2024 - Version 12.77
40
117
 
@@ -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.82.tar.gz | tar -xf -
113
+ cd Image-ExifTool-12.82
114
114
  ./exiftool t/images/ExifTool.jpg
115
115
 
116
116
  Note: These commands extract meta information from one of the test images.
@@ -238,6 +238,7 @@ information:
238
238
  html/ExifTool.html - API documentation
239
239
  html/TagNames/index.html - Tag name documentation
240
240
  html/geotag.html - Geotag feature
241
+ html/geolocation.html - Geolocation feature
241
242
  html/faq.html - Frequently asked questions
242
243
  html/filename.html - Renaming/moving files
243
244
  html/metafiles.html - Working with metadata sidecar files
@@ -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
@@ -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.82';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -209,7 +209,7 @@ my $tmpFile; # temporary file to delete on exit
209
209
  my $tmpText; # temporary text file
210
210
  my $validFile; # flag indicating we processed a valid file
211
211
  my $verbose; # verbose setting
212
- my $vout; # verbose output file reference (\*STDOUT or \*STDERR)
212
+ my $vout; # verbose output file reference (\*STDOUT or \*STDERR by default)
213
213
  my $windowTitle; # title for console window
214
214
  my %wroteHEAD; # list of output txt files to which we wrote HEAD
215
215
  my $xml; # flag for XML-formatted output
@@ -683,7 +683,7 @@ for (;;) {
683
683
  next;
684
684
  }
685
685
  my $a = lc $_;
686
- if (/^list([wfrdx]|wf|g(\d*))?$/i) {
686
+ if (/^list([wfrdx]|wf|g(\d*)|geo)?$/i) {
687
687
  $pass or push @nextPass, "-$_";
688
688
  my $type = lc($1 || '');
689
689
  if (not $type or $type eq 'w' or $type eq 'x') {
@@ -732,6 +732,29 @@ for (;;) {
732
732
  PrintTagList('Recognized file extensions', GetFileType(undef, 0));
733
733
  } elsif ($type eq 'd') {
734
734
  PrintTagList('Deletable groups', GetDeleteGroups());
735
+ } elsif ($type eq 'geo') {
736
+ require Image::ExifTool::Geolocation;
737
+ my ($i, $entry);
738
+ print "Geolocation database:\n" unless $quiet;
739
+ my $isAlt = $mt->Options('GeolocAltNames') ? ',AltNames' : '';
740
+ $isAlt = '' if $isAlt and not Image::ExifTool::Geolocation::ReadAltNames();
741
+ print "City,Region,Subregion,CountryCode,Country,TimeZone,FeatureCode,Population,Latitude,Longitude$isAlt\n";
742
+ Image::ExifTool::Geolocation::SortDatabase('City') if $sortOpt;
743
+ my $minPop = $mt->Options('GeolocMinPop');
744
+ my $feature = $mt->Options('GeolocFeature') || '';
745
+ my $neg = $feature =~ s/^-//;
746
+ my %fcodes = map { lc($_) => 1 } split /\s*,\s*/, $feature;
747
+ my @isUTF8 = (0,1,2,4); # items that need converting from UTF8
748
+ push @isUTF8, 10 if $isAlt;
749
+ for ($i=0; ; ++$i) {
750
+ my @entry = Image::ExifTool::Geolocation::GetEntry($i,$langOpt,1) or last;
751
+ next if $minPop and $entry[7] < $minPop;
752
+ next if %fcodes and $neg ? $fcodes{lc $entry[6]} : not $fcodes{lc $entry[6]};
753
+ push @entry, Image::ExifTool::Geolocation::GetAltNames($i,1) if $isAlt;
754
+ $_ = defined $_ ? $mt->Decode($_, 'UTF8') : '' foreach @entry[@isUTF8];
755
+ pop @entry if $isAlt and not $entry[10];
756
+ print join(',', @entry), "\n";
757
+ }
735
758
  } else { # 'g(\d*)'
736
759
  # list all groups in specified family
737
760
  my $family = $2 || 0;
@@ -1122,7 +1145,7 @@ for (;;) {
1122
1145
  } else {
1123
1146
  $pass or push(@nextPass, '-lang'), next;
1124
1147
  }
1125
- my $langs = "Available languages:\n";
1148
+ my $langs = $quiet ? '' : "Available languages:\n";
1126
1149
  $langs .= " $_ - $Image::ExifTool::langName{$_}\n" foreach @Image::ExifTool::langs;
1127
1150
  $langs =~ tr/_/-/; # display dashes instead of underlines in language codes
1128
1151
  $langs = Image::ExifTool::HTML::EscapeHTML($langs) if $escapeHTML;
@@ -1361,11 +1384,11 @@ for (;;) {
1361
1384
  $useMWG = 1;
1362
1385
  } elsif (/^([-\w]+:)*(filename|directory|testname)\b/i) {
1363
1386
  $doSetFileName = 1;
1364
- } elsif (/^([-\w]+:)*(geotag|geotime|geosync)\b/i) {
1387
+ } elsif (/^([-\w]+:)*(geotag|geotime|geosync|geolocate)\b/i) {
1365
1388
  if (lc $2 eq 'geotime') {
1366
1389
  $addGeotime = '';
1367
1390
  } else {
1368
- # add geotag/geosync commands first
1391
+ # add geotag/geosync/geolocate commands first
1369
1392
  unshift @newValues, pop @newValues;
1370
1393
  if (lc $2 eq 'geotag' and (not defined $addGeotime or $addGeotime) and length $val) {
1371
1394
  $addGeotime = ($1 || '') . 'Geotime<DateTimeOriginal#';
@@ -1438,11 +1461,11 @@ if ($useMWG and not defined $mt->Options('CharsetEXIF')) {
1438
1461
  if (not @files and not $outOpt and not @newValues) {
1439
1462
  my $loc = $mt->Options('Geolocation');
1440
1463
  # use undocumented feature to input JSON file directly from command line
1441
- $loc and $loc =~ /,/ and push(@files, qq(\@JSON:{})), $geoOnly = 1;
1464
+ $loc and $loc ne '1' and push(@files, qq(\@JSON:{})), $geoOnly = 1;
1442
1465
  }
1443
1466
 
1444
1467
  # print help
1445
- unless ((@tags and not $outOpt) or @files or @newValues) {
1468
+ unless ((@tags and not $outOpt) or @files or @newValues or $geoOnly) {
1446
1469
  if ($doGlob and $doGlob == 2) {
1447
1470
  Warn "No matching files\n";
1448
1471
  $rtnVal = 1;
@@ -2128,7 +2151,7 @@ sub GetImageInfo($$)
2128
2151
  # read JSON file from command line
2129
2152
  my $dat = $2;
2130
2153
  $info = $et->ImageInfo(\$dat, \@foundTags);
2131
- if ($geoOnly) { /^Geolocation/ or delete $$info{$_} foreach keys %$info }
2154
+ if ($geoOnly) { /^Geolocation/ or delete $$info{$_} foreach keys %$info; $file = ' ' }
2132
2155
  }
2133
2156
  if (defined $deleteOrig) {
2134
2157
  Progress($vout, "======== $file") if defined $verbose;
@@ -2155,7 +2178,7 @@ sub GetImageInfo($$)
2155
2178
 
2156
2179
  my $lineCount = 0;
2157
2180
  my ($fp, $outfile, $append);
2158
- if ($textOut and $verbose and not $tagOut) {
2181
+ if ($textOut and ($verbose or $et->Options('PrintCSV')) and not $tagOut) {
2159
2182
  ($fp, $outfile, $append) = OpenOutputFile($orig);
2160
2183
  $fp or EFile($file), ++$countBad, return;
2161
2184
  # delete file if we exit prematurely (unless appending)
@@ -2278,7 +2301,7 @@ sub GetImageInfo($$)
2278
2301
  $lastDoc = 0;
2279
2302
  }
2280
2303
  for ($doc=0; $doc<=$lastDoc; ++$doc) {
2281
- my $skipBody;
2304
+ my ($skipBody, $opt);
2282
2305
  foreach $type (qw(HEAD SECT IF BODY ENDS TAIL)) {
2283
2306
  my $prf = $printFmt{$type} or next;
2284
2307
  if ($type eq 'HEAD' and defined $outfile) {
@@ -2286,6 +2309,12 @@ sub GetImageInfo($$)
2286
2309
  $wroteHEAD{$outfile} = 1;
2287
2310
  }
2288
2311
  next if $type eq 'BODY' and $skipBody;
2312
+ # silence "IF" warnings and warnings for subdocuments > 1
2313
+ if ($type eq 'IF' or ($doc > 1 and not $$et{OPTIONS}{IgnoreMinorErrors})) {
2314
+ $opt = 'Silent';
2315
+ } else {
2316
+ $opt = 'Warn';
2317
+ }
2289
2318
  if ($lastDoc) {
2290
2319
  if ($doc) {
2291
2320
  next if $type eq 'HEAD' or $type eq 'TAIL'; # only repeat SECT/IF/BODY/ENDS
@@ -2295,7 +2324,6 @@ sub GetImageInfo($$)
2295
2324
  }
2296
2325
  }
2297
2326
  my @lines;
2298
- my $opt = $type eq 'IF' ? 'Silent' : 'Warn'; # silence "IF" warnings
2299
2327
  foreach (@$prf) {
2300
2328
  my $line = $et->InsertTagValues($_, \@foundTags, $opt, $grp, $cache);
2301
2329
  if ($type eq 'IF') {
@@ -4656,7 +4684,7 @@ SYNOPSIS
4656
4684
  *FILE*...
4657
4685
 
4658
4686
  Other
4659
- exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x] ]
4687
+ exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x|geo] ]
4660
4688
 
4661
4689
  For specific examples, see the EXAMPLES sections below.
4662
4690
 
@@ -5663,7 +5691,7 @@ OPTIONS
5663
5691
 
5664
5692
  produces output like this:
5665
5693
 
5666
- -- Generated by ExifTool 12.78 --
5694
+ -- Generated by ExifTool 12.82 --
5667
5695
  File: a.jpg - 2003:10:31 15:44:19
5668
5696
  (f/5.6, 1/60s, ISO 100)
5669
5697
  File: b.jpg - 2006:05:23 11:57:38
@@ -6428,22 +6456,26 @@ OPTIONS
6428
6456
  This option is used to prevent the command window from closing when
6429
6457
  run as a Windows drag and drop application.
6430
6458
 
6431
- -list, -listw, -listf, -listr, -listwf, -listg[*NUM*], -listd, -listx
6459
+ -list, -listw, -listf, -listr, -listwf, -listg[*NUM*], -listd, -listx,
6460
+ -listgeo
6432
6461
  Print a list of all valid tag names (-list), all writable tag names
6433
6462
  (-listw), all supported file extensions (-listf), all recognized
6434
6463
  file extensions (-listr), all writable file extensions (-listwf),
6435
6464
  all tag groups [in a specified family] (-listg[*NUM*]), all
6436
- deletable tag groups (-listd), or an XML database of tag details
6437
- including language translations (-listx). The -list, -listw and
6438
- -listx options may be followed by an additional argument of the
6439
- form "-GROUP:All" to list only tags in a specific group, where
6440
- "GROUP" is one or more family 0-2 group names (excepting EXIF IFD
6441
- groups) separated by colons. With -listg, *NUM* may be given to
6442
- specify the group family, otherwise family 0 is assumed. The -l
6443
- option may be combined with -listf, -listr or -listwf to add file
6444
- descriptions to the list. The -lang option may be combined with
6445
- -listx to output descriptions in a single language. Here are some
6446
- examples:
6465
+ deletable tag groups (-listd), an XML database of tag details
6466
+ including language translations (-listx), or the Geolocation
6467
+ database (-listgeo). The -list, -listw and -listx options may be
6468
+ followed by an additional argument of the form "-GROUP:All" to list
6469
+ only tags in a specific group, where "GROUP" is one or more family
6470
+ 0-2 group names (excepting EXIF IFD groups) separated by colons.
6471
+ With -listg, *NUM* may be given to specify the group family,
6472
+ otherwise family 0 is assumed. The -l option may be combined with
6473
+ -listf, -listr or -listwf to add file descriptions to the list. The
6474
+ -lang option may be combined with -listx to output descriptions in
6475
+ a single language, and the -sort and/or -lang options may be
6476
+ combined with -listgeo. Also, the API GeolocMinPop, GeolocFeature
6477
+ and GeolocAltNames options apply to the -listgeo output. Here are
6478
+ some examples:
6447
6479
 
6448
6480
  -list # list all tag names
6449
6481
  -list -EXIF:All # list all EXIF tags
@@ -6456,6 +6488,7 @@ OPTIONS
6456
6488
  -listd # list all deletable groups
6457
6489
  -listx -EXIF:All # list database of EXIF tags in XML format
6458
6490
  -listx -XMP:All -s # list short XML database of XMP tags
6491
+ -listgeo -lang de # list geolocation database in German
6459
6492
 
6460
6493
  When combined with -listx, the -s option shortens the output by
6461
6494
  omitting the descriptions and values (as in the last example
@@ -6539,6 +6572,11 @@ OPTIONS
6539
6572
  full ExifTool distribution and the Image::ExifTool Options for more
6540
6573
  details and for information about geotag configuration options.
6541
6574
 
6575
+ The API Geolocation option may be set to the value "geotag" to also
6576
+ write the name, province/state and country of the nearest city
6577
+ while geotagging. See <https://exiftool.org/geolocation.html> for
6578
+ details.
6579
+
6542
6580
  -globalTimeShift *SHIFT*
6543
6581
  Shift all formatted date/time values by the specified amount when
6544
6582
  reading. Does not apply to unformatted (-n) output. *SHIFT* takes
@@ -7334,6 +7372,12 @@ GEOTAGGING EXAMPLES
7334
7372
  value of DateTimeOriginal is used for geotagging. Local system time
7335
7373
  is assumed unless DateTimeOriginal contains a timezone.
7336
7374
 
7375
+ exiftool -geotag track.log -geolocate=geotag a.jpg
7376
+ Geotag an image and also write geolocation information of the
7377
+ nearest city (city name, state/province and country). Read here for
7378
+ more details about the Geolocation feature:
7379
+ <https://exiftool.org/geolocation.html#Write>
7380
+
7337
7381
  exiftool -geotag t.log -geotime="2009:04:02 13:41:12-05:00" a.jpg
7338
7382
  Geotag an image with the GPS position for a specific time.
7339
7383
 
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
35
35
  use Image::ExifTool::Validate;
36
36
  use Image::ExifTool::MacOS;
37
37
 
38
- $VERSION = '3.54';
38
+ $VERSION = '3.55';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -95,16 +95,9 @@ my %tweakOrder = (
95
95
  Lytro => 'SigmaRaw',
96
96
  PhotoMechanic => 'FotoStation',
97
97
  Microsoft => 'PhotoMechanic',
98
- 'Microsoft::MP'=> 'Microsoft::MP1',
99
98
  GIMP => 'Microsoft',
100
- 'Nikon::CameraSettingsD300' => 'Nikon::ShotInfoD300b',
101
- 'Pentax::LensData' => 'Pentax::LensInfo2',
102
- 'Sony::SRF2' => 'Sony::SRF',
103
99
  DarwinCore => 'AFCP',
104
- 'MWG::Regions' => 'MWG::Composite',
105
- 'MWG::Keywords' => 'MWG::Regions',
106
- 'MWG::Collections' => 'MWG::Keywords',
107
- 'GoPro::fdsc' => 'GoPro::KBAT',
100
+ MWG => 'Shortcuts',
108
101
  );
109
102
 
110
103
  # list of all recognized Format strings
@@ -671,6 +664,15 @@ will extract all available information even for tags not listed.
671
664
  Tags in these tables are referred to as "pseudo" tags because their
672
665
  information is not stored in the file itself. As such, B<Writable> tags in
673
666
  these tables may be changed without having to rewrite the file.
667
+ },
668
+ GM => q{
669
+ These tags are extracted from GM/Cosworth PDR (Performance Data Recorder)
670
+ information found in videos from General Motors cars such as Corvette and
671
+ Camero.
672
+
673
+ Use the API L<PrintCSV|../ExifTool.html#PrintCSV> option to output all timed
674
+ PDR data in CSV format at greatly increased speed and with much lower memory
675
+ usage.
674
676
  },
675
677
  PodTrailer => q{
676
678
  ~head1 NOTES
@@ -708,7 +710,7 @@ my %shortcutNotes = (
708
710
  color space when deleting all other metadata
709
711
  },
710
712
  CommonIFD0 => q{
711
- common metadata tags found in IFD0 of TIFF-format images. Used to simpify
713
+ common metadata tags found in IFD0 of TIFF-format images. Used to simplify
712
714
  deletion of all metadata from these images. See
713
715
  L<FAQ number 7|../faq.html#Q7> for details
714
716
  },
@@ -852,7 +854,7 @@ sub new
852
854
  my ($tagID, $binaryTable, $noID, $hexID, $isIPTC, $isXMP);
853
855
  $isIPTC = 1 if $writeProc and $writeProc eq \&Image::ExifTool::IPTC::WriteIPTC;
854
856
  # generate flattened tag names for structure fields if this is an XMP table
855
- if ($$table{GROUPS} and $$table{GROUPS}{0} eq 'XMP') {
857
+ if ($$table{GROUPS} and $$table{GROUPS}{0} eq 'XMP' or $$vars{ADD_FLATTENED}) {
856
858
  Image::ExifTool::XMP::AddFlattenedTags($table);
857
859
  $isXMP = 1;
858
860
  }
@@ -1526,7 +1528,8 @@ TagID: foreach $tagID (@keys) {
1526
1528
  my $fullName = ($strName =~ / / ? '' : 'XMP ') . "$strName Struct";
1527
1529
  my $info = $tagNameInfo{$fullName} = [ ];
1528
1530
  my $tag;
1529
- foreach $tag (sort keys %$struct) {
1531
+ my $order = $$struct{SORT_ORDER} || [ sort keys %$struct ];
1532
+ foreach $tag (@$order) {
1530
1533
  my $tagInfo = $$struct{$tag};
1531
1534
  next unless ref $tagInfo eq 'HASH' and $tag ne 'NAMESPACE' and $tag ne 'GROUPS';
1532
1535
  warn "WARNING: $strName Struct containes $tag\n" if $Image::ExifTool::specialTags{$tag};
@@ -1539,6 +1542,8 @@ TagID: foreach $tagID (@keys) {
1539
1542
  push @vals, $writable;
1540
1543
  $structs{$writable} = 1;
1541
1544
  $writable = "=$writable";
1545
+ } elsif (defined $$tagInfo{Writable}) {
1546
+ $writable = 'no';
1542
1547
  } else {
1543
1548
  $writable = 'string';
1544
1549
  }
@@ -1548,7 +1553,7 @@ TagID: foreach $tagID (@keys) {
1548
1553
  # handle PrintConv lookups in Structure elements
1549
1554
  my $printConv = $$tagInfo{PrintConv};
1550
1555
  if (ref $printConv eq 'HASH') {
1551
- foreach (sort keys %$printConv) {
1556
+ foreach (sort { NumbersFirst($a,$b) } keys %$printConv) {
1552
1557
  next if /^(OTHER|BITMASK)$/;
1553
1558
  push @vals, "$_ = $$printConv{$_}";
1554
1559
  }
@@ -1822,24 +1827,7 @@ sub TweakOrder($$)
1822
1827
  local $_;
1823
1828
  my ($sortedTables, $tweakOrder) = @_;
1824
1829
  my @tweak = sort keys %$tweakOrder;
1825
- my (%addedMain, @sorted);
1826
- # flag files which have a "Main" table
1827
- foreach (@$sortedTables) {
1828
- $addedMain{$1} = 0 if /^Image::ExifTool::(\w+)::(\w+)/ and $2 eq 'Main';
1829
- }
1830
- # make sure that the main table always comes first in each file
1831
- foreach (@$sortedTables) {
1832
- if (/^Image::ExifTool::(\w+)::(\w+)/) {
1833
- if ($addedMain{$1}) {
1834
- next if $2 eq 'Main'; # don't add again
1835
- } elsif (defined $addedMain{$1}) {
1836
- push @sorted, "Image::ExifTool::${1}::Main" if $2 ne 'Main';
1837
- $addedMain{$1} = 1;
1838
- }
1839
- }
1840
- push @sorted, $_;
1841
- }
1842
- @$sortedTables = @sorted;
1830
+ my (@sorted, %hasMain, %module, $entry);
1843
1831
  # apply manual tweaks
1844
1832
  while (@tweak) {
1845
1833
  my $table = shift @tweak;
@@ -1858,6 +1846,31 @@ sub TweakOrder($$)
1858
1846
  }
1859
1847
  @$sortedTables = (@notMoving, @moving, @after);
1860
1848
  }
1849
+ # flag modules which have a "Main" table, and organize tables by module name
1850
+ foreach (@$sortedTables) {
1851
+ if (not /^Image::ExifTool::(\w+)::(\w+)/) {
1852
+ push @sorted, $_;
1853
+ } else {
1854
+ $hasMain{$1} = 1 if $2 eq 'Main';
1855
+ push @sorted, $module{$1} = [ ] unless $module{$1};
1856
+ push @{$module{$1}}, $_;
1857
+ }
1858
+ }
1859
+ # force MWG::Composite table first
1860
+ my @mwg = ( 'Image::ExifTool::MWG::Composite' );
1861
+ /Composite/ or push @mwg, $_ foreach @{$module{MWG}};
1862
+ @{$module{MWG}} = @mwg;
1863
+ # make sure that the main table always comes first in each file
1864
+ # and that all other tables from this group follow
1865
+ @$sortedTables = ( );
1866
+ foreach $entry (@sorted) {
1867
+ ref $entry or push(@$sortedTables, $entry), next;
1868
+ $$entry[0] =~ /^Image::ExifTool::(\w+)::(\w+)/ or die 'Internal error';
1869
+ my $main = "Image::ExifTool::$1::Main";
1870
+ # main table must come first (even if it doesn't exist)
1871
+ push @$sortedTables, $main if $hasMain{$1};
1872
+ $_ eq $main or push(@$sortedTables, $_) foreach @$entry;
1873
+ }
1861
1874
  }
1862
1875
 
1863
1876
  #------------------------------------------------------------------------------
@@ -23,7 +23,7 @@ use vars qw($VERSION);
23
23
  use Image::ExifTool qw(:DataAccess :Utils);
24
24
  use Image::ExifTool::Canon;
25
25
 
26
- $VERSION = '1.38';
26
+ $VERSION = '1.39';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -1758,7 +1758,7 @@ sub ProcessDR4($$;$)
1758
1758
  } else {
1759
1759
  # load DR4 file into memory
1760
1760
  my $buff;
1761
- $raf->Read($buff, 8) == 8 and $buff eq "IIII\x04\0\x04\0" or return 0;
1761
+ $raf->Read($buff, 8) == 8 and $buff =~ /^IIII[\x04|\x05]\0\x04\0/ or return 0;
1762
1762
  $et->SetFileType();
1763
1763
  $raf->Seek(0, 2) or return $err = 1;
1764
1764
  $dirLen = $raf->Tell();