Skip to content

Commit d9b74eb

Browse files
Merge pull request #113 from woss/v13.38
Update exiftool to version v13.38
2 parents d1b5f8b + e201efe commit d9b74eb

File tree

19 files changed

+4816
-4439
lines changed

19 files changed

+4816
-4439
lines changed

exiftool/exiftool

Lines changed: 65 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use strict;
1111
use warnings;
1212
require 5.004;
1313

14-
my $version = '13.37';
14+
my $version = '13.38';
1515

1616
$^W = 1; # enable global warnings
1717

@@ -5079,51 +5079,51 @@ supported by ExifTool (r = read, w = write, c = create):
50795079
50805080
File Types
50815081
------------+-------------+-------------+-------------+------------
5082-
360 r/w | DPX r | JNG r/w | ODP r | RSRC r
5083-
3FR r | DR4 r/w/c | JP2 r/w | ODS r | RTF r
5084-
3G2 r/w | DSS r | JPEG r/w | ODT r | RW2 r/w
5085-
3GP r/w | DV r | JSON r | OFR r | RWL r/w
5086-
7Z r | DVB r/w | JXL r/w | OGG r | RWZ r
5087-
A r | DVR-MS r | K25 r | OGV r | RM r
5088-
AA r | DYLIB r | KDC r | ONP r | SEQ r
5089-
AAC r | EIP r | KEY r | OPUS r | SKETCH r
5090-
AAE r | EPS r/w | LA r | ORF r/w | SO r
5091-
AAX r/w | EPUB r | LFP r | ORI r/w | SR2 r/w
5092-
ACR r | ERF r/w | LIF r | OTF r | SRF r
5093-
AFM r | EXE r | LNK r | PAC r | SRW r/w
5094-
AI r/w | EXIF r/w/c | LRV r/w | PAGES r | SVG r
5095-
AIFF r | EXR r | M2TS r | PBM r/w | SWF r
5096-
APE r | EXV r/w/c | M4A/V r/w | PCAP r | THM r/w
5097-
ARQ r/w | F4A/V r/w | MACOS r | PCAPNG r | TIFF r/w
5098-
ARW r/w | FFF r/w | MAX r | PCD r | TNEF r
5099-
ASF r | FITS r | MEF r/w | PCX r | TORRENT r
5100-
AVI r | FLA r | MIE r/w/c | PDB r | TTC r
5101-
AVIF r/w | FLAC r | MIFF r | PDF r/w | TTF r
5102-
AZW r | FLIF r/w | MKA r | PEF r/w | TXT r
5103-
BMP r | FLV r | MKS r | PFA r | VCF r
5104-
BPG r | FPF r | MKV r | PFB r | VNT r
5105-
BTF r | FPX r | MNG r/w | PFM r | VRD r/w/c
5106-
C2PA r | GIF r/w | MOBI r | PGF r | VSD r
5107-
CHM r | GLV r/w | MODD r | PGM r/w | WAV r
5108-
COS r | GPR r/w | MOI r | PLIST r | WDP r/w
5109-
CR2 r/w | GZ r | MOS r/w | PICT r | WEBP r/w
5110-
CR3 r/w | HDP r/w | MOV r/w | PMP r | WEBM r
5111-
CRM r/w | HDR r | MP3 r | PNG r/w | WMA r
5112-
CRW r/w | HEIC r/w | MP4 r/w | PPM r/w | WMV r
5113-
CS1 r/w | HEIF r/w | MPC r | PPT r | WPG r
5114-
CSV r | HTML r | MPG r | PPTX r | WTV r
5115-
CUR r | ICC r/w/c | MPO r/w | PS r/w | WV r
5116-
CZI r | ICO r | MQV r/w | PSB r/w | X3F r/w
5117-
DCM r | ICS r | MRC r | PSD r/w | XCF r
5118-
DCP r/w | IDML r | MRW r/w | PSP r | XISF r
5119-
DCR r | IIQ r/w | MXF r | QTIF r/w | XLS r
5120-
DFONT r | IND r/w | NEF r/w | R3D r | XLSX r
5121-
DIVX r | INSP r/w | NKA r | RA r | XMP r/w/c
5122-
DJVU r | INSV r | NKSC r/w | RAF r/w | ZIP r
5123-
DLL r | INX r | NRW r/w | RAM r |
5124-
DNG r/w | ISO r | NUMBERS r | RAR r |
5125-
DOC r | ITC r | NXD r | RAW r/w |
5126-
DOCX r | J2C r | O r | RIFF r |
5082+
360 r/w | DPX r | J2C r | O r | RIFF r
5083+
3FR r | DR4 r/w/c | JNG r/w | ODP r | RSRC r
5084+
3G2 r/w | DSF r | JP2 r/w | ODS r | RTF r
5085+
3GP r/w | DSS r | JPEG r/w | ODT r | RW2 r/w
5086+
7Z r | DV r | JSON r | OFR r | RWL r/w
5087+
A r | DVB r/w | JXL r/w | OGG r | RWZ r
5088+
AA r | DVR-MS r | K25 r | OGV r | RM r
5089+
AAC r | DYLIB r | KDC r | ONP r | SEQ r
5090+
AAE r | EIP r | KEY r | OPUS r | SKETCH r
5091+
AAX r/w | EPS r/w | LA r | ORF r/w | SO r
5092+
ACR r | EPUB r | LFP r | ORI r/w | SR2 r/w
5093+
AFM r | ERF r/w | LIF r | OTF r | SRF r
5094+
AI r/w | EXE r | LNK r | PAC r | SRW r/w
5095+
AIFF r | EXIF r/w/c | LRV r/w | PAGES r | SVG r
5096+
APE r | EXR r | M2TS r | PBM r/w | SWF r
5097+
ARQ r/w | EXV r/w/c | M4A/V r/w | PCAP r | THM r/w
5098+
ARW r/w | F4A/V r/w | MACOS r | PCAPNG r | TIFF r/w
5099+
ASF r | FFF r/w | MAX r | PCD r | TNEF r
5100+
AVI r | FITS r | MEF r/w | PCX r | TORRENT r
5101+
AVIF r/w | FLA r | MIE r/w/c | PDB r | TTC r
5102+
AZW r | FLAC r | MIFF r | PDF r/w | TTF r
5103+
BMP r | FLIF r/w | MKA r | PEF r/w | TXT r
5104+
BPG r | FLV r | MKS r | PFA r | VCF r
5105+
BTF r | FPF r | MKV r | PFB r | VNT r
5106+
C2PA r | FPX r | MNG r/w | PFM r | VRD r/w/c
5107+
CHM r | GIF r/w | MOBI r | PGF r | VSD r
5108+
COS r | GLV r/w | MODD r | PGM r/w | WAV r
5109+
CR2 r/w | GPR r/w | MOI r | PLIST r | WDP r/w
5110+
CR3 r/w | GZ r | MOS r/w | PICT r | WEBP r/w
5111+
CRM r/w | HDP r/w | MOV r/w | PMP r | WEBM r
5112+
CRW r/w | HDR r | MP3 r | PNG r/w | WMA r
5113+
CS1 r/w | HEIC r/w | MP4 r/w | PPM r/w | WMV r
5114+
CSV r | HEIF r/w | MPC r | PPT r | WPG r
5115+
CUR r | HTML r | MPG r | PPTX r | WTV r
5116+
CZI r | ICC r/w/c | MPO r/w | PS r/w | WV r
5117+
DCM r | ICO r | MQV r/w | PSB r/w | X3F r/w
5118+
DCP r/w | ICS r | MRC r | PSD r/w | XCF r
5119+
DCR r | IDML r | MRW r/w | PSP r | XISF r
5120+
DFONT r | IIQ r/w | MXF r | QTIF r/w | XLS r
5121+
DIVX r | IND r/w | NEF r/w | R3D r | XLSX r
5122+
DJVU r | INSP r/w | NKA r | RA r | XMP r/w/c
5123+
DLL r | INSV r | NKSC r/w | RAF r/w | ZIP r
5124+
DNG r/w | INX r | NRW r/w | RAM r |
5125+
DOC r | ISO r | NUMBERS r | RAR r |
5126+
DOCX r | ITC r | NXD r | RAW r/w |
51275127
51285128
Meta Information
51295129
----------------------+----------------------+---------------------
@@ -5722,10 +5722,12 @@ as the exported file. The first row of the I<CSVFILE> must be the ExifTool
57225722
tag names (with optional group names) for each column of the file, and
57235723
values must be separated by commas. A special "SourceFile" column specifies
57245724
the files associated with each row of information (and a SourceFile of "*"
5725-
may be used to define default tags to be imported for all files which are
5726-
combined with any tags specified for the specific SourceFile processed). The
5727-
B<-csvDelim> option may be used to change the input/output field delimiter
5728-
if something other than a comma is required.
5725+
may be used to define default tags to be imported for all files, which are
5726+
then combined with any tags specified for the specific SourceFile
5727+
processed). To be clear, the imported CSV file acts as a lookup table to
5728+
obtain the tags for import based on the files/directories and tags specified
5729+
on the command line. The B<-csvDelim> option may be used to change the
5730+
input/output field delimiter if something other than a comma is required.
57295731
57305732
The following examples demonstrate basic use of the B<-csv> option:
57315733
@@ -5924,18 +5926,18 @@ convert arrays into strings. For example:
59245926
59255927
exiftool -j -api structformat=jsonq -sep ", " ...
59265928
5927-
If I<JSONFILE> is specified, the file is imported and the tag definitions
5928-
from the file are used to set tag values on a per-file basis. The special
5929-
"SourceFile" entry in each JSON object associates the information with a
5930-
specific target file. An object with a missing SourceFile or a SourceFile
5931-
of "*" defines default tags for all target files which are combined with any
5932-
tags specified for the specific SourceFile processed. The imported JSON
5933-
file must have the same format as the exported JSON files with the exception
5934-
that options exporting JSON objects instead of simple values are not
5935-
compatible with the import file format (ie. export with B<-D>, B<-H>, B<-l>,
5936-
or B<-T> is not compatible, and use B<-G> instead of B<-g>). Additionally,
5937-
tag names in the input JSON file may be suffixed with a C<#> to disable
5938-
print conversion.
5929+
If I<JSONFILE> is specified, the JSON file is imported and the tag
5930+
definitions from the JSON are used to set tag values on a per-file basis for
5931+
each file specified on the command line. A special "SourceFile" entry in
5932+
each JSON object associates the information with a specific target file. An
5933+
object with a missing SourceFile or a SourceFile of "*" defines default tags
5934+
for all target files which are combined with any tags specified for the
5935+
specific SourceFile processed. The imported JSON file must have the same
5936+
format as the exported JSON files with the exception that options exporting
5937+
JSON objects instead of simple values are not compatible with the import
5938+
file format (ie. export with B<-D>, B<-H>, B<-l>, or B<-T> is not
5939+
compatible, and use B<-G> instead of B<-g>). Additionally, tag names in the
5940+
input JSON file may be suffixed with a C<#> to disable print conversion.
59395941
59405942
Specific tags may be imported from the JSON database by adding B<->I<TAG>
59415943
options to the command, or excluded with B<-->I<TAG>, with exclusions taking
@@ -6082,7 +6084,7 @@ with this command:
60826084
60836085
produces output like this:
60846086
6085-
-- Generated by ExifTool 13.37 --
6087+
-- Generated by ExifTool 13.38 --
60866088
File: a.jpg - 2003:10:31 15:44:19
60876089
(f/5.6, 1/60s, ISO 100)
60886090
File: b.jpg - 2006:05:23 11:57:38

exiftool/lib/Image/ExifTool.pm

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
2929
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
3030
%static_vars $advFmtSelf $configFile @configFiles $noConfig);
3131

32-
$VERSION = '13.37';
32+
$VERSION = '13.38';
3333
$RELEASE = '';
3434
@ISA = qw(Exporter);
3535
%EXPORT_TAGS = (
@@ -148,16 +148,16 @@ sub ReadValue($$$;$$$);
148148
PCX PGF PSP PhotoCD Radiance Other::PFM PDF PostScript Photoshop::Header
149149
Photoshop::Layers Photoshop::ImageData FujiFilm::RAFHeader FujiFilm::RAF
150150
FujiFilm::IFD FujiFilm::MRAW Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD
151-
Sony::PMP ITC ID3 ID3::Lyrics3 FLAC AAC Ogg Vorbis APE APE::NewHeader
152-
APE::OldHeader Audible MPC MPEG::Audio MPEG::Video MPEG::Xing M2TS QuickTime
153-
QuickTime::ImageFile QuickTime::Stream QuickTime::Tags360Fly Matroska
154-
Matroska::StdTag MOI MXF DV Flash Flash::FLV Real::Media Real::Audio
155-
Real::Metafile Red RIFF AIFF ASF TNEF WTV DICOM FITS XISF MIE JSON HTML
156-
XMP::SVG Palm Palm::MOBI Palm::EXTH Torrent EXE EXE::PEVersion EXE::PEString
157-
EXE::DebugRSDS EXE::DebugNB10 EXE::Misc EXE::MachO EXE::PEF EXE::ELF EXE::AR
158-
EXE::CHM LNK PCAP Font VCard Text VCard::VCalendar VCard::VNote RSRC Rawzor
159-
ZIP ZIP::GZIP ZIP::RAR ZIP::RAR5 RTF OOXML iWork ISO FLIR::AFF FLIR::FPF
160-
MacOS MacOS::MDItem FlashPix::DocTable
151+
Sony::PMP ITC ID3 ID3::Lyrics3 FLAC AAC Ogg Vorbis DSF WavPack APE
152+
APE::NewHeader APE::OldHeader Audible MPC MPEG::Audio MPEG::Video MPEG::Xing
153+
M2TS QuickTime QuickTime::ImageFile QuickTime::Stream QuickTime::Tags360Fly
154+
Matroska Matroska::StdTag MOI MXF DV Flash Flash::FLV Real::Media
155+
Real::Audio Real::Metafile Red RIFF AIFF ASF TNEF WTV DICOM FITS XISF MIE
156+
JSON HTML XMP::SVG Palm Palm::MOBI Palm::EXTH Torrent EXE EXE::PEVersion
157+
EXE::PEString EXE::DebugRSDS EXE::DebugNB10 EXE::Misc EXE::MachO EXE::PEF
158+
EXE::ELF EXE::AR EXE::CHM LNK PCAP Font VCard Text VCard::VCalendar
159+
VCard::VNote RSRC Rawzor ZIP ZIP::GZIP ZIP::RAR ZIP::RAR5 RTF OOXML iWork
160+
ISO FLIR::AFF FLIR::FPF MacOS MacOS::MDItem FlashPix::DocTable
161161
);
162162

163163
# alphabetical list of current Lang modules
@@ -194,13 +194,13 @@ $defaultLang = 'en'; # default language
194194
# 3) PLIST must be in this list for the binary PLIST format, although it may
195195
# cause a file to be checked twice for XML
196196
@fileTypes = qw(JPEG EXV CRW DR4 TIFF GIF MRW RAF X3F JP2 PNG MIE MIFF PS PDF
197-
PSD XMP BMP WPG BPG PPM RIFF AIFF ASF MOV MPEG Real SWF PSP FLV
198-
OGG FLAC APE MPC MKV MXF DV PMP IND PGF ICC ITC FLIR FLIF FPF
199-
LFP HTML VRD RTF FITS XISF XCF DSS QTIF FPX PICT ZIP GZIP PLIST
200-
RAR 7Z BZ2 CZI TAR EXE EXR HDR CHM LNK WMF AVC DEX DPX RAW Font
201-
JUMBF RSRC M2TS MacOS PHP PCX DCX DWF DWG DXF WTV Torrent VCard
202-
LRI R3D AA PDB PFM2 MRC LIF JXL MOI ISO ALIAS PCAP JSON MP3
203-
TNEF DICOM PCD NKA ICO TXT AAC);
197+
PSD XMP BMP WPG BPG PPM WV RIFF AIFF ASF MOV MPEG Real SWF PSP
198+
FLV OGG FLAC APE MPC MKV MXF DV PMP IND PGF ICC ITC FLIR FLIF
199+
FPF LFP HTML VRD RTF FITS XISF XCF DSF DSS QTIF FPX PICT ZIP
200+
GZIP PLIST RAR 7Z BZ2 CZI TAR EXE EXR HDR CHM LNK WMF AVC DEX
201+
DPX RAW Font JUMBF RSRC M2TS MacOS PHP PCX DCX DWF DWG DXF WTV
202+
Torrent VCard LRI R3D AA PDB PFM2 MRC LIF JXL MOI ISO ALIAS PCAP
203+
JSON MP3 TNEF DICOM PCD NKA ICO TXT AAC);
204204

205205
# file types that we can write (edit)
206206
my @writeTypes = qw(JPEG TIFF GIF CRW MRW ORF RAF RAW PNG MIE PSD XMP PPM EPS
@@ -304,6 +304,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
304304
DPX => ['DPX', 'Digital Picture Exchange' ],
305305
DR4 => ['DR4', 'Canon VRD version 4 Recipe'],
306306
DS2 => ['DSS', 'Digital Speech Standard 2'],
307+
DSF => ['DSF', 'DSF Stream File'],
307308
DSS => ['DSS', 'Digital Speech Standard'],
308309
DV => ['DV', 'Digital Video'],
309310
DVB => ['MOV', 'Digital Video Broadcasting'],
@@ -556,7 +557,8 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
556557
WMA => ['ASF', 'Windows Media Audio'],
557558
WMF => ['WMF', 'Windows Metafile Format'],
558559
WMV => ['ASF', 'Windows Media Video'],
559-
WV => ['RIFF', 'WavePack lossless audio'],
560+
WV => ['WV', 'WavPack Audio'],
561+
WVP => 'WV',
560562
X3F => ['X3F', 'Sigma RAW format'],
561563
XCF => ['XCF', 'GIMP native image format'],
562564
XHTML=> ['HTML', 'Extensible HyperText Markup Language'],
@@ -652,6 +654,7 @@ my %fileDescription = (
652654
DPX => 'image/x-dpx',
653655
DR4 => 'application/octet-stream', #PH (NC)
654656
DS2 => 'audio/x-ds2',
657+
DSF => 'audio/x-dsf',
655658
DSS => 'audio/x-dss',
656659
DV => 'video/x-dv',
657660
'DVR-MS' => 'video/x-ms-dvr',
@@ -818,6 +821,7 @@ my %fileDescription = (
818821
WMV => 'video/x-ms-wmv',
819822
WPG => 'image/x-wpg',
820823
WTV => 'video/x-ms-wtv',
824+
WV => 'audio/x-wavpack',
821825
X3F => 'image/x-sigma-x3f',
822826
XCF => 'image/x-xcf',
823827
XISF => 'image/x-xisf',
@@ -901,6 +905,7 @@ my %moduleName = (
901905
TXT => 'Text',
902906
VRD => 'CanonVRD',
903907
WMF => 0,
908+
WV => 'WavPack',
904909
X3F => 'SigmaRaw',
905910
XCF => 'GIMP',
906911
);
@@ -933,6 +938,7 @@ $testLen = 1024; # number of bytes to read when testing for magic number
933938
DOCX => 'PK\x03\x04',
934939
DPX => '(SDPX|XPDS)',
935940
DR4 => 'IIII[\x04|\x05]\0\x04\0',
941+
DSF => 'DSD \x1c\0{7}.{16}fmt ',
936942
DSS => '(\x02dss|\x03ds2)',
937943
DV => '\x1f\x07\0[\x3f\xbf]', # (not tested if extension recognized)
938944
DWF => '\(DWF V\d',
@@ -970,7 +976,7 @@ $testLen = 1024; # number of bytes to read when testing for magic number
970976
LIF => '\x70\0{3}.{4}\x2a.{4}<\0',
971977
LNK => '.{4}\x01\x14\x02\0{5}\xc0\0{6}\x46',
972978
LRI => 'LELR \0',
973-
M2TS => '(....)?\x47',
979+
M2TS => '.{0,191}?\x47(.{187}|.{191})\x47(.{187}|.{191})\x47',
974980
MacOS=> '\0\x05\x16\x07\0.\0\0Mac OS X ',
975981
MIE => '~[\x10\x18]\x04.0MIE',
976982
MIFF => 'id=ImageMagick',
@@ -5523,23 +5529,31 @@ sub AddCleanup($)
55235529
#------------------------------------------------------------------------------
55245530
# Add warning tag
55255531
# Inputs: 0) ExifTool object reference, 1) warning message
5526-
# 2) true if minor (2 if behaviour changes when warning is ignored,
5527-
# or 3 if warning shouldn't be issued when Validate option is used)
5532+
# 2) 0=normal warning, 1=minor, 2=minor with behavioural change when
5533+
# ignored, 3=warning shouldn't be issued with Validate option,
5534+
# bit 0x04 set causes warning count to not be incremented
55285535
# Returns: true if warning tag was added
55295536
sub Warn($$;$)
55305537
{
55315538
my ($self, $str, $ignorable) = @_;
55325539
my $noWarn = $$self{OPTIONS}{NoWarning};
5533-
if ($ignorable) {
5540+
my $noCount;
5541+
while ($ignorable) {
5542+
if ($ignorable & 0x04) {
5543+
$noCount = 1;
5544+
$ignorable &= 0x03 or last;
5545+
}
5546+
my $ignorable = $ignorable & 0x03;
55345547
return 0 if $$self{OPTIONS}{IgnoreMinorErrors};
55355548
return 0 if $ignorable eq '3' and $$self{OPTIONS}{Validate};
55365549
return 1 if defined $noWarn and eval { $str =~ /$noWarn/ };
55375550
$str = $ignorable eq '2' ? "[Minor] $str" : "[minor] $str";
5551+
last;
55385552
}
55395553
unless (defined $noWarn and eval { $str =~ /$noWarn/ }) {
55405554
# add each warning only once but count number of occurrences
55415555
if ($$self{WAS_WARNED}{$str}) {
5542-
++$$self{WAS_WARNED}{$str};
5556+
++$$self{WAS_WARNED}{$str} unless $noCount;
55435557
} else {
55445558
$self->FoundTag('Warning', $str);
55455559
$$self{WAS_WARNED}{$str} = 1;
@@ -9575,6 +9589,7 @@ sub DoEscape($$)
95759589
sub SetFileType($;$$$)
95769590
{
95779591
my ($self, $fileType, $mimeType, $normExt) = @_;
9592+
# use only the first FileType set if called again for the main document
95789593
unless ($$self{FileType} and not $$self{DOC_NUM}) {
95799594
my $baseType = $$self{FILE_TYPE};
95809595
my $ext = $$self{FILE_EXT};

0 commit comments

Comments
 (0)