exiftool-vendored.exe 12.28.0 → 12.34.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/exiftool_files/Changes +108 -5
- package/bin/exiftool_files/README +2 -2
- package/bin/exiftool_files/arg_files/xmp2exif.args +2 -1
- package/bin/exiftool_files/config_files/example.config +1 -1
- package/bin/exiftool_files/exiftool.pl +40 -26
- package/bin/exiftool_files/fmt_files/gpx.fmt +1 -1
- package/bin/exiftool_files/fmt_files/gpx_wpt.fmt +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +16 -3
- package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +331 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +35 -5
- package/bin/exiftool_files/lib/Image/ExifTool/Charset.pm +2 -0
- package/bin/exiftool_files/lib/Image/ExifTool/DPX.pm +13 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +98 -4
- package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +1 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +13 -2
- package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +16 -1
- package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +96 -4
- package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +15 -3
- package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +7 -3
- package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +60 -26
- package/bin/exiftool_files/lib/Image/ExifTool/Lang/nl.pm +60 -59
- package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +81 -14
- package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +12 -3
- package/bin/exiftool_files/lib/Image/ExifTool/NikonSettings.pm +10 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +8 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Other.pm +93 -0
- package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +11 -12
- package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +7 -6
- package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +2 -1
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +67 -9
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +133 -119
- package/bin/exiftool_files/lib/Image/ExifTool/README +9 -2
- package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +6 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +47 -10
- package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +80 -32
- package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +139 -4
- package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +224 -30
- package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -0
- package/bin/exiftool_files/lib/Image/ExifTool/WritePNG.pl +2 -0
- package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +17 -3
- package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +43 -0
- package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +21 -8
- package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +4 -1
- package/bin/exiftool_files/lib/Image/ExifTool/XMPStruct.pl +3 -1
- package/bin/exiftool_files/lib/Image/ExifTool.pm +8892 -8839
- package/bin/exiftool_files/lib/Image/ExifTool.pod +24 -15
- package/package.json +3 -3
|
@@ -28,7 +28,7 @@ use vars qw($VERSION);
|
|
|
28
28
|
use Image::ExifTool qw(:Public);
|
|
29
29
|
use Image::ExifTool::GPS;
|
|
30
30
|
|
|
31
|
-
$VERSION = '1.
|
|
31
|
+
$VERSION = '1.65';
|
|
32
32
|
|
|
33
33
|
sub JITTER() { return 2 } # maximum time jitter
|
|
34
34
|
|
|
@@ -262,8 +262,10 @@ sub LoadTrackLog($$;$)
|
|
|
262
262
|
$param = 'time';
|
|
263
263
|
} elsif (/^(Pos)?Lat/i) {
|
|
264
264
|
$param = 'lat';
|
|
265
|
+
/ref$/i and $param .= 'ref';
|
|
265
266
|
} elsif (/^(Pos)?Lon/i) {
|
|
266
267
|
$param = 'lon';
|
|
268
|
+
/ref$/i and $param .= 'ref';
|
|
267
269
|
} elsif (/^(Pos)?Alt/i) {
|
|
268
270
|
$param = 'alt';
|
|
269
271
|
} elsif (/^(Angle)?(Heading|Track)/i) {
|
|
@@ -453,7 +455,7 @@ DoneFix: $isDate = 1;
|
|
|
453
455
|
# (ExifTool enhancements allow for standard tag names or descriptions as the column headings,
|
|
454
456
|
# add support for time zones and flexible coordinates, and allow new DateTime and Shift columns)
|
|
455
457
|
#
|
|
456
|
-
my ($param, $date, $secs);
|
|
458
|
+
my ($param, $date, $secs, %neg);
|
|
457
459
|
foreach $param (@csvHeadings) {
|
|
458
460
|
my $val = shift @vals;
|
|
459
461
|
last unless defined $val;
|
|
@@ -479,6 +481,10 @@ DoneFix: $isDate = 1;
|
|
|
479
481
|
}
|
|
480
482
|
} elsif ($param eq 'lat' or $param eq 'lon') {
|
|
481
483
|
$$fix{$param} = Image::ExifTool::GPS::ToDegrees($val, 1);
|
|
484
|
+
} elsif ($param eq 'latref') {
|
|
485
|
+
$neg{lat} = 1 if $val =~ /^S/i;
|
|
486
|
+
} elsif ($param eq 'lonref') {
|
|
487
|
+
$neg{lon} = 1 if $val =~ /^W/i;
|
|
482
488
|
} elsif ($param eq 'runtime') {
|
|
483
489
|
$date = $trackTime;
|
|
484
490
|
$secs = $val;
|
|
@@ -486,6 +492,11 @@ DoneFix: $isDate = 1;
|
|
|
486
492
|
$$fix{$param} = $val;
|
|
487
493
|
}
|
|
488
494
|
}
|
|
495
|
+
# make coordinate negative according to reference direction if necessary
|
|
496
|
+
foreach $param (keys %neg) {
|
|
497
|
+
next unless defined $$fix{$param};
|
|
498
|
+
$$fix{$param} = -abs($$fix{$param});
|
|
499
|
+
}
|
|
489
500
|
if ($date and defined $secs and defined $$fix{lat} and defined $$fix{lon}) {
|
|
490
501
|
$time = $date + $secs;
|
|
491
502
|
$$has{alt} = 1 if defined $$fix{alt};
|
|
@@ -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.07';
|
|
20
20
|
|
|
21
21
|
sub ProcessGoPro($$$);
|
|
22
22
|
sub ProcessString($$$);
|
|
@@ -386,6 +386,21 @@ my %addUnits = (
|
|
|
386
386
|
Binary => 1,
|
|
387
387
|
},
|
|
388
388
|
# ZFOV (APP6,GPMF) - seen: 148.34, 0 (fmt f, Hero8, Max)
|
|
389
|
+
# the following ref forum12825
|
|
390
|
+
MUID => {
|
|
391
|
+
Name => 'MediaUniqueID',
|
|
392
|
+
PrintConv => q{
|
|
393
|
+
my @a = split ' ', $val;
|
|
394
|
+
$_ = sprintf('%.8x',$_) foreach @a;
|
|
395
|
+
return join('', @a);
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
EXPT => 'MaximumShutterAngle',
|
|
399
|
+
MTRX => 'AccelerometerMatrix',
|
|
400
|
+
ORIN => 'InputOrientation',
|
|
401
|
+
ORIO => 'OutputOrientation',
|
|
402
|
+
UNIF => 'InputUniformity',
|
|
403
|
+
SROT => 'SensorReadoutTime',
|
|
389
404
|
);
|
|
390
405
|
|
|
391
406
|
# GoPro GPS5 tags (ref 2) (Hero5,Hero6)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# 4) http://www.color.org/privatetag2007-01.pdf
|
|
12
12
|
# 5) http://www.color.org/icc_specs2.xalter (approved revisions, 2010-07-16)
|
|
13
13
|
# 6) Eef Vreeland private communication
|
|
14
|
+
# 7) https://color.org/specification/ICC.2-2019.pdf
|
|
14
15
|
#
|
|
15
16
|
# Notes: The ICC profile information is different: the format of each
|
|
16
17
|
# tag is embedded in the information instead of in the directory
|
|
@@ -24,7 +25,7 @@ use strict;
|
|
|
24
25
|
use vars qw($VERSION);
|
|
25
26
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
26
27
|
|
|
27
|
-
$VERSION = '1.
|
|
28
|
+
$VERSION = '1.37';
|
|
28
29
|
|
|
29
30
|
sub ProcessICC($$);
|
|
30
31
|
sub ProcessICC_Profile($$$);
|
|
@@ -52,6 +53,11 @@ my %profileClass = (
|
|
|
52
53
|
abst => 'Abstract Profile',
|
|
53
54
|
nmcl => 'NamedColor Profile',
|
|
54
55
|
nkpf => 'Nikon Input Device Profile (NON-STANDARD!)', # (written by Nikon utilities)
|
|
56
|
+
# additions in v5 (ref 7)
|
|
57
|
+
cenc => 'ColorEncodingSpace Profile',
|
|
58
|
+
'mid '=> 'MultiplexIdentification Profile',
|
|
59
|
+
mlnk => 'MultiplexLink Profile',
|
|
60
|
+
mvis => 'MultiplexVisualization Profile',
|
|
55
61
|
);
|
|
56
62
|
my %manuSig = ( #6
|
|
57
63
|
'NONE' => 'none',
|
|
@@ -539,6 +545,90 @@ my %manuSig = ( #6
|
|
|
539
545
|
Binary => 1, # (NC)
|
|
540
546
|
},
|
|
541
547
|
|
|
548
|
+
# new tags in v5 (ref 7)
|
|
549
|
+
A2B3 => 'AToB3',
|
|
550
|
+
A2M0 => 'AToM0',
|
|
551
|
+
B2A3 => 'BToA3',
|
|
552
|
+
bcp0 => 'BRDFColorimetricParameter3Tag',
|
|
553
|
+
bcp1 => 'BRDFColorimetricParam1',
|
|
554
|
+
bcp2 => 'BRDFColorimetricParam2',
|
|
555
|
+
bcp3 => 'BRDFColorimetricParam3',
|
|
556
|
+
bsp0 => 'BRDFSpectralParam0',
|
|
557
|
+
bsp1 => 'BRDFSpectralParam1',
|
|
558
|
+
bsp2 => 'BRDFSpectralParam2',
|
|
559
|
+
bsp3 => 'BRDFSpectralParam3',
|
|
560
|
+
bAB0 => 'BRDFAToB0',
|
|
561
|
+
bAB1 => 'BRDFAToB1',
|
|
562
|
+
bAB2 => 'BRDFAToB2',
|
|
563
|
+
bAB3 => 'BRDFAToB3',
|
|
564
|
+
bBA0 => 'BRDFBToA0',
|
|
565
|
+
bBA1 => 'BRDFBToA1',
|
|
566
|
+
bBA2 => 'BRDFBToA2',
|
|
567
|
+
bBA3 => 'BRDFBToA3',
|
|
568
|
+
bBD0 => 'BRDFBToD0',
|
|
569
|
+
bBD1 => 'BRDFBToD1',
|
|
570
|
+
bBD2 => 'BRDFBToD2',
|
|
571
|
+
bBD3 => 'BRDFBToD3',
|
|
572
|
+
bDB0 => 'BRDFDToB0',
|
|
573
|
+
bDB1 => 'BRDFDToB1',
|
|
574
|
+
bDB2 => 'BRDFDToB2',
|
|
575
|
+
bDB3 => 'BRDFDToB3',
|
|
576
|
+
bMB0 => 'BRDFMToB0',
|
|
577
|
+
bMB1 => 'BRDFMToB1',
|
|
578
|
+
bMB2 => 'BRDFMToB2',
|
|
579
|
+
bMB3 => 'BRDFMToB3',
|
|
580
|
+
bMS0 => 'BRDFMToS0',
|
|
581
|
+
bMS1 => 'BRDFMToS1',
|
|
582
|
+
bMS2 => 'BRDFMToS2',
|
|
583
|
+
bMS3 => 'BRDFMToS3',
|
|
584
|
+
dAB0 => 'DirectionalAToB0',
|
|
585
|
+
dAB1 => 'DirectionalAToB1',
|
|
586
|
+
dAB2 => 'DirectionalAToB2',
|
|
587
|
+
dAB3 => 'DirectionalAToB3',
|
|
588
|
+
dBA0 => 'DirectionalBToA0',
|
|
589
|
+
dBA1 => 'DirectionalBToA1',
|
|
590
|
+
dBA2 => 'DirectionalBToA2',
|
|
591
|
+
dBA3 => 'DirectionalBToA3',
|
|
592
|
+
dBD0 => 'DirectionalBToD0',
|
|
593
|
+
dBD1 => 'DirectionalBToD1',
|
|
594
|
+
dBD2 => 'DirectionalBToD2',
|
|
595
|
+
dBD3 => 'DirectionalBToD3',
|
|
596
|
+
dDB0 => 'DirectionalDToB0',
|
|
597
|
+
dDB1 => 'DirectionalDToB1',
|
|
598
|
+
dDB2 => 'DirectionalDToB2',
|
|
599
|
+
dDB3 => 'DirectionalDToB3',
|
|
600
|
+
gdb0 => 'GamutBoundaryDescription0',
|
|
601
|
+
gdb1 => 'GamutBoundaryDescription1',
|
|
602
|
+
gdb2 => 'GamutBoundaryDescription2',
|
|
603
|
+
gdb3 => 'GamutBoundaryDescription3',
|
|
604
|
+
'mdv '=> 'MultiplexDefaultValues',
|
|
605
|
+
mcta => 'MultiplixTypeArray',
|
|
606
|
+
minf => 'MeasurementInfo',
|
|
607
|
+
miin => 'MeasurementInputInfo',
|
|
608
|
+
M2A0 => 'MToA0',
|
|
609
|
+
M2B0 => 'MToB0',
|
|
610
|
+
M2B1 => 'MToB1',
|
|
611
|
+
M2B2 => 'MToB2',
|
|
612
|
+
M2B3 => 'MToB3',
|
|
613
|
+
M2S0 => 'MToS0',
|
|
614
|
+
M2S1 => 'MToS1',
|
|
615
|
+
M2S2 => 'MToS2',
|
|
616
|
+
M2S3 => 'MToS3',
|
|
617
|
+
cept => 'ColorEncodingParams',
|
|
618
|
+
csnm => 'ColorSpaceName',
|
|
619
|
+
cloo => 'ColorantOrderOut',
|
|
620
|
+
clio => 'ColorantInfoOut',
|
|
621
|
+
c2sp => 'CustomToStandardPcc',
|
|
622
|
+
'CxF '=> 'CXF',
|
|
623
|
+
nmcl => 'NamedColor',
|
|
624
|
+
psin => 'ProfileSequenceInfo',
|
|
625
|
+
rfnm => 'ReferenceName',
|
|
626
|
+
svcn => 'SpectralViewingConditions',
|
|
627
|
+
swpt => 'SpectralWhitePoint',
|
|
628
|
+
s2cp => 'StandardToCustomPcc',
|
|
629
|
+
smap => 'SurfaceMap',
|
|
630
|
+
# smwp ? (seen in some v5 samples)
|
|
631
|
+
|
|
542
632
|
# the following entry represents the ICC profile header, and doesn't
|
|
543
633
|
# exist as a tag in the directory. It is only in this table to provide
|
|
544
634
|
# a link so ExifTool can locate the header tags
|
|
@@ -850,7 +940,7 @@ sub FormatICCTag($$$)
|
|
|
850
940
|
# dataType
|
|
851
941
|
if ($type eq 'data' and $size >= 12) {
|
|
852
942
|
my $form = Get32u($dataPt, $offset+8);
|
|
853
|
-
# format 0 is
|
|
943
|
+
# format 0 is UTF-8 data
|
|
854
944
|
$form == 0 and return substr($$dataPt, $offset+12, $size-12);
|
|
855
945
|
# binary data and other data types treat as binary (ie. don't format)
|
|
856
946
|
}
|
|
@@ -1022,7 +1112,7 @@ sub ValidateICC($)
|
|
|
1022
1112
|
$profileClass{substr($$valPtr, 12, 4)} or $err = 'profile class';
|
|
1023
1113
|
my $col = substr($$valPtr, 16, 4); # ColorSpaceData
|
|
1024
1114
|
my $con = substr($$valPtr, 20, 4); # ConnectionSpace
|
|
1025
|
-
my $match = '(XYZ |Lab |Luv |YCbr|Yxy |RGB |GRAY|HSV |HLS |CMYK|CMY |[2-9A-F]CLR)';
|
|
1115
|
+
my $match = '(XYZ |Lab |Luv |YCbr|Yxy |RGB |GRAY|HSV |HLS |CMYK|CMY |[2-9A-F]CLR|nc..|\0{4})';
|
|
1026
1116
|
$col =~ /$match/ or $err = 'color space';
|
|
1027
1117
|
$con =~ /$match/ or $err = 'connection space';
|
|
1028
1118
|
return $err ? "Invalid ICC profile (bad $err)" : undef;
|
|
@@ -1134,7 +1224,7 @@ sub ProcessICC_Profile($$$)
|
|
|
1134
1224
|
my $tagInfo = $et->GetTagInfo($tagTablePtr, $tagID);
|
|
1135
1225
|
# unknown tags aren't generated automatically by GetTagInfo()
|
|
1136
1226
|
# if the tagID's aren't numeric, so we must do this manually:
|
|
1137
|
-
if (not $tagInfo and $$et{OPTIONS}{Unknown}) {
|
|
1227
|
+
if (not $tagInfo and ($$et{OPTIONS}{Unknown} or $verbose)) {
|
|
1138
1228
|
$tagInfo = { Unknown => 1 };
|
|
1139
1229
|
AddTagToTable($tagTablePtr, $tagID, $tagInfo);
|
|
1140
1230
|
}
|
|
@@ -1277,6 +1367,8 @@ under the same terms as Perl itself.
|
|
|
1277
1367
|
|
|
1278
1368
|
=item L<http://developer.apple.com/documentation/GraphicsImaging/Reference/ColorSync_Manager/ColorSync_Manager.pdf>
|
|
1279
1369
|
|
|
1370
|
+
=item L<https://color.org/specification/ICC.2-2019.pdf>
|
|
1371
|
+
|
|
1280
1372
|
=back
|
|
1281
1373
|
|
|
1282
1374
|
=head1 SEE ALSO
|
|
@@ -18,11 +18,12 @@ use strict;
|
|
|
18
18
|
use vars qw($VERSION);
|
|
19
19
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
20
20
|
|
|
21
|
-
$VERSION = '1.
|
|
21
|
+
$VERSION = '1.57';
|
|
22
22
|
|
|
23
23
|
sub ProcessID3v2($$$);
|
|
24
24
|
sub ProcessPrivate($$$);
|
|
25
25
|
sub ProcessSynText($$$);
|
|
26
|
+
sub ProcessID3Dir($$$);
|
|
26
27
|
sub ConvertID3v1Text($$);
|
|
27
28
|
sub ConvertTimeStamp($);
|
|
28
29
|
|
|
@@ -69,9 +70,10 @@ my %dateTimeConv = (
|
|
|
69
70
|
# This table is just for documentation purposes
|
|
70
71
|
%Image::ExifTool::ID3::Main = (
|
|
71
72
|
VARS => { NO_ID => 1 },
|
|
73
|
+
PROCESS_PROC => \&ProcessID3Dir, # (used to process 'id3 ' chunk in WAV files)
|
|
72
74
|
NOTES => q{
|
|
73
|
-
ExifTool extracts ID3 and Lyrics3 information from MP3, MPEG,
|
|
74
|
-
FLAC, APE, MPC and RealAudio files. ID3v2 tags which support multiple
|
|
75
|
+
ExifTool extracts ID3 and Lyrics3 information from MP3, MPEG, WAV, AIFF,
|
|
76
|
+
OGG, FLAC, APE, MPC and RealAudio files. ID3v2 tags which support multiple
|
|
75
77
|
languages (eg. Comment and Lyrics) are extracted by specifying the tag name,
|
|
76
78
|
followed by a dash ('-'), then a 3-character ISO 639-2 language code (eg.
|
|
77
79
|
"Comment-spa"). See L<http://www.id3.org/> for the official ID3
|
|
@@ -1570,6 +1572,16 @@ sub ProcessID3($$)
|
|
|
1570
1572
|
return $rtnVal;
|
|
1571
1573
|
}
|
|
1572
1574
|
|
|
1575
|
+
#------------------------------------------------------------------------------
|
|
1576
|
+
# Process ID3 directory
|
|
1577
|
+
# Inputs: 0) ExifTool object reference, 1) dirInfo reference, 2) dummy tag table ref
|
|
1578
|
+
sub ProcessID3Dir($$$)
|
|
1579
|
+
{
|
|
1580
|
+
my ($et, $dirInfo, $tagTablePtr) = @_;
|
|
1581
|
+
$et->VerboseDir('ID3', undef, length ${$$dirInfo{DataPt}});
|
|
1582
|
+
return ProcessID3($et, $dirInfo);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1573
1585
|
#------------------------------------------------------------------------------
|
|
1574
1586
|
# Extract ID3 information from an MP3 audio file
|
|
1575
1587
|
# Inputs: 0) ExifTool object reference, 1) dirInfo reference
|
|
@@ -14,7 +14,7 @@ use vars qw($VERSION);
|
|
|
14
14
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
15
15
|
use Image::ExifTool::Import;
|
|
16
16
|
|
|
17
|
-
$VERSION = '1.
|
|
17
|
+
$VERSION = '1.05';
|
|
18
18
|
|
|
19
19
|
sub ProcessJSON($$);
|
|
20
20
|
sub ProcessTag($$$$%);
|
|
@@ -83,8 +83,12 @@ sub ProcessTag($$$$%)
|
|
|
83
83
|
FoundTag($et, $tagTablePtr, $tag, $val, %flags, Struct => 1);
|
|
84
84
|
return unless $et->Options('Struct') > 1;
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
# support hashes with ordered keys
|
|
87
|
+
my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
|
|
88
|
+
foreach (@keys) {
|
|
89
|
+
my $tg = $tag . ((/^\d/ and $tag =~ /\d$/) ? '_' : '') . ucfirst;
|
|
90
|
+
$tg =~ s/([^a-zA-Z])([a-z])/$1\U$2/g;
|
|
91
|
+
ProcessTag($et, $tagTablePtr, $tg, $$val{$_}, %flags, Flat => 1);
|
|
88
92
|
}
|
|
89
93
|
} elsif (ref $val eq 'ARRAY') {
|
|
90
94
|
foreach (@$val) {
|
|
@@ -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.31';
|
|
20
20
|
|
|
21
21
|
sub ProcessJpeg2000Box($$$);
|
|
22
22
|
sub ProcessJUMD($$$);
|
|
@@ -116,9 +116,6 @@ my %j2cMarker = (
|
|
|
116
116
|
0x76 => 'NLT', # non-linearity point transformation
|
|
117
117
|
);
|
|
118
118
|
|
|
119
|
-
my %jumbfTypes = (
|
|
120
|
-
);
|
|
121
|
-
|
|
122
119
|
# JPEG 2000 "box" (ie. atom) names
|
|
123
120
|
# Note: only tags with a defined "Format" are extracted
|
|
124
121
|
%Image::ExifTool::Jpeg2000::Main = (
|
|
@@ -127,10 +124,13 @@ my %jumbfTypes = (
|
|
|
127
124
|
WRITE_PROC => \&ProcessJpeg2000Box,
|
|
128
125
|
PREFERRED => 1, # always add these tags when writing
|
|
129
126
|
NOTES => q{
|
|
130
|
-
The tags below are
|
|
131
|
-
|
|
132
|
-
tags in Jpeg2000 images.
|
|
127
|
+
The tags below are found in JPEG 2000 images and the JUMBF metadata in JPEG
|
|
128
|
+
images, but not all of these are extracted. Note that ExifTool currently
|
|
129
|
+
writes only EXIF, IPTC and XMP tags in Jpeg2000 images.
|
|
133
130
|
},
|
|
131
|
+
#
|
|
132
|
+
# NOTE: ONLY TAGS WITH "Format" DEFINED ARE EXTRACTED!
|
|
133
|
+
#
|
|
134
134
|
'jP ' => 'JP2Signature', # (ref 1)
|
|
135
135
|
"jP\x1a\x1a" => 'JP2Signature', # (ref 2)
|
|
136
136
|
prfl => 'Profile',
|
|
@@ -340,10 +340,20 @@ my %jumbfTypes = (
|
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
Name => 'UUID-Signature', # (seen in JUMB data of JPEG images)
|
|
343
|
+
# (may be able to remove this when JUMBF specification is finalized)
|
|
343
344
|
Condition => '$$valPt=~/^casg\x00\x11\x00\x10\x80\x00\x00\xaa\x00\x38\x9b\x71/',
|
|
344
345
|
Format => 'undef',
|
|
345
346
|
ValueConv => 'substr($val,16)',
|
|
346
347
|
},
|
|
348
|
+
{
|
|
349
|
+
Name => 'UUID-C2PAClaimSignature', # (seen in incorrectly-formatted JUMB data of JPEG images)
|
|
350
|
+
# (may be able to remove this when JUMBF specification is finalized)
|
|
351
|
+
Condition => '$$valPt=~/^c2cs\x00\x11\x00\x10\x80\x00\x00\xaa\x00\x38\x9b\x71/',
|
|
352
|
+
SubDirectory => {
|
|
353
|
+
TagTable => 'Image::ExifTool::CBOR::Main',
|
|
354
|
+
Start => '$valuePtr + 16',
|
|
355
|
+
},
|
|
356
|
+
},
|
|
347
357
|
{
|
|
348
358
|
Name => 'UUID-Unknown',
|
|
349
359
|
},
|
|
@@ -386,6 +396,27 @@ my %jumbfTypes = (
|
|
|
386
396
|
},
|
|
387
397
|
SubDirectory => { TagTable => 'Image::ExifTool::JSON::Main' },
|
|
388
398
|
},
|
|
399
|
+
cbor => {
|
|
400
|
+
Name => 'CBORData',
|
|
401
|
+
Flags => [ 'Binary', 'Protected' ],
|
|
402
|
+
SubDirectory => { TagTable => 'Image::ExifTool::CBOR::Main' },
|
|
403
|
+
},
|
|
404
|
+
bfdb => { # used in JUMBF (see # (used when tag is renamed according to JUMDLabel)
|
|
405
|
+
Name => 'BinaryDataType',
|
|
406
|
+
Notes => 'JUMBF, MIME type and optional file name',
|
|
407
|
+
Format => 'undef',
|
|
408
|
+
# (ignore "toggles" byte and just extract MIME type and file name)
|
|
409
|
+
ValueConv => '$_=substr($val,1); s/\0+$//; s/\0/, /; $_',
|
|
410
|
+
JUMBF_Suffix => 'Type', # (used when tag is renamed according to JUMDLabel)
|
|
411
|
+
},
|
|
412
|
+
bidb => { # used in JUMBF
|
|
413
|
+
Name => 'BinaryData',
|
|
414
|
+
Notes => 'JUMBF',
|
|
415
|
+
Groups => { 2 => 'Preview' },
|
|
416
|
+
Format => 'undef',
|
|
417
|
+
Binary => 1,
|
|
418
|
+
JUMBF_Suffix => 'Data', # (used when tag is renamed according to JUMDLabel)
|
|
419
|
+
},
|
|
389
420
|
#
|
|
390
421
|
# stuff seen in JPEG XL images:
|
|
391
422
|
#
|
|
@@ -607,23 +638,24 @@ my %jumbfTypes = (
|
|
|
607
638
|
PROCESS_PROC => \&ProcessJUMD,
|
|
608
639
|
GROUPS => { 0 => 'JUMBF', 1 => 'JUMBF', 2 => 'Image' },
|
|
609
640
|
NOTES => 'Information extracted from the JUMBF description box.',
|
|
610
|
-
'
|
|
641
|
+
'type' => {
|
|
611
642
|
Name => 'JUMDType',
|
|
612
643
|
ValueConv => 'unpack "H*", $val',
|
|
613
644
|
PrintConv => q{
|
|
614
645
|
my @a = $val =~ /^(\w{8})(\w{4})(\w{4})(\w{16})$/;
|
|
615
646
|
return $val unless @a;
|
|
616
647
|
my $ascii = pack 'H*', $a[0];
|
|
617
|
-
$a[0] = $ascii if $ascii =~ /^[a-zA-Z0-9]{4}$/;
|
|
648
|
+
$a[0] = "($ascii)" if $ascii =~ /^[a-zA-Z0-9]{4}$/;
|
|
618
649
|
return join '-', @a;
|
|
619
650
|
},
|
|
620
651
|
# seen:
|
|
621
652
|
# cacb/cast/caas/cacl/casg/json-00110010800000aa00389b71
|
|
622
653
|
# 6579d6fbdba2446bb2ac1b82feeb89d1 - JPEG image
|
|
623
654
|
},
|
|
624
|
-
'
|
|
625
|
-
'
|
|
626
|
-
Name => '
|
|
655
|
+
'label' => { Name => 'JUMDLabel' },
|
|
656
|
+
'toggles' => {
|
|
657
|
+
Name => 'JUMDToggles',
|
|
658
|
+
Unknown => 1,
|
|
627
659
|
PrintConv => { BITMASK => {
|
|
628
660
|
0 => 'Requestable',
|
|
629
661
|
1 => 'Label',
|
|
@@ -631,8 +663,8 @@ my %jumbfTypes = (
|
|
|
631
663
|
3 => 'Signature',
|
|
632
664
|
}},
|
|
633
665
|
},
|
|
634
|
-
'
|
|
635
|
-
'
|
|
666
|
+
'id' => { Name => 'JUMDID', Description => 'JUMD ID' },
|
|
667
|
+
'sig' => { Name => 'JUMDSignature', PrintConv => 'unpack "H*", $val' },
|
|
636
668
|
);
|
|
637
669
|
|
|
638
670
|
#------------------------------------------------------------------------------
|
|
@@ -675,20 +707,21 @@ sub ProcessJUMD($$$)
|
|
|
675
707
|
delete $$et{JUMBFLabel};
|
|
676
708
|
$$dirInfo{DirLen} < 17 and $et->Warn('Truncated JUMD directory'), return 0;
|
|
677
709
|
my $type = substr($$dataPt, $pos, 4);
|
|
678
|
-
$et->HandleTag($tagTablePtr, '
|
|
710
|
+
$et->HandleTag($tagTablePtr, 'type', substr($$dataPt, $pos, 16));
|
|
679
711
|
$pos += 16;
|
|
680
712
|
my $flags = Get8u($dataPt, $pos++);
|
|
681
|
-
$et->HandleTag($tagTablePtr, '
|
|
713
|
+
$et->HandleTag($tagTablePtr, 'toggles', $flags);
|
|
682
714
|
if ($flags & 0x02) { # label exists?
|
|
683
715
|
pos($$dataPt) = $pos;
|
|
684
716
|
$$dataPt =~ /\0/g or $et->Warn('Missing JUMD label terminator'), return 0;
|
|
685
717
|
my $len = pos($$dataPt) - $pos;
|
|
686
718
|
my $name = substr($$dataPt, $pos, $len);
|
|
687
|
-
$et->HandleTag($tagTablePtr, '
|
|
719
|
+
$et->HandleTag($tagTablePtr, 'label', $name);
|
|
688
720
|
$pos += $len;
|
|
689
721
|
if ($len) {
|
|
690
722
|
$name =~ s/[^-_a-zA-Z0-9]([a-z])/\U$1/g; # capitalize characters after illegal characters
|
|
691
723
|
$name =~ tr/-_a-zA-Z0-9//dc; # remove other illegal characters
|
|
724
|
+
$name =~ s/__/_/; # collapse double underlines
|
|
692
725
|
$name = ucfirst $name; # capitalize first letter
|
|
693
726
|
$name = "Tag$name" if length($name) < 2; # must at least 2 characters long
|
|
694
727
|
$$et{JUMBFLabel} = $name;
|
|
@@ -696,12 +729,12 @@ sub ProcessJUMD($$$)
|
|
|
696
729
|
}
|
|
697
730
|
if ($flags & 0x04) { # ID exists?
|
|
698
731
|
$pos + 4 > $end and $et->Warn('Missing JUMD ID'), return 0;
|
|
699
|
-
$et->HandleTag($tagTablePtr, '
|
|
732
|
+
$et->HandleTag($tagTablePtr, 'id', Get32u($dataPt, $pos));
|
|
700
733
|
$pos += 4;
|
|
701
734
|
}
|
|
702
735
|
if ($flags & 0x08) { # signature exists?
|
|
703
736
|
$pos + 32 > $end and $et->Warn('Missing JUMD signature'), return 0;
|
|
704
|
-
$et->HandleTag($tagTablePtr, '
|
|
737
|
+
$et->HandleTag($tagTablePtr, 'sig', substr($$dataPt, $pos, 32));
|
|
705
738
|
$pos += 32;
|
|
706
739
|
}
|
|
707
740
|
$pos == $end or $et->Warn('Extra data in JUMD box'." $pos $end", 1);
|
|
@@ -931,6 +964,14 @@ sub ProcessJpeg2000Box($$$)
|
|
|
931
964
|
}
|
|
932
965
|
}
|
|
933
966
|
}
|
|
967
|
+
# create new tag for JUMBF data values with name corresponding to JUMBFLabel
|
|
968
|
+
if ($tagInfo and $$et{JUMBFLabel} and (not $$tagInfo{SubDirectory} or $$tagInfo{BlockExtract})) {
|
|
969
|
+
$tagInfo = { %$tagInfo, Name => $$et{JUMBFLabel} . ($$tagInfo{JUMBF_Suffix} || '') };
|
|
970
|
+
delete $$tagInfo{Description};
|
|
971
|
+
AddTagToTable($tagTablePtr, '_JUMBF_' . $$et{JUMBFLabel}, $tagInfo);
|
|
972
|
+
delete $$tagInfo{Protected}; # (must do this so -j -b returns JUMBF binary data)
|
|
973
|
+
$$tagInfo{TagID} = $boxID;
|
|
974
|
+
}
|
|
934
975
|
if ($verbose) {
|
|
935
976
|
$et->VerboseInfo($boxID, $tagInfo,
|
|
936
977
|
Table => $tagTablePtr,
|
|
@@ -941,13 +982,6 @@ sub ProcessJpeg2000Box($$$)
|
|
|
941
982
|
);
|
|
942
983
|
next unless $tagInfo;
|
|
943
984
|
}
|
|
944
|
-
# create new tag for JUMBF data values with name corresponding to JUMBFLabel
|
|
945
|
-
if ($$et{JUMBFLabel} and (not $$tagInfo{SubDirectory} or $$tagInfo{BlockExtract})) {
|
|
946
|
-
$tagInfo = { %$tagInfo, Name => $$et{JUMBFLabel} };
|
|
947
|
-
AddTagToTable($tagTablePtr, '_JUMBF_' . $$et{JUMBFLabel}, $tagInfo);
|
|
948
|
-
delete $$tagInfo{Protected}; # (must do this so -j -b returns JUMBF binary data)
|
|
949
|
-
$$tagInfo{TagID} = $boxID;
|
|
950
|
-
}
|
|
951
985
|
if ($$tagInfo{SubDirectory}) {
|
|
952
986
|
my $subdir = $$tagInfo{SubDirectory};
|
|
953
987
|
my $subdirStart = $valuePtr;
|