Skip to content

Commit

Permalink
update exiftool to v12.96
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Sep 22, 2024
1 parent 3197d0c commit 631b846
Show file tree
Hide file tree
Showing 22 changed files with 7,602 additions and 7,118 deletions.
48 changes: 45 additions & 3 deletions bin/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,52 @@ RSS feed: https://exiftool.org/rss.xml
Note: The most recent production release is Version 12.76. (Other versions are
considered development releases, and are not uploaded to MetaCPAN.)

Sept. 1, 2024 - Version 12.96

- More improvements to handling of trailers on video files (and add ability to
write videos which have an unknown trailer)
- Fixed problem geotagging from some newer Google Takeout files

Aug. 30, 2024 - Version 12.95

- Added a couple of new CanonModelID values
- Decode ColorData for a couple of new Canon models
- Fixed problem writing video files which have some known trailer types

Aug. 29, 2024 - Version 12.94

- Added ability to geotag from new-format Google Takeout JSON files
- Added a few new Android and Xiaomi QuickTime Keys tags
- Added ability to read C2PA JUMBF metadata from TTF/OTF files
- Internal changes to code for creating new directories
- Changed Windows packages to have the application help text file in the
exiftool_files folder instead of writing it to a temporary directory
- Removed new QuickTime Keys tags added in 12.93 because these aren't used in
top-level metadata (written to the video track by Apple devices)
- Fixed the group names for synthesized default-language QuickTime tags and
added a verbose message when generating these tags
- Fixed warning in Geolocation.t self test

Aug. 20, 2024 - Version 12.93

- Added a new Nikon LensID
- Added a couple of new OpenEXR Compression types
- Added a couple of new QuickTime Keys tags
- Decode timed metadata from E-ACE B44 dashcam videos
- Made "Unrecognized" Samsung Meta warnings minor
- Fixed bug in -listg6 option which resulted in "uninitialized value" warnings
- Fixed decoding of Func1Button and Func2Button for the Nikon Z6/Z7
- Fixed bug reading JUMB metadata from JXL images

July 24, 2024 - Version 12.92

- Removed -w from exiftool shebang due to compatibility issues on some systems

July 24, 2024 - Version 12.91

- Fixed 2 test files that were causing failed tests (ExifTool itself is
unchanged)
- Added a couple of new OpenEXR Compression values (github#276)
- Updated 2 test files that were causing failed tests (ExifTool itself is
unchanged)

July 24, 2024 - Version 12.90

Expand All @@ -21,7 +63,7 @@ July 24, 2024 - Version 12.90
- Drop Nikon ShotInfo record when copying MakerNotes from NEF to JPG if it is
larger than 50000 bytes (then MakerNotes would be too large for a single
JPEG segment)
- Changed exiftool shebang from "#!/usr/bin/perl" to "#!/usr/bin/env perl"
- Changed exiftool shebang to use env: "#!/usr/bin/env perl -w"
- Revert change of 12.84 to iterate through sub-documents with the -p option
only if -ee is used

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" : "12.91"
"version" : "12.96"
}
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: '12.91'
version: '12.96'
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-12.91.tar.gz | tar -xf -
cd Image-ExifTool-12.91
gzip -dc Image-ExifTool-12.96.tar.gz | tar -xf -
cd Image-ExifTool-12.96
./exiftool t/images/ExifTool.jpg

Note: These commands extract meta information from one of the test images.
Expand Down
59 changes: 15 additions & 44 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 = '12.91';
my $version = '12.96';

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exePath;
Expand Down Expand Up @@ -232,10 +232,6 @@ my $stayOpen = 0;
my $rtnValApp = 0; # app return value (0=success)
my $curTitle = ''; # current window title

# lookup for O/S names which may use a backslash as a directory separator
# (ref File::Spec of PathTools-3.2701)
my %hasBackslash = ( MSWin32 => 1, os2 => 1, dos => 1, NetWare => 1, symbian => 1, cygwin => 1 );

# lookup for O/S names which use CR/LF newlines
my $isCRLF = { MSWin32 => 1, os2 => 1, dos => 1 }->{$^O};

Expand Down Expand Up @@ -1615,7 +1611,7 @@ if ($argFormat) {
}

# change to forward slashes if necessary in all filenames (like CleanFilename)
if ($hasBackslash{$^O}) {
if (Image::ExifTool::IsPC()) {
tr/\\/\// foreach @files;
}

Expand Down Expand Up @@ -3774,7 +3770,7 @@ sub DoSetFromFile($$$)
# Returns: nothing, but changes filename if necessary
sub CleanFilename($)
{
$_[0] =~ tr/\\/\// if $hasBackslash{$^O};
$_[0] =~ tr/\\/\// if Image::ExifTool::IsPC();
}

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -4097,7 +4093,7 @@ sub AbsPath($)
$path = eval { Cwd::abs_path($file) };
# make the delimiters and case consistent
# (abs_path is very inconsistent about what it returns in Windows)
if (defined $path and $hasBackslash{$^O}) {
if (defined $path and Image::ExifTool::IsPC()) {
$path =~ tr/\\/\//;
$path = lc $path;
}
Expand Down Expand Up @@ -4353,46 +4349,21 @@ sub NextUnusedFilename($;$)
# Create directory for specified file
# Inputs: 0) complete file name including path
# Returns: true if a directory was created
my $k32CreateDir;
sub CreateDirectory($)
{
my $file = shift;
my ($dir, $created);
($dir = $file) =~ s/[^\/]*$//; # remove filename from path specification
if ($dir and not $mt->IsDirectory($dir)) {
my @parts = split /\//, $dir;
$dir = '';
foreach (@parts) {
$dir .= $_;
if (length $dir and not $mt->IsDirectory($dir) and
# don't try to create a network drive root directory
not ($hasBackslash{$^O} and $dir =~ m{^//[^/]*$}))
{
my $success;
# create directory since it doesn't exist
my $d2 = $dir; # (must make a copy in case EncodeFileName recodes it)
if ($mt->EncodeFileName($d2)) {
# handle Windows Unicode directory names
unless (eval { require Win32::API }) {
Error('Install Win32::API to create directories with Unicode names');
return 0;
}
unless ($k32CreateDir) {
$k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
}
$success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
} else {
$success = mkdir($d2, 0777);
}
$success or Error("Error creating directory $dir\n"), return 0;
$verbose and print $vout "Created directory $dir\n";
$created = 1;
}
$dir .= '/';
my $err = $mt->CreateDirectory($file);
if (defined $err) {
$err and Error("$err\n"), return 0;
if ($verbose) {
my $dir;
($dir = $file) =~ s(/[^/]*$)();
print $vout "Created directory $dir\n";
}
++$countNewDir if $created;
++$countNewDir;
return 1;
}
return $created;
return 0;
}

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -5684,7 +5655,7 @@ with this command:
produces output like this:
-- Generated by ExifTool 12.91 --
-- Generated by ExifTool 12.96 --
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 Down
70 changes: 66 additions & 4 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 = '12.91';
$VERSION = '12.96';
$RELEASE = '';
@ISA = qw(Exporter);
%EXPORT_TAGS = (
Expand Down Expand Up @@ -1873,9 +1873,10 @@ my %systemTagsNotes = (
this write-only tag is used to define the GPS track log data or track log
file name. Currently supported track log formats are GPX, NMEA RMC/GGA/GLL,
KML, IGC, Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR, Winplus
Beacon text, and Bramor gEO log files. May be set to the special value of
"DATETIMEONLY" (all caps) to set GPS date/time tags if no input track points
are available. See L<geotag.html|../geotag.html> for details
Beacon text, Bramor gEO, Google Takeout JSON, and CSV log files. May be set
to the special value of "DATETIMEONLY" (all caps) to set GPS date/time tags
if no input track points are available. See L<geotag.html|../geotag.html>
for details
},
DelCheck => q{
require Image::ExifTool::Geotag;
Expand Down Expand Up @@ -4734,6 +4735,56 @@ sub IsDirectory($$)
return 0;
}

#------------------------------------------------------------------------------
# Create directory for specified file
# Inputs: 0) ExifTool ref, 1) complete file name including path
# Returns: '' = directory created, undef = nothing done, otherwise error string
my $k32CreateDir;
sub CreateDirectory($$)
{
local $_;
my ($self, $file) = @_;
my ($err, $dir);
($dir = $file) =~ s/[^\/]*$//; # remove filename from path specification
if ($dir and not $self->IsDirectory($dir)) {
my @parts = split /\//, $dir;
$dir = '';
foreach (@parts) {
$dir .= $_;
if (length and not $self->IsDirectory($dir) and
# don't try to create a network drive root directory
not (IsPC() and $dir =~ m{^//[^/]*$}))
{
my $success;
# create directory since it doesn't exist
my $d2 = $dir; # (must make a copy in case EncodeFileName recodes it)
if ($self->EncodeFileName($d2)) {
# handle Windows Unicode directory names
unless (eval { require Win32::API }) {
$err = 'Install Win32::API to create directories with Unicode names';
last;
}
unless (defined $k32CreateDir) {
$k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
unless ($k32CreateDir) {
$k32CreateDir = 0;
# give this error once, then just "Error creating" for subsequent attempts
return 'Error accessing Win32::API::CreateDirectoryW';
}
}
$success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
} else {
$success = mkdir($d2, 0777);
}
$success or $err = "Error creating directory $dir", last;
$err = '';
}
$dir .= '/';
}
}
return $err;
}

#------------------------------------------------------------------------------
# Get file times (Unix seconds since the epoch)
# Inputs: 0) ExifTool ref, 1) file name or ref
Expand Down Expand Up @@ -5648,6 +5699,17 @@ sub SetupTagTable($)
}
}

#------------------------------------------------------------------------------
# Is this a PC system?
# Returns: true for PC systems
# uses lookup for O/S names which may use a backslash as a directory separator
# (ref File::Spec of PathTools-3.2701)
my %isPC = (MSWin32 => 1, os2 => 1, dos => 1, NetWare => 1, symbian => 1, cygwin => 1);
sub IsPC()
{
return $isPC{$^O};
}

#------------------------------------------------------------------------------
# Utilities to check for numerical types
# Inputs: 0) value; Returns: true if value is a numerical type
Expand Down
Loading

0 comments on commit 631b846

Please sign in to comment.