exiftool_vendored 13.03.0 → 13.06.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: beee9d5cf55d8f0cdbe040a87bcccb203cb39721065957785486ef6bc02380ca
4
- data.tar.gz: b5023cb0b5f82e8c4798256b34ea31bc3e99dc805af96d7595f2727ef1b9ce90
3
+ metadata.gz: 277daacb61b45f8ffcf01c45e8a2ae6c7814aa878af57ce5e700433e37a73a89
4
+ data.tar.gz: c27dc0342c61725b98adb52806417396827df205172ae6793f14bb6eb9d3949b
5
5
  SHA512:
6
- metadata.gz: 6e8b38e7fa81625bb834f7f419100eb4116514d6e3f667b80b486e449b36f849ee26dfb9878caab0b0d937b59a803e1177ed459cbf0e6df4a949427b7e87347d
7
- data.tar.gz: 36865cb5c13daac876f068af94f9d7b50b16338b0159fadcdd365bb15bf98791956bfe5c2fb25d6ab9521f02126bfc918184f4d12b264e54a24718ab93808f53
6
+ metadata.gz: acb79bdb9f29cb00439ad4006faba198b460abed0c655e1cce6d7a3845ec14c8fe19a778dcbdb5401bb5f77b51329329e9ab8a6932c98a9d04ff63ca04be9af0
7
+ data.tar.gz: 2771ca21af4d53e1d2138b4b94dd187f1e59c9f9c6230f8d3a8d83be61979b320570084a50f5ae5a3d038114a46cca518dca35e517d8304ed98087c73ceeb163
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 13.00. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Dec. 5, 2024 - Version 13.06
11
+
12
+ - Decode timed metadata from MP4 videos of yet another dashcam model
13
+ - Patched issue where FileSequence could increment twice for each file when a
14
+ -if condition was used
15
+ - API Changes:
16
+ - Revert default WindowsLongPath option until we can solve the pipe
17
+ problem)
18
+
19
+ Dec. 4, 2024 - Version 13.05
20
+
21
+ - Added a new SonyModelID
22
+ - Added support for XMP HDRGainMap and apdi namespaces
23
+ - Decode DJI timed djmd and dbgi protobuf-format metadata
24
+ - Decode APP10 AROT HDRGainCurve and APP2 URN UniformResourceName
25
+ - Decode a couple of new GoPro tags
26
+ - API Changes:
27
+ - Changed default WindowsLongPath option to 1 (please report if this
28
+ causes any problems)
29
+
30
+ Nov. 26, 2024 - Version 13.04
31
+
32
+ - Added the ability to write GPSDOP and GPSMeasureMode from the -geotag option
33
+ if hdop or pdop information exists in the input track file
34
+ - Added a few new Canon RFLensTypes (thanks Norbert Wasser)
35
+ - Decode timed GPS from GoPro Hero 13 videos
36
+ - Improved writing of GPSDestLatitudeRef and GPSDestLongitudeRef tags to allow
37
+ signed numbers to be written in the same way as GPSLatitudeRef and
38
+ GPSLongitudeRef
39
+ - Warn if using an Image::ExifTool library that doesn't match the application
40
+ version
41
+ - Renamed an Unknown Photoshop tag
42
+ - Convert GoPro GPSSpeed and GPSSpeed3D from m/s to km/h
43
+ - Patched to tolerate XML header in DOCX xml files
44
+ - Fixed incorrect file offsets for tags in some embedded files of -htmldump
45
+ output
46
+ - Fixed -htmldump output to show the same names for unknown EXIF tags as with
47
+ the -u option
48
+
10
49
  Nov. 12, 2024 - Version 13.03
11
50
 
12
51
  - Added ability to include or exclude tags from CSV and JSON imports
data/bin/MANIFEST CHANGED
@@ -397,6 +397,7 @@ lib/Image/ExifTool/PhotoMechanic.pm
397
397
  lib/Image/ExifTool/Photoshop.pm
398
398
  lib/Image/ExifTool/PostScript.pm
399
399
  lib/Image/ExifTool/PrintIM.pm
400
+ lib/Image/ExifTool/Protobuf.pm
400
401
  lib/Image/ExifTool/Qualcomm.pm
401
402
  lib/Image/ExifTool/QuickTime.pm
402
403
  lib/Image/ExifTool/QuickTimeStream.pl
data/bin/META.json CHANGED
@@ -50,5 +50,5 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "13.03"
53
+ "version" : "13.06"
54
54
  }
data/bin/META.yml CHANGED
@@ -31,4 +31,4 @@ recommends:
31
31
  Time::HiRes: '0'
32
32
  requires:
33
33
  perl: '5.004'
34
- version: '13.03'
34
+ version: '13.06'
data/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-13.03.tar.gz | tar -xf -
113
- cd Image-ExifTool-13.03
112
+ gzip -dc Image-ExifTool-13.06.tar.gz | tar -xf -
113
+ cd Image-ExifTool-13.06
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/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '13.03';
14
+ my $version = '13.06';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -597,6 +597,10 @@ if (@Image::ExifTool::UserDefined::Arguments) {
597
597
  unshift @ARGV, @Image::ExifTool::UserDefined::Arguments;
598
598
  }
599
599
 
600
+ if ($version ne $Image::ExifTool::VERSION) {
601
+ Warn "Application version $version does not match Image::ExifTool library version $Image::ExifTool::VERSION\n";
602
+ }
603
+
600
604
  # parse command-line options in 2 passes...
601
605
  # pass 1: set all of our ExifTool options
602
606
  # pass 2: print all of our help and informational output (-list, -ver, etc)
@@ -1914,7 +1918,7 @@ if (@dbKeys) {
1914
1918
  print $vout "Imported entry for '${_}' (full path: '${absPath}')\n";
1915
1919
  }
1916
1920
  } elsif ($verbose and $verbose > 1) {
1917
- print $vout "Imported entry for '${_}' (non-existent file)\n";
1921
+ print $vout "Imported entry for '${_}' (no full path)\n";
1918
1922
  }
1919
1923
  }
1920
1924
  }
@@ -2168,7 +2172,10 @@ sub GetImageInfo($$)
2168
2172
  }
2169
2173
  # can't make use of $info if verbose because we must reprocess
2170
2174
  # the file anyway to generate the verbose output
2171
- undef $info if $verbose or defined $fastCondition or defined $diff;
2175
+ if ($verbose or defined $fastCondition or defined $diff) {
2176
+ undef $info;
2177
+ --$$et{FILE_SEQUENCE};
2178
+ }
2172
2179
  } elsif ($file =~ s/^(\@JSON:)(.*)/$1/) {
2173
2180
  # read JSON file from command line
2174
2181
  my $dat = $2;
@@ -4159,11 +4166,12 @@ sub ScanDir($$;$)
4159
4166
  }
4160
4167
  $dir =~ /\/$/ or $dir .= '/'; # make sure directory name ends with '/'
4161
4168
  foreach $file (@fileList) {
4169
+ next if $file eq '.' or $file eq '..';
4162
4170
  my $path = "$dir$file";
4163
4171
  if ($et->IsDirectory($path)) {
4164
4172
  next unless $recurse;
4165
4173
  # ignore directories starting with "." by default
4166
- next if $file =~ /^\./ and ($recurse == 1 or $file eq '.' or $file eq '..');
4174
+ next if $file =~ /^\./ and $recurse == 1;
4167
4175
  next if $ignore{$file} or ($ignore{SYMLINKS} and -l $path);
4168
4176
  ScanDir($et, $path, $list);
4169
4177
  last if $end;
@@ -4311,14 +4319,15 @@ sub AbsPath($)
4311
4319
  {
4312
4320
  my $file = shift;
4313
4321
  my $path;
4314
- if (defined $file and eval { require Cwd }) {
4315
- $path = eval { Cwd::abs_path($file) };
4316
- # make the delimiters and case consistent
4317
- # (abs_path is very inconsistent about what it returns in Windows)
4318
- if (defined $path and Image::ExifTool::IsPC()) {
4319
- $path =~ tr/\\/\//;
4320
- $path = lc $path;
4322
+ if (defined $file) {
4323
+ return undef if $file eq '*'; # (CSV SourceFile may be '*' -- no absolute path for that)
4324
+ if ($^O eq 'MSWin32' and $mt->Options('WindowsLongPath')) {
4325
+ $path = $mt->WindowsLongPath($file);
4326
+ } elsif (eval { require Cwd }) {
4327
+ local $SIG{'__WARN__'} = sub { };
4328
+ $path = eval { Cwd::abs_path($file) };
4321
4329
  }
4330
+ $path =~ tr/\\/\// if $^O eq 'MSWin32' and defined $path; # use forward slashes
4322
4331
  }
4323
4332
  return $path;
4324
4333
  }
@@ -5903,7 +5912,7 @@ with this command:
5903
5912
 
5904
5913
  produces output like this:
5905
5914
 
5906
- -- Generated by ExifTool 13.03 --
5915
+ -- Generated by ExifTool 13.06 --
5907
5916
  File: a.jpg - 2003:10:31 15:44:19
5908
5917
  (f/5.6, 1/60s, ISO 100)
5909
5918
  File: b.jpg - 2006:05:23 11:57:38
@@ -5919,8 +5928,9 @@ name, a value of 1 is returned if any tag exists in the specified group, or
5919
5928
  0 otherwise (unless the C<All> group is also specified, in which case the
5920
5929
  values of all matching tags are joined).
5921
5930
 
5922
- When B<-ee> (B<-extractEmbedded>) is combined with B<-p>, embedded documents
5923
- are effectively processed as separate input files.
5931
+ The B<-p> output iterates through the family 3 group names, with each
5932
+ sub-document producing additional output. This feature is most useful when
5933
+ used in combination with the B<-ee> option to extract embedded documents.
5924
5934
 
5925
5935
  If a specified tag does not exist, a minor warning is issued and the line
5926
5936
  with the missing tag is not printed. However, the B<-f> option may be used
@@ -6017,7 +6027,8 @@ import). May be combined with B<-s> to print tag names instead of
6017
6027
  descriptions, or B<-S> to print tag values only, tab-delimited on a single
6018
6028
  line. The B<-t> option may be combined with B<-j>, B<-php> or B<-X> to add
6019
6029
  tag table information (C<table>, tag C<id>, and C<index> for cases where
6020
- multiple conditional tags exist with the same ID).
6030
+ multiple conditional tags exist with the same ID), which allows the
6031
+ corresponding tag to be located in the B<-listx> output.
6021
6032
 
6022
6033
  =item B<-T> (B<-table>)
6023
6034
 
@@ -6770,23 +6781,22 @@ the following two commands are equivalent:
6770
6781
  exiftool -geotag trk.log image.jpg
6771
6782
  exiftool -geotag trk.log "-Geotime<DateTimeOriginal#" image.jpg
6772
6783
 
6773
- When the C<Geotime> value is converted to UTC, the local system timezone is
6774
- assumed unless the date/time value contains a timezone. Writing C<Geotime>
6775
- causes the following tags to be written (provided they can be calculated
6776
- from the track log, and they are supported by the destination metadata
6777
- format): GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef,
6778
- GPSAltitude, GPSAltitudeRef, GPSDateStamp, GPSTimeStamp, GPSDateTime,
6779
- GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef, GPSImgDirection,
6780
- GPSImgDirectionRef, GPSPitch, GPSRoll, GPSCoordinates, AmbientTemperature
6781
- and CameraElevationAngle. By default, in image files tags are created in
6782
- EXIF, and updated in XMP only if they already exist. In QuickTime-format
6783
- files GPSCoordinates is created in the preferred location (ItemList by
6784
- default) as well as in XMP. However, C<EXIF:Geotime>, C<XMP:Geotime> or
6785
- C<QuickTime:Geotime> may be specified to write to write only to one group.
6786
- Also, C<ItemList:Geotime>, C<Keys:Geotime> or C<UserData:Geotime> may be
6787
- used to write to a specific location in QuickTime-format files. Note that
6788
- GPSPitch and GPSRoll are non-standard, and require user-defined tags in
6789
- order to be written.
6784
+ If the C<Geotime> value does not contain a time zone then the local system
6785
+ timezone is assumed. Writing C<Geotime> causes the following tags to be
6786
+ written (provided they can be calculated from the track log, and they are
6787
+ supported by the destination metadata format): GPSLatitude, GPSLatitudeRef,
6788
+ GPSLongitude, GPSLongitudeRef, GPSAltitude, GPSAltitudeRef, GPSDateStamp,
6789
+ GPSTimeStamp, GPSDateTime, GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef,
6790
+ GPSImgDirection, GPSImgDirectionRef, GPSMeasureMode, GPSDOP, GPSPitch,
6791
+ GPSRoll, GPSCoordinates, AmbientTemperature and CameraElevationAngle. By
6792
+ default, in image files tags are created in EXIF, and updated in XMP only if
6793
+ they already exist. In QuickTime-format files GPSCoordinates is created in
6794
+ the preferred location (ItemList by default) as well as in XMP. However,
6795
+ C<EXIF:Geotime>, C<XMP:Geotime> or C<QuickTime:Geotime> may be specified to
6796
+ write to write only to one group. Also, C<ItemList:Geotime>, C<Keys:Geotime>
6797
+ or C<UserData:Geotime> may be used to write to a specific location in
6798
+ QuickTime-format files. Note that GPSPitch and GPSRoll are non-standard,
6799
+ and require user-defined tags in order to be written.
6790
6800
 
6791
6801
  The C<Geosync> tag may be used to specify a time correction which is applied
6792
6802
  to each C<Geotime> value for synchronization with GPS time. For example,
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.84';
91
+ $VERSION = '4.85';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -631,6 +631,9 @@ $VERSION = '4.84';
631
631
  '61182.54' => 'Canon RF 24-105mm F2.8 L IS USM Z', #42
632
632
  '61182.55' => 'Canon RF-S 10-18mm F4.5-6.3 IS STM', #42
633
633
  '61182.56' => 'Canon RF 35mm F1.4 L VCM', #42
634
+ '61182.57' => 'Canon RF 70-200mm F2.8 L IS USM Z', #42
635
+ '61182.58' => 'Canon RF 50mm F1.4 L VCM', #42
636
+ '61182.59' => 'Canon RF 24mm F1.4 L VCM', #42
634
637
  65535 => 'n/a',
635
638
  );
636
639
 
@@ -7001,6 +7004,9 @@ my %ciMaxFocal = (
7001
7004
  316 => 'Canon RF 35mm F1.4 L VCM', #42
7002
7005
  317 => 'Canon RF-S 3.9mm F3.5 STM DUAL FISHEYE', #42
7003
7006
  318 => 'Canon RF 28-70mm F2.8 IS STM', #42
7007
+ 319 => 'Canon RF 70-200mm F2.8 L IS USM Z', #42
7008
+ 325 => 'Canon RF 50mm F1.4 L VCM', #42
7009
+ 326 => 'Canon RF 24mm F1.4 L VCM', #42
7004
7010
  # Note: add new RF lenses to %canonLensTypes with ID 61182
7005
7011
  },
7006
7012
  },
@@ -15,11 +15,11 @@ use Image::ExifTool qw(:DataAccess :Utils);
15
15
  use Image::ExifTool::Exif;
16
16
  use Image::ExifTool::XMP;
17
17
  use Image::ExifTool::GPS;
18
+ use Image::ExifTool::Protobuf;
18
19
 
19
- $VERSION = '1.09';
20
+ $VERSION = '1.10';
20
21
 
21
22
  sub ProcessDJIInfo($$$);
22
- sub Process_djmd($$$);
23
23
 
24
24
  my %convFloat2 = (
25
25
  PrintConv => 'sprintf("%+.2f", $val)',
@@ -187,34 +187,96 @@ my %convFloat2 = (
187
187
  },
188
188
  );
189
189
 
190
- # TODO - eventually add ability to decode this?
191
- %Image::ExifTool::DJI::djmd = (
192
- PROCESS_PROC => \&Process_djmd,
190
+ # metadata in protobuf format (djmd and dbgi meta types, ref PH)
191
+ %Image::ExifTool::DJI::Protobuf = (
192
+ GROUPS => { 0 => 'Protobuf', 1 => 'DJI', 2 => 'Location' },
193
+ TAG_PREFIX => '',
194
+ PROCESS_PROC => \&Image::ExifTool::Protobuf::ProcessProtobuf,
195
+ NOTES => q{
196
+ Tags found in protobuf-format DJI meta djmd and dbgi timed metadata. Only a
197
+ few tags are currently known, but unknown djmd tags may be extracted by
198
+ setting the Unknown option to 1 (or 2 to also extract unknown dbgi debug
199
+ tags). Tag ID's are composed of the corresponding .proto file name combined
200
+ with the hierarchical protobuf field numbers. The "dvtm_AVATA2.proto" file
201
+ is used by the DJI Avanta 2, and "dvtm_ac203.proto" by the OsmoAction4.
202
+ },
203
+ Protocol => { },
204
+ # dvtm_ac203_1-1-6 - some version number
205
+ 'dvtm_ac203_1-1-10' => 'Model',
206
+ 'dvtm_ac203_2-3-1' => { Name => 'FrameWidth', Format => 'unsigned' },
207
+ 'dvtm_ac203_2-3-2' => { Name => 'FrameHeight', Format => 'unsigned' },
208
+ 'dvtm_ac203_2-3-3' => { Name => 'FrameRate', Format => 'float' },
209
+ # dvtm_ac203_3-4-1-4 - model code?
210
+ 'dvtm_ac203_3-4-2-1-1' => {
211
+ Name => 'CoordinateUnits',
212
+ Format => 'unsigned',
213
+ # don't extract this -- just convert to degrees
214
+ RawConv => '$$self{CoordUnits} = $val; undef',
215
+ Hidden => 1,
216
+ # PrintConv => { 0 => 'Radians', 1 => 'Degrees' },
217
+ },
218
+ 'dvtm_ac203_3-4-2-1-2' => {
219
+ Name => 'GPSLatitude',
220
+ Format => 'double',
221
+ # set ExifTool GPSLatitude/GPSLongitude members so GPSDateTime will be generated if necessary
222
+ RawConv => '$$self{GPSLatitude} = $$self{CoordUnits} ? $val : $val * 180 / 3.141592653589793', # (NC)
223
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
224
+ },
225
+ 'dvtm_ac203_3-4-2-1-3' => {
226
+ Name => 'GPSLongitude',
227
+ Format => 'double',
228
+ RawConv => '$$self{GPSLongitude} = $$self{CoordUnits} ? $val : $val * 180 / 3.141592653589793', # (NC)
229
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
230
+ },
231
+ 'dvtm_ac203_3-4-2-2' => {
232
+ Name => 'GPSAltitude',
233
+ Format => 'unsigned',
234
+ ValueConv => '$val / 1000',
235
+ },
236
+ 'dvtm_ac203_3-4-2-6-1' => {
237
+ Name => 'GPSDateTime',
238
+ Format => 'string',
239
+ Groups => { 2 => 'Time' },
240
+ RawConv => '$$self{GPSDateTime} = $val',
241
+ ValueConv => '$val =~ tr/-/:/; $val',
242
+ PrintConv => '$self->ConvertDateTime($val)',
243
+ },
244
+ # dvtm_AVATA2_1-1-2 - some version number
245
+ # dvtm_AVATA2_1-1-3 - some version number
246
+ 'dvtm_AVATA2_1-1-10' => 'Model',
247
+ 'dvtm_AVATA2_2-2-3-1' => 'SerialNumber', # (NC)
248
+ 'dvtm_AVATA2_2-3-1' => { Name => 'FrameWidth', Format => 'unsigned' },
249
+ 'dvtm_AVATA2_2-3-2' => { Name => 'FrameHeight', Format => 'unsigned' },
250
+ 'dvtm_AVATA2_2-3-3' => { Name => 'FrameRate', Format => 'float' },
251
+ # dvtm_AVATA2_3-1-1 - frame number (starting at 1)
252
+ 'dvtm_AVATA2_3-1-2' => { # (also 3-2-1-6 and 3-4-1-6)
253
+ Name => 'TimeStamp',
254
+ Format => 'unsigned',
255
+ # milliseconds, but I don't know what the zero is
256
+ ValueConv => '$val / 1e6',
257
+ },
258
+ # dvtm_AVATA2_3-2-1-4 - model code?
259
+ # dvtm_AVATA2_3-4-1-4 - model code?
260
+ 'dvtm_AVATA2_3-4-4-1-1' => { # (NC) (default seems to be radians if missing)
261
+ Name => 'CoordinateDegrees',
262
+ Format => 'unsigned',
263
+ RawConv => '$$self{CoordDegrees} = $val; undef',
264
+ Hidden => 1,
265
+ },
266
+ 'dvtm_AVATA2_3-4-4-1-2' => {
267
+ Name => 'GPSLatitude',
268
+ Format => 'double',
269
+ RawConv => '$$self{GPSLatitude} = $$self{CoordDegrees} ? $val : $val * 180 / 3.141592653589793', # (NC)
270
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
271
+ },
272
+ 'dvtm_AVATA2_3-4-4-1-3' => {
273
+ Name => 'GPSLongitude',
274
+ Format => 'double',
275
+ RawConv => '$$self{GPSLongitude} = $$self{CoordDegrees} ? $val : $val * 180 / 3.141592653589793', # (NC)
276
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
277
+ },
193
278
  );
194
279
 
195
- #------------------------------------------------------------------------------
196
- # Process DJI djmd timed data from Action4 videos (ref PH)
197
- # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
198
- # Returns: 1 on success
199
- # TODO: work in progress
200
- sub Process_djmd($$$)
201
- {
202
- my ($et, $dirInfo, $tagTbl) = @_;
203
- my $dataPt = $$dirInfo{DataPt};
204
- my ($pos, $bit, $val) = (6, 0, 0);
205
- for (;;) {
206
- my $v = Get8u($dataPt, $pos);
207
- $val += ($v & 0x7f) << $bit;
208
- last unless $v & 0x80;
209
- ++$pos;
210
- $bit += 7;
211
- }
212
- $pos += 49;
213
- my @a = unpack("x${pos}fxfxfxfx3fxfxf", $$dataPt);
214
- print "$val @a\n";
215
- return 1;
216
- }
217
-
218
280
  #------------------------------------------------------------------------------
219
281
  # Process DJI info (ref PH)
220
282
  # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.54';
60
+ $VERSION = '4.55';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -6697,8 +6697,9 @@ sub ProcessExif($$$)
6697
6697
  "Format: $fstr\nSize: $size bytes\n";
6698
6698
  if ($size > 4) {
6699
6699
  my $offPt = Get32u($dataPt,$entry+8);
6700
- # (test this with ../pics/{CanonEOS-1D_XMarkIII.hif,PanasonicDC-G9.rw2})
6701
- my $actPt = $valuePtr + $valueDataPos + $base - ($$et{EXIF_POS} || 0) + ($$et{BASE_FUDGE} || 0);
6700
+ # (test this with ../pics/{CanonEOS-1D_XMarkIII.hif,PanasonicDC-G9.rw2,*.raf})
6701
+ my $actPt = $valuePtr + $valueDataPos + $base - ($$et{EXIF_POS} || 0) +
6702
+ ($$et{BASE_FUDGE} || $$et{BASE} || 0);
6702
6703
  $tip .= sprintf("Value offset: 0x%.4x\n", $offPt);
6703
6704
  # highlight tag name (red for bad size)
6704
6705
  my $style = ($bad or not defined $tval) ? 'V' : 'H';
@@ -6729,12 +6730,15 @@ sub ProcessExif($$$)
6729
6730
  } elsif ($tagInfo and Image::ExifTool::IsInt($tval)) {
6730
6731
  if ($$tagInfo{IsOffset} or $$tagInfo{SubIFD}) {
6731
6732
  $tval = sprintf('0x%.4x', $tval);
6732
- my $actPt = $val + $base - ($$et{EXIF_POS} || 0) + ($$et{BASE_FUDGE} || 0);
6733
+ my $actPt = $val + $base - ($$et{EXIF_POS} || 0) + ($$et{BASE_FUDGE} || $$et{BASE} || 0);
6733
6734
  if ($actPt != $val) {
6734
6735
  $tval .= sprintf("\nActual offset: 0x%.4x", $actPt);
6735
6736
  my $sign = $actPt < $val ? '-' : '';
6736
6737
  $tval .= sprintf("\nOffset base: ${sign}0x%.4x", abs($actPt - $val));
6737
6738
  }
6739
+ if ($$et{EXIF_POS} and not $$et{BASE_FUDGE}) {
6740
+ $tip .= sprintf("File offset: 0x%.4x\n", $actPt + $$et{EXIF_POS})
6741
+ }
6738
6742
  } elsif ($$tagInfo{PrintHex}) {
6739
6743
  $tval = sprintf('0x%x', $tval);
6740
6744
  }
@@ -12,7 +12,7 @@ use strict;
12
12
  use vars qw($VERSION);
13
13
  use Image::ExifTool::Exif;
14
14
 
15
- $VERSION = '1.56';
15
+ $VERSION = '1.57';
16
16
 
17
17
  my %coordConv = (
18
18
  ValueConv => 'Image::ExifTool::GPS::ToDegrees($val)',
@@ -20,6 +20,34 @@ my %coordConv = (
20
20
  PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)',
21
21
  );
22
22
 
23
+ my %printConvLatRef = (
24
+ # extract N/S if written from Composite:GPSLatitude
25
+ # (also allow writing from a signed number)
26
+ OTHER => sub {
27
+ my ($val, $inv) = @_;
28
+ return undef unless $inv;
29
+ return uc $2 if $val =~ /(^|[^A-Z])([NS])(orth|outh)?\b/i;
30
+ return $1 eq '-' ? 'S' : 'N' if $val =~ /([-+]?)\d+/;
31
+ return undef;
32
+ },
33
+ N => 'North',
34
+ S => 'South',
35
+ );
36
+
37
+ my %printConvLonRef = (
38
+ # extract E/W if written from Composite:GPSLongitude
39
+ # (also allow writing from a signed number)
40
+ OTHER => sub {
41
+ my ($val, $inv) = @_;
42
+ return undef unless $inv;
43
+ return uc $2 if $val =~ /(^|[^A-Z])([EW])(ast|est)?\b/i;
44
+ return $1 eq '-' ? 'W' : 'E' if $val =~ /([-+]?)\d+/;
45
+ return undef;
46
+ },
47
+ E => 'East',
48
+ W => 'West',
49
+ );
50
+
23
51
  %Image::ExifTool::GPS::Main = (
24
52
  GROUPS => { 0 => 'EXIF', 1 => 'GPS', 2 => 'Location' },
25
53
  WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
@@ -43,19 +71,7 @@ my %coordConv = (
43
71
  latitudes or negative for south, or a string containing N, North, S or South
44
72
  },
45
73
  Count => 2,
46
- PrintConv => {
47
- # extract N/S if written from Composite:GPSLatitude
48
- # (also allow writing from a signed number)
49
- OTHER => sub {
50
- my ($val, $inv) = @_;
51
- return undef unless $inv;
52
- return uc $2 if $val =~ /(^|[^A-Z])([NS])(orth|outh)?\b/i;
53
- return $1 eq '-' ? 'S' : 'N' if $val =~ /([-+]?)\d+/;
54
- return undef;
55
- },
56
- N => 'North',
57
- S => 'South',
58
- },
74
+ PrintConv => \%printConvLatRef,
59
75
  },
60
76
  0x0002 => {
61
77
  Name => 'GPSLatitude',
@@ -72,19 +88,7 @@ my %coordConv = (
72
88
  ExifTool will also accept a number when writing this tag, positive for east
73
89
  longitudes or negative for west, or a string containing E, East, W or West
74
90
  },
75
- PrintConv => {
76
- # extract E/W if written from Composite:GPSLongitude
77
- # (also allow writing from a signed number)
78
- OTHER => sub {
79
- my ($val, $inv) = @_;
80
- return undef unless $inv;
81
- return uc $2 if $val =~ /(^|[^A-Z])([EW])(ast|est)?\b/i;
82
- return $1 eq '-' ? 'W' : 'E' if $val =~ /([-+]?)\d+/;
83
- return undef;
84
- },
85
- E => 'East',
86
- W => 'West',
87
- },
91
+ PrintConv => \%printConvLonRef,
88
92
  },
89
93
  0x0004 => {
90
94
  Name => 'GPSLongitude',
@@ -238,7 +242,7 @@ my %coordConv = (
238
242
  Writable => 'string',
239
243
  Notes => 'tags 0x0013-0x001a used for subject location according to MWG 2.0',
240
244
  Count => 2,
241
- PrintConv => { N => 'North', S => 'South' },
245
+ PrintConv => \%printConvLatRef,
242
246
  },
243
247
  0x0014 => {
244
248
  Name => 'GPSDestLatitude',
@@ -251,7 +255,7 @@ my %coordConv = (
251
255
  Name => 'GPSDestLongitudeRef',
252
256
  Writable => 'string',
253
257
  Count => 2,
254
- PrintConv => { E => 'East', W => 'West' },
258
+ PrintConv => \%printConvLonRef,
255
259
  },
256
260
  0x0016 => {
257
261
  Name => 'GPSDestLongitude',
@@ -18,7 +18,8 @@
18
18
  # specifying $Image::ExifTool::Geolocation::altDir. This
19
19
  # database and has entries in the same order as Geolocation.dat,
20
20
  # and each entry is a newline-separated list of alternate names
21
- # terminated by a null byte.
21
+ # terminated by a null byte. These alternate names are used
22
+ # only when searching for a city by name (eg. "Big Apple").
22
23
  #
23
24
  # Databases are based on data from geonames.org with a
24
25
  # Creative Commons license, reformatted as follows in the