Skip to content

Commit

Permalink
Upgrading to exiftool v13.04
Browse files Browse the repository at this point in the history
  • Loading branch information
morozgrafix committed Nov 27, 2024
1 parent 375fc20 commit 6012c5d
Show file tree
Hide file tree
Showing 19 changed files with 318 additions and 108 deletions.
17 changes: 17 additions & 0 deletions bin/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ RSS feed: https://exiftool.org/rss.xml
Note: The most recent production release is Version 13.00. (Other versions are
considered development releases, and are not uploaded to MetaCPAN.)

Nov. 26, 2024 - Version 13.04

- Added the ability to write GPSDOP and GPSMeasureMode from the -geotag option
if hdop or pdop information exists in the input track file
- Added a few new Canon RFLensTypes (thanks Norbert Wasser)
- Decode timed GPS from GoPro Hero 13 videos
- Improved writing of GPSDestLatitudeRef and GPSDestLongitudeRef tags to allow
signed numbers to be written in the same way as GPSLatitudeRef and
GPSLongitudeRef
- Warn if using an Image::ExifTool library that doesn't match the application
version
- Renamed an Unknown Photoshop tag
- Convert GoPro GPSSpeed and GPSSpeed3D from m/s to km/h
- Patched to tolerate XML header in DOCX xml files
- Fixed -htmldump output to show the same names for unknown EXIF tags as with
the -u option

Nov. 12, 2024 - Version 13.03

- Added ability to include or exclude tags from CSV and JSON imports
Expand Down
2 changes: 1 addition & 1 deletion bin/META.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@
}
},
"release_status" : "stable",
"version" : "13.03"
"version" : "13.04"
}
2 changes: 1 addition & 1 deletion bin/META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ recommends:
Time::HiRes: '0'
requires:
perl: '5.004'
version: '13.03'
version: '13.04'
4 changes: 2 additions & 2 deletions bin/README
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ your home directory, then you would type the following commands in a
terminal window to extract and run ExifTool:

cd ~/Desktop
gzip -dc Image-ExifTool-13.03.tar.gz | tar -xf -
cd Image-ExifTool-13.03
gzip -dc Image-ExifTool-13.04.tar.gz | tar -xf -
cd Image-ExifTool-13.04
./exiftool t/images/ExifTool.jpg

Note: These commands extract meta information from one of the test images.
Expand Down
46 changes: 25 additions & 21 deletions bin/exiftool
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use strict;
use warnings;
require 5.004;

my $version = '13.03';
my $version = '13.04';

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exePath;
Expand Down Expand Up @@ -597,6 +597,10 @@ if (@Image::ExifTool::UserDefined::Arguments) {
unshift @ARGV, @Image::ExifTool::UserDefined::Arguments;
}

if ($version ne $Image::ExifTool::VERSION) {
Warn "Application version $version does not match Image::ExifTool library version $Image::ExifTool::VERSION\n";
}

# parse command-line options in 2 passes...
# pass 1: set all of our ExifTool options
# pass 2: print all of our help and informational output (-list, -ver, etc)
Expand Down Expand Up @@ -5903,7 +5907,7 @@ with this command:
produces output like this:
-- Generated by ExifTool 13.03 --
-- Generated by ExifTool 13.04 --
File: a.jpg - 2003:10:31 15:44:19
(f/5.6, 1/60s, ISO 100)
File: b.jpg - 2006:05:23 11:57:38
Expand All @@ -5919,8 +5923,9 @@ name, a value of 1 is returned if any tag exists in the specified group, or
0 otherwise (unless the C<All> group is also specified, in which case the
values of all matching tags are joined).
When B<-ee> (B<-extractEmbedded>) is combined with B<-p>, embedded documents
are effectively processed as separate input files.
The B<-p> output iterates through the family 3 group names, with each
sub-document producing additional output. This feature is most useful when
used in combination with the B<-ee> option to extract embedded documents.
If a specified tag does not exist, a minor warning is issued and the line
with the missing tag is not printed. However, the B<-f> option may be used
Expand Down Expand Up @@ -6770,23 +6775,22 @@ the following two commands are equivalent:
exiftool -geotag trk.log image.jpg
exiftool -geotag trk.log "-Geotime<DateTimeOriginal#" image.jpg
When the C<Geotime> value is converted to UTC, the local system timezone is
assumed unless the date/time value contains a timezone. Writing C<Geotime>
causes the following tags to be written (provided they can be calculated
from the track log, and they are supported by the destination metadata
format): GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef,
GPSAltitude, GPSAltitudeRef, GPSDateStamp, GPSTimeStamp, GPSDateTime,
GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef, GPSImgDirection,
GPSImgDirectionRef, GPSPitch, GPSRoll, GPSCoordinates, AmbientTemperature
and CameraElevationAngle. By default, in image files tags are created in
EXIF, and updated in XMP only if they already exist. In QuickTime-format
files GPSCoordinates is created in the preferred location (ItemList by
default) as well as in XMP. However, C<EXIF:Geotime>, C<XMP:Geotime> or
C<QuickTime:Geotime> may be specified to write to write only to one group.
Also, C<ItemList:Geotime>, C<Keys:Geotime> or C<UserData:Geotime> may be
used to write to a specific location in QuickTime-format files. Note that
GPSPitch and GPSRoll are non-standard, and require user-defined tags in
order to be written.
If the C<Geotime> value does not contain a time zone then the local system
timezone is assumed. Writing C<Geotime> causes the following tags to be
written (provided they can be calculated from the track log, and they are
supported by the destination metadata format): GPSLatitude, GPSLatitudeRef,
GPSLongitude, GPSLongitudeRef, GPSAltitude, GPSAltitudeRef, GPSDateStamp,
GPSTimeStamp, GPSDateTime, GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef,
GPSImgDirection, GPSImgDirectionRef, GPSPitch, GPSRoll, GPSCoordinates,
AmbientTemperature and CameraElevationAngle. By default, in image files
tags are created in EXIF, and updated in XMP only if they already exist. In
QuickTime-format files GPSCoordinates is created in the preferred location
(ItemList by default) as well as in XMP. However, C<EXIF:Geotime>,
C<XMP:Geotime> or C<QuickTime:Geotime> may be specified to write to write
only to one group. Also, C<ItemList:Geotime>, C<Keys:Geotime> or
C<UserData:Geotime> may be used to write to a specific location in
QuickTime-format files. Note that GPSPitch and GPSRoll are non-standard,
and require user-defined tags in order to be written.
The C<Geosync> tag may be used to specify a time correction which is applied
to each C<Geotime> value for synchronization with GPS time. For example,
Expand Down
14 changes: 8 additions & 6 deletions bin/lib/Image/ExifTool.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
%static_vars $advFmtSelf);

$VERSION = '13.03';
$VERSION = '13.04';
$RELEASE = '';
@ISA = qw(Exporter);
%EXPORT_TAGS = (
Expand Down Expand Up @@ -2583,7 +2583,7 @@ sub Options($$;@)
warn("Can't set $param to undef\n");
}
} elsif (lc $param eq 'geodir') {
$Image::ExifTool::Geolocation::geoDir = $newVal; # (undocumented)
$Image::ExifTool::Geolocation::geoDir = $newVal;
} else {
if ($param eq 'Escape') {
# set ESCAPE_PROC
Expand Down Expand Up @@ -4404,6 +4404,7 @@ sub DoneExtract($)
local $SIG{'__WARN__'} = \&SetWarning;
undef $evalWarning;
$$opts{GeolocMulti} = $$opts{Duplicates};
$self->VPrint(0, "Geolocation arguments: '${arg}'\n");
my ($cities, $dist) = Image::ExifTool::Geolocation::Geolocate($arg, $opts);
delete $$opts{GeolocMulti};
if ($cities and (@$cities < 2 or $dist or not $self->Warn('Multiple Geolocation cities are possible',2))) {
Expand Down Expand Up @@ -8915,6 +8916,7 @@ sub GetTagInfo($$$;$$$)
my ($valPt, $format, $count);

my @infoArray = GetTagInfoList($tagTablePtr, $tagID);
my $options = $$self{OPTIONS};
# evaluate condition
my $tagInfo;
foreach $tagInfo (@infoArray) {
Expand All @@ -8933,17 +8935,17 @@ sub GetTagInfo($$$;$$$)
}
}
# don't return Unknown tags unless that option is set (also see forum13716)
if ($$tagInfo{Unknown} and not $$self{OPTIONS}{Unknown} and not
($$self{OPTIONS}{Verbose} or $$self{HTML_DUMP} or
($$self{OPTIONS}{Validate} and not $$tagInfo{AddedUnknown})))
if ($$tagInfo{Unknown} and not $$options{Unknown} and not
($$options{Verbose} or $$self{HTML_DUMP} or
($$options{Validate} and not $$tagInfo{AddedUnknown})))
{
return undef;
}
# return the tag information we found
return $tagInfo;
}
# generate information for unknown tags (numerical only) if required
if (not $tagInfo and ($$self{OPTIONS}{Unknown} or $$self{OPTIONS}{Verbose}) and
if (not $tagInfo and ($$options{Unknown} or $$options{Verbose} or $$self{HTML_DUMP}) and
$tagID =~ /^\d+$/ and not $$self{NO_UNKNOWN})
{
my $printConv;
Expand Down
8 changes: 7 additions & 1 deletion bin/lib/Image/ExifTool/Canon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
sub ProcessExifInfo($$$);
sub SwapWords($);

$VERSION = '4.84';
$VERSION = '4.85';

# Note: Removed 'USM' from 'L' lenses since it is redundant - PH
# (or is it? Ref 32 shows 5 non-USM L-type lenses)
Expand Down Expand Up @@ -631,6 +631,9 @@ $VERSION = '4.84';
'61182.54' => 'Canon RF 24-105mm F2.8 L IS USM Z', #42
'61182.55' => 'Canon RF-S 10-18mm F4.5-6.3 IS STM', #42
'61182.56' => 'Canon RF 35mm F1.4 L VCM', #42
'61182.57' => 'Canon RF 70-200mm F2.8 L IS USM Z', #42
'61182.58' => 'Canon RF 50mm F1.4 L VCM', #42
'61182.59' => 'Canon RF 24mm F1.4 L VCM', #42
65535 => 'n/a',
);

Expand Down Expand Up @@ -7001,6 +7004,9 @@ my %ciMaxFocal = (
316 => 'Canon RF 35mm F1.4 L VCM', #42
317 => 'Canon RF-S 3.9mm F3.5 STM DUAL FISHEYE', #42
318 => 'Canon RF 28-70mm F2.8 IS STM', #42
319 => 'Canon RF 70-200mm F2.8 L IS USM Z', #42
325 => 'Canon RF 50mm F1.4 L VCM', #42
326 => 'Canon RF 24mm F1.4 L VCM', #42
# Note: add new RF lenses to %canonLensTypes with ID 61182
},
},
Expand Down
12 changes: 8 additions & 4 deletions bin/lib/Image/ExifTool/Exif.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::MakerNotes;

$VERSION = '4.54';
$VERSION = '4.55';

sub ProcessExif($$$);
sub WriteExif($$$);
Expand Down Expand Up @@ -6697,8 +6697,9 @@ sub ProcessExif($$$)
"Format: $fstr\nSize: $size bytes\n";
if ($size > 4) {
my $offPt = Get32u($dataPt,$entry+8);
# (test this with ../pics/{CanonEOS-1D_XMarkIII.hif,PanasonicDC-G9.rw2})
my $actPt = $valuePtr + $valueDataPos + $base - ($$et{EXIF_POS} || 0) + ($$et{BASE_FUDGE} || 0);
# (test this with ../pics/{CanonEOS-1D_XMarkIII.hif,PanasonicDC-G9.rw2,*.raf})
my $actPt = $valuePtr + $valueDataPos + $base - ($$et{EXIF_POS} || 0) +
($$et{BASE_FUDGE} || $$et{BASE} || 0);
$tip .= sprintf("Value offset: 0x%.4x\n", $offPt);
# highlight tag name (red for bad size)
my $style = ($bad or not defined $tval) ? 'V' : 'H';
Expand Down Expand Up @@ -6729,12 +6730,15 @@ sub ProcessExif($$$)
} elsif ($tagInfo and Image::ExifTool::IsInt($tval)) {
if ($$tagInfo{IsOffset} or $$tagInfo{SubIFD}) {
$tval = sprintf('0x%.4x', $tval);
my $actPt = $val + $base - ($$et{EXIF_POS} || 0) + ($$et{BASE_FUDGE} || 0);
my $actPt = $val + $base - ($$et{EXIF_POS} || 0) + ($$et{BASE_FUDGE} || $$et{BASE} || 0);
if ($actPt != $val) {
$tval .= sprintf("\nActual offset: 0x%.4x", $actPt);
my $sign = $actPt < $val ? '-' : '';
$tval .= sprintf("\nOffset base: ${sign}0x%.4x", abs($actPt - $val));
}
if ($$et{EXIF_POS} and not $$et{BASE_FUDGE}) {
$tip .= sprintf("File offset: 0x%.4x\n", $actPt + $$et{EXIF_POS})
}
} elsif ($$tagInfo{PrintHex}) {
$tval = sprintf('0x%x', $tval);
}
Expand Down
62 changes: 33 additions & 29 deletions bin/lib/Image/ExifTool/GPS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,42 @@ use strict;
use vars qw($VERSION);
use Image::ExifTool::Exif;

$VERSION = '1.56';
$VERSION = '1.57';

my %coordConv = (
ValueConv => 'Image::ExifTool::GPS::ToDegrees($val)',
ValueConvInv => 'Image::ExifTool::GPS::ToDMS($self, $val)',
PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)',
);

my %printConvLatRef = (
# extract N/S if written from Composite:GPSLatitude
# (also allow writing from a signed number)
OTHER => sub {
my ($val, $inv) = @_;
return undef unless $inv;
return uc $2 if $val =~ /(^|[^A-Z])([NS])(orth|outh)?\b/i;
return $1 eq '-' ? 'S' : 'N' if $val =~ /([-+]?)\d+/;
return undef;
},
N => 'North',
S => 'South',
);

my %printConvLonRef = (
# extract E/W if written from Composite:GPSLongitude
# (also allow writing from a signed number)
OTHER => sub {
my ($val, $inv) = @_;
return undef unless $inv;
return uc $2 if $val =~ /(^|[^A-Z])([EW])(ast|est)?\b/i;
return $1 eq '-' ? 'W' : 'E' if $val =~ /([-+]?)\d+/;
return undef;
},
E => 'East',
W => 'West',
);

%Image::ExifTool::GPS::Main = (
GROUPS => { 0 => 'EXIF', 1 => 'GPS', 2 => 'Location' },
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
Expand All @@ -43,19 +71,7 @@ my %coordConv = (
latitudes or negative for south, or a string containing N, North, S or South
},
Count => 2,
PrintConv => {
# extract N/S if written from Composite:GPSLatitude
# (also allow writing from a signed number)
OTHER => sub {
my ($val, $inv) = @_;
return undef unless $inv;
return uc $2 if $val =~ /(^|[^A-Z])([NS])(orth|outh)?\b/i;
return $1 eq '-' ? 'S' : 'N' if $val =~ /([-+]?)\d+/;
return undef;
},
N => 'North',
S => 'South',
},
PrintConv => \%printConvLatRef,
},
0x0002 => {
Name => 'GPSLatitude',
Expand All @@ -72,19 +88,7 @@ my %coordConv = (
ExifTool will also accept a number when writing this tag, positive for east
longitudes or negative for west, or a string containing E, East, W or West
},
PrintConv => {
# extract E/W if written from Composite:GPSLongitude
# (also allow writing from a signed number)
OTHER => sub {
my ($val, $inv) = @_;
return undef unless $inv;
return uc $2 if $val =~ /(^|[^A-Z])([EW])(ast|est)?\b/i;
return $1 eq '-' ? 'W' : 'E' if $val =~ /([-+]?)\d+/;
return undef;
},
E => 'East',
W => 'West',
},
PrintConv => \%printConvLonRef,
},
0x0004 => {
Name => 'GPSLongitude',
Expand Down Expand Up @@ -238,7 +242,7 @@ my %coordConv = (
Writable => 'string',
Notes => 'tags 0x0013-0x001a used for subject location according to MWG 2.0',
Count => 2,
PrintConv => { N => 'North', S => 'South' },
PrintConv => \%printConvLatRef,
},
0x0014 => {
Name => 'GPSDestLatitude',
Expand All @@ -251,7 +255,7 @@ my %coordConv = (
Name => 'GPSDestLongitudeRef',
Writable => 'string',
Count => 2,
PrintConv => { E => 'East', W => 'West' },
PrintConv => \%printConvLonRef,
},
0x0016 => {
Name => 'GPSDestLongitude',
Expand Down
Loading

0 comments on commit 6012c5d

Please sign in to comment.