exiftool_vendored 13.04.0 → 13.08.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/Changes +48 -0
- data/bin/MANIFEST +1 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +2 -2
- data/bin/exiftool +30 -23
- data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
- data/bin/lib/Image/ExifTool/APE.pm +1 -1
- data/bin/lib/Image/ExifTool/ASF.pm +1 -1
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +4 -3
- data/bin/lib/Image/ExifTool/Canon.pm +19 -1
- data/bin/lib/Image/ExifTool/DJI.pm +91 -29
- data/bin/lib/Image/ExifTool/Exif.pm +2 -2
- data/bin/lib/Image/ExifTool/FITS.pm +2 -2
- data/bin/lib/Image/ExifTool/FLIF.pm +2 -2
- data/bin/lib/Image/ExifTool/FlashPix.pm +11 -11
- data/bin/lib/Image/ExifTool/Font.pm +1 -1
- data/bin/lib/Image/ExifTool/Geolocation.pm +2 -1
- data/bin/lib/Image/ExifTool/GoPro.pm +3 -3
- data/bin/lib/Image/ExifTool/HP.pm +1 -1
- data/bin/lib/Image/ExifTool/ID3.pm +3 -3
- data/bin/lib/Image/ExifTool/IPTC.pm +2 -2
- data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
- data/bin/lib/Image/ExifTool/JPEG.pm +19 -4
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +6 -6
- data/bin/lib/Image/ExifTool/M2TS.pm +39 -9
- data/bin/lib/Image/ExifTool/MXF.pm +2 -2
- data/bin/lib/Image/ExifTool/Matroska.pm +1 -1
- data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
- data/bin/lib/Image/ExifTool/PDF.pm +15 -15
- data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
- data/bin/lib/Image/ExifTool/PNG.pm +4 -4
- data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
- data/bin/lib/Image/ExifTool/PhaseOne.pm +3 -3
- data/bin/lib/Image/ExifTool/Photoshop.pm +63 -3
- data/bin/lib/Image/ExifTool/Protobuf.pm +242 -0
- data/bin/lib/Image/ExifTool/QuickTime.pm +23 -14
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +395 -109
- data/bin/lib/Image/ExifTool/README +4 -1
- data/bin/lib/Image/ExifTool/RIFF.pm +3 -3
- data/bin/lib/Image/ExifTool/RTF.pm +1 -1
- data/bin/lib/Image/ExifTool/Ricoh.pm +3 -3
- data/bin/lib/Image/ExifTool/Sony.pm +4 -3
- data/bin/lib/Image/ExifTool/TagInfoXML.pm +4 -3
- data/bin/lib/Image/ExifTool/TagLookup.pm +6988 -6967
- data/bin/lib/Image/ExifTool/TagNames.pod +85 -5
- data/bin/lib/Image/ExifTool/VCard.pm +2 -2
- data/bin/lib/Image/ExifTool/Validate.pm +3 -3
- data/bin/lib/Image/ExifTool/WriteExif.pl +2 -2
- data/bin/lib/Image/ExifTool/WriteQuickTime.pl +4 -4
- data/bin/lib/Image/ExifTool/WriteXMP.pl +2 -2
- data/bin/lib/Image/ExifTool/Writer.pl +17 -17
- data/bin/lib/Image/ExifTool/XMP.pm +20 -10
- data/bin/lib/Image/ExifTool/XMP2.pl +38 -0
- data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
- data/bin/lib/Image/ExifTool.pm +109 -82
- data/bin/lib/Image/ExifTool.pod +8 -7
- data/bin/perl-Image-ExifTool.spec +1 -1
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +3 -2
@@ -18,7 +18,8 @@
|
|
18
18
|
# specifying $Image::ExifTool::Geolocation::altDir. This
|
19
19
|
# database and has entries in the same order as Geolocation.dat,
|
20
20
|
# and each entry is a newline-separated list of alternate names
|
21
|
-
# terminated by a null byte.
|
21
|
+
# terminated by a null byte. These alternate names are used
|
22
|
+
# only when searching for a city by name (eg. "Big Apple").
|
22
23
|
#
|
23
24
|
# Databases are based on data from geonames.org with a
|
24
25
|
# Creative Commons license, reformatted as follows in the
|
@@ -16,7 +16,7 @@ use vars qw($VERSION);
|
|
16
16
|
use Image::ExifTool qw(:DataAccess :Utils);
|
17
17
|
use Image::ExifTool::QuickTime;
|
18
18
|
|
19
|
-
$VERSION = '1.
|
19
|
+
$VERSION = '1.11';
|
20
20
|
|
21
21
|
sub ProcessGoPro($$$);
|
22
22
|
sub ProcessString($$$);
|
@@ -423,7 +423,7 @@ my %addUnits = (
|
|
423
423
|
},
|
424
424
|
},
|
425
425
|
# VLTA (GPMF) - seen: 78 ('N') (fmt B -- wrong format?)
|
426
|
-
|
426
|
+
VFPS => { Name => 'VideoFrameRate', PrintConv => '$val=~s( )(/);$val' }, #PH (GPMF, fmt L)
|
427
427
|
VFRH => { #PH (Karma)
|
428
428
|
Name => 'VisualFlightRulesHUD',
|
429
429
|
BinaryData => 1,
|
@@ -431,7 +431,7 @@ my %addUnits = (
|
|
431
431
|
# TYPE=ffffsS
|
432
432
|
},
|
433
433
|
# VLTE (GPMF) - seen: 'Y','N' (fmt c)
|
434
|
-
|
434
|
+
VRES => { Name => 'VideoFrameSize', PrintConv => '$val=~s/ /x/;$val' }, #PH (GPMF, fmt L)
|
435
435
|
WBAL => 'ColorTemperatures', #PH (gpmd)
|
436
436
|
WRGB => { #PH (gpmd)
|
437
437
|
Name => 'WhiteBalanceRGB',
|
@@ -225,7 +225,7 @@ sub ProcessHP($$$)
|
|
225
225
|
# scan for other tag ID's
|
226
226
|
foreach $tagID (sort(TagTableKeys($tagTablePtr))) {
|
227
227
|
next if $tagID eq 'PreviewImage';
|
228
|
-
next unless $$dataPt =~ /$tagID:\s*([\x20-\
|
228
|
+
next unless $$dataPt =~ /$tagID:\s*([\x20-\x7e]+)/i;
|
229
229
|
$et->HandleTag($tagTablePtr, $tagID, $1);
|
230
230
|
}
|
231
231
|
return 1;
|
@@ -1169,7 +1169,7 @@ sub ProcessID3v2($$$)
|
|
1169
1169
|
}
|
1170
1170
|
$tagInfo = $et->GetTagInfo($otherTable, $id) if $otherTable;
|
1171
1171
|
if ($tagInfo) {
|
1172
|
-
$et->
|
1172
|
+
$et->Warn("Frame '${id}' is not valid for this ID3 version", 1);
|
1173
1173
|
} else {
|
1174
1174
|
next unless $verbose or $et->Options('Unknown');
|
1175
1175
|
$id =~ tr/-A-Za-z0-9_//dc;
|
@@ -1198,7 +1198,7 @@ sub ProcessID3v2($$$)
|
|
1198
1198
|
}
|
1199
1199
|
}
|
1200
1200
|
if ($flags{Encrypt}) {
|
1201
|
-
$et->
|
1201
|
+
$et->Warn('Encrypted frames currently not supported');
|
1202
1202
|
next;
|
1203
1203
|
}
|
1204
1204
|
# extract the value
|
@@ -1232,7 +1232,7 @@ sub ProcessID3v2($$$)
|
|
1232
1232
|
next;
|
1233
1233
|
}
|
1234
1234
|
} else {
|
1235
|
-
$et->
|
1235
|
+
$et->Warn('Install Compress::Zlib to decode compressed frames');
|
1236
1236
|
next;
|
1237
1237
|
}
|
1238
1238
|
}
|
@@ -1025,7 +1025,7 @@ sub TranslateCodedString($$$$)
|
|
1025
1025
|
$$valPtr = $et->Decode($$valPtr, $$xlatPtr);
|
1026
1026
|
} else {
|
1027
1027
|
# don't yet support reading ISO 2022 shifted character sets
|
1028
|
-
$et->
|
1028
|
+
$et->Warn('Some IPTC characters not converted (ISO 2022 shifting not supported)');
|
1029
1029
|
}
|
1030
1030
|
}
|
1031
1031
|
|
@@ -1164,7 +1164,7 @@ sub ProcessIPTC($$$)
|
|
1164
1164
|
}
|
1165
1165
|
my $tableInfo = $tagTablePtr->{$rec};
|
1166
1166
|
unless ($tableInfo) {
|
1167
|
-
$et->
|
1167
|
+
$et->Warn("Unrecognized IPTC record $rec (ignored)");
|
1168
1168
|
$pos += $len;
|
1169
1169
|
next; # ignore this entry
|
1170
1170
|
}
|
@@ -78,7 +78,7 @@ sub ProcessIND($$)
|
|
78
78
|
$err = 'InDesign files larger than 2 GB not supported (LargeFileSupport not set)';
|
79
79
|
goto DONE;
|
80
80
|
} elsif ($et->Options('LargeFileSupport') eq '2') {
|
81
|
-
$et->
|
81
|
+
$et->Warn('Processing large file (LargeFileSupport is 2)');
|
82
82
|
}
|
83
83
|
}
|
84
84
|
if ($outfile) {
|
@@ -11,7 +11,7 @@ use strict;
|
|
11
11
|
use vars qw($VERSION);
|
12
12
|
use Image::ExifTool qw(:DataAccess :Utils);
|
13
13
|
|
14
|
-
$VERSION = '1.
|
14
|
+
$VERSION = '1.38';
|
15
15
|
|
16
16
|
sub ProcessOcad($$$);
|
17
17
|
sub ProcessJPEG_HDR($$$);
|
@@ -87,6 +87,11 @@ sub ProcessJPEG_HDR($$$);
|
|
87
87
|
Name => 'InfiRayVersion',
|
88
88
|
Condition => '$$valPt =~ /^....IJPEG\0/s',
|
89
89
|
SubDirectory => { TagTable => 'Image::ExifTool::InfiRay::Version' },
|
90
|
+
}, {
|
91
|
+
Name => 'UniformResourceName',
|
92
|
+
Groups => { 1 => 'APP2' },
|
93
|
+
Condition => '$$valPt =~ /^urn:/',
|
94
|
+
Notes => 'used in Apple HDR images',
|
90
95
|
}, {
|
91
96
|
Name => 'PreviewImage',
|
92
97
|
Condition => '$$valPt =~ /^(|QVGA\0|BGTH)\xff\xd8\xff\xdb/',
|
@@ -246,16 +251,26 @@ sub ProcessJPEG_HDR($$$);
|
|
246
251
|
Condition => '$$valPt =~ /^SEAL\0/',
|
247
252
|
SubDirectory => { TagTable => 'Image::ExifTool::XMP::SEAL' },
|
248
253
|
}],
|
249
|
-
APP10 => {
|
254
|
+
APP10 => [{
|
250
255
|
Name => 'Comment',
|
251
256
|
Condition => '$$valPt =~ /^UNICODE\0/',
|
252
257
|
Notes => 'PhotoStudio Unicode comment',
|
253
|
-
|
258
|
+
}, {
|
259
|
+
Name => 'HDRGainCurve', #PH (NC)
|
260
|
+
Condition => '$$valPt =~ /^AROT\0\0.{4}/s',
|
261
|
+
Groups => { 1 => 'APP10', 2 => 'Image' },
|
262
|
+
ValueConv => q{
|
263
|
+
my $n = unpack('x6N', $val);
|
264
|
+
return '<truncated AROT data>' if length($val)-6 < $n * 4;
|
265
|
+
my $str = join ' ', unpack("x10V$n", $val);
|
266
|
+
return \$str;
|
267
|
+
},
|
268
|
+
}],
|
254
269
|
APP11 => [{
|
255
270
|
Name => 'JPEG-HDR',
|
256
271
|
Condition => '$$valPt =~ /^HDR_RI /',
|
257
272
|
SubDirectory => { TagTable => 'Image::ExifTool::JPEG::HDR' },
|
258
|
-
|
273
|
+
}, {
|
259
274
|
Name => 'JUMBF',
|
260
275
|
Condition => '$$valPt =~ /^JP/',
|
261
276
|
SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main' },
|
@@ -866,8 +866,8 @@ sub BrotliWarn($$;$)
|
|
866
866
|
{
|
867
867
|
my ($et, $type, $uncompress) = @_;
|
868
868
|
my ($enc, $mod) = $uncompress ? qw(decoding Uncompress) : qw(encoding Compress);
|
869
|
-
$et->
|
870
|
-
$et->
|
869
|
+
$et->Warn("Error $enc '${type}' brob box");
|
870
|
+
$et->Warn("Try updating to IO::${mod}::Brotli 0.004 or later");
|
871
871
|
}
|
872
872
|
|
873
873
|
#------------------------------------------------------------------------------
|
@@ -933,7 +933,7 @@ sub CreateNewBoxes($$)
|
|
933
933
|
$tag = 'brob';
|
934
934
|
}
|
935
935
|
} else {
|
936
|
-
$et->
|
936
|
+
$et->Warn('Install IO::Compress::Brotli to create Brotli-compressed metadata');
|
937
937
|
}
|
938
938
|
}
|
939
939
|
my $boxhdr = pack('N', length($newdir) + length($pad) + 8) . $tag;
|
@@ -1285,7 +1285,7 @@ sub ProcessJpeg2000Box($$$)
|
|
1285
1285
|
++$$et{CHANGED};
|
1286
1286
|
}
|
1287
1287
|
} else {
|
1288
|
-
$et->
|
1288
|
+
$et->Warn('Install IO::Compress::Brotli to write Brotli-compressed metadata');
|
1289
1289
|
}
|
1290
1290
|
} elsif (not $compress and $boxID eq 'brob') {
|
1291
1291
|
# (in this case, ProcessBrotli has returned uncompressed data,
|
@@ -1410,7 +1410,7 @@ sub ProcessBrotli($$$)
|
|
1410
1410
|
}
|
1411
1411
|
if (eval { require IO::Uncompress::Brotli }) {
|
1412
1412
|
if ($isWriting and not eval { require IO::Compress::Brotli }) {
|
1413
|
-
$et->
|
1413
|
+
$et->Warn('Install IO::Compress::Brotli to write Brotli-compressed metadata');
|
1414
1414
|
return undef;
|
1415
1415
|
}
|
1416
1416
|
my $compress = $et->Options('Compress');
|
@@ -1455,7 +1455,7 @@ sub ProcessBrotli($$$)
|
|
1455
1455
|
return $type . $dat;
|
1456
1456
|
}
|
1457
1457
|
} else {
|
1458
|
-
$et->
|
1458
|
+
$et->Warn('Install IO::Uncompress::Brotli to decode Brotli-compressed metadata');
|
1459
1459
|
return undef if $isWriting;
|
1460
1460
|
}
|
1461
1461
|
return 1;
|
@@ -32,7 +32,7 @@ use strict;
|
|
32
32
|
use vars qw($VERSION);
|
33
33
|
use Image::ExifTool qw(:DataAccess :Utils);
|
34
34
|
|
35
|
-
$VERSION = '1.
|
35
|
+
$VERSION = '1.28';
|
36
36
|
|
37
37
|
# program map table "stream_type" lookup (ref 6/1/9)
|
38
38
|
my %streamType = (
|
@@ -305,6 +305,15 @@ sub ParsePID($$$$$)
|
|
305
305
|
# MPEG-1/MPEG-2 Audio
|
306
306
|
require Image::ExifTool::MPEG;
|
307
307
|
Image::ExifTool::MPEG::ParseMPEGAudio($et, $dataPt);
|
308
|
+
} elsif ($type == 6 and $pid == 0x0300) {
|
309
|
+
# LIGOGPSINFO from unknown dashcam (../testpics/gps_video/Wrong Way pass.ts)
|
310
|
+
if ($$dataPt =~ /^LIGOGPSINFO/s) {
|
311
|
+
my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
|
312
|
+
my %dirInfo = ( DataPt => $dataPt, DirName => 'Ligo0x0300' );
|
313
|
+
Image::ExifTool::QuickTime::ProcessLigoGPS($et, \%dirInfo, $tbl, 1);
|
314
|
+
$$et{FoundGoodGPS} = 1;
|
315
|
+
$more = 1;
|
316
|
+
}
|
308
317
|
} elsif ($type == 0x1b) {
|
309
318
|
# H.264 Video
|
310
319
|
require Image::ExifTool::H264;
|
@@ -313,7 +322,7 @@ sub ParsePID($$$$$)
|
|
313
322
|
if ($$et{OPTIONS}{ExtractEmbedded}) {
|
314
323
|
$more = 1;
|
315
324
|
} elsif (not $$et{OPTIONS}{Validate}) {
|
316
|
-
$et->
|
325
|
+
$et->Warn('The ExtractEmbedded option may find more tags in the video data',3);
|
317
326
|
}
|
318
327
|
} elsif ($type == 0x81 or $type == 0x87 or $type == 0x91) {
|
319
328
|
# AC-3 audio
|
@@ -459,11 +468,11 @@ sub ParsePID($$$$$)
|
|
459
468
|
$bad = 1 if $_ < 0x30 or $_ > 0x39;
|
460
469
|
}
|
461
470
|
if ($bad) {
|
462
|
-
$et->
|
471
|
+
$et->Warn('Error decrypting GPS degrees');
|
463
472
|
} else {
|
464
473
|
my $la = pack('C*', @chars[0,1]);
|
465
474
|
my $lo = pack('C*', @chars[2,3,4]);
|
466
|
-
$et->
|
475
|
+
$et->Warn('Decryption of this GPS is highly experimental. More testing samples are required');
|
467
476
|
$et->HandleTag($tagTbl, GPSLatitude => (($la || 0) + (($6-85.95194)/2.43051724137931+42.2568)/60) * ($7 eq 'N' ? 1 : -1));
|
468
477
|
$et->HandleTag($tagTbl, GPSLongitude => (($lo || 0) + (($9-70.14674)/1.460987654320988+9.2028)/60) * ($10 eq 'E' ? 1 : -1));
|
469
478
|
}
|
@@ -476,7 +485,7 @@ sub ParsePID($$$$$)
|
|
476
485
|
my $lon = abs(GetFloat($dataPt, 56)); # (abs just to be safe)
|
477
486
|
my $spd = GetFloat($dataPt, 64);
|
478
487
|
my $trk = GetFloat($dataPt, 68);
|
479
|
-
$et->
|
488
|
+
$et->Warn('GPSLatitude/Longitude encryption is not yet known, so these will be wrong');
|
480
489
|
$$et{DOC_NUM} = ++$$et{DOC_COUNT};
|
481
490
|
my @date = unpack('x32V3x28V3', $$dataPt);
|
482
491
|
$date[3] += 2000;
|
@@ -514,9 +523,16 @@ sub ParsePID($$$$$)
|
|
514
523
|
$et->HandleTag($tagTbl, GPSTrack => $a[2] / 100);
|
515
524
|
}
|
516
525
|
# Note: 10 bytes after last GPS record look like a single 3-axis accelerometer reading:
|
517
|
-
# eg. fd ff 00 00 ff ff 00 00 01 00
|
526
|
+
# eg. fd ff 00 00 ff ff 00 00 01 00
|
518
527
|
$$et{FoundGoodGPS} = 1; # so we skip over unrecognized packets
|
519
528
|
$more = 1;
|
529
|
+
} elsif ($$dataPt =~ /^skip.{4}LIGOGPSINFO\0/s) {
|
530
|
+
# (this record contains 2 copies of the same 'skip' atom in my sample --
|
531
|
+
# only extract data from the first one)
|
532
|
+
my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
|
533
|
+
my %dirInfo = ( DataPt => $dataPt, DirStart => 8, DirName => sprintf('Ligo0x%.4x',$pid));
|
534
|
+
Image::ExifTool::QuickTime::ProcessLigoGPS($et, \%dirInfo, $tbl, 1);
|
535
|
+
$$et{FoundGoodGPS} = 1;
|
520
536
|
} elsif ($$et{FoundGoodGPS}) {
|
521
537
|
$more = 1;
|
522
538
|
}
|
@@ -694,7 +710,7 @@ sub ProcessM2TS($$)
|
|
694
710
|
# or if we are just looking for the last timestamp
|
695
711
|
next unless $payload_data_exists and not defined $backScan;
|
696
712
|
|
697
|
-
|
713
|
+
# decode payload data
|
698
714
|
if ($pid == 0 or # program association table
|
699
715
|
defined $pmt{$pid}) # program map table(s)
|
700
716
|
{
|
@@ -787,7 +803,7 @@ sub ProcessM2TS($$)
|
|
787
803
|
last if $j + $descriptor_length > $program_info_length;
|
788
804
|
my $desc = substr($buf2, $pos+$j, $descriptor_length);
|
789
805
|
$j += $descriptor_length;
|
790
|
-
$desc =~ s/([\x00-\x1f\
|
806
|
+
$desc =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%.2x",ord $1)/eg;
|
791
807
|
printf $out " Program Descriptor: Type=0x%.2x \"$desc\"\n", $descriptor_tag;
|
792
808
|
}}
|
793
809
|
$pos += $program_info_length; # skip descriptors (for now)
|
@@ -822,7 +838,7 @@ sub ProcessM2TS($$)
|
|
822
838
|
$j += $descriptor_length;
|
823
839
|
if ($verbose > 1) {
|
824
840
|
my $dstr = $desc;
|
825
|
-
$dstr =~ s/([\x00-\x1f\
|
841
|
+
$dstr =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%.2x",ord $1)/eg;
|
826
842
|
printf $out " ES Descriptor: Type=0x%.2x \"$dstr\"\n", $descriptor_tag;
|
827
843
|
}
|
828
844
|
# parse type-specific descriptor information (once)
|
@@ -954,6 +970,20 @@ sub ProcessM2TS($$)
|
|
954
970
|
ParsePID($et, $pid, $pidType{$pid}, $pidName{$pid}, \$data{$pid});
|
955
971
|
delete $data{$pid};
|
956
972
|
}
|
973
|
+
|
974
|
+
# look for LIGOGPSINFO trailer
|
975
|
+
if ($et->Options('ExtractEmbedded') and
|
976
|
+
$raf->Seek(-8, 2) and $raf->Read($buff, 8) == 8 and
|
977
|
+
$buff =~ /^&&&&/)
|
978
|
+
{
|
979
|
+
my $len = unpack('x4N', $buff);
|
980
|
+
if ($len < $raf->Tell() and $raf->Seek(-$len, 2) and $raf->Read($buff,$len) == $len) {
|
981
|
+
my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
|
982
|
+
my %dirInfo = ( DataPt => \$buff, DirStart => 8, DirName => 'LigoTrailer' );
|
983
|
+
Image::ExifTool::QuickTime::ProcessLigoGPS($et, \%dirInfo, $tbl);
|
984
|
+
}
|
985
|
+
}
|
986
|
+
|
957
987
|
return 1;
|
958
988
|
}
|
959
989
|
|
@@ -2525,7 +2525,7 @@ sub ReadMXFValue($$$)
|
|
2525
2525
|
} elsif ($type =~ /(Array|Batch)/ and $len > 16) {
|
2526
2526
|
my ($count, $size) = unpack('NN', $val);
|
2527
2527
|
# validate data length
|
2528
|
-
$len == 8 + $count * $size or $et->
|
2528
|
+
$len == 8 + $count * $size or $et->Warn("Bad array or batch size");
|
2529
2529
|
my ($i, @a);
|
2530
2530
|
for ($i=0; $i<$count; ++$i) {
|
2531
2531
|
my $pos = 8 + $i * $size;
|
@@ -2626,7 +2626,7 @@ sub ProcessLocalSet($$$)
|
|
2626
2626
|
$extra = sprintf(', Local 0x%.4x', $loc);
|
2627
2627
|
} else {
|
2628
2628
|
$tag = $loc;
|
2629
|
-
# $et->
|
2629
|
+
# $et->Warn('Missing local key for at least one tag');
|
2630
2630
|
$extra = ', NOT IN PRIMER!';
|
2631
2631
|
}
|
2632
2632
|
my $tagInfo = $$tagTablePtr{$tag};
|
@@ -1097,7 +1097,7 @@ sub ProcessMKV($$)
|
|
1097
1097
|
if ($more >= 0x80000000) {
|
1098
1098
|
last unless $et->Options('LargeFileSupport');
|
1099
1099
|
if ($et->Options('LargeFileSupport') eq '2') {
|
1100
|
-
$et->
|
1100
|
+
$et->Warn('Processing large block (LargeFileSupport is 2)');
|
1101
1101
|
}
|
1102
1102
|
}
|
1103
1103
|
$raf->Seek($more, 1) or last;
|
@@ -907,7 +907,7 @@ sub WriteXtraValue($$$)
|
|
907
907
|
$type = 72;
|
908
908
|
}
|
909
909
|
} else {
|
910
|
-
$et->
|
910
|
+
$et->Warn("Error converting value for Microsoft:$$tagInfo{Name}");
|
911
911
|
}
|
912
912
|
SetByteOrder('MM');
|
913
913
|
if (defined $type) {
|
@@ -1215,7 +1215,7 @@ sub DecodeStream($$)
|
|
1215
1215
|
# be sure we can process all the filters before we take the time to do the decryption
|
1216
1216
|
foreach $filter (@filters) {
|
1217
1217
|
next if $supportedFilter{$filter};
|
1218
|
-
$et->
|
1218
|
+
$et->Warn("Unsupported Filter $filter");
|
1219
1219
|
return 0;
|
1220
1220
|
}
|
1221
1221
|
# apply decryption first if required (and if the default encryption
|
@@ -1244,7 +1244,7 @@ sub DecodeStream($$)
|
|
1244
1244
|
if (ref $decodeParms eq 'HASH') {
|
1245
1245
|
$pre = $$decodeParms{Predictor};
|
1246
1246
|
if ($pre and $pre ne '1' and $pre ne '12') {
|
1247
|
-
$et->
|
1247
|
+
$et->Warn("FlateDecode Predictor $pre currently not supported");
|
1248
1248
|
return 0;
|
1249
1249
|
}
|
1250
1250
|
}
|
@@ -1259,7 +1259,7 @@ sub DecodeStream($$)
|
|
1259
1259
|
return 0;
|
1260
1260
|
}
|
1261
1261
|
} else {
|
1262
|
-
$et->
|
1262
|
+
$et->Warn('Install Compress::Zlib to process filtered streams');
|
1263
1263
|
return 0;
|
1264
1264
|
}
|
1265
1265
|
next unless $pre and $pre eq '12'; # 12 = 'up' prediction
|
@@ -1268,7 +1268,7 @@ sub DecodeStream($$)
|
|
1268
1268
|
my $cols = $$decodeParms{Columns};
|
1269
1269
|
unless ($cols) {
|
1270
1270
|
# currently only support 'up' prediction
|
1271
|
-
$et->
|
1271
|
+
$et->Warn('No Columns for decoding stream');
|
1272
1272
|
return 0;
|
1273
1273
|
}
|
1274
1274
|
my @bytes = unpack('C*', $$dict{_stream});
|
@@ -1276,7 +1276,7 @@ sub DecodeStream($$)
|
|
1276
1276
|
my $buff = '';
|
1277
1277
|
while (@bytes > $cols) {
|
1278
1278
|
unless (($_ = shift @bytes) == 2) {
|
1279
|
-
$et->
|
1279
|
+
$et->Warn("Unsupported PNG filter $_"); # (yes, PNG)
|
1280
1280
|
return 0;
|
1281
1281
|
}
|
1282
1282
|
foreach (@pre) {
|
@@ -1296,11 +1296,11 @@ sub DecodeStream($$)
|
|
1296
1296
|
my $name = $$decodeParms{Name};
|
1297
1297
|
next unless defined $name or $name eq 'Identity';
|
1298
1298
|
if ($name ne 'StdCF') {
|
1299
|
-
$et->
|
1299
|
+
$et->Warn("Unsupported Crypt Filter $name");
|
1300
1300
|
return 0;
|
1301
1301
|
}
|
1302
1302
|
unless ($cryptInfo) {
|
1303
|
-
$et->
|
1303
|
+
$et->Warn('Missing Encrypt StdCF entry');
|
1304
1304
|
return 0;
|
1305
1305
|
}
|
1306
1306
|
# decrypt the stream manually because we want to:
|
@@ -1318,15 +1318,15 @@ sub DecodeStream($$)
|
|
1318
1318
|
# make sure we don't have any unsupported decoding parameters
|
1319
1319
|
if (ref $decodeParms eq 'HASH') {
|
1320
1320
|
if ($$decodeParms{Predictor}) {
|
1321
|
-
$et->
|
1321
|
+
$et->Warn("LZWDecode Predictor $$decodeParms{Predictor} currently not supported");
|
1322
1322
|
return 0;
|
1323
1323
|
} elsif ($$decodeParms{EarlyChange}) {
|
1324
|
-
$et->
|
1324
|
+
$et->Warn("LZWDecode EarlyChange currently not supported");
|
1325
1325
|
return 0;
|
1326
1326
|
}
|
1327
1327
|
}
|
1328
1328
|
unless (DecodeLZW(\$$dict{_stream})) {
|
1329
|
-
$et->
|
1329
|
+
$et->Warn('LZW decompress error');
|
1330
1330
|
return 0;
|
1331
1331
|
}
|
1332
1332
|
|
@@ -1362,7 +1362,7 @@ sub DecodeStream($$)
|
|
1362
1362
|
last if $_ eq '~';
|
1363
1363
|
# (both $n and $val are zero again now)
|
1364
1364
|
}
|
1365
|
-
$err and $et->
|
1365
|
+
$err and $et->Warn("ASCII85Decode error $err");
|
1366
1366
|
$$dict{_stream} = pack('C*', @out);
|
1367
1367
|
}
|
1368
1368
|
}
|
@@ -1830,7 +1830,7 @@ sub ProcessDict($$$$;$$)
|
|
1830
1830
|
|
1831
1831
|
$nesting = ($nesting || 0) + 1;
|
1832
1832
|
if ($nesting > 50) {
|
1833
|
-
$et->
|
1833
|
+
$et->Warn('Nesting too deep (directory ignored)');
|
1834
1834
|
return;
|
1835
1835
|
}
|
1836
1836
|
# save entire dictionary for rewriting if specified
|
@@ -1990,7 +1990,7 @@ sub ProcessDict($$$$;$$)
|
|
1990
1990
|
if ($$tagInfo{IgnoreDuplicates}) {
|
1991
1991
|
my $flag = "ProcessedPDF_$tag";
|
1992
1992
|
if ($$et{$flag}) {
|
1993
|
-
next if $et->
|
1993
|
+
next if $et->Warn("Ignored duplicate $tag dictionary", 2);
|
1994
1994
|
} else {
|
1995
1995
|
$$et{$flag} = 1;
|
1996
1996
|
}
|
@@ -2171,9 +2171,9 @@ sub ProcessDict($$$$;$$)
|
|
2171
2171
|
my $type = $$dict{Type} || '';
|
2172
2172
|
if ($type ne '/Metadata' or $$dict{Length} > 100000) {
|
2173
2173
|
if ($$et{OPTIONS}{IgnoreMinorErrors}) {
|
2174
|
-
$et->
|
2174
|
+
$et->Warn("Decrypting large $$tagInfo{Name} (will be slow)");
|
2175
2175
|
} else {
|
2176
|
-
$et->
|
2176
|
+
$et->Warn("Skipping large AES-encrypted $$tagInfo{Name}", 2);
|
2177
2177
|
last;
|
2178
2178
|
}
|
2179
2179
|
}
|
@@ -269,7 +269,7 @@ sub ExtractObject($$;$)
|
|
269
269
|
if ($type == 13) { # dict
|
270
270
|
# prevent infinite recursion
|
271
271
|
if (defined $parent and length $parent > 1000) {
|
272
|
-
$et->
|
272
|
+
$et->Warn('Possible deep recursion while parsing PLIST');
|
273
273
|
return undef;
|
274
274
|
}
|
275
275
|
my $tagTablePtr = $$plistInfo{TagTablePtr};
|
@@ -965,7 +965,7 @@ sub FoundPNG($$$$;$$$$)
|
|
965
965
|
my $processed;
|
966
966
|
if ($$tagInfo{SubDirectory}) {
|
967
967
|
if ($$et{OPTIONS}{Validate} and $$tagInfo{NonStandard}) {
|
968
|
-
$et->
|
968
|
+
$et->Warn("Non-standard $$tagInfo{NonStandard} in PNG $tag chunk", 1);
|
969
969
|
}
|
970
970
|
my $subdir = $$tagInfo{SubDirectory};
|
971
971
|
my $dirName = $$subdir{DirName} || $tagName;
|
@@ -1471,7 +1471,7 @@ sub ProcessPNG($$)
|
|
1471
1471
|
|
1472
1472
|
if ($wasEnd) {
|
1473
1473
|
last unless $n; # stop now if normal end of PNG
|
1474
|
-
$et->
|
1474
|
+
$et->Warn("Trailer data after $fileType $endChunk chunk", 1);
|
1475
1475
|
$wasTrailer = 1;
|
1476
1476
|
last if $n < 8;
|
1477
1477
|
$$et{SET_GROUP1} = 'Trailer';
|
@@ -1500,7 +1500,7 @@ sub ProcessPNG($$)
|
|
1500
1500
|
} elsif ($hdrChunk eq 'IHDR' and $chunk eq 'CgBI') {
|
1501
1501
|
$et->Warn('Non-standard PNG image (Apple iPhone format)');
|
1502
1502
|
} else {
|
1503
|
-
$et->
|
1503
|
+
$et->Warn("$fileType image did not start with $hdrChunk");
|
1504
1504
|
}
|
1505
1505
|
}
|
1506
1506
|
if ($outfile and ($isDatChunk{$chunk} or $chunk eq $endChunk) and @txtOffset) {
|
@@ -1594,7 +1594,7 @@ sub ProcessPNG($$)
|
|
1594
1594
|
} else {
|
1595
1595
|
$msg = 'fixed';
|
1596
1596
|
}
|
1597
|
-
$et->
|
1597
|
+
$et->Warn("Text/EXIF chunk(s) found after $$et{FileType} $wasDat ($msg)", 1);
|
1598
1598
|
}
|
1599
1599
|
# read chunk data and CRC
|
1600
1600
|
unless ($raf->Read($dbuf,$len)==$len and $raf->Read($cbuf, 4)==4) {
|
@@ -2802,7 +2802,7 @@ sub ProcessLeicaTrailer($;$)
|
|
2802
2802
|
}
|
2803
2803
|
} else { # M (Type 240)
|
2804
2804
|
# scan for the lens type (M writes 114 bytes of garbage first)
|
2805
|
-
if ($buff =~ /\G.{114}([\x20-\
|
2805
|
+
if ($buff =~ /\G.{114}([\x20-\x7e]*\0*)/sg and length($1) >= 50) {
|
2806
2806
|
$expect = 114;
|
2807
2807
|
}
|
2808
2808
|
}
|
@@ -450,7 +450,7 @@ sub WritePhaseOne($$$)
|
|
450
450
|
|
451
451
|
return undef if $dirLen < 12;
|
452
452
|
unless ($$tagTablePtr{VARS} and $$tagTablePtr{VARS}{ENTRY_SIZE}) {
|
453
|
-
$et->
|
453
|
+
$et->Warn("No ENTRY_SIZE for $$tagTablePtr{TABLE_NAME}");
|
454
454
|
return undef;
|
455
455
|
}
|
456
456
|
my $entrySize = $$tagTablePtr{VARS}{ENTRY_SIZE};
|
@@ -591,7 +591,7 @@ sub ProcessPhaseOne($$$)
|
|
591
591
|
|
592
592
|
return 0 if $dirLen < 12;
|
593
593
|
unless ($$tagTablePtr{VARS} and $$tagTablePtr{VARS}{ENTRY_SIZE}) {
|
594
|
-
$et->
|
594
|
+
$et->Warn("No ENTRY_SIZE for $$tagTablePtr{TABLE_NAME}");
|
595
595
|
return undef;
|
596
596
|
}
|
597
597
|
my $entrySize = $$tagTablePtr{VARS}{ENTRY_SIZE};
|
@@ -632,7 +632,7 @@ sub ProcessPhaseOne($$$)
|
|
632
632
|
$formatSize = Get32u($dataPt, $entry+4);
|
633
633
|
$formatStr = $formatName[$formatSize];
|
634
634
|
unless ($formatStr) {
|
635
|
-
$et->
|
635
|
+
$et->Warn("Unrecognized $ifdType format size $formatSize",1);
|
636
636
|
$formatSize = 1;
|
637
637
|
$formatStr = 'undef';
|
638
638
|
}
|