exiftool-vendored.pl 12.72.0 → 12.76.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 +64 -1
- package/bin/META.json +1 -1
- package/bin/META.yml +1 -1
- package/bin/README +47 -46
- package/bin/exiftool +123 -96
- package/bin/lib/File/RandomAccess.pm +32 -6
- package/bin/lib/File/RandomAccess.pod +6 -6
- package/bin/lib/Image/ExifTool/7Z.pm +3 -3
- package/bin/lib/Image/ExifTool/AAC.pm +8 -6
- package/bin/lib/Image/ExifTool/AES.pm +1 -1
- package/bin/lib/Image/ExifTool/AFCP.pm +3 -3
- package/bin/lib/Image/ExifTool/AIFF.pm +1 -1
- package/bin/lib/Image/ExifTool/APE.pm +1 -1
- package/bin/lib/Image/ExifTool/APP12.pm +1 -1
- package/bin/lib/Image/ExifTool/ASF.pm +1 -1
- package/bin/lib/Image/ExifTool/Apple.pm +1 -1
- package/bin/lib/Image/ExifTool/Audible.pm +1 -1
- package/bin/lib/Image/ExifTool/BMP.pm +1 -1
- package/bin/lib/Image/ExifTool/BPG.pm +1 -1
- package/bin/lib/Image/ExifTool/BZZ.pm +3 -3
- package/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
- package/bin/lib/Image/ExifTool/BuildTagLookup.pm +9 -9
- package/bin/lib/Image/ExifTool/CBOR.pm +1 -1
- package/bin/lib/Image/ExifTool/Canon.pm +7 -6
- package/bin/lib/Image/ExifTool/CanonCustom.pm +1 -1
- package/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
- package/bin/lib/Image/ExifTool/CanonVRD.pm +3 -3
- package/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
- package/bin/lib/Image/ExifTool/Casio.pm +1 -1
- package/bin/lib/Image/ExifTool/Charset.pm +1 -1
- package/bin/lib/Image/ExifTool/DICOM.pm +3 -3
- package/bin/lib/Image/ExifTool/DJI.pm +1 -1
- package/bin/lib/Image/ExifTool/DNG.pm +5 -5
- package/bin/lib/Image/ExifTool/DPX.pm +1 -1
- package/bin/lib/Image/ExifTool/DV.pm +1 -1
- package/bin/lib/Image/ExifTool/DarwinCore.pm +1 -1
- package/bin/lib/Image/ExifTool/DjVu.pm +1 -1
- package/bin/lib/Image/ExifTool/EXE.pm +1 -1
- package/bin/lib/Image/ExifTool/Exif.pm +4 -3
- package/bin/lib/Image/ExifTool/FITS.pm +1 -1
- package/bin/lib/Image/ExifTool/FLAC.pm +1 -1
- package/bin/lib/Image/ExifTool/FLIF.pm +1 -1
- package/bin/lib/Image/ExifTool/FLIR.pm +3 -3
- package/bin/lib/Image/ExifTool/Fixup.pm +4 -4
- package/bin/lib/Image/ExifTool/Flash.pm +1 -1
- package/bin/lib/Image/ExifTool/FlashPix.pm +61 -8
- package/bin/lib/Image/ExifTool/Font.pm +1 -1
- package/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
- package/bin/lib/Image/ExifTool/FujiFilm.pm +9 -4
- package/bin/lib/Image/ExifTool/GE.pm +1 -1
- package/bin/lib/Image/ExifTool/GIF.pm +1 -1
- package/bin/lib/Image/ExifTool/GIMP.pm +1 -1
- package/bin/lib/Image/ExifTool/GPS.pm +1 -1
- package/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
- package/bin/lib/Image/ExifTool/Geotag.pm +4 -4
- package/bin/lib/Image/ExifTool/GoPro.pm +1 -1
- package/bin/lib/Image/ExifTool/H264.pm +1 -1
- package/bin/lib/Image/ExifTool/HP.pm +1 -1
- package/bin/lib/Image/ExifTool/HTML.pm +1 -1
- package/bin/lib/Image/ExifTool/HtmlDump.pm +7 -5
- package/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
- package/bin/lib/Image/ExifTool/ICO.pm +1 -1
- package/bin/lib/Image/ExifTool/ID3.pm +3 -3
- package/bin/lib/Image/ExifTool/IPTC.pm +1 -1
- package/bin/lib/Image/ExifTool/ISO.pm +1 -1
- package/bin/lib/Image/ExifTool/ITC.pm +1 -1
- package/bin/lib/Image/ExifTool/Import.pm +6 -6
- package/bin/lib/Image/ExifTool/InDesign.pm +1 -1
- package/bin/lib/Image/ExifTool/InfiRay.pm +1 -1
- package/bin/lib/Image/ExifTool/JPEG.pm +5 -2
- package/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
- package/bin/lib/Image/ExifTool/JSON.pm +3 -3
- package/bin/lib/Image/ExifTool/JVC.pm +3 -3
- package/bin/lib/Image/ExifTool/Jpeg2000.pm +67 -17
- package/bin/lib/Image/ExifTool/Kodak.pm +1 -1
- package/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
- package/bin/lib/Image/ExifTool/LIF.pm +1 -1
- package/bin/lib/Image/ExifTool/LNK.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/de.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/es.pm +4 -4
- package/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/fr.pm +4 -5
- package/bin/lib/Image/ExifTool/Lang/it.pm +3 -3
- package/bin/lib/Image/ExifTool/Lang/ja.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/ko.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/nl.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/pl.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/sk.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/tr.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
- package/bin/lib/Image/ExifTool/Leaf.pm +3 -3
- package/bin/lib/Image/ExifTool/Lytro.pm +1 -1
- package/bin/lib/Image/ExifTool/M2TS.pm +1 -1
- package/bin/lib/Image/ExifTool/MIE.pm +5 -5
- package/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
- package/bin/lib/Image/ExifTool/MIFF.pm +1 -1
- package/bin/lib/Image/ExifTool/MISB.pm +1 -1
- package/bin/lib/Image/ExifTool/MNG.pm +1 -1
- package/bin/lib/Image/ExifTool/MOI.pm +1 -1
- package/bin/lib/Image/ExifTool/MPC.pm +1 -1
- package/bin/lib/Image/ExifTool/MPEG.pm +1 -1
- package/bin/lib/Image/ExifTool/MPF.pm +1 -1
- package/bin/lib/Image/ExifTool/MRC.pm +1 -1
- package/bin/lib/Image/ExifTool/MWG.pm +1 -1
- package/bin/lib/Image/ExifTool/MXF.pm +1 -1
- package/bin/lib/Image/ExifTool/MacOS.pm +1 -1
- package/bin/lib/Image/ExifTool/MakerNotes.pm +1 -1
- package/bin/lib/Image/ExifTool/Matroska.pm +1 -1
- package/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
- package/bin/lib/Image/ExifTool/Minolta.pm +1 -1
- package/bin/lib/Image/ExifTool/MinoltaRaw.pm +3 -3
- package/bin/lib/Image/ExifTool/Motorola.pm +1 -1
- package/bin/lib/Image/ExifTool/Nikon.pm +11 -8
- package/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
- package/bin/lib/Image/ExifTool/NikonCustom.pm +4 -4
- package/bin/lib/Image/ExifTool/NikonSettings.pm +1 -1
- package/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
- package/bin/lib/Image/ExifTool/OOXML.pm +1 -1
- package/bin/lib/Image/ExifTool/Ogg.pm +3 -3
- package/bin/lib/Image/ExifTool/Olympus.pm +1 -1
- package/bin/lib/Image/ExifTool/OpenEXR.pm +1 -1
- package/bin/lib/Image/ExifTool/Opus.pm +1 -1
- package/bin/lib/Image/ExifTool/Other.pm +1 -1
- package/bin/lib/Image/ExifTool/PCX.pm +1 -1
- package/bin/lib/Image/ExifTool/PDF.pm +55 -5
- package/bin/lib/Image/ExifTool/PGF.pm +1 -1
- package/bin/lib/Image/ExifTool/PICT.pm +1 -1
- package/bin/lib/Image/ExifTool/PLIST.pm +4 -4
- package/bin/lib/Image/ExifTool/PLUS.pm +1 -1
- package/bin/lib/Image/ExifTool/PNG.pm +24 -2
- package/bin/lib/Image/ExifTool/PPM.pm +1 -1
- package/bin/lib/Image/ExifTool/PSP.pm +1 -1
- package/bin/lib/Image/ExifTool/Palm.pm +1 -1
- package/bin/lib/Image/ExifTool/Panasonic.pm +27 -2
- package/bin/lib/Image/ExifTool/PanasonicRaw.pm +4 -4
- package/bin/lib/Image/ExifTool/Parrot.pm +1 -1
- package/bin/lib/Image/ExifTool/Pentax.pm +32 -11
- package/bin/lib/Image/ExifTool/PhaseOne.pm +6 -6
- package/bin/lib/Image/ExifTool/PhotoCD.pm +1 -1
- package/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
- package/bin/lib/Image/ExifTool/Photoshop.pm +4 -4
- package/bin/lib/Image/ExifTool/PostScript.pm +3 -3
- package/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
- package/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
- package/bin/lib/Image/ExifTool/QuickTime.pm +55 -101
- package/bin/lib/Image/ExifTool/QuickTimeStream.pl +97 -7
- package/bin/lib/Image/ExifTool/RIFF.pm +1 -1
- package/bin/lib/Image/ExifTool/RSRC.pm +3 -3
- package/bin/lib/Image/ExifTool/RTF.pm +1 -1
- package/bin/lib/Image/ExifTool/Radiance.pm +1 -1
- package/bin/lib/Image/ExifTool/Rawzor.pm +1 -1
- package/bin/lib/Image/ExifTool/Real.pm +1 -1
- package/bin/lib/Image/ExifTool/Reconyx.pm +1 -1
- package/bin/lib/Image/ExifTool/Red.pm +1 -1
- package/bin/lib/Image/ExifTool/Ricoh.pm +3 -3
- package/bin/lib/Image/ExifTool/Samsung.pm +5 -5
- package/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
- package/bin/lib/Image/ExifTool/Scalado.pm +1 -1
- package/bin/lib/Image/ExifTool/Shift.pl +2 -3
- package/bin/lib/Image/ExifTool/Shortcuts.pm +1 -1
- package/bin/lib/Image/ExifTool/Sigma.pm +1 -1
- package/bin/lib/Image/ExifTool/SigmaRaw.pm +4 -4
- package/bin/lib/Image/ExifTool/Sony.pm +5 -5
- package/bin/lib/Image/ExifTool/SonyIDC.pm +1 -1
- package/bin/lib/Image/ExifTool/Stim.pm +1 -1
- package/bin/lib/Image/ExifTool/TagInfoXML.pm +4 -4
- package/bin/lib/Image/ExifTool/TagLookup.pm +3879 -3862
- package/bin/lib/Image/ExifTool/TagNames.pod +11439 -11374
- package/bin/lib/Image/ExifTool/Text.pm +1 -1
- package/bin/lib/Image/ExifTool/Theora.pm +1 -1
- package/bin/lib/Image/ExifTool/Torrent.pm +1 -1
- package/bin/lib/Image/ExifTool/Unknown.pm +1 -1
- package/bin/lib/Image/ExifTool/VCard.pm +1 -1
- package/bin/lib/Image/ExifTool/Validate.pm +1 -1
- package/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
- package/bin/lib/Image/ExifTool/WPG.pm +1 -1
- package/bin/lib/Image/ExifTool/WTV.pm +1 -1
- package/bin/lib/Image/ExifTool/WriteCanonRaw.pl +2 -2
- package/bin/lib/Image/ExifTool/WriteExif.pl +27 -24
- package/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
- package/bin/lib/Image/ExifTool/WritePDF.pl +2 -2
- package/bin/lib/Image/ExifTool/WritePNG.pl +1 -1
- package/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
- package/bin/lib/Image/ExifTool/WritePostScript.pl +1 -1
- package/bin/lib/Image/ExifTool/WriteQuickTime.pl +5 -2
- package/bin/lib/Image/ExifTool/WriteRIFF.pl +1 -1
- package/bin/lib/Image/ExifTool/WriteXMP.pl +9 -5
- package/bin/lib/Image/ExifTool/Writer.pl +74 -45
- package/bin/lib/Image/ExifTool/XISF.pm +1 -1
- package/bin/lib/Image/ExifTool/XMP.pm +20 -3
- package/bin/lib/Image/ExifTool/XMP2.pl +10 -1
- package/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
- package/bin/lib/Image/ExifTool/ZIP.pm +7 -7
- package/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
- package/bin/lib/Image/ExifTool/iWork.pm +1 -1
- package/bin/lib/Image/ExifTool.pm +59 -28
- package/bin/lib/Image/ExifTool.pod +81 -68
- package/bin/perl-Image-ExifTool.spec +45 -44
- package/bin/pp_build_exe.args +5 -5
- package/package.json +5 -5
package/bin/exiftool
CHANGED
|
@@ -11,7 +11,7 @@ use strict;
|
|
|
11
11
|
use warnings;
|
|
12
12
|
require 5.004;
|
|
13
13
|
|
|
14
|
-
my $version = '12.
|
|
14
|
+
my $version = '12.76';
|
|
15
15
|
|
|
16
16
|
# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
|
|
17
17
|
my $exePath;
|
|
@@ -58,6 +58,7 @@ sub ConvertBinary($);
|
|
|
58
58
|
sub IsEqual($$);
|
|
59
59
|
sub Infile($;$);
|
|
60
60
|
sub AddSetTagsFile($;$);
|
|
61
|
+
sub Warning($$);
|
|
61
62
|
sub DoSetFromFile($$$);
|
|
62
63
|
sub CleanFilename($);
|
|
63
64
|
sub SetWindowTitle($);
|
|
@@ -69,7 +70,7 @@ sub PreserveTime();
|
|
|
69
70
|
sub AbsPath($);
|
|
70
71
|
sub MyConvertFileName($$);
|
|
71
72
|
sub SuggestedExtension($$$);
|
|
72
|
-
sub LoadPrintFormat(
|
|
73
|
+
sub LoadPrintFormat($;$);
|
|
73
74
|
sub FilenameSPrintf($;$@);
|
|
74
75
|
sub NextUnusedFilename($;$);
|
|
75
76
|
sub CreateDirectory($);
|
|
@@ -270,7 +271,7 @@ my %optArgs = (
|
|
|
270
271
|
'-lang' => 0, # (optional arg; cannot begin with "-")
|
|
271
272
|
'-listitem' => 1,
|
|
272
273
|
'-o' => 1, '-out' => 1,
|
|
273
|
-
'-p' => 1, '-printformat' => 1,
|
|
274
|
+
'-p' => 1, '-printformat' => 1, '-p-' => 1, '-printformat-' => 1,
|
|
274
275
|
'-P' => 0,
|
|
275
276
|
'-password' => 1,
|
|
276
277
|
'-require' => 1,
|
|
@@ -572,7 +573,7 @@ if ($^O eq 'MSWin32' and eval { require File::Glob }) {
|
|
|
572
573
|
$doGlob = 1;
|
|
573
574
|
}
|
|
574
575
|
|
|
575
|
-
$mt =
|
|
576
|
+
$mt = Image::ExifTool->new; # create ExifTool object
|
|
576
577
|
|
|
577
578
|
# don't extract duplicates by default unless set by UserDefined::Options
|
|
578
579
|
$mt->Options(Duplicates => 0) unless %Image::ExifTool::UserDefined::Options
|
|
@@ -1132,10 +1133,10 @@ for (;;) {
|
|
|
1132
1133
|
}
|
|
1133
1134
|
/^overwrite_original$/i and $overwriteOrig = 1, next;
|
|
1134
1135
|
/^overwrite_original_in_place$/i and $overwriteOrig = 2, next;
|
|
1135
|
-
if (/^p$/ or
|
|
1136
|
+
if (/^p(-?)$/ or /^printformat(-?)$/i) {
|
|
1136
1137
|
my $fmt = shift;
|
|
1137
1138
|
if ($pass) {
|
|
1138
|
-
LoadPrintFormat($fmt);
|
|
1139
|
+
LoadPrintFormat($fmt, $1);
|
|
1139
1140
|
# load MWG module now if necessary
|
|
1140
1141
|
if (not $useMWG and grep /^mwg:/i, @requestTags) {
|
|
1141
1142
|
$useMWG = 1;
|
|
@@ -1144,7 +1145,7 @@ for (;;) {
|
|
|
1144
1145
|
}
|
|
1145
1146
|
} else {
|
|
1146
1147
|
# defer to next pass so the filename charset is available
|
|
1147
|
-
push @nextPass,
|
|
1148
|
+
push @nextPass, "-$_", $fmt;
|
|
1148
1149
|
}
|
|
1149
1150
|
next;
|
|
1150
1151
|
}
|
|
@@ -1705,7 +1706,7 @@ if (@newValues) {
|
|
|
1705
1706
|
my ($rtn, $wrn) = $mt->SetNewValue($tag, $newVal, %opts);
|
|
1706
1707
|
$needSave = 1;
|
|
1707
1708
|
++$isWriting if $rtn;
|
|
1708
|
-
$wrn and
|
|
1709
|
+
$wrn and Warning($mt, $wrn);
|
|
1709
1710
|
}
|
|
1710
1711
|
# exclude specified tags
|
|
1711
1712
|
foreach (@exclude) {
|
|
@@ -1791,7 +1792,7 @@ if (not $altEnc and $mt->Options('Lang') ne 'en' and eval { require Encode }) {
|
|
|
1791
1792
|
if (@fileOrder) {
|
|
1792
1793
|
my @allFiles;
|
|
1793
1794
|
ProcessFiles($mt, \@allFiles);
|
|
1794
|
-
my $sortTool =
|
|
1795
|
+
my $sortTool = Image::ExifTool->new;
|
|
1795
1796
|
$sortTool->Options(FastScan => $fileOrderFast) if $fileOrderFast;
|
|
1796
1797
|
$sortTool->Options(PrintConv => $mt->Options('PrintConv'));
|
|
1797
1798
|
$sortTool->Options(Duplicates => 0);
|
|
@@ -2079,7 +2080,7 @@ sub GetImageInfo($$)
|
|
|
2079
2080
|
@foundTags = ('*', @tags) if @tags;
|
|
2080
2081
|
$info = $et->ImageInfo(Infile($pipe,$isWriting), \@foundTags, $opts);
|
|
2081
2082
|
foreach $condition (@condition) {
|
|
2082
|
-
my $cond = $et->InsertTagValues(\@foundTags,
|
|
2083
|
+
my $cond = $et->InsertTagValues($condition, \@foundTags, \%info);
|
|
2083
2084
|
{
|
|
2084
2085
|
# set package so eval'd functions are in Image::ExifTool namespace
|
|
2085
2086
|
package Image::ExifTool;
|
|
@@ -2280,7 +2281,7 @@ sub GetImageInfo($$)
|
|
|
2280
2281
|
my @lines;
|
|
2281
2282
|
my $opt = $type eq 'IF' ? 'Silent' : 'Warn'; # silence "IF" warnings
|
|
2282
2283
|
foreach (@$prf) {
|
|
2283
|
-
my $line = $et->InsertTagValues(\@foundTags, $
|
|
2284
|
+
my $line = $et->InsertTagValues($_, \@foundTags, $opt, $grp, $cache);
|
|
2284
2285
|
if ($type eq 'IF') {
|
|
2285
2286
|
$skipBody = 1 unless defined $line;
|
|
2286
2287
|
} elsif (defined $line) {
|
|
@@ -2713,12 +2714,12 @@ TAG: foreach $tag (@foundTags) {
|
|
|
2713
2714
|
} elsif ($fixLen == 1) {
|
|
2714
2715
|
$padLen -= length Encode::decode_utf8($desc);
|
|
2715
2716
|
} else {
|
|
2716
|
-
my $gcstr = eval {
|
|
2717
|
+
my $gcstr = eval { Unicode::GCString->new(Encode::decode_utf8($desc)) };
|
|
2717
2718
|
if ($gcstr) {
|
|
2718
2719
|
$padLen -= $gcstr->columns;
|
|
2719
2720
|
} else {
|
|
2720
2721
|
$padLen -= length Encode::decode_utf8($desc);
|
|
2721
|
-
|
|
2722
|
+
Warning($et, 'Unicode::GCString problem. Columns may be misaligned');
|
|
2722
2723
|
$fixLen = 1;
|
|
2723
2724
|
}
|
|
2724
2725
|
}
|
|
@@ -2988,7 +2989,7 @@ sub SetImageInfo($$$)
|
|
|
2988
2989
|
my $newFileName = $et->GetNewValues('FileName');
|
|
2989
2990
|
my $newDir = $et->GetNewValues('Directory');
|
|
2990
2991
|
if (defined $newFileName and not length $newFileName) {
|
|
2991
|
-
|
|
2992
|
+
Warning($et,"New file name is empty - $infile");
|
|
2992
2993
|
undef $newFileName;
|
|
2993
2994
|
}
|
|
2994
2995
|
if (defined $testName) {
|
|
@@ -3639,7 +3640,7 @@ sub Infile($;$)
|
|
|
3639
3640
|
if ($rafStdin) {
|
|
3640
3641
|
$rafStdin->Seek(0); # rewind
|
|
3641
3642
|
} elsif (open RAF_STDIN, '-') {
|
|
3642
|
-
$rafStdin =
|
|
3643
|
+
$rafStdin = File::RandomAccess->new(\*RAF_STDIN);
|
|
3643
3644
|
$rafStdin->BinMode();
|
|
3644
3645
|
}
|
|
3645
3646
|
return $rafStdin if $rafStdin;
|
|
@@ -3647,9 +3648,22 @@ sub Infile($;$)
|
|
|
3647
3648
|
return $file;
|
|
3648
3649
|
}
|
|
3649
3650
|
|
|
3651
|
+
#------------------------------------------------------------------------------
|
|
3652
|
+
# Issue warning to stderr, adding leading "Warning: " and trailing newline
|
|
3653
|
+
# if the warning isn't suppressed by the API NoWarning option
|
|
3654
|
+
# Inputs: 0) ExifTool ref, 1) warning string
|
|
3655
|
+
sub Warning($$)
|
|
3656
|
+
{
|
|
3657
|
+
my ($et, $str) = @_;
|
|
3658
|
+
my $noWarn = $et->Options('NoWarning');
|
|
3659
|
+
if (not defined $noWarn or not eval { $str =~ /$noWarn/ }) {
|
|
3660
|
+
Warn "Warning: $str\n";
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3650
3664
|
#------------------------------------------------------------------------------
|
|
3651
3665
|
# Set new values from file
|
|
3652
|
-
# Inputs: 0)
|
|
3666
|
+
# Inputs: 0) ExifTool ref, 1) filename, 2) reference to list of values to set
|
|
3653
3667
|
# Returns: 0 on error (and increments $countBadWr)
|
|
3654
3668
|
sub DoSetFromFile($$$)
|
|
3655
3669
|
{
|
|
@@ -3662,19 +3676,18 @@ sub DoSetFromFile($$$)
|
|
|
3662
3676
|
# delete all error and warning tags
|
|
3663
3677
|
my @warns = grep /^(Error|Warning)\b/, keys %$info;
|
|
3664
3678
|
$numSet -= scalar(@warns);
|
|
3665
|
-
# issue a warning for the main error
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
}
|
|
3679
|
+
# issue a warning only for the main error
|
|
3680
|
+
my $err = $$info{Error};
|
|
3681
|
+
delete $$info{$_} foreach @warns;
|
|
3682
|
+
my $noWarn = $et->Options('NoWarning');
|
|
3683
|
+
$$info{Warning} = $err unless defined $noWarn and eval { $err =~ /$noWarn/ };
|
|
3671
3684
|
} elsif ($$info{Warning}) {
|
|
3672
3685
|
my $warns = 1;
|
|
3673
3686
|
++$warns while $$info{"Warning ($warns)"};
|
|
3674
3687
|
$numSet -= $warns;
|
|
3675
3688
|
}
|
|
3676
3689
|
PrintErrors($et, $info, $file) and EFile($file), ++$countBadWr, return 0;
|
|
3677
|
-
|
|
3690
|
+
Warning($et,"No writable tags set from $file") unless $numSet;
|
|
3678
3691
|
return 1;
|
|
3679
3692
|
}
|
|
3680
3693
|
|
|
@@ -3820,7 +3833,7 @@ sub ScanDir($$;$)
|
|
|
3820
3833
|
if ($evalWarning) {
|
|
3821
3834
|
chomp $evalWarning;
|
|
3822
3835
|
$evalWarning =~ s/ at .*//s;
|
|
3823
|
-
|
|
3836
|
+
Warning($et,"[Win32::FindFile] $evalWarning - $dir");
|
|
3824
3837
|
$winSurrogate = 1 if $evalWarning =~ /surrogate/;
|
|
3825
3838
|
} else {
|
|
3826
3839
|
$et->Options(CharsetFileName => 'UTF8'); # now using UTF8
|
|
@@ -4096,6 +4109,10 @@ sub SuggestedExtension($$$)
|
|
|
4096
4109
|
$ext = 'pict';
|
|
4097
4110
|
} elsif ($$valPt =~ /^\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl/s) {
|
|
4098
4111
|
$ext = 'jxl';
|
|
4112
|
+
} elsif ($$valPt =~ /^.{4}jumb\0.{3}jumdc2pa/s) {
|
|
4113
|
+
$ext = 'c2pa';
|
|
4114
|
+
} elsif ($tag eq 'JUMBF') {
|
|
4115
|
+
$ext = 'jumbf';
|
|
4099
4116
|
} else {
|
|
4100
4117
|
$ext = 'dat';
|
|
4101
4118
|
}
|
|
@@ -4104,12 +4121,12 @@ sub SuggestedExtension($$$)
|
|
|
4104
4121
|
|
|
4105
4122
|
#------------------------------------------------------------------------------
|
|
4106
4123
|
# Load print format file
|
|
4107
|
-
# Inputs: 0) file name
|
|
4124
|
+
# Inputs: 0) file name, 1) flag to avoid adding newline to input argument
|
|
4108
4125
|
# - saves lines of file to %printFmt list
|
|
4109
4126
|
# - adds tag names to @tags list
|
|
4110
|
-
sub LoadPrintFormat(
|
|
4127
|
+
sub LoadPrintFormat($;$)
|
|
4111
4128
|
{
|
|
4112
|
-
my $arg =
|
|
4129
|
+
my ($arg, $noNL) = @_;
|
|
4113
4130
|
if (not defined $arg) {
|
|
4114
4131
|
Error "Must specify file or expression for -p option\n";
|
|
4115
4132
|
} elsif ($arg !~ /\n/ and -f $arg and $mt->Open(\*FMT_FILE, $arg)) {
|
|
@@ -4118,7 +4135,8 @@ sub LoadPrintFormat($)
|
|
|
4118
4135
|
}
|
|
4119
4136
|
close(FMT_FILE);
|
|
4120
4137
|
} else {
|
|
4121
|
-
|
|
4138
|
+
$arg .= "\n" unless $noNL;
|
|
4139
|
+
AddPrintFormat($arg);
|
|
4122
4140
|
}
|
|
4123
4141
|
}
|
|
4124
4142
|
|
|
@@ -4282,7 +4300,7 @@ sub CreateDirectory($)
|
|
|
4282
4300
|
return 0;
|
|
4283
4301
|
}
|
|
4284
4302
|
unless ($k32CreateDir) {
|
|
4285
|
-
$k32CreateDir =
|
|
4303
|
+
$k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
|
|
4286
4304
|
}
|
|
4287
4305
|
$success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
|
|
4288
4306
|
} else {
|
|
@@ -4631,49 +4649,50 @@ supported by ExifTool (r = read, w = write, c = create):
|
|
|
4631
4649
|
|
|
4632
4650
|
File Types
|
|
4633
4651
|
------------+-------------+-------------+-------------+------------
|
|
4634
|
-
360 r/w | DOCX r |
|
|
4635
|
-
3FR r | DPX r |
|
|
4636
|
-
3G2 r/w | DR4 r/w/c |
|
|
4637
|
-
3GP r/w | DSS r |
|
|
4638
|
-
7Z r | DV r |
|
|
4639
|
-
A r | DVB r/w |
|
|
4640
|
-
AA r | DVR-MS r |
|
|
4641
|
-
AAC r | DYLIB r |
|
|
4642
|
-
AAE r | EIP r |
|
|
4643
|
-
AAX r/w | EPS r/w |
|
|
4644
|
-
ACR r | EPUB r |
|
|
4645
|
-
AFM r | ERF r/w |
|
|
4646
|
-
AI r/w | EXE r |
|
|
4647
|
-
AIFF r | EXIF r/w/c |
|
|
4648
|
-
APE r | EXR r |
|
|
4649
|
-
ARQ r/w | EXV r/w/c |
|
|
4650
|
-
ARW r/w | F4A/V r/w |
|
|
4651
|
-
ASF r | FFF r/w |
|
|
4652
|
-
AVI r | FITS r |
|
|
4653
|
-
AVIF r/w | FLA r |
|
|
4654
|
-
AZW r | FLAC r |
|
|
4655
|
-
BMP r | FLIF r/w |
|
|
4656
|
-
BPG r | FLV r |
|
|
4657
|
-
BTF r | FPF r |
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4652
|
+
360 r/w | DOCX r | ITC r | O r | RSRC r
|
|
4653
|
+
3FR r | DPX r | J2C r | ODP r | RTF r
|
|
4654
|
+
3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w
|
|
4655
|
+
3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
|
|
4656
|
+
7Z r | DV r | JPEG r/w | OFR r | RWZ r
|
|
4657
|
+
A r | DVB r/w | JSON r | OGG r | RM r
|
|
4658
|
+
AA r | DVR-MS r | JXL r | OGV r | SEQ r
|
|
4659
|
+
AAC r | DYLIB r | K25 r | ONP r | SKETCH r
|
|
4660
|
+
AAE r | EIP r | KDC r | OPUS r | SO r
|
|
4661
|
+
AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
|
|
4662
|
+
ACR r | EPUB r | LA r | ORI r/w | SRF r
|
|
4663
|
+
AFM r | ERF r/w | LFP r | OTF r | SRW r/w
|
|
4664
|
+
AI r/w | EXE r | LIF r | PAC r | SVG r
|
|
4665
|
+
AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r
|
|
4666
|
+
APE r | EXR r | LRV r/w | PBM r/w | THM r/w
|
|
4667
|
+
ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w
|
|
4668
|
+
ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r
|
|
4669
|
+
ASF r | FFF r/w | MACOS r | PDB r | TTC r
|
|
4670
|
+
AVI r | FITS r | MAX r | PDF r/w | TTF r
|
|
4671
|
+
AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r
|
|
4672
|
+
AZW r | FLAC r | MIE r/w/c | PFA r | VCF r
|
|
4673
|
+
BMP r | FLIF r/w | MIFF r | PFB r | VNT r
|
|
4674
|
+
BPG r | FLV r | MKA r | PFM r | VRD r/w/c
|
|
4675
|
+
BTF r | FPF r | MKS r | PGF r | VSD r
|
|
4676
|
+
C2PA r | FPX r | MKV r | PGM r/w | WAV r
|
|
4677
|
+
CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w
|
|
4678
|
+
COS r | GLV r/w | MOBI r | PICT r | WEBP r/w
|
|
4679
|
+
CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r
|
|
4680
|
+
CR3 r/w | GZ r | MOI r | PNG r/w | WMA r
|
|
4681
|
+
CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r
|
|
4682
|
+
CRW r/w | HDR r | MOV r/w | PPT r | WPG r
|
|
4683
|
+
CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r
|
|
4684
|
+
CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r
|
|
4685
|
+
CUR r | HTML r | MPC r | PSB r/w | X3F r/w
|
|
4686
|
+
CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r
|
|
4687
|
+
DCM r | ICO r | MPO r/w | PSP r | XISF r
|
|
4688
|
+
DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r
|
|
4689
|
+
DCR r | IDML r | MRC r | R3D r | XLSX r
|
|
4690
|
+
DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
|
|
4691
|
+
DIVX r | IND r/w | MXF r | RAF r/w | ZIP r
|
|
4692
|
+
DJVU r | INSP r/w | NEF r/w | RAM r |
|
|
4693
|
+
DLL r | INSV r | NKSC r/w | RAR r |
|
|
4694
|
+
DNG r/w | INX r | NRW r/w | RAW r/w |
|
|
4695
|
+
DOC r | ISO r | NUMBERS r | RIFF r |
|
|
4677
4696
|
|
|
4678
4697
|
Meta Information
|
|
4679
4698
|
----------------------+----------------------+---------------------
|
|
@@ -4739,7 +4758,7 @@ L<Input-output text formatting|/Input-output text formatting>
|
|
|
4739
4758
|
-lang [LANG] Set current language
|
|
4740
4759
|
-listItem INDEX Extract specific item from a list
|
|
4741
4760
|
-n (--printConv) No print conversion
|
|
4742
|
-
-p
|
|
4761
|
+
-p[-] STR (-printFormat) Print output in specified format
|
|
4743
4762
|
-php Export tags as a PHP Array
|
|
4744
4763
|
-s[NUM] (-short) Short output format (-s for tag names)
|
|
4745
4764
|
-S (-veryShort) Very short output format
|
|
@@ -5548,30 +5567,31 @@ when writing. For example, the following commands all have the same effect:
|
|
|
5548
5567
|
> exiftool -Orientation=6 -n a.jpg
|
|
5549
5568
|
> exiftool -Orientation#=6 a.jpg
|
|
5550
5569
|
|
|
5551
|
-
=item B<-p> I<
|
|
5570
|
+
=item B<-p>[-] I<STR> or I<FMTFILE> (B<-printFormat>)
|
|
5552
5571
|
|
|
5553
|
-
Print output in the format specified by the given
|
|
5572
|
+
Print output in the format specified by the given string or file. The
|
|
5554
5573
|
argument is interpreted as a string unless a file of that name exists, in
|
|
5555
5574
|
which case the string is loaded from the contents of the file. Tag names in
|
|
5556
|
-
the format
|
|
5575
|
+
the format string or file begin with a C<$> symbol and may contain leading
|
|
5557
5576
|
group names and/or a trailing C<#> (to disable print conversion). Case is
|
|
5558
5577
|
not significant. Braces C<{}> may be used around the tag name to separate
|
|
5559
5578
|
it from subsequent text (and must be used if subsequent text begins with an
|
|
5560
5579
|
alphanumeric character, hyphen, underline, colon or number sign). Use C<$$>
|
|
5561
|
-
to represent a C<$> symbol, and C<$/> for a newline.
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
C<#[
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5580
|
+
to represent a C<$> symbol, and C<$/> for a newline. When the string
|
|
5581
|
+
argument is used (ie. I<STR>), a newline is added to the end of the string
|
|
5582
|
+
unless B<-p-> is specified.
|
|
5583
|
+
|
|
5584
|
+
Multiple B<-p> options may be used. Lines beginning with C<#[HEAD]> and
|
|
5585
|
+
C<#[TAIL]> are output before the first processed file and after the last
|
|
5586
|
+
processed file respectively. Lines beginning with C<#[SECT]> and C<#[ENDS]>
|
|
5587
|
+
are output before and after each section of files. A section is defined as
|
|
5588
|
+
a group of consecutive files with the same section header (eg. files are
|
|
5589
|
+
grouped by directory if C<#[SECT]> contains C<$directory>). Lines beginning
|
|
5590
|
+
with C<#[BODY]> and lines not beginning with C<#> are output for each
|
|
5591
|
+
processed file. Lines beginning with C<#[IF]> are not output, but all BODY
|
|
5592
|
+
lines are skipped if any tag on an IF line doesn't exist. Other lines
|
|
5593
|
+
beginning with C<#> are ignored. (To output a line beginning with C<#>, use
|
|
5594
|
+
C<#[BODY]#>.) For example, this format file:
|
|
5575
5595
|
|
|
5576
5596
|
# this is a comment line
|
|
5577
5597
|
#[HEAD]-- Generated by ExifTool $exifToolVersion --
|
|
@@ -5585,16 +5605,21 @@ with this command:
|
|
|
5585
5605
|
|
|
5586
5606
|
produces output like this:
|
|
5587
5607
|
|
|
5588
|
-
-- Generated by ExifTool 12.
|
|
5608
|
+
-- Generated by ExifTool 12.76 --
|
|
5589
5609
|
File: a.jpg - 2003:10:31 15:44:19
|
|
5590
5610
|
(f/5.6, 1/60s, ISO 100)
|
|
5591
5611
|
File: b.jpg - 2006:05:23 11:57:38
|
|
5592
5612
|
(f/8.0, 1/13s, ISO 100)
|
|
5593
5613
|
-- end --
|
|
5594
5614
|
|
|
5595
|
-
The values of List-type tags with multiple items
|
|
5596
|
-
|
|
5597
|
-
when interpolated in the string.
|
|
5615
|
+
The values of List-type tags with multiple items, Shortcut tags representing
|
|
5616
|
+
multiple tags, and matching tags when the C<All> group is specified are
|
|
5617
|
+
joined according the B<-sep> option setting when interpolated in the string.
|
|
5618
|
+
(Note that when C<All> is used as a group name, dupicate tags are included
|
|
5619
|
+
regardless of the Duplicates option setting.) When C<All> is used as a tag
|
|
5620
|
+
name, a value of 1 is returned if any tag exists in the specified group, or
|
|
5621
|
+
0 otherwise (unless the C<All> group is also specified, in which case the
|
|
5622
|
+
values of all matching tags are joined).
|
|
5598
5623
|
|
|
5599
5624
|
When B<-ee> (B<-extractEmbedded>) is combined with B<-p>, embedded documents
|
|
5600
5625
|
are effectively processed as separate input files.
|
|
@@ -6537,7 +6562,9 @@ set to undef if C<=> is used, or an empty string with C<^=>. If I<OPT> is
|
|
|
6537
6562
|
not specified a list of available options is returned. The option name is
|
|
6538
6563
|
not case senstive, but the option values are. See
|
|
6539
6564
|
L<Image::ExifTool Options|Image::ExifTool/Options> for option details. This
|
|
6540
|
-
overrides API options set via the config file.
|
|
6565
|
+
overrides API options set via the config file. Note that the exiftool app
|
|
6566
|
+
sets some API options internally, and attempts to change these via the
|
|
6567
|
+
command line will have no effect.
|
|
6541
6568
|
|
|
6542
6569
|
=item B<-common_args>
|
|
6543
6570
|
|
|
@@ -7454,7 +7481,7 @@ the commands if B<-execute> was used).
|
|
|
7454
7481
|
|
|
7455
7482
|
=head1 AUTHOR
|
|
7456
7483
|
|
|
7457
|
-
Copyright 2003-
|
|
7484
|
+
Copyright 2003-2024, Phil Harvey
|
|
7458
7485
|
|
|
7459
7486
|
This is free software; you can redistribute it and/or modify it under the
|
|
7460
7487
|
same terms as Perl itself.
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
# scalar with a multi-character newline
|
|
18
18
|
# 01/24/2009 - PH Protect against reading too much at once
|
|
19
19
|
# 10/04/2018 - PH Added NoBuffer option
|
|
20
|
+
# 01/20/2024 - PH Set ERROR on file read error
|
|
20
21
|
#
|
|
21
22
|
# Notes: Calls the normal file i/o routines unless SeekTest() fails, in
|
|
22
23
|
# which case the file is buffered in memory to allow random access.
|
|
@@ -25,7 +26,10 @@
|
|
|
25
26
|
#
|
|
26
27
|
# May also be used for string i/o (just pass a scalar reference)
|
|
27
28
|
#
|
|
28
|
-
#
|
|
29
|
+
# Sets internal ERROR member from $! if there is an error reading
|
|
30
|
+
# the file.
|
|
31
|
+
#
|
|
32
|
+
# Legal: Copyright (c) 2003-2024, Phil Harvey (philharvey66 at gmail.com)
|
|
29
33
|
# This library is free software; you can redistribute it and/or
|
|
30
34
|
# modify it under the same terms as Perl itself.
|
|
31
35
|
#------------------------------------------------------------------------------
|
|
@@ -37,7 +41,7 @@ require 5.002;
|
|
|
37
41
|
require Exporter;
|
|
38
42
|
|
|
39
43
|
use vars qw($VERSION @ISA @EXPORT_OK);
|
|
40
|
-
$VERSION = '1.
|
|
44
|
+
$VERSION = '1.12';
|
|
41
45
|
@ISA = qw(Exporter);
|
|
42
46
|
|
|
43
47
|
sub Read($$$);
|
|
@@ -211,6 +215,8 @@ sub Read($$$)
|
|
|
211
215
|
if ($num) {
|
|
212
216
|
${$self->{BUFF_PT}} .= $buff;
|
|
213
217
|
$self->{LEN} += $num;
|
|
218
|
+
} elsif (not defined $num) {
|
|
219
|
+
$self->{ERROR} = $!;
|
|
214
220
|
}
|
|
215
221
|
}
|
|
216
222
|
# number of bytes left in data buffer
|
|
@@ -229,7 +235,11 @@ sub Read($$$)
|
|
|
229
235
|
} else {
|
|
230
236
|
# read directly from file
|
|
231
237
|
$_[0] = '' unless defined $_[0];
|
|
232
|
-
$rtnVal = read($self->{FILE_PT}, $_[0], $len)
|
|
238
|
+
$rtnVal = read($self->{FILE_PT}, $_[0], $len);
|
|
239
|
+
unless (defined $rtnVal) {
|
|
240
|
+
$self->{ERROR} = $!;
|
|
241
|
+
$rtnVal = 0;
|
|
242
|
+
}
|
|
233
243
|
}
|
|
234
244
|
if ($self->{DEBUG}) {
|
|
235
245
|
my $pos = $self->Tell() - $rtnVal;
|
|
@@ -258,7 +268,10 @@ sub ReadLine($$)
|
|
|
258
268
|
# make sure we have some data after the current position
|
|
259
269
|
while ($self->{LEN} <= $pos) {
|
|
260
270
|
$num = read($fp, $buff, $CHUNK_SIZE);
|
|
261
|
-
|
|
271
|
+
unless ($num) {
|
|
272
|
+
defined $num or $self->{ERROR} = $!;
|
|
273
|
+
return 0;
|
|
274
|
+
}
|
|
262
275
|
${$self->{BUFF_PT}} .= $buff;
|
|
263
276
|
$self->{LEN} += $num;
|
|
264
277
|
}
|
|
@@ -270,7 +283,11 @@ sub ReadLine($$)
|
|
|
270
283
|
last;
|
|
271
284
|
}
|
|
272
285
|
$pos = $self->{LEN}; # have scanned to end of buffer
|
|
273
|
-
$num = read($fp, $buff, $CHUNK_SIZE)
|
|
286
|
+
$num = read($fp, $buff, $CHUNK_SIZE);
|
|
287
|
+
unless ($num) {
|
|
288
|
+
defined $num or $self->{ERROR} = $!;
|
|
289
|
+
last;
|
|
290
|
+
}
|
|
274
291
|
${$self->{BUFF_PT}} .= $buff;
|
|
275
292
|
$self->{LEN} += $num;
|
|
276
293
|
}
|
|
@@ -314,7 +331,12 @@ sub Slurp($)
|
|
|
314
331
|
my $fp = $self->{FILE_PT} || return;
|
|
315
332
|
# read whole file into buffer (in large chunks)
|
|
316
333
|
my ($buff, $num);
|
|
317
|
-
|
|
334
|
+
for (;;) {
|
|
335
|
+
$num = read($fp, $buff, $CHUNK_SIZE * $SLURP_CHUNKS);
|
|
336
|
+
unless ($num) {
|
|
337
|
+
defined $num or $self->{ERROR} = $!;
|
|
338
|
+
last;
|
|
339
|
+
}
|
|
318
340
|
${$self->{BUFF_PT}} .= $buff;
|
|
319
341
|
$self->{LEN} += $num;
|
|
320
342
|
}
|
|
@@ -339,6 +361,10 @@ sub Purge($)
|
|
|
339
361
|
$self->{POS} -= $self->{LEN};
|
|
340
362
|
${$self->{BUFF_PT}} = '';
|
|
341
363
|
$self->{LEN} = read($self->{FILE_PT}, ${$self->{BUFF_PT}}, $SKIP_SIZE);
|
|
364
|
+
if (not defined $self->{LEN}) {
|
|
365
|
+
$self->{ERROR} = $!;
|
|
366
|
+
last;
|
|
367
|
+
}
|
|
342
368
|
last if $self->{LEN} < $SKIP_SIZE;
|
|
343
369
|
}
|
|
344
370
|
} elsif ($purge > 0) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Description: Buffer to support random access reading of sequential file
|
|
5
5
|
#
|
|
6
|
-
# Legal: Copyright (c) 2003-
|
|
6
|
+
# Legal: Copyright (c) 2003-2024, Phil Harvey (philharvey66 at gmail.com)
|
|
7
7
|
# This library is free software; you can redistribute it and/or
|
|
8
8
|
# modify it under the same terms as Perl itself.
|
|
9
9
|
#------------------------------------------------------------------------------
|
|
@@ -16,9 +16,9 @@ File::RandomAccess - Random access reads of sequential file or scalar
|
|
|
16
16
|
|
|
17
17
|
use File::RandomAccess;
|
|
18
18
|
|
|
19
|
-
$raf =
|
|
19
|
+
$raf = File::RandomAccess->new(\*FILE, $disableSeekTest);
|
|
20
20
|
|
|
21
|
-
$raf =
|
|
21
|
+
$raf = File::RandomAccess->new(\$data);
|
|
22
22
|
|
|
23
23
|
$err = $raf->Seek($pos);
|
|
24
24
|
$num = $raf->Read($buff, $bytes);
|
|
@@ -38,10 +38,10 @@ Creates a new RandomAccess object given a file reference or
|
|
|
38
38
|
reference to data in memory.
|
|
39
39
|
|
|
40
40
|
# Read from open file or pipe
|
|
41
|
-
$raf =
|
|
41
|
+
$raf = File::RandomAccess->new(\*FILE);
|
|
42
42
|
|
|
43
43
|
# Read from data in memory
|
|
44
|
-
$raf =
|
|
44
|
+
$raf = File::RandomAccess->new(\$data);
|
|
45
45
|
|
|
46
46
|
=over 4
|
|
47
47
|
|
|
@@ -236,7 +236,7 @@ the end of file is not allowed.
|
|
|
236
236
|
|
|
237
237
|
=head1 AUTHOR
|
|
238
238
|
|
|
239
|
-
Copyright 2003-
|
|
239
|
+
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
|
|
240
240
|
|
|
241
241
|
This library is free software; you can redistribute it and/or modify it
|
|
242
242
|
under the same terms as Perl itself.
|
|
@@ -15,7 +15,7 @@ use strict;
|
|
|
15
15
|
use vars qw($VERSION);
|
|
16
16
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
17
17
|
|
|
18
|
-
$VERSION = '1.
|
|
18
|
+
$VERSION = '1.01';
|
|
19
19
|
|
|
20
20
|
sub ReadUInt32 {
|
|
21
21
|
my $buff;
|
|
@@ -569,7 +569,7 @@ sub ReadFilesInfo {
|
|
|
569
569
|
next;
|
|
570
570
|
}
|
|
571
571
|
$_[0]->Read($buff, $size);
|
|
572
|
-
my $buffer =
|
|
572
|
+
my $buffer = File::RandomAccess->new(\$buff);
|
|
573
573
|
if($prop == 14){ # empty stream
|
|
574
574
|
my @isempty = ReadBoolean($buffer, $numfiles, 0);
|
|
575
575
|
my $numemptystreams = 0;
|
|
@@ -732,7 +732,7 @@ sub Process7Z($$)
|
|
|
732
732
|
$folder_data .= Decompress($et, $raf, $decomporessor, $remaining);
|
|
733
733
|
$remaining = $uncompressed_size - length($folder_data);
|
|
734
734
|
}
|
|
735
|
-
$buffer2 =
|
|
735
|
+
$buffer2 = File::RandomAccess->new(\$folder_data);
|
|
736
736
|
}
|
|
737
737
|
$buffer2->Seek(0, 0);
|
|
738
738
|
$buffer2->Read($buff, 1);
|