exiftool-vendored.pl 12.69.0 → 12.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/Changes +43 -12
- package/bin/META.json +1 -1
- package/bin/META.yml +1 -1
- package/bin/README +2 -2
- package/bin/exiftool +13 -13
- package/bin/lib/Image/ExifTool/CBOR.pm +18 -2
- package/bin/lib/Image/ExifTool/Canon.pm +63 -16
- package/bin/lib/Image/ExifTool/DJI.pm +3 -2
- package/bin/lib/Image/ExifTool/EXE.pm +54 -6
- package/bin/lib/Image/ExifTool/Exif.pm +82 -3
- package/bin/lib/Image/ExifTool/FujiFilm.pm +142 -20
- package/bin/lib/Image/ExifTool/GIF.pm +5 -1
- package/bin/lib/Image/ExifTool/ID3.pm +70 -7
- package/bin/lib/Image/ExifTool/InDesign.pm +1 -1
- package/bin/lib/Image/ExifTool/JPEG.pm +1 -1
- package/bin/lib/Image/ExifTool/Jpeg2000.pm +30 -15
- package/bin/lib/Image/ExifTool/MakerNotes.pm +2 -2
- package/bin/lib/Image/ExifTool/Nikon.pm +45 -12
- package/bin/lib/Image/ExifTool/Olympus.pm +7 -1
- package/bin/lib/Image/ExifTool/PNG.pm +8 -13
- package/bin/lib/Image/ExifTool/Panasonic.pm +10 -1
- package/bin/lib/Image/ExifTool/QuickTime.pm +31 -4
- package/bin/lib/Image/ExifTool/README +7 -2
- package/bin/lib/Image/ExifTool/RIFF.pm +53 -9
- package/bin/lib/Image/ExifTool/Sony.pm +95 -34
- package/bin/lib/Image/ExifTool/TagLookup.pm +6927 -6856
- package/bin/lib/Image/ExifTool/TagNames.pod +435 -304
- package/bin/lib/Image/ExifTool/Text.pm +4 -5
- package/bin/lib/Image/ExifTool/Validate.pm +6 -5
- package/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -0
- package/bin/lib/Image/ExifTool/WriteRIFF.pl +9 -3
- package/bin/lib/Image/ExifTool/Writer.pl +21 -36
- package/bin/lib/Image/ExifTool.pm +59 -33
- package/bin/lib/Image/ExifTool.pod +9 -3
- package/bin/perl-Image-ExifTool.spec +1 -1
- package/bin/pp_build_exe.args +4 -4
- package/package.json +2 -2
|
@@ -25,11 +25,10 @@ $VERSION = '1.04';
|
|
|
25
25
|
Although basic text files contain no metadata, the following tags are
|
|
26
26
|
determined from a simple analysis of the data in TXT and CSV files.
|
|
27
27
|
Statistics are generated only for 8-bit encodings, but the L<FastScan|../ExifTool.html#FastScan> (-fast)
|
|
28
|
-
option may be used to limit processing to the first 64
|
|
29
|
-
tags are not produced. To avoid long processing delays, ExifTool will
|
|
30
|
-
a minor warning and process only the first 64
|
|
31
|
-
|
|
32
|
-
option is used.
|
|
28
|
+
option may be used to limit processing to the first 64 KiB in which case
|
|
29
|
+
some tags are not produced. To avoid long processing delays, ExifTool will
|
|
30
|
+
issue a minor warning and process only the first 64 KiB of any file larger
|
|
31
|
+
than 20 MiB unless the L<IgnoreMinorErrors|../ExifTool.html#IgnoreMinorErrors> (-m) option is used.
|
|
33
32
|
},
|
|
34
33
|
MIMEEncoding => { Groups => { 2 => 'Other' } },
|
|
35
34
|
Newlines => {
|
|
@@ -17,7 +17,7 @@ package Image::ExifTool::Validate;
|
|
|
17
17
|
use strict;
|
|
18
18
|
use vars qw($VERSION %exifSpec);
|
|
19
19
|
|
|
20
|
-
$VERSION = '1.
|
|
20
|
+
$VERSION = '1.23';
|
|
21
21
|
|
|
22
22
|
use Image::ExifTool qw(:Utils);
|
|
23
23
|
use Image::ExifTool::Exif;
|
|
@@ -86,7 +86,7 @@ my %verCheck = (
|
|
|
86
86
|
GPS => { GPSVersionID => \%gpsVer },
|
|
87
87
|
);
|
|
88
88
|
|
|
89
|
-
# tags standard in various RAW file formats
|
|
89
|
+
# tags standard in various RAW file formats or IFD's
|
|
90
90
|
my %otherSpec = (
|
|
91
91
|
CR2 => { 0xc5d8 => 1, 0xc5d9 => 1, 0xc5e0 => 1, 0xc640 => 1, 0xc6dc => 1, 0xc6dd => 1 },
|
|
92
92
|
NEF => { 0x9216 => 1, 0x9217 => 1 },
|
|
@@ -103,6 +103,7 @@ my %otherSpec = (
|
|
|
103
103
|
SRW => { 0xa010 => 1, 0xa011 => 1, 0xa101 => 1, 0xa102 => 1 },
|
|
104
104
|
NRW => { 0x9216 => 1, 0x9217 => 1 },
|
|
105
105
|
X3F => { 0xa500 => 1 },
|
|
106
|
+
CameraIFD => { All => 1 }, # (exists in JPG and DNG of Leica Q3 images)
|
|
106
107
|
);
|
|
107
108
|
|
|
108
109
|
# standard format for tags (not necessary for exifSpec or GPS tags where Writable is defined)
|
|
@@ -458,8 +459,8 @@ sub ValidateExif($$$$$$$$)
|
|
|
458
459
|
} elsif (not $otherSpec{$$et{FileType}} or
|
|
459
460
|
(not $otherSpec{$$et{FileType}}{$tag} and not $otherSpec{$$et{FileType}}{All}))
|
|
460
461
|
{
|
|
461
|
-
if ($tagTablePtr eq \%Image::ExifTool::Exif::Main or $$
|
|
462
|
-
$et->Warn(sprintf('Non-standard %s tag 0x%.4x %s', $ifd, $tag, $$ti{Name}), 1);
|
|
462
|
+
if ($tagTablePtr eq \%Image::ExifTool::Exif::Main or $$ti{Unknown}) {
|
|
463
|
+
$et->Warn(sprintf('Non-standard %s tag 0x%.4x %s', $ifd, $tag, $$ti{Name}), 1) unless $otherSpec{$ifd};
|
|
463
464
|
}
|
|
464
465
|
}
|
|
465
466
|
# change expected count from read Format to Writable size
|
|
@@ -480,7 +481,7 @@ sub ValidateExif($$$$$$$$)
|
|
|
480
481
|
} elsif (not $otherSpec{$$et{FileType}} or
|
|
481
482
|
(not $otherSpec{$$et{FileType}}{$tag} and not $otherSpec{$$et{FileType}}{All}))
|
|
482
483
|
{
|
|
483
|
-
$et->Warn(sprintf('Unknown %s tag 0x%.4x', $ifd, $tag), 1);
|
|
484
|
+
$et->Warn(sprintf('Unknown %s tag 0x%.4x', $ifd, $tag), 1) unless $otherSpec{$ifd};
|
|
484
485
|
}
|
|
485
486
|
}
|
|
486
487
|
|
|
@@ -19,6 +19,8 @@ my %webpMap = (
|
|
|
19
19
|
'XMP ' => 'RIFF', # (the RIFF chunk name is 'XMP ')
|
|
20
20
|
EXIF => 'RIFF',
|
|
21
21
|
ICCP => 'RIFF',
|
|
22
|
+
C2PA => 'RIFF',
|
|
23
|
+
JUMBF => 'C2PA',
|
|
22
24
|
XMP => 'XMP ',
|
|
23
25
|
IFD0 => 'EXIF',
|
|
24
26
|
IFD1 => 'IFD0',
|
|
@@ -168,10 +170,10 @@ sub WriteRIFF($$)
|
|
|
168
170
|
#
|
|
169
171
|
# add/edit/delete EXIF/XMP/ICCP (note: EXIF must come before XMP, and ICCP is written elsewhere)
|
|
170
172
|
#
|
|
171
|
-
my %dirName = ( EXIF => 'IFD0', 'XMP ' => 'XMP', ICCP => 'ICC_Profile' );
|
|
172
|
-
my %tblName = ( EXIF => 'Exif', 'XMP ' => 'XMP', ICCP => 'ICC_Profile' );
|
|
173
|
+
my %dirName = ( EXIF => 'IFD0', 'XMP ' => 'XMP', ICCP => 'ICC_Profile', C2PA => 'JUMBF' );
|
|
174
|
+
my %tblName = ( EXIF => 'Exif', 'XMP ' => 'XMP', ICCP => 'ICC_Profile', C2PA => 'Jpeg2000' );
|
|
173
175
|
my $dir;
|
|
174
|
-
foreach $dir ('EXIF', 'XMP ', 'ICCP' ) {
|
|
176
|
+
foreach $dir ('EXIF', 'XMP ', 'ICCP', 'C2PA' ) {
|
|
175
177
|
next unless $tag eq $dir or ($$addDirs{$dir} and
|
|
176
178
|
($tag eq '' or ($tag eq 'XMP ' and $dir eq 'EXIF')));
|
|
177
179
|
my $start;
|
|
@@ -207,6 +209,10 @@ sub WriteRIFF($$)
|
|
|
207
209
|
Parent => $dir,
|
|
208
210
|
DirName => $dirName{$dir},
|
|
209
211
|
);
|
|
212
|
+
# must pass the TagInfo to enable deletion of C2PA information
|
|
213
|
+
if (ref $Image::ExifTool::RIFF::Main{$dir} eq 'HASH') {
|
|
214
|
+
$dirInfo{TagInfo} = $Image::ExifTool::RIFF::Main{$dir};
|
|
215
|
+
}
|
|
210
216
|
my $tagTablePtr = GetTagTable("Image::ExifTool::$tblName{$dir}::Main");
|
|
211
217
|
# (override writeProc for EXIF because it has the TIFF header)
|
|
212
218
|
my $writeProc = $dir eq 'EXIF' ? \&Image::ExifTool::WriteTIFF : undef;
|
|
@@ -1271,6 +1271,7 @@ sub SetNewValuesFromFile($$;@)
|
|
|
1271
1271
|
# +------------------------------------------+
|
|
1272
1272
|
$srcExifTool->Options(
|
|
1273
1273
|
Binary => 1,
|
|
1274
|
+
ByteUnit => $$options{ByteUnit},
|
|
1274
1275
|
Charset => $$options{Charset},
|
|
1275
1276
|
CharsetEXIF => $$options{CharsetEXIF},
|
|
1276
1277
|
CharsetFileName => $$options{CharsetFileName},
|
|
@@ -4187,7 +4188,10 @@ sub WriteDirectory($$$;$)
|
|
|
4187
4188
|
my $delGroup = $$self{DEL_GROUP};
|
|
4188
4189
|
# delete entire directory if specified
|
|
4189
4190
|
my $grp1 = $dirName;
|
|
4190
|
-
$delFlag = ($$delGroup{$grp0} or $$delGroup{$grp1})
|
|
4191
|
+
$delFlag = ($$delGroup{$grp0} or $$delGroup{$grp1});
|
|
4192
|
+
if ($permanentDir{$grp0} and not ($$dirInfo{TagInfo} and $$dirInfo{TagInfo}{Deletable})) {
|
|
4193
|
+
undef $delFlag;
|
|
4194
|
+
}
|
|
4191
4195
|
# (never delete an entire QuickTime group)
|
|
4192
4196
|
if ($delFlag) {
|
|
4193
4197
|
if (($grp0 =~ /^(MakerNotes)$/ or $grp1 =~ /^(IFD0|ExifIFD|MakerNotes)$/) and
|
|
@@ -4289,7 +4293,21 @@ sub WriteDirectory($$$;$)
|
|
|
4289
4293
|
last unless $self->IsOverwriting($nvHash, $dataPt ? $$dataPt : '');
|
|
4290
4294
|
my $verb = 'Writing';
|
|
4291
4295
|
my $newVal = $self->GetNewValue($nvHash);
|
|
4292
|
-
|
|
4296
|
+
if (defined $newVal and length $newVal) {
|
|
4297
|
+
# hack to add back TIFF header when writing MakerNoteCanon to CMT3 in CR3 images
|
|
4298
|
+
if ($$tagInfo{Name} eq 'MakerNoteCanon') {
|
|
4299
|
+
require Image::ExifTool::Canon;
|
|
4300
|
+
if ($tagInfo eq $Image::ExifTool::Canon::uuid{CMT3}) {
|
|
4301
|
+
my $hdr;
|
|
4302
|
+
if (substr($newVal, 0, 1) eq "\0") {
|
|
4303
|
+
$hdr = "MM\0\x2a" . pack('N', 8);
|
|
4304
|
+
} else {
|
|
4305
|
+
$hdr = "II\x2a\0" . pack('V', 8);
|
|
4306
|
+
}
|
|
4307
|
+
$newVal = $hdr . $newVal;
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
} else {
|
|
4293
4311
|
return '' unless $dataPt or $$dirInfo{RAF}; # nothing to do if block never existed
|
|
4294
4312
|
# don't allow MakerNotes to be removed from RAW files
|
|
4295
4313
|
if ($blockName eq 'MakerNotes' and $self->IsRawType() and
|
|
@@ -7075,7 +7093,7 @@ sub WriteBinaryData($$$)
|
|
|
7075
7093
|
$newVal = length($data) if defined $data;
|
|
7076
7094
|
my $format = $$tagInfo{Format} || $$tagTablePtr{FORMAT} || 'int32u';
|
|
7077
7095
|
if ($format =~ /^int16/ and $newVal > 0xffff) {
|
|
7078
|
-
$self->Error("$$tagInfo{DataTag} is too large (64
|
|
7096
|
+
$self->Error("$$tagInfo{DataTag} is too large (64 KiB max. for this file)");
|
|
7079
7097
|
}
|
|
7080
7098
|
}
|
|
7081
7099
|
my $rtnVal = WriteValue($newVal, $format, $count, $dataPt, $entry);
|
|
@@ -7194,39 +7212,6 @@ sub WriteTIFF($$$)
|
|
|
7194
7212
|
{
|
|
7195
7213
|
my ($self, $dirInfo, $tagTablePtr) = @_;
|
|
7196
7214
|
$self or return 1; # allow dummy access
|
|
7197
|
-
# hack to allow MakeNoteCanon to be written as a block in CMT3 chunk of CR3 image
|
|
7198
|
-
if ($$dirInfo{DirName} and $$dirInfo{DirName} eq 'MakerNoteCanon') {
|
|
7199
|
-
require Image::ExifTool::Canon;
|
|
7200
|
-
my $tagInfo = $Image::ExifTool::Canon::uuid{CMT3};
|
|
7201
|
-
my $nvHash;
|
|
7202
|
-
if ($tagInfo and ($nvHash = $$self{NEW_VALUE}{$tagInfo}) and
|
|
7203
|
-
$self->IsOverwriting($nvHash) and not $$nvHash{CreateOnly})
|
|
7204
|
-
{
|
|
7205
|
-
my $newVal = $self->GetNewValue($nvHash);
|
|
7206
|
-
if (defined $newVal and length $newVal) {
|
|
7207
|
-
# fix up offsets
|
|
7208
|
-
if ($$nvHash{MAKER_NOTE_FIXUP}) {
|
|
7209
|
-
# must clone fixup because we will be shifting it
|
|
7210
|
-
my $makerFixup = $$nvHash{MAKER_NOTE_FIXUP}->Clone();
|
|
7211
|
-
$$makerFixup{Shift} += 8; # shift for TIFF header
|
|
7212
|
-
$makerFixup->ApplyFixup(\$newVal);
|
|
7213
|
-
}
|
|
7214
|
-
# add TIFF header
|
|
7215
|
-
my $hdr;
|
|
7216
|
-
if (substr($newVal, 0, 1) eq "\0") {
|
|
7217
|
-
$hdr = "MM\0\x2a" . pack('N', 8);
|
|
7218
|
-
} else {
|
|
7219
|
-
$hdr = "II\x2a\0" . pack('V', 8);
|
|
7220
|
-
}
|
|
7221
|
-
$self->VPrint(0, " Writing MakerNoteCanon as a block\n");
|
|
7222
|
-
++$$self{CHANGED};
|
|
7223
|
-
return $hdr . $newVal;
|
|
7224
|
-
} elsif ($$dirInfo{Parent} and $$dirInfo{Parent} eq 'UUID-Canon') {
|
|
7225
|
-
$self->Warn("Can't delete CanonMakerNotes from $$dirInfo{Parent}");
|
|
7226
|
-
return undef;
|
|
7227
|
-
}
|
|
7228
|
-
}
|
|
7229
|
-
}
|
|
7230
7215
|
my $buff = '';
|
|
7231
7216
|
$$dirInfo{OutFile} = \$buff;
|
|
7232
7217
|
return $buff if $self->ProcessTIFF($dirInfo, $tagTablePtr) > 0;
|
|
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
|
|
|
29
29
|
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
|
|
30
30
|
%static_vars);
|
|
31
31
|
|
|
32
|
-
$VERSION = '12.
|
|
32
|
+
$VERSION = '12.70';
|
|
33
33
|
$RELEASE = '';
|
|
34
34
|
@ISA = qw(Exporter);
|
|
35
35
|
%EXPORT_TAGS = (
|
|
@@ -132,7 +132,7 @@ sub Rename($$$);
|
|
|
132
132
|
sub Unlink($@);
|
|
133
133
|
sub SetFileTime($$;$$$$);
|
|
134
134
|
sub DoEscape($$);
|
|
135
|
-
sub ConvertFileSize(
|
|
135
|
+
sub ConvertFileSize($;$);
|
|
136
136
|
sub ParseArguments($;@); #(defined in attempt to avoid mod_perl problem)
|
|
137
137
|
sub ReadValue($$$;$$$);
|
|
138
138
|
|
|
@@ -145,16 +145,16 @@ sub ReadValue($$$;$$$);
|
|
|
145
145
|
WPG ICO PICT PNG MNG FLIF DjVu DPX OpenEXR ZISRAW MRC LIF MRC::FEI12 MIFF
|
|
146
146
|
PCX PGF PSP PhotoCD Radiance Other::PFM PDF PostScript Photoshop::Header
|
|
147
147
|
Photoshop::Layers Photoshop::ImageData FujiFilm::RAF FujiFilm::IFD
|
|
148
|
-
Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD Sony::PMP ITC ID3
|
|
149
|
-
FLAC Ogg Vorbis APE APE::NewHeader APE::OldHeader Audible MPC
|
|
150
|
-
MPEG::Video MPEG::Xing M2TS QuickTime QuickTime::ImageFile
|
|
151
|
-
QuickTime::Tags360Fly Matroska Matroska::StdTag MOI MXF DV
|
|
152
|
-
Real::Media Real::Audio Real::Metafile Red RIFF AIFF ASF
|
|
153
|
-
MIE JSON HTML XMP::SVG Palm Palm::MOBI Palm::EXTH
|
|
154
|
-
EXE
|
|
155
|
-
Text VCard::VCalendar VCard::VNote RSRC
|
|
156
|
-
ZIP::RAR5 RTF OOXML iWork ISO FLIR::AFF
|
|
157
|
-
FlashPix::DocTable
|
|
148
|
+
FujiFilm::MRAW Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD Sony::PMP ITC ID3
|
|
149
|
+
ID3::Lyrics3 FLAC Ogg Vorbis APE APE::NewHeader APE::OldHeader Audible MPC
|
|
150
|
+
MPEG::Audio MPEG::Video MPEG::Xing M2TS QuickTime QuickTime::ImageFile
|
|
151
|
+
QuickTime::Stream QuickTime::Tags360Fly Matroska Matroska::StdTag MOI MXF DV
|
|
152
|
+
Flash Flash::FLV Real::Media Real::Audio Real::Metafile Red RIFF AIFF ASF
|
|
153
|
+
WTV DICOM FITS XISF MIE JSON HTML XMP::SVG Palm Palm::MOBI Palm::EXTH
|
|
154
|
+
Torrent EXE EXE::PEVersion EXE::PEString EXE::MachO EXE::PEF EXE::ELF
|
|
155
|
+
EXE::AR EXE::CHM LNK Font VCard Text VCard::VCalendar VCard::VNote RSRC
|
|
156
|
+
Rawzor ZIP ZIP::GZIP ZIP::RAR ZIP::RAR5 RTF OOXML iWork ISO FLIR::AFF
|
|
157
|
+
FLIR::FPF MacOS MacOS::MDItem FlashPix::DocTable
|
|
158
158
|
);
|
|
159
159
|
|
|
160
160
|
# alphabetical list of current Lang modules
|
|
@@ -365,6 +365,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
|
|
|
365
365
|
JPC => 'J2C',
|
|
366
366
|
JPE => 'JPEG',
|
|
367
367
|
JPEG => ['JPEG', 'Joint Photographic Experts Group'],
|
|
368
|
+
JPH => ['JP2', 'High-throughput JPEG 2000'],
|
|
368
369
|
JPF => 'JP2',
|
|
369
370
|
JPG => 'JPEG',
|
|
370
371
|
JPM => ['JP2', 'JPEG 2000 compound image'],
|
|
@@ -677,6 +678,7 @@ my %fileDescription = (
|
|
|
677
678
|
JNG => 'image/jng',
|
|
678
679
|
JP2 => 'image/jp2',
|
|
679
680
|
JPEG => 'image/jpeg',
|
|
681
|
+
JPH => 'image/jph',
|
|
680
682
|
JPM => 'image/jpm',
|
|
681
683
|
JPS => 'image/x-jps',
|
|
682
684
|
JPX => 'image/jpx',
|
|
@@ -1066,6 +1068,7 @@ my %xmpShorthandOpt = ( 0 => 'None', 1 => 'Shorthand', 2 => ['Shorthand','OneDes
|
|
|
1066
1068
|
my @availableOptions = (
|
|
1067
1069
|
[ 'Binary', undef, 'flag to extract binary values even if tag not specified' ],
|
|
1068
1070
|
[ 'ByteOrder', undef, 'default byte order when creating EXIF information' ],
|
|
1071
|
+
[ 'ByteUnit', 'SI', 'units for byte conversions (SI or Binary)'],
|
|
1069
1072
|
[ 'Charset', 'UTF8', 'character set for converting Unicode characters' ],
|
|
1070
1073
|
[ 'CharsetEXIF', undef, 'internal EXIF "ASCII" string encoding' ],
|
|
1071
1074
|
[ 'CharsetFileName', undef, 'external encoding for file names' ],
|
|
@@ -1307,8 +1310,9 @@ my %systemTagsNotes = (
|
|
|
1307
1310
|
FileSize => {
|
|
1308
1311
|
Groups => { 1 => 'System', 2 => 'Other' },
|
|
1309
1312
|
Notes => q{
|
|
1310
|
-
note that the print conversion for this tag uses
|
|
1311
|
-
|
|
1313
|
+
note that the print conversion for this tag uses SI prefixes by default: 1
|
|
1314
|
+
kB = 1000 bytes, etc. Set the API ByteUnit option to "Binary" to use binary
|
|
1315
|
+
prefixes instead: 1 KiB = 1024 bytes, etc.
|
|
1312
1316
|
},
|
|
1313
1317
|
PrintConv => \&ConvertFileSize,
|
|
1314
1318
|
},
|
|
@@ -2413,17 +2417,28 @@ sub Options($$;@)
|
|
|
2413
2417
|
}
|
|
2414
2418
|
$$options{$param} = $newVal;
|
|
2415
2419
|
} elsif ($param eq 'ImageHashType') {
|
|
2416
|
-
if (defined $newVal
|
|
2420
|
+
if (not defined $newVal) {
|
|
2421
|
+
warn("Can't set $param to undef\n");
|
|
2422
|
+
} elsif ($newVal =~ /^(MD5|SHA256|SHA512)$/i) {
|
|
2417
2423
|
$$options{$param} = uc($newVal);
|
|
2418
2424
|
} else {
|
|
2419
|
-
warn("Invalid $param setting '${newVal}'\n")
|
|
2425
|
+
warn("Invalid $param setting '${newVal}'\n");
|
|
2420
2426
|
}
|
|
2421
2427
|
} elsif ($param eq 'StructFormat') {
|
|
2422
2428
|
if (defined $newVal) {
|
|
2423
|
-
$newVal =~ /^(JSON|JSONQ)$/i or warn("Invalid $param setting '${newVal}'\n"),
|
|
2429
|
+
$newVal =~ /^(JSON|JSONQ)$/i or warn("Invalid $param setting '${newVal}'\n"), next;
|
|
2424
2430
|
$newVal = uc($newVal);
|
|
2425
2431
|
}
|
|
2426
2432
|
$$options{$param} = $newVal;
|
|
2433
|
+
} elsif ($param eq 'ByteUnit') {
|
|
2434
|
+
if (defined $newVal) {
|
|
2435
|
+
# (allow "Metric" or "SI" for SI, and "IT" or "Binary" for Binary)
|
|
2436
|
+
my $goodVal = ($newVal =~ /^S|M/i ? 'SI' : ($newVal =~ /^I|B/i ? 'Binary' : undef));
|
|
2437
|
+
$goodVal or warn("Invalid $param setting '${newVal}'\n"), next;
|
|
2438
|
+
$$options{$param} = $goodVal;
|
|
2439
|
+
} else {
|
|
2440
|
+
warn("Can't set $param to undef\n");
|
|
2441
|
+
}
|
|
2427
2442
|
} else {
|
|
2428
2443
|
if ($param eq 'Escape') {
|
|
2429
2444
|
# set ESCAPE_PROC
|
|
@@ -2548,7 +2563,7 @@ sub ExtractInfo($;@)
|
|
|
2548
2563
|
$self->WarnOnce('Install Time::HiRes to generate ProcessingTime');
|
|
2549
2564
|
}
|
|
2550
2565
|
}
|
|
2551
|
-
|
|
2566
|
+
|
|
2552
2567
|
# create Hash object if ImageDataHash is requested
|
|
2553
2568
|
if ($$req{imagedatahash} and not $$self{ImageDataHash}) {
|
|
2554
2569
|
my $imageHashType = $self->Options('ImageHashType');
|
|
@@ -3456,9 +3471,10 @@ sub GetValue($$;$)
|
|
|
3456
3471
|
} elsif (wantarray) {
|
|
3457
3472
|
# return array if requested
|
|
3458
3473
|
return @$value;
|
|
3459
|
-
} elsif ($type eq 'PrintConv' and not $$self{OPTIONS}{List}
|
|
3460
|
-
# join PrintConv values in
|
|
3474
|
+
} elsif ($type eq 'PrintConv' and not $$self{OPTIONS}{List}) {
|
|
3475
|
+
# join PrintConv values in delimited string if List option not used
|
|
3461
3476
|
# and list contains simple scalars (otherwise return ARRAY ref)
|
|
3477
|
+
ref and return $value foreach @$value;
|
|
3462
3478
|
$value = join $$self{OPTIONS}{ListSep}, @$value;
|
|
3463
3479
|
}
|
|
3464
3480
|
}
|
|
@@ -6023,7 +6039,7 @@ sub ConvertDateTime($$)
|
|
|
6023
6039
|
++$a[5];
|
|
6024
6040
|
last; # (this was a goto)
|
|
6025
6041
|
}
|
|
6026
|
-
}
|
|
6042
|
+
}
|
|
6027
6043
|
}
|
|
6028
6044
|
$neg and $frac =~ s/^\.//;
|
|
6029
6045
|
$fmt =~ s/(^|[^%])((%%)*)%-?\.?\d*f/$1$2$frac/g;
|
|
@@ -6203,16 +6219,26 @@ sub GetUnixTime($;$)
|
|
|
6203
6219
|
# Print conversion for file size
|
|
6204
6220
|
# Inputs: 0) file size in bytes
|
|
6205
6221
|
# Returns: converted file size
|
|
6206
|
-
sub ConvertFileSize(
|
|
6207
|
-
{
|
|
6208
|
-
my $val =
|
|
6209
|
-
$
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6222
|
+
sub ConvertFileSize($;$)
|
|
6223
|
+
{
|
|
6224
|
+
my ($val, $et) = @_;
|
|
6225
|
+
if ($et and $$et{OPTIONS}{ByteUnit} eq 'Binary') {
|
|
6226
|
+
$val < 2048 and return "$val bytes";
|
|
6227
|
+
$val < 10240 and return sprintf('%.1f KiB', $val / 1024);
|
|
6228
|
+
$val < 2097152 and return sprintf('%.0f KiB', $val / 1024);
|
|
6229
|
+
$val < 10485760 and return sprintf('%.1f MiB', $val / 1048576);
|
|
6230
|
+
$val < 2147483648 and return sprintf('%.0f MiB', $val / 1048576);
|
|
6231
|
+
$val < 10737418240 and return sprintf('%.1f GiB', $val / 1073741824);
|
|
6232
|
+
return sprintf('%.0f GiB', $val / 1073741824);
|
|
6233
|
+
} else {
|
|
6234
|
+
$val < 2000 and return "$val bytes";
|
|
6235
|
+
$val < 10000 and return sprintf('%.1f kB', $val / 1000);
|
|
6236
|
+
$val < 2000000 and return sprintf('%.0f kB', $val / 1000);
|
|
6237
|
+
$val < 10000000 and return sprintf('%.1f MB', $val / 1000000);
|
|
6238
|
+
$val < 2000000000 and return sprintf('%.0f MB', $val / 1000000);
|
|
6239
|
+
$val < 10000000000 and return sprintf('%.1f GB', $val / 1000000000);
|
|
6240
|
+
return sprintf('%.0f GB', $val / 1000000000);
|
|
6241
|
+
}
|
|
6216
6242
|
}
|
|
6217
6243
|
|
|
6218
6244
|
#------------------------------------------------------------------------------
|
|
@@ -7749,8 +7775,8 @@ sub DoProcessTIFF($$;$)
|
|
|
7749
7775
|
my ($err, $sig, $canonSig, $otherSig);
|
|
7750
7776
|
|
|
7751
7777
|
# attempt to read TIFF header
|
|
7752
|
-
$$self{EXIF_DATA} = '';
|
|
7753
7778
|
if ($raf) {
|
|
7779
|
+
$$self{EXIF_DATA} = '';
|
|
7754
7780
|
if ($outfile) {
|
|
7755
7781
|
$raf->Seek(0, 0) or return 0;
|
|
7756
7782
|
if ($base) {
|
|
@@ -8372,7 +8398,7 @@ sub GetTagInfo($$$;$$$)
|
|
|
8372
8398
|
}
|
|
8373
8399
|
}
|
|
8374
8400
|
# don't return Unknown tags unless that option is set (also see forum13716)
|
|
8375
|
-
if ($$tagInfo{Unknown} and not $$self{OPTIONS}{Unknown} and not
|
|
8401
|
+
if ($$tagInfo{Unknown} and not $$self{OPTIONS}{Unknown} and not
|
|
8376
8402
|
($$self{OPTIONS}{Verbose} or $$self{HTML_DUMP} or
|
|
8377
8403
|
($$self{OPTIONS}{Validate} and not $$tagInfo{AddedUnknown})))
|
|
8378
8404
|
{
|
|
@@ -467,6 +467,12 @@ big-endian ('MM') order is assumed. This can also be set via the
|
|
|
467
467
|
L<ExifByteOrder tag|Image::ExifTool::TagNames/Extra Tags>, but the ByteOrder
|
|
468
468
|
option takes precedence if both are set.
|
|
469
469
|
|
|
470
|
+
=item ByteUnit
|
|
471
|
+
|
|
472
|
+
Units for print conversion of FileSize and other byte values. Either 'SI'
|
|
473
|
+
(eg. kB for 1000 bytes) or 'Binary' (eg. KiB for 1024 bytes). Default is
|
|
474
|
+
'SI'.
|
|
475
|
+
|
|
470
476
|
=item Charset
|
|
471
477
|
|
|
472
478
|
Character set for encoding character tag values passed to/from ExifTool with
|
|
@@ -554,12 +560,12 @@ without recoding. Default is 0.
|
|
|
554
560
|
Comma-delimited list of settings for writing compact XMP. Below is a list
|
|
555
561
|
of available settings. Note that 'NoPadding' effects only embedded XMP
|
|
556
562
|
since padding is never written for stand-alone XMP files. Also note that
|
|
557
|
-
'OneDesc' is not recommended when writing XMP larger than 64
|
|
563
|
+
'OneDesc' is not recommended when writing XMP larger than 64 KiB to a JPG
|
|
558
564
|
file because it interferes with ExifTool's technique of splitting off large
|
|
559
565
|
rdf:Description elements into the extended XMP. Case is not significant for
|
|
560
566
|
any of these options. Aliases are given in brackets. Default is undef.
|
|
561
567
|
|
|
562
|
-
NoPadding - Avoid 2
|
|
568
|
+
NoPadding - Avoid 2 KiB of recommended padding at end of XMP (NoPad)
|
|
563
569
|
NoIndent - No spaces to indent lines (NoSpace, NoSpaces)
|
|
564
570
|
NoNewline - Avoid unnecessary newlines (NoNewlines)
|
|
565
571
|
Shorthand - Use XMP Shorthand format
|
|
@@ -2440,7 +2446,7 @@ ICC_Profile#, ID3, ID3v1, ID3v1_Enh, ID3v2_2, ID3v2_3, ID3v2_4, IFD0, IFD1,
|
|
|
2440
2446
|
IPTC, IPTC#, ISO, ITC, InfiRay, Insta360, InteropIFD, ItemList, JFIF, JFXX,
|
|
2441
2447
|
JPEG, JPEG-HDR, JPS, JSON, JUMBF, JVC, Jpeg2000, KDC_IFD, Keys, Kodak,
|
|
2442
2448
|
KodakBordersIFD, KodakEffectsIFD, KodakIFD, KyoceraRaw, LNK, Leaf,
|
|
2443
|
-
LeafSubIFD, Leica, Lyrics3, Lytro, M2TS, MAC, MIE-Audio, MIE-Camera,
|
|
2449
|
+
LeafSubIFD, Leica, Lyrics3, Lytro, M-RAW, M2TS, MAC, MIE-Audio, MIE-Camera,
|
|
2444
2450
|
MIE-Canon, MIE-Doc, MIE-Extender, MIE-Flash, MIE-GPS, MIE-Geo, MIE-Image,
|
|
2445
2451
|
MIE-Lens, MIE-Main, MIE-MakerNotes, MIE-Meta, MIE-Orient, MIE-Preview,
|
|
2446
2452
|
MIE-Thumbnail, MIE-UTM, MIE-Unknown, MIE-Video, MIFF, MISB, MNG, MOBI, MOI,
|
package/bin/pp_build_exe.args
CHANGED
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
# 10) Copy zip archive to web servers.
|
|
22
22
|
# 11) Update zip file version in link and text of html/index.html.
|
|
23
23
|
#------------------------------------------------------------------------------
|
|
24
|
-
-T exiftool-12.
|
|
25
|
-
#--info=FileVersion=12.
|
|
26
|
-
#--info=ProductVersion=12.
|
|
27
|
-
##"--info=Build Date=2023:
|
|
24
|
+
-T exiftool-12.70
|
|
25
|
+
#--info=FileVersion=12.7.0.0
|
|
26
|
+
#--info=ProductVersion=12.7.0.0
|
|
27
|
+
##"--info=Build Date=2023:11:19 09:19:50-05:00"
|
|
28
28
|
##"--info=Bundled Perl Version=ActivePerl 5.24.0"
|
|
29
29
|
##"--info=LegalCopyright=Copyright (c) 2003-2023, Phil Harvey"
|
|
30
30
|
##"--info=ProductName=ExifTool"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exiftool-vendored.pl",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.70.0",
|
|
4
4
|
"description": "Vendored perl ExifTool for Node.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"homepage": "https://github.com/mceachen/exiftool-vendored.pl#readme",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"mocha": "^10.2.0",
|
|
46
|
-
"prettier": "^3.0
|
|
46
|
+
"prettier": "^3.1.0",
|
|
47
47
|
"rimraf": "^5.0.5"
|
|
48
48
|
}
|
|
49
49
|
}
|