Skip to content

Commit

Permalink
Upgrading to exiftool v12.98
Browse files Browse the repository at this point in the history
  • Loading branch information
morozgrafix committed Oct 9, 2024
1 parent 5d4c6d7 commit e9436ba
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 63 deletions.
10 changes: 9 additions & 1 deletion bin/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ 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.)

Oct. 8, 2024 - Version 12.98

- Added write support for PDF files with huge offsets
- Added a number of new Sony LensType values (thanks Jos Roost)
- Require -v4 or higher to output "JPG RST" lines
- Patched problem with -fast option when reading HEIC file via a pipe
- Patched to avoid hang when reading some corrupted XMP

Sept. 25, 2024 - Version 12.97

- Added ability to ignore up to 4095 bytes of garbage at the end of an INDD
Expand Down Expand Up @@ -143,7 +151,7 @@ June 7, 2024 - Version 12.86
- Patched some Olympus WB_RBLevels tags to allow 4 values to be written as per
some newer models
- Fixed issue when writing IPTC date tags with a date/time value containing
subseconds with 4 or more digits
subseconds with 4 or more digits

May 21, 2024 - Version 12.85

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

Note: These commands extract meta information from one of the test images.
Expand Down
17 changes: 9 additions & 8 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.97';
my $version = '12.98';

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exePath;
Expand Down Expand Up @@ -5662,7 +5662,7 @@ with this command:
produces output like this:
-- Generated by ExifTool 12.97 --
-- Generated by ExifTool 12.98 --
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 @@ -6204,9 +6204,10 @@ B<-fileNUM> option is used to read an alternate file and the corresponding
family 8 group name is specified for the tag. See the B<-fileNUM> option
details for more information.
5) The B<-a> option has no effect on the evaluation of the expression, and
the values of duplicate tags are accessible only by specifying a group name
(such as a family 4 instance number, eg. C<$Copy1:TAG>, C<$Copy2:TAG>, etc).
5) The B<-a> (Duplicates) option is implied when B<-if> is used without a
fast I<NUM>, and the values of duplicate tags are accessible by specifying a
group name in the expression (such as a family 4 instance number, eg.
C<$Copy1:TAG>, C<$Copy2:TAG>, etc).
6) A special "OK" UserParam is available to test the success of the previous
command when B<-execute> was used, and may be used like any other tag in the
Expand Down Expand Up @@ -6472,9 +6473,9 @@ B<-f> adds 'flags' and 'struct' attributes if applicable. The flags are
formatted as a comma-separated list of the following possible values:
Avoid, Binary, List, Mandatory, Permanent, Protected, Unknown and Unsafe
(see the L<Tag Name documentation|Image::ExifTool::TagNames>). For XMP List
tags, the list type (Alt, Bag or Seq) is added to the flags, and flattened
structure tags are indicated by a Flattened flag with 'struct' giving the ID
of the parent structure.
tags, the list type (Alt, Bag or Seq) is also given, and flattened structure
tags are indicated by a Flattened flag with 'struct' giving the ID of the
parent structure.
Note that none of the B<-list> options require an input I<FILE>.
Expand Down
7 changes: 5 additions & 2 deletions bin/lib/File/RandomAccess.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require 5.002;
require Exporter;

use vars qw($VERSION @ISA @EXPORT_OK);
$VERSION = '1.12';
$VERSION = '1.13';
@ISA = qw(Exporter);

sub Read($$$);
Expand Down Expand Up @@ -158,7 +158,10 @@ sub Seek($$;$)
$self->Slurp(); # read whole file into buffer
$newPos = $num + $self->{LEN}; # relative to end of file
}
if ($newPos >= 0) {
if ($newPos >= 0 and
# can't go backwards in unbuffered non-seekable file
(not $self->{NoBuffer} or $newPos >= $self->{POS}))
{
$self->{POS} = $newPos;
$rtnVal = 1;
}
Expand Down
19 changes: 11 additions & 8 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.97';
$VERSION = '12.98';
$RELEASE = '';
@ISA = qw(Exporter);
%EXPORT_TAGS = (
Expand Down Expand Up @@ -1466,12 +1466,12 @@ my %systemTagsNotes = (
PrintConv => sub {
my ($mask, $val) = (0400, oct(shift));
my %types = (
0010000 => 'p',
0020000 => 'c',
0040000 => 'd',
0060000 => 'b',
0120000 => 'l',
0140000 => 's',
0010000 => 'p', # FIFO
0020000 => 'c', # character special file
0040000 => 'd', # directory
0060000 => 'b', # block special file
0120000 => 'l', # sym link
0140000 => 's', # socket link
);
my $str = $types{$val & 0170000} || '-';
while ($mask) {
Expand Down Expand Up @@ -7290,7 +7290,10 @@ sub ProcessJPEG($$;$)
last; # all done parsing file
} elsif (defined $markerLenBytes{$marker}) {
# handle other stand-alone markers and segments we skipped over
$verbose and $marker and print $out "${indent}JPEG $markerName\n";
if ($verbose and $marker) {
next if $verbose < 4 and ($marker & 0xf8) == 0xd0;
print $out "${indent}JPEG $markerName\n";
}
next;
} elsif ($marker == 0xdb and length($$segDataPt) and # DQT
# save the DQT data only if JPEGDigest has been requested
Expand Down
7 changes: 4 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.08';
$VERSION = '1.09';

# map for writing metadata to InDesign files (currently only write XMP)
my %indMap = (
Expand Down Expand Up @@ -104,9 +104,10 @@ sub ProcessIND($$)
# 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;
$raf->Read($buff, 8192) and $hdr .= $buff;
my $n = length $hdr;
$hdr =~ s/\0+$//; # remove trailing nulls
if (length($hdr) > 4095) {
if ($n > 8190 or length($hdr) > 4095) {
$err = 'Corrupt file or unsupported InDesign version';
last;
}
Expand Down
3 changes: 2 additions & 1 deletion bin/lib/Image/ExifTool/Jpeg2000.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use strict;
use vars qw($VERSION);
use Image::ExifTool qw(:DataAccess :Utils);

$VERSION = '1.40';
$VERSION = '1.41';

sub ProcessJpeg2000Box($$$);
sub ProcessJUMD($$$);
Expand Down Expand Up @@ -574,6 +574,7 @@ my %j2cMarker = (
2 => {
Name => 'CompatibleBrands',
Format => 'undef[$size-8]',
List => 1, # (for documentation only)
# ignore any entry with a null, and return others as a list
ValueConv => 'my @a=($val=~/.{4}/sg); @a=grep(!/\0/,@a); \@a',
},
Expand Down
8 changes: 8 additions & 0 deletions bin/lib/Image/ExifTool/M2TS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ sub ParsePID($$$$$)
$more = 1; # read past unknown 0x15 packets if ExtractEmbedded > 2
}
}
# still have a lot of questions about how to decode this...
# (see https://exiftool.org/forum/index.php?topic=16486 and ../testpics/gps_video/forum16486.ts)
# } elsif ($type == 6) {
# my @a = unpack('x17x2NNx2nx2nx2nx2Cx2a4x2a5x2Nx2Nx2nx2Nx2Nx2Nx2nx2nx2Nx2nx2n', $$dataPt . " ");
# my $hi = shift @a;
# $a[0] = Image::ExifTool::ConvertUnixTime(($a[0] + $hi * 4294967296) * 1e-6, undef, 6);
# print "@a\n";
# $more = 1;
} elsif ($type < 0) {
if ($$dataPt =~ /^(.{164})?(.{24})A[NS][EW]/s) {
# (Blueskysea B4K, Novatek NT96670)
Expand Down
13 changes: 7 additions & 6 deletions bin/lib/Image/ExifTool/QuickTime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::Exif;
use Image::ExifTool::GPS;

$VERSION = '3.02';
$VERSION = '3.03';

sub ProcessMOV($$;$);
sub ProcessKeys($$$);
Expand Down Expand Up @@ -935,6 +935,7 @@ my %userDefined = (
2 => {
Name => 'CompatibleBrands',
Format => 'undef[$size-8]',
List => 1, # (for documentation only)
# ignore any entry with a null, and return others as a list
ValueConv => 'my @a=($val=~/.{4}/sg); @a=grep(!/\0/,@a); \@a',
},
Expand Down Expand Up @@ -2551,7 +2552,7 @@ my %userDefined = (
TTID => { Name => 'TomTomID', ValueConv => 'unpack("x4H*",$val)' },
TTVI => { Name => 'TomTomVI', Format => 'int32u', Unknown => 1 }, # seen: "0 1 61 508 508"
# TTVD seen: "normal 720p 60fps 60fps 16/9 wide 1x"
TTVD => { Name => 'TomTomVD', ValueConv => 'my @a = ($val =~ /[\x20-\x7f]+/g); "@a"' },
TTVD => { Name => 'TomTomVD', ValueConv => 'my @a = ($val =~ /[\x20-\x7f]+/g); "@a"', List => 1 },
);

# User-specific media data atoms (ref 11)
Expand Down Expand Up @@ -9151,7 +9152,7 @@ sub HandleItemInfo($)
$et->ProcessDirectory(\%dirInfo, $subTable, $proc);
delete $$et{DOC_NUM};
}
$raf->Seek($curPos, 0); # seek back to original position
$raf->Seek($curPos, 0) or $et->Warn('Seek error'), last; # seek back to original position
pop @{$$et{PATH}};
}
# process the item properties now that we should know their associations and document numbers
Expand Down Expand Up @@ -9577,7 +9578,7 @@ sub ProcessMOV($$;$)
if ($tag eq 'ftyp' and $size >= 12) {
# read ftyp atom to see what type of file this is
if ($raf->Read($buff, $size-8) == $size-8) {
$raf->Seek(-($size-8), 1);
$raf->Seek(-($size-8), 1) or $et->Warn('Seek error'), return 0;
my $type = substr($buff, 0, 4);
$$et{save_ftyp} = $type;
# see if we know the extension for this file type
Expand Down Expand Up @@ -9629,7 +9630,7 @@ sub ProcessMOV($$;$)
# a zero size isn't legal for contained atoms, but Canon uses it to
# terminate the CNTH atom (eg. CanonEOS100D.mov), so tolerate it here
my $pos = $raf->Tell() - 4;
$raf->Seek(0,2);
$raf->Seek(0,2) or $et->Warn('Seek error'), return 0;
my $str = $$dirInfo{DirName} . ' with ' . ($raf->Tell() - $pos) . ' bytes';
$et->VPrint(0,"$$et{INDENT}\[Terminator found in $str remaining]");
} else {
Expand All @@ -9638,7 +9639,7 @@ sub ProcessMOV($$;$)
if ($$tagTablePtr{"$tag-size"}) {
my $pos = $raf->Tell();
unless ($fast) {
$raf->Seek(0, 2);
$raf->Seek(0, 2) or $et->Warn('Seek error'), return 0;
$et->HandleTag($tagTablePtr, "$tag-size", $raf->Tell() - $pos);
}
$et->HandleTag($tagTablePtr, "$tag-offset", $pos) if $$tagTablePtr{"$tag-offset"};
Expand Down
7 changes: 6 additions & 1 deletion bin/lib/Image/ExifTool/Sony.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::Exif;
use Image::ExifTool::Minolta;

$VERSION = '3.69';
$VERSION = '3.70';

sub ProcessSRF($$$);
sub ProcessSR2($$$);
Expand Down Expand Up @@ -170,6 +170,7 @@ sub PrintInvLensSpec($;$$);
32885 => 'Sony FE 16-35mm F2.8 GM II', #JR
32886 => 'Sony FE 300mm F2.8 GM OSS', #JR
32887 => 'Sony E PZ 16-50mm F3.5-5.6 OSS II', #JR
32888 => 'Sony FE 85mm F1.4 GM II', #JR

# (comment this out so LensID will report the LensModel, which is more useful)
# 32952 => 'Metabones Canon EF Speed Booster Ultra', #JR (corresponds to 184, but 'Advanced' mode, LensMount reported as E-mount)
Expand Down Expand Up @@ -241,6 +242,8 @@ sub PrintInvLensSpec($;$$);
49474.9 => 'Viltrox 75mm F1.2 E', #JR
'49474.10' => 'Viltrox 20mm F2.8 FE', #JR
49475 => 'Tamron 50-300mm F4.5-6.3 Di III VC VXD', #JR (Model A069)
49476 => 'Tamron 28-300mm F4-7.1 Di III VC VXD', #JR (Model A074)
49477 => 'Tamron 90mm F2.8 Di III Macro VXD', #JR (Model F072)

49712 => 'Tokina FiRIN 20mm F2 FE AF', # (firmware Ver.01)
49713 => 'Tokina FiRIN 100mm F2.8 FE MACRO', # (firmware Ver.01)
Expand Down Expand Up @@ -299,6 +302,7 @@ sub PrintInvLensSpec($;$$);
50547 => 'Sigma 10-18mm F2.8 DC DN | C', #JR (023)
50548 => 'Sigma 15mm F1.4 DG DN DIAGONAL FISHEYE | A', #JR (024)
50549 => 'Sigma 50mm F1.2 DG DN | A', #JR (024)
50550 => 'Sigma 28-105mm F2.8 DG DN | A', #JR (024)
50551 => 'Sigma 28-45mm F1.8 DG DN | A', #JR (024)

50992 => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR
Expand All @@ -315,6 +319,7 @@ sub PrintInvLensSpec($;$$);
51003 => 'Voigtlander NOKTON 35mm F1.2 Aspherical SE', #JR
51006 => 'Voigtlander APO-LANTHAR 35mm F2 Aspherical', #JR
51007 => 'Voigtlander NOKTON 50mm F1 Aspherical', #JR
51008 => 'Voigtlander NOKTON 75mm F1.5 Aspherical', #JR

# lenses listed in the Sigma MC-11 list, but not yet seen:
# 504xx => 'Sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | C + MC-11', # (014)
Expand Down
6 changes: 3 additions & 3 deletions bin/lib/Image/ExifTool/TagNames.pod
Original file line number Diff line number Diff line change
Expand Up @@ -26108,7 +26108,7 @@ the image undisplayable.
------ -------- --------
0 MajorBrand no
1 MinorVersion no
2 CompatibleBrands no
2 CompatibleBrands no+

=head3 Jpeg2000 ImageHeader Tags

Expand Down Expand Up @@ -30230,7 +30230,7 @@ Tags found in Pittasoft Blackvue dashcam "free" data.
------ -------- --------
0 MajorBrand no
1 MinorVersion no
2 CompatibleBrands no
2 CompatibleBrands no+

=head3 QuickTime OtherMeta Tags

Expand Down Expand Up @@ -31280,7 +31280,7 @@ Tags found in TomTom Bandit Action Cam MP4 videos.
'TTAD' TomTomAD QuickTime Stream
'TTHL' TomTomHL? no
'TTID' TomTomID no
'TTVD' TomTomVD no
'TTVD' TomTomVD no+
'TTVI' TomTomVI? no

=head3 QuickTime HintTrackInfo Tags
Expand Down
Loading

0 comments on commit e9436ba

Please sign in to comment.