Skip to content

Commit

Permalink
Upgrading to exiftool v12.97
Browse files Browse the repository at this point in the history
  • Loading branch information
morozgrafix committed Sep 25, 2024
1 parent c52f69c commit 68eeb2b
Show file tree
Hide file tree
Showing 18 changed files with 5,889 additions and 4,920 deletions.
13 changes: 13 additions & 0 deletions bin/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ 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. 25, 2024 - Version 12.97

- Added ability to ignore up to 4095 bytes of garbage at the end of an INDD
file with the -m option
- Added a new Canon RFLensType value (thanks Norbert Wasser)
- Added a new Nikon Z LensID
- Decode a number of new Nikon Z6_3 tags (thanks Warren Hatch)
- Decode a few more FujiFilm tags (thanks Greybeard)
- Enhanced %C format code to allow file-name collisions to be avoided by using
a colon instead of a decimal in the format modifier
- Fixed bug which could result in hang when using %C code in an output file
name

Sept. 1, 2024 - Version 12.96

- More improvements to handling of trailers on video files (and add ability to
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.96"
"version" : "12.97"
}
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.96'
version: '12.97'
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.96.tar.gz | tar -xf -
cd Image-ExifTool-12.96
gzip -dc Image-ExifTool-12.97.tar.gz | tar -xf -
cd Image-ExifTool-12.97
./exiftool t/images/ExifTool.jpg

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

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exePath;
Expand Down Expand Up @@ -4301,17 +4301,20 @@ sub Num2Alpha($)
sub NextUnusedFilename($;$)
{
my ($fmt, $okfile) = @_;
return $fmt unless $fmt =~ /%[-+]?\d*\.?\d*[lun]?[cC]/;
return $fmt unless $fmt =~ /%[-+]?\d*[.:]?\d*[lun]?[cC]/;
my %sep = ( '-' => '-', '+' => '_' );
my ($copy, $alpha) = (0, 'a');
my $lastFile;
for (;;) {
my ($filename, $pos) = ('', 0);
while ($fmt =~ /(%([-+]?)(\d*)(\.?)(\d*)([lun]?)([cC]))/g) {
while ($fmt =~ /(%([-+]?)(\d*)([.:]?)(\d*)([lun]?)([cC]))/g) {
$filename .= substr($fmt, $pos, pos($fmt) - $pos - length($1));
$pos = pos($fmt);
my ($sign, $wid, $dec, $wid2, $mod, $tok) = ($2, $3 || 0, $4, $5 || 0, $6, $7);
my $seq;
if ($tok eq 'C') {
# increment sequence number for %C on collision if ':' is used
$sign eq '-' ? ++$seqFileDir : ++$seqFileNum if $copy and $dec eq ':';
$seq = $wid + ($sign eq '-' ? $seqFileDir : $seqFileNum) - 1;
$wid = $wid2;
} else {
Expand Down Expand Up @@ -4340,6 +4343,8 @@ sub NextUnusedFilename($;$)
my ($fn, $ok) = (AbsPath($filename), AbsPath($okfile));
return $okfile if defined $fn and defined $ok and $fn eq $ok;
}
return $filename if defined $lastFile and $lastFile eq $filename;
$lastFile = $filename;
++$copy;
++$alpha;
}
Expand Down Expand Up @@ -4639,6 +4644,10 @@ sub PrintErrors($$$)
return $$info{Error};
}

#=====================================================================================
# NOTE: Be sure to update windows_exiftool.txt with any changes to this documentation!
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

__END__
=head1 NAME
Expand Down Expand Up @@ -5170,16 +5179,14 @@ B<-struct> option for details.
E<quot>'-I<DSTTAG>E<lt>I<SRCTAG>'E<quot>) is not the same as interpolating
its value inside a string (ie. E<quot>'-I<DSTTAG>E<lt>$I<SRCTAG>'E<quot>)
for source tags which are list-type tags,
L<shortcut tags|Image::ExifTool::Shortcuts>, tag names containing wildcards,
or UserParam variables. When copying directly, the values of each matching
source tag are copied individually to the destination tag (as if they were
separate assignments). However, when interpolated inside a string, list
items and the values of shortcut tags are concatenated (with a separator set
by the B<-sep> option), and wildcards are not allowed. Also, UserParam
variables are available only when interpolated in a string. Another
difference is that a minor warning is generated if a tag doesn't exist when
interpolating its value in a string (with C<$>), but isn't when copying the
tag directly.
L<shortcut tags|Image::ExifTool::Shortcuts>, or tag names containing
wildcards. When copying directly, the values of each matching source tag
are copied individually to the destination tag (as if they were separate
assignments). However, when interpolated inside a string, list items and
the values of shortcut tags are concatenated (with a separator set by the
B<-sep> option), and wildcards are not allowed.Another difference is that a
minor warning is generated if a tag doesn't exist when interpolating its
value in a string (with C<$>), but isn't when copying the tag directly.
Finally, the behaviour is different when a destination tag or group of
C<All> is used. When copying directly, a destination group and/or tag name
Expand Down Expand Up @@ -5655,7 +5662,7 @@ with this command:
produces output like this:
-- Generated by ExifTool 12.96 --
-- Generated by ExifTool 12.97 --
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 Expand Up @@ -5897,7 +5904,13 @@ A leading '-' causes the number to be reset at the start of each new
directory (in the original directory structure if the files are being
moved), and '+' has no effect. The number before the decimal place gives
the starting index, the number after the decimal place gives the field
width. The following examples show the output filenames when used with the
width. To preserve synchronization with the processed file number, by
default the copy number is not incremented to avoid file name collisions, so
any existing same-named file will cause an error. However using a colon
instead of a decimal point causes the number to be incremented to avoid
collisions with existing files.
The following examples show the output filenames when used with the
command C<exiftool rose.jpg star.jpg jet.jpg ...>:
-w %C%f.txt # 0rose.txt, 1star.txt, 2jet.txt
Expand Down
2 changes: 1 addition & 1 deletion 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.96';
$VERSION = '12.97';
$RELEASE = '';
@ISA = qw(Exporter);
%EXPORT_TAGS = (
Expand Down
1 change: 1 addition & 0 deletions bin/lib/Image/ExifTool/Canon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6999,6 +6999,7 @@ my %ciMaxFocal = (
314 => 'Canon RF 24-105mm F2.8 L IS USM Z', #42
315 => 'Canon RF-S 10-18mm F4.5-6.3 IS STM', #42
316 => 'Canon RF 35mm F1.4 L VCM', #42
318 => 'Canon RF 28-70mm F2.8 IS STM', #42
# Note: add new RF lenses to %canonLensTypes with ID 61182
},
},
Expand Down
24 changes: 23 additions & 1 deletion bin/lib/Image/ExifTool/FujiFilm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use vars qw($VERSION);
use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::Exif;

$VERSION = '1.95';
$VERSION = '1.96';

sub ProcessFujiDir($$$);
sub ProcessFaceRec($$$);
Expand Down Expand Up @@ -1252,6 +1252,28 @@ my %faceCategories = (
ValueConv => 'my @v=reverse split(" ",$val);"@v"', # reverse to show width first
PrintConv => '$val=~tr/ /:/; $val',
},
0x117 => {
Name => 'RawZoomActive',
Format => 'int32u',
Count => 1,
PrintConv => { 0 => 'No', 1 => 'Yes' },
},
0x118 => {
Name => 'RawZoomTopLeft',
Format => 'int16u',
Count => 2,
Notes => 'relative to RawCroppedImageSize',
ValueConv => 'my @v=reverse split(" ",$val);"@v"', # reverse to show width first
PrintConv => '$val=~tr/ /x/; $val',
},
0x119 => {
Name => 'RawZoomSize',
Format => 'int16u',
Count => 2,
Notes => 'relative to RawCroppedImageSize',
ValueConv => 'my @v=reverse split(" ",$val);"@v"', # reverse to show width first
PrintConv => '$val=~tr/ /x/; $val',
},
0x121 => [
{
Name => 'RawImageSize',
Expand Down
20 changes: 17 additions & 3 deletions bin/lib/Image/ExifTool/InDesign.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use strict;
use vars qw($VERSION);
use Image::ExifTool qw(:DataAccess :Utils);

$VERSION = '1.07';
$VERSION = '1.08';

# map for writing metadata to InDesign files (currently only write XMP)
my %indMap = (
Expand Down Expand Up @@ -101,8 +101,22 @@ sub ProcessIND($$)
for (;;) {
$raf->Read($hdr, 32) or last;
unless (length($hdr) == 32 and $hdr =~ /^\Q$objectHeaderGUID/) {
# this must be null padding or we have an error
$hdr =~ /^\0+$/ or $err = 'Corrupt file or unsupported InDesign version';
# this must be null padding or we have a possible error
last if $hdr =~ /^\0+$/;
# (could be up to 4095 bytes of non-null garbage plus 4095 null bytes from ExifTool)
$raf->Read($buff, 8196) and $hdr .= $buff;
$hdr =~ s/\0+$//; # remove trailing nulls
if (length($hdr) > 4095) {
$err = 'Corrupt file or unsupported InDesign version';
last;
}
my $non = 'Non-null padding at end of file';
if (not $outfile) {
$et->Warn($non, 1);
} elsif (not $et->Error($non, 1)) {
Write($outfile, $hdr) or $err = 1;
$writeLen += length $hdr;
}
last;
}
my $len = Get32u(\$hdr, 24);
Expand Down
2 changes: 1 addition & 1 deletion bin/lib/Image/ExifTool/Jpeg2000.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ sub ProcessJP2($$)

# check to be sure this is a valid JPG2000 file
return 0 unless $raf->Read($hdr,12) == 12;
unless ($hdr eq "\0\0\0\x0cjP \x0d\x0a\x87\x0a" or # (ref 1)
unless ($hdr eq "\0\0\0\x0cjP \x0d\x0a\x87\x0a" or # (ref 1)
$hdr eq "\0\0\0\x0cjP\x1a\x1a\x0d\x0a\x87\x0a" or # (ref 2)
$$et{IsJXL})
{
Expand Down
Loading

0 comments on commit 68eeb2b

Please sign in to comment.