exiftool_vendored 13.06.0 → 13.10.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.
- checksums.yaml +4 -4
- data/bin/Changes +55 -4
- 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 +29 -15
- 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/Apple.pm +9 -7
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +12 -3
- data/bin/lib/Image/ExifTool/Canon.pm +19 -1
- data/bin/lib/Image/ExifTool/DJI.pm +1 -1
- 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.dat +0 -0
- data/bin/lib/Image/ExifTool/HP.pm +1 -1
- data/bin/lib/Image/ExifTool/ICC_Profile.pm +80 -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/Jpeg2000.pm +8 -7
- 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 +3 -3
- data/bin/lib/Image/ExifTool/PNG.pm +6 -5
- 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 +64 -3
- data/bin/lib/Image/ExifTool/Protobuf.pm +4 -4
- data/bin/lib/Image/ExifTool/QuickTime.pm +72 -24
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +336 -91
- 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 +2 -2
- data/bin/lib/Image/ExifTool/TagInfoXML.pm +4 -3
- data/bin/lib/Image/ExifTool/TagLookup.pm +6982 -6970
- data/bin/lib/Image/ExifTool/TagNames.pod +48 -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 +47 -13
- data/bin/lib/Image/ExifTool/WriteXMP.pl +2 -2
- data/bin/lib/Image/ExifTool/Writer.pl +32 -21
- data/bin/lib/Image/ExifTool/XMP.pm +9 -9
- data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
- data/bin/lib/Image/ExifTool.pm +65 -61
- data/bin/lib/Image/ExifTool.pod +41 -35
- data/bin/perl-Image-ExifTool.spec +1 -1
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +2 -2
@@ -12,6 +12,7 @@
|
|
12
12
|
# 5) http://www.color.org/icc_specs2.xalter (approved revisions, 2010-07-16)
|
13
13
|
# 6) Eef Vreeland private communication
|
14
14
|
# 7) https://color.org/specification/ICC.2-2019.pdf
|
15
|
+
# 8) https://www.color.org/specification/ICC.1-2022-05.pdf
|
15
16
|
#
|
16
17
|
# Notes: The ICC profile information is different: the format of each
|
17
18
|
# tag is embedded in the information instead of in the directory
|
@@ -25,7 +26,7 @@ use strict;
|
|
25
26
|
use vars qw($VERSION);
|
26
27
|
use Image::ExifTool qw(:DataAccess :Utils);
|
27
28
|
|
28
|
-
$VERSION = '1.
|
29
|
+
$VERSION = '1.41';
|
29
30
|
|
30
31
|
sub ProcessICC($$);
|
31
32
|
sub ProcessICC_Profile($$$);
|
@@ -367,6 +368,7 @@ my %manuSig = ( #6
|
|
367
368
|
Groups => { 2 => 'Time' },
|
368
369
|
PrintConv => '$self->ConvertDateTime($val)',
|
369
370
|
},
|
371
|
+
|
370
372
|
targ => {
|
371
373
|
Name => 'CharTarget',
|
372
374
|
ValueConv => '$val=~s/\0.*//; length $val > 128 ? \$val : $val',
|
@@ -493,6 +495,10 @@ my %manuSig = ( #6
|
|
493
495
|
},
|
494
496
|
},
|
495
497
|
ciis => 'ColorimetricIntentImageState', #5
|
498
|
+
cicp => { #8 (Coding-independent Code Points)
|
499
|
+
Name => 'ColorRepresentation',
|
500
|
+
SubDirectory => { TagTable => 'Image::ExifTool::ICC_Profile::ColorRep' },
|
501
|
+
},
|
496
502
|
scoe => 'SceneColorimetryEstimates', #5
|
497
503
|
sape => 'SceneAppearanceEstimates', #5
|
498
504
|
fpce => 'FocalPlaneColorimetryEstimates', #5
|
@@ -628,6 +634,7 @@ my %manuSig = ( #6
|
|
628
634
|
s2cp => 'StandardToCustomPcc',
|
629
635
|
smap => 'SurfaceMap',
|
630
636
|
# smwp ? (seen in some v5 samples [was a mistake in sample production])
|
637
|
+
hdgm => { Name => 'HDGainMapInfo', Binary => 1 }, #PH
|
631
638
|
|
632
639
|
# the following entry represents the ICC profile header, and doesn't
|
633
640
|
# exist as a tag in the directory. It is only in this table to provide
|
@@ -747,6 +754,78 @@ my %manuSig = ( #6
|
|
747
754
|
},
|
748
755
|
);
|
749
756
|
|
757
|
+
# Coding-independent code points (cicp) definition
|
758
|
+
# (NOTE: conversions are the same as Image::ExifTool::QuickTime::ColorRep tags)
|
759
|
+
%Image::ExifTool::ICC_Profile::ColorRep = (
|
760
|
+
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
761
|
+
GROUPS => { 0 => 'ICC_Profile', 1 => 'ICC-cicp', 2 => 'Image' },
|
762
|
+
8 => {
|
763
|
+
Name => 'ColorPrimaries',
|
764
|
+
PrintConv => {
|
765
|
+
1 => 'BT.709',
|
766
|
+
2 => 'Unspecified',
|
767
|
+
4 => 'BT.470 System M (historical)',
|
768
|
+
5 => 'BT.470 System B, G (historical)',
|
769
|
+
6 => 'BT.601',
|
770
|
+
7 => 'SMPTE 240',
|
771
|
+
8 => 'Generic film (color filters using illuminant C)',
|
772
|
+
9 => 'BT.2020, BT.2100',
|
773
|
+
10 => 'SMPTE 428 (CIE 1931 XYZ)', #forum14766
|
774
|
+
11 => 'SMPTE RP 431-2',
|
775
|
+
12 => 'SMPTE EG 432-1',
|
776
|
+
22 => 'EBU Tech. 3213-E',
|
777
|
+
},
|
778
|
+
},
|
779
|
+
9 => {
|
780
|
+
Name => 'TransferCharacteristics',
|
781
|
+
PrintConv => {
|
782
|
+
0 => 'For future use (0)',
|
783
|
+
1 => 'BT.709',
|
784
|
+
2 => 'Unspecified',
|
785
|
+
3 => 'For future use (3)',
|
786
|
+
4 => 'BT.470 System M (historical)', # Gamma 2.2? (ref forum14960)
|
787
|
+
5 => 'BT.470 System B, G (historical)', # Gamma 2.8? (ref forum14960)
|
788
|
+
6 => 'BT.601',
|
789
|
+
7 => 'SMPTE 240 M',
|
790
|
+
8 => 'Linear',
|
791
|
+
9 => 'Logarithmic (100 : 1 range)',
|
792
|
+
10 => 'Logarithmic (100 * Sqrt(10) : 1 range)',
|
793
|
+
11 => 'IEC 61966-2-4',
|
794
|
+
12 => 'BT.1361',
|
795
|
+
13 => 'sRGB or sYCC',
|
796
|
+
14 => 'BT.2020 10-bit systems',
|
797
|
+
15 => 'BT.2020 12-bit systems',
|
798
|
+
16 => 'SMPTE ST 2084, ITU BT.2100 PQ',
|
799
|
+
17 => 'SMPTE ST 428',
|
800
|
+
18 => 'BT.2100 HLG, ARIB STD-B67',
|
801
|
+
},
|
802
|
+
},
|
803
|
+
10 => {
|
804
|
+
Name => 'MatrixCoefficients',
|
805
|
+
PrintConv => {
|
806
|
+
0 => 'Identity matrix',
|
807
|
+
1 => 'BT.709',
|
808
|
+
2 => 'Unspecified',
|
809
|
+
3 => 'For future use (3)',
|
810
|
+
4 => 'US FCC 73.628',
|
811
|
+
5 => 'BT.470 System B, G (historical)',
|
812
|
+
6 => 'BT.601',
|
813
|
+
7 => 'SMPTE 240 M',
|
814
|
+
8 => 'YCgCo',
|
815
|
+
9 => 'BT.2020 non-constant luminance, BT.2100 YCbCr',
|
816
|
+
10 => 'BT.2020 constant luminance',
|
817
|
+
11 => 'SMPTE ST 2085 YDzDx',
|
818
|
+
12 => 'Chromaticity-derived non-constant luminance',
|
819
|
+
13 => 'Chromaticity-derived constant luminance',
|
820
|
+
14 => 'BT.2100 ICtCp',
|
821
|
+
},
|
822
|
+
},
|
823
|
+
11 => {
|
824
|
+
Name => 'VideoFullRangeFlag',
|
825
|
+
PrintConv => { 0 => 'Limited', 1 => 'Full' },
|
826
|
+
},
|
827
|
+
);
|
828
|
+
|
750
829
|
# viewingConditionsType (view) definition
|
751
830
|
%Image::ExifTool::ICC_Profile::ViewingConditions = (
|
752
831
|
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
@@ -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) {
|
@@ -16,7 +16,7 @@ use strict;
|
|
16
16
|
use vars qw($VERSION);
|
17
17
|
use Image::ExifTool qw(:DataAccess :Utils);
|
18
18
|
|
19
|
-
$VERSION = '1.
|
19
|
+
$VERSION = '1.43';
|
20
20
|
|
21
21
|
sub ProcessJpeg2000Box($$$);
|
22
22
|
sub ProcessJUMD($$$);
|
@@ -631,6 +631,7 @@ my %j2cMarker = (
|
|
631
631
|
%Image::ExifTool::Jpeg2000::ColorSpec = (
|
632
632
|
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
633
633
|
WRITE_PROC => \&Image::ExifTool::WriteBinaryData, # (we don't actually call this)
|
634
|
+
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
|
634
635
|
GROUPS => { 2 => 'Image' },
|
635
636
|
FORMAT => 'int8s',
|
636
637
|
WRITABLE => 1,
|
@@ -866,8 +867,8 @@ sub BrotliWarn($$;$)
|
|
866
867
|
{
|
867
868
|
my ($et, $type, $uncompress) = @_;
|
868
869
|
my ($enc, $mod) = $uncompress ? qw(decoding Uncompress) : qw(encoding Compress);
|
869
|
-
$et->
|
870
|
-
$et->
|
870
|
+
$et->Warn("Error $enc '${type}' brob box");
|
871
|
+
$et->Warn("Try updating to IO::${mod}::Brotli 0.004 or later");
|
871
872
|
}
|
872
873
|
|
873
874
|
#------------------------------------------------------------------------------
|
@@ -933,7 +934,7 @@ sub CreateNewBoxes($$)
|
|
933
934
|
$tag = 'brob';
|
934
935
|
}
|
935
936
|
} else {
|
936
|
-
$et->
|
937
|
+
$et->Warn('Install IO::Compress::Brotli to create Brotli-compressed metadata');
|
937
938
|
}
|
938
939
|
}
|
939
940
|
my $boxhdr = pack('N', length($newdir) + length($pad) + 8) . $tag;
|
@@ -1285,7 +1286,7 @@ sub ProcessJpeg2000Box($$$)
|
|
1285
1286
|
++$$et{CHANGED};
|
1286
1287
|
}
|
1287
1288
|
} else {
|
1288
|
-
$et->
|
1289
|
+
$et->Warn('Install IO::Compress::Brotli to write Brotli-compressed metadata');
|
1289
1290
|
}
|
1290
1291
|
} elsif (not $compress and $boxID eq 'brob') {
|
1291
1292
|
# (in this case, ProcessBrotli has returned uncompressed data,
|
@@ -1410,7 +1411,7 @@ sub ProcessBrotli($$$)
|
|
1410
1411
|
}
|
1411
1412
|
if (eval { require IO::Uncompress::Brotli }) {
|
1412
1413
|
if ($isWriting and not eval { require IO::Compress::Brotli }) {
|
1413
|
-
$et->
|
1414
|
+
$et->Warn('Install IO::Compress::Brotli to write Brotli-compressed metadata');
|
1414
1415
|
return undef;
|
1415
1416
|
}
|
1416
1417
|
my $compress = $et->Options('Compress');
|
@@ -1455,7 +1456,7 @@ sub ProcessBrotli($$$)
|
|
1455
1456
|
return $type . $dat;
|
1456
1457
|
}
|
1457
1458
|
} else {
|
1458
|
-
$et->
|
1459
|
+
$et->Warn('Install IO::Uncompress::Brotli to decode Brotli-compressed metadata');
|
1459
1460
|
return undef if $isWriting;
|
1460
1461
|
}
|
1461
1462
|
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
|
}
|
@@ -21,7 +21,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
|
|
21
21
|
use Image::ExifTool::XMP;
|
22
22
|
use Image::ExifTool::GPS;
|
23
23
|
|
24
|
-
$VERSION = '1.
|
24
|
+
$VERSION = '1.13';
|
25
25
|
|
26
26
|
sub ExtractObject($$;$);
|
27
27
|
sub Get24u($$);
|
@@ -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};
|
@@ -344,7 +344,7 @@ sub ProcessBinaryPLIST($$;$)
|
|
344
344
|
my ($i, $buff, @table);
|
345
345
|
my $dataPt = $$dirInfo{DataPt};
|
346
346
|
|
347
|
-
$et->VerboseDir('Binary PLIST');
|
347
|
+
$et->VerboseDir('Binary PLIST') unless $$dirInfo{NoVerboseDir};
|
348
348
|
SetByteOrder('MM');
|
349
349
|
|
350
350
|
if ($dataPt) {
|
@@ -36,7 +36,7 @@ use strict;
|
|
36
36
|
use vars qw($VERSION $AUTOLOAD %stdCase);
|
37
37
|
use Image::ExifTool qw(:DataAccess :Utils);
|
38
38
|
|
39
|
-
$VERSION = '1.
|
39
|
+
$VERSION = '1.70';
|
40
40
|
|
41
41
|
sub ProcessPNG_tEXt($$$);
|
42
42
|
sub ProcessPNG_iTXt($$$);
|
@@ -435,6 +435,7 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
|
|
435
435
|
%Image::ExifTool::PNG::PhysicalPixel = (
|
436
436
|
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
437
437
|
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
|
438
|
+
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
|
438
439
|
WRITABLE => 1,
|
439
440
|
GROUPS => { 1 => 'PNG-pHYs', 2 => 'Image' },
|
440
441
|
WRITE_GROUP => 'PNG-pHYs',
|
@@ -965,7 +966,7 @@ sub FoundPNG($$$$;$$$$)
|
|
965
966
|
my $processed;
|
966
967
|
if ($$tagInfo{SubDirectory}) {
|
967
968
|
if ($$et{OPTIONS}{Validate} and $$tagInfo{NonStandard}) {
|
968
|
-
$et->
|
969
|
+
$et->Warn("Non-standard $$tagInfo{NonStandard} in PNG $tag chunk", 1);
|
969
970
|
}
|
970
971
|
my $subdir = $$tagInfo{SubDirectory};
|
971
972
|
my $dirName = $$subdir{DirName} || $tagName;
|
@@ -1471,7 +1472,7 @@ sub ProcessPNG($$)
|
|
1471
1472
|
|
1472
1473
|
if ($wasEnd) {
|
1473
1474
|
last unless $n; # stop now if normal end of PNG
|
1474
|
-
$et->
|
1475
|
+
$et->Warn("Trailer data after $fileType $endChunk chunk", 1);
|
1475
1476
|
$wasTrailer = 1;
|
1476
1477
|
last if $n < 8;
|
1477
1478
|
$$et{SET_GROUP1} = 'Trailer';
|
@@ -1500,7 +1501,7 @@ sub ProcessPNG($$)
|
|
1500
1501
|
} elsif ($hdrChunk eq 'IHDR' and $chunk eq 'CgBI') {
|
1501
1502
|
$et->Warn('Non-standard PNG image (Apple iPhone format)');
|
1502
1503
|
} else {
|
1503
|
-
$et->
|
1504
|
+
$et->Warn("$fileType image did not start with $hdrChunk");
|
1504
1505
|
}
|
1505
1506
|
}
|
1506
1507
|
if ($outfile and ($isDatChunk{$chunk} or $chunk eq $endChunk) and @txtOffset) {
|
@@ -1594,7 +1595,7 @@ sub ProcessPNG($$)
|
|
1594
1595
|
} else {
|
1595
1596
|
$msg = 'fixed';
|
1596
1597
|
}
|
1597
|
-
$et->
|
1598
|
+
$et->Warn("Text/EXIF chunk(s) found after $$et{FileType} $wasDat ($msg)", 1);
|
1598
1599
|
}
|
1599
1600
|
# read chunk data and CRC
|
1600
1601
|
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
|
}
|