exiftool-vendored.pl 12.31.0 → 12.39.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/LICENSE +10 -3
- package/bin/Changes +130 -4
- package/bin/MANIFEST +3 -0
- package/bin/META.json +1 -1
- package/bin/META.yml +1 -1
- package/bin/README +45 -45
- package/bin/arg_files/xmp2exif.args +2 -1
- package/bin/exiftool +128 -96
- package/bin/lib/File/RandomAccess.pm +1 -1
- package/bin/lib/File/RandomAccess.pod +2 -2
- package/bin/lib/Image/ExifTool/AES.pm +1 -1
- package/bin/lib/Image/ExifTool/AFCP.pm +1 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
- package/bin/lib/Image/ExifTool/BuildTagLookup.pm +17 -5
- package/bin/lib/Image/ExifTool/CBOR.pm +331 -0
- package/bin/lib/Image/ExifTool/Canon.pm +171 -13
- package/bin/lib/Image/ExifTool/CanonCustom.pm +13 -3
- package/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
- package/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
- 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 +3 -1
- package/bin/lib/Image/ExifTool/DICOM.pm +1 -1
- package/bin/lib/Image/ExifTool/DJI.pm +1 -1
- package/bin/lib/Image/ExifTool/DNG.pm +1 -1
- 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 +3 -3
- 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 +118 -4
- 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 +48 -11
- package/bin/lib/Image/ExifTool/Fixup.pm +1 -1
- package/bin/lib/Image/ExifTool/Flash.pm +1 -1
- package/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/GE.pm +1 -1
- package/bin/lib/Image/ExifTool/GIF.pm +6 -2
- package/bin/lib/Image/ExifTool/GIMP.pm +1 -1
- package/bin/lib/Image/ExifTool/GPS.pm +15 -11
- package/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
- package/bin/lib/Image/ExifTool/Geotag.pm +14 -3
- 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 +1 -1
- package/bin/lib/Image/ExifTool/ICC_Profile.pm +97 -5
- package/bin/lib/Image/ExifTool/ID3.pm +1 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/InDesign.pm +1 -1
- package/bin/lib/Image/ExifTool/JPEG.pm +6 -2
- package/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
- package/bin/lib/Image/ExifTool/JSON.pm +8 -4
- package/bin/lib/Image/ExifTool/JVC.pm +1 -1
- package/bin/lib/Image/ExifTool/Jpeg2000.pm +155 -25
- 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 +1 -1
- package/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/fr.pm +1 -1
- package/bin/lib/Image/ExifTool/Lang/it.pm +1 -1
- 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/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 +1 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
- package/bin/lib/Image/ExifTool/MIFF.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 +3 -3
- package/bin/lib/Image/ExifTool/MakerNotes.pm +1 -1
- package/bin/lib/Image/ExifTool/Matroska.pm +9 -5
- 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 +1 -1
- package/bin/lib/Image/ExifTool/Motorola.pm +1 -1
- package/bin/lib/Image/ExifTool/Nikon.pm +1895 -74
- package/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
- package/bin/lib/Image/ExifTool/NikonCustom.pm +523 -6
- package/bin/lib/Image/ExifTool/NikonSettings.pm +150 -87
- 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 +1 -1
- package/bin/lib/Image/ExifTool/Olympus.pm +6 -2
- package/bin/lib/Image/ExifTool/OpenEXR.pm +5 -3
- 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 +6 -4
- 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 +1 -1
- package/bin/lib/Image/ExifTool/PLUS.pm +1 -1
- package/bin/lib/Image/ExifTool/PNG.pm +29 -8
- 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 +3 -3
- package/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
- package/bin/lib/Image/ExifTool/Parrot.pm +1 -1
- package/bin/lib/Image/ExifTool/Pentax.pm +4 -2
- package/bin/lib/Image/ExifTool/PhaseOne.pm +1 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/PostScript.pm +1 -1
- 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 +25 -4
- package/bin/lib/Image/ExifTool/QuickTimeStream.pl +125 -81
- package/bin/lib/Image/ExifTool/README +9 -2
- package/bin/lib/Image/ExifTool/RIFF.pm +1 -1
- package/bin/lib/Image/ExifTool/RSRC.pm +1 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/Samsung.pm +1 -1
- 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 +3 -1
- 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 +1 -1
- package/bin/lib/Image/ExifTool/Sony.pm +34 -14
- 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 +11 -6
- package/bin/lib/Image/ExifTool/TagLookup.pm +6589 -5877
- package/bin/lib/Image/ExifTool/TagNames.pod +1681 -65
- 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/WTV.pm +1 -1
- package/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
- package/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
- package/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
- package/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
- package/bin/lib/Image/ExifTool/WritePNG.pl +30 -10
- 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 +12 -1
- package/bin/lib/Image/ExifTool/WriteXMP.pl +11 -12
- package/bin/lib/Image/ExifTool/Writer.pl +56 -10
- package/bin/lib/Image/ExifTool/XMP.pm +164 -52
- package/bin/lib/Image/ExifTool/XMP2.pl +6 -3
- package/bin/lib/Image/ExifTool/XMPStruct.pl +4 -2
- package/bin/lib/Image/ExifTool/ZIP.pm +10 -2
- package/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
- package/bin/lib/Image/ExifTool/iWork.pm +1 -1
- package/bin/lib/Image/ExifTool.pm +98 -23
- package/bin/lib/Image/ExifTool.pod +76 -67
- package/bin/perl-Image-ExifTool.spec +43 -43
- package/bin/pp_build_exe.args +6 -5
- package/package.json +3 -3
|
@@ -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.38';
|
|
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 => 'BRDFColorimetricParam0',
|
|
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 => 'MultiplexTypeArray',
|
|
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
|
}
|
|
@@ -1264,7 +1354,7 @@ data created on one device into another device's native color space.
|
|
|
1264
1354
|
|
|
1265
1355
|
=head1 AUTHOR
|
|
1266
1356
|
|
|
1267
|
-
Copyright 2003-
|
|
1357
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
1268
1358
|
|
|
1269
1359
|
This library is free software; you can redistribute it and/or modify it
|
|
1270
1360
|
under the same terms as Perl itself.
|
|
@@ -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
|
|
@@ -1652,7 +1652,7 @@ other types of audio files.
|
|
|
1652
1652
|
|
|
1653
1653
|
=head1 AUTHOR
|
|
1654
1654
|
|
|
1655
|
-
Copyright 2003-
|
|
1655
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
1656
1656
|
|
|
1657
1657
|
This library is free software; you can redistribute it and/or modify it
|
|
1658
1658
|
under the same terms as Perl itself.
|
|
@@ -1280,7 +1280,7 @@ image files.
|
|
|
1280
1280
|
|
|
1281
1281
|
=head1 AUTHOR
|
|
1282
1282
|
|
|
1283
|
-
Copyright 2003-
|
|
1283
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
1284
1284
|
|
|
1285
1285
|
This library is free software; you can redistribute it and/or modify it
|
|
1286
1286
|
under the same terms as Perl itself.
|
|
@@ -184,7 +184,7 @@ information from ISO 9660 disk images.
|
|
|
184
184
|
|
|
185
185
|
=head1 AUTHOR
|
|
186
186
|
|
|
187
|
-
Copyright 2003-
|
|
187
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
188
188
|
|
|
189
189
|
This library is free software; you can redistribute it and/or modify it
|
|
190
190
|
under the same terms as Perl itself.
|
|
@@ -191,7 +191,7 @@ information (including artwork images) from iTunes Cover Flow files.
|
|
|
191
191
|
|
|
192
192
|
=head1 AUTHOR
|
|
193
193
|
|
|
194
|
-
Copyright 2003-
|
|
194
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
195
195
|
|
|
196
196
|
This library is free software; you can redistribute it and/or modify it
|
|
197
197
|
under the same terms as Perl itself.
|
|
@@ -348,7 +348,7 @@ stored as hash lookups of tag name/value for each SourceFile.
|
|
|
348
348
|
|
|
349
349
|
=head1 AUTHOR
|
|
350
350
|
|
|
351
|
-
Copyright 2003-
|
|
351
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
352
352
|
|
|
353
353
|
This library is free software; you can redistribute it and/or modify it
|
|
354
354
|
under the same terms as Perl itself.
|
|
@@ -258,7 +258,7 @@ them and the LargeFileSupport option is enabled.
|
|
|
258
258
|
|
|
259
259
|
=head1 AUTHOR
|
|
260
260
|
|
|
261
|
-
Copyright 2003-
|
|
261
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
262
262
|
|
|
263
263
|
This library is free software; you can redistribute it and/or modify it
|
|
264
264
|
under the same terms as Perl itself.
|
|
@@ -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.33';
|
|
15
15
|
|
|
16
16
|
sub ProcessOcad($$$);
|
|
17
17
|
sub ProcessJPEG_HDR($$$);
|
|
@@ -284,6 +284,10 @@ sub ProcessJPEG_HDR($$$);
|
|
|
284
284
|
}, {
|
|
285
285
|
Name => 'Insta360',
|
|
286
286
|
Condition => '$$valPt =~ /8db42d694ccc418790edff439fe026bf$/',
|
|
287
|
+
}, {
|
|
288
|
+
Name => 'NikonApp',
|
|
289
|
+
Condition => '$$valPt =~ m(\0{6}/NIKON APP$)',
|
|
290
|
+
Notes => 'contains editing information in XMP format',
|
|
287
291
|
}, {
|
|
288
292
|
Name => 'PreviewImage',
|
|
289
293
|
Condition => '$$valPt =~ /^\xff\xd8\xff/',
|
|
@@ -714,7 +718,7 @@ segments are included in the Image::ExifTool module itself.
|
|
|
714
718
|
|
|
715
719
|
=head1 AUTHOR
|
|
716
720
|
|
|
717
|
-
Copyright 2003-
|
|
721
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
718
722
|
|
|
719
723
|
This library is free software; you can redistribute it and/or modify it
|
|
720
724
|
under the same terms as Perl itself.
|
|
@@ -2590,7 +2590,7 @@ estimated JPEG quality if requested.
|
|
|
2590
2590
|
|
|
2591
2591
|
=head1 AUTHOR
|
|
2592
2592
|
|
|
2593
|
-
Copyright 2003-
|
|
2593
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
2594
2594
|
|
|
2595
2595
|
This library is free software; you can redistribute it and/or modify it
|
|
2596
2596
|
under the same terms as Perl itself.
|
|
@@ -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) {
|
|
@@ -172,7 +176,7 @@ information from JSON files.
|
|
|
172
176
|
|
|
173
177
|
=head1 AUTHOR
|
|
174
178
|
|
|
175
|
-
Copyright 2003-
|
|
179
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
176
180
|
|
|
177
181
|
This library is free software; you can redistribute it and/or modify it
|
|
178
182
|
under the same terms as Perl itself.
|
|
@@ -117,7 +117,7 @@ notes.
|
|
|
117
117
|
|
|
118
118
|
=head1 AUTHOR
|
|
119
119
|
|
|
120
|
-
Copyright 2003-
|
|
120
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
121
121
|
|
|
122
122
|
This library is free software; you can redistribute it and/or modify it
|
|
123
123
|
under the same terms as Perl itself.
|
|
@@ -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.32';
|
|
20
20
|
|
|
21
21
|
sub ProcessJpeg2000Box($$$);
|
|
22
22
|
sub ProcessJUMD($$$);
|
|
@@ -42,8 +42,9 @@ my %jp2Map = (
|
|
|
42
42
|
'UUID-IPTC' => 'JP2',
|
|
43
43
|
'UUID-EXIF' => 'JP2',
|
|
44
44
|
'UUID-XMP' => 'JP2',
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
jp2h => 'JP2',
|
|
46
|
+
colr => 'jp2h',
|
|
47
|
+
ICC_Profile => 'colr',
|
|
47
48
|
IFD1 => 'IFD0',
|
|
48
49
|
EXIF => 'IFD0', # to write EXIF as a block
|
|
49
50
|
ExifIFD => 'IFD0',
|
|
@@ -116,9 +117,6 @@ my %j2cMarker = (
|
|
|
116
117
|
0x76 => 'NLT', # non-linearity point transformation
|
|
117
118
|
);
|
|
118
119
|
|
|
119
|
-
my %jumbfTypes = (
|
|
120
|
-
);
|
|
121
|
-
|
|
122
120
|
# JPEG 2000 "box" (ie. atom) names
|
|
123
121
|
# Note: only tags with a defined "Format" are extracted
|
|
124
122
|
%Image::ExifTool::Jpeg2000::Main = (
|
|
@@ -127,10 +125,13 @@ my %jumbfTypes = (
|
|
|
127
125
|
WRITE_PROC => \&ProcessJpeg2000Box,
|
|
128
126
|
PREFERRED => 1, # always add these tags when writing
|
|
129
127
|
NOTES => q{
|
|
130
|
-
The tags below are
|
|
131
|
-
|
|
132
|
-
tags in Jpeg2000 images.
|
|
128
|
+
The tags below are found in JPEG 2000 images and the JUMBF metadata in JPEG
|
|
129
|
+
images, but not all of these are extracted. Note that ExifTool currently
|
|
130
|
+
writes only EXIF, IPTC and XMP tags in Jpeg2000 images.
|
|
133
131
|
},
|
|
132
|
+
#
|
|
133
|
+
# NOTE: ONLY TAGS WITH "Format" DEFINED ARE EXTRACTED!
|
|
134
|
+
#
|
|
134
135
|
'jP ' => 'JP2Signature', # (ref 1)
|
|
135
136
|
"jP\x1a\x1a" => 'JP2Signature', # (ref 2)
|
|
136
137
|
prfl => 'Profile',
|
|
@@ -340,10 +341,20 @@ my %jumbfTypes = (
|
|
|
340
341
|
},
|
|
341
342
|
{
|
|
342
343
|
Name => 'UUID-Signature', # (seen in JUMB data of JPEG images)
|
|
344
|
+
# (may be able to remove this when JUMBF specification is finalized)
|
|
343
345
|
Condition => '$$valPt=~/^casg\x00\x11\x00\x10\x80\x00\x00\xaa\x00\x38\x9b\x71/',
|
|
344
346
|
Format => 'undef',
|
|
345
347
|
ValueConv => 'substr($val,16)',
|
|
346
348
|
},
|
|
349
|
+
{
|
|
350
|
+
Name => 'UUID-C2PAClaimSignature', # (seen in incorrectly-formatted JUMB data of JPEG images)
|
|
351
|
+
# (may be able to remove this when JUMBF specification is finalized)
|
|
352
|
+
Condition => '$$valPt=~/^c2cs\x00\x11\x00\x10\x80\x00\x00\xaa\x00\x38\x9b\x71/',
|
|
353
|
+
SubDirectory => {
|
|
354
|
+
TagTable => 'Image::ExifTool::CBOR::Main',
|
|
355
|
+
Start => '$valuePtr + 16',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
347
358
|
{
|
|
348
359
|
Name => 'UUID-Unknown',
|
|
349
360
|
},
|
|
@@ -386,6 +397,27 @@ my %jumbfTypes = (
|
|
|
386
397
|
},
|
|
387
398
|
SubDirectory => { TagTable => 'Image::ExifTool::JSON::Main' },
|
|
388
399
|
},
|
|
400
|
+
cbor => {
|
|
401
|
+
Name => 'CBORData',
|
|
402
|
+
Flags => [ 'Binary', 'Protected' ],
|
|
403
|
+
SubDirectory => { TagTable => 'Image::ExifTool::CBOR::Main' },
|
|
404
|
+
},
|
|
405
|
+
bfdb => { # used in JUMBF (see # (used when tag is renamed according to JUMDLabel)
|
|
406
|
+
Name => 'BinaryDataType',
|
|
407
|
+
Notes => 'JUMBF, MIME type and optional file name',
|
|
408
|
+
Format => 'undef',
|
|
409
|
+
# (ignore "toggles" byte and just extract MIME type and file name)
|
|
410
|
+
ValueConv => '$_=substr($val,1); s/\0+$//; s/\0/, /; $_',
|
|
411
|
+
JUMBF_Suffix => 'Type', # (used when tag is renamed according to JUMDLabel)
|
|
412
|
+
},
|
|
413
|
+
bidb => { # used in JUMBF
|
|
414
|
+
Name => 'BinaryData',
|
|
415
|
+
Notes => 'JUMBF',
|
|
416
|
+
Groups => { 2 => 'Preview' },
|
|
417
|
+
Format => 'undef',
|
|
418
|
+
Binary => 1,
|
|
419
|
+
JUMBF_Suffix => 'Data', # (used when tag is renamed according to JUMDLabel)
|
|
420
|
+
},
|
|
389
421
|
#
|
|
390
422
|
# stuff seen in JPEG XL images:
|
|
391
423
|
#
|
|
@@ -529,11 +561,34 @@ my %jumbfTypes = (
|
|
|
529
561
|
|
|
530
562
|
%Image::ExifTool::Jpeg2000::ColorSpec = (
|
|
531
563
|
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
|
564
|
+
WRITE_PROC => \&Image::ExifTool::WriteBinaryData, # (we don't actually call this)
|
|
532
565
|
GROUPS => { 2 => 'Image' },
|
|
533
566
|
FORMAT => 'int8s',
|
|
567
|
+
WRITABLE => 1,
|
|
568
|
+
# (Note: 'colr' is not a real group, but is used as a hack to write the
|
|
569
|
+
# necessary colr box. This hack necessitated another hack in TagInfoXML.pm
|
|
570
|
+
# to avoid reporting this fake group in the XML output)
|
|
571
|
+
WRITE_GROUP => 'colr',
|
|
572
|
+
DATAMEMBER => [ 0 ],
|
|
573
|
+
IS_SUBDIR => [ 3 ],
|
|
574
|
+
NOTES => q{
|
|
575
|
+
The table below contains tags in the color specification (colr) box. This
|
|
576
|
+
box may be rewritten by writing either ICC_Profile, ColorSpace or
|
|
577
|
+
ColorSpecData. When writing, any existing colr boxes are replaced with the
|
|
578
|
+
newly created colr box.
|
|
579
|
+
|
|
580
|
+
B<NOTE>: Care must be taken when writing this color specification because
|
|
581
|
+
writing a specification that is incompatible with the image data may make
|
|
582
|
+
the image undisplayable.
|
|
583
|
+
},
|
|
534
584
|
0 => {
|
|
535
585
|
Name => 'ColorSpecMethod',
|
|
536
586
|
RawConv => '$$self{ColorSpecMethod} = $val',
|
|
587
|
+
Protected => 1,
|
|
588
|
+
Notes => q{
|
|
589
|
+
default for writing is 2 when writing ICC_Profile, 1 when writing
|
|
590
|
+
ColorSpace, or 4 when writing ColorSpecData
|
|
591
|
+
},
|
|
537
592
|
PrintConv => {
|
|
538
593
|
1 => 'Enumerated',
|
|
539
594
|
2 => 'Restricted ICC',
|
|
@@ -541,9 +596,15 @@ my %jumbfTypes = (
|
|
|
541
596
|
4 => 'Vendor Color',
|
|
542
597
|
},
|
|
543
598
|
},
|
|
544
|
-
1 =>
|
|
599
|
+
1 => {
|
|
600
|
+
Name => 'ColorSpecPrecedence',
|
|
601
|
+
Notes => 'default for writing is 0',
|
|
602
|
+
Protected => 1,
|
|
603
|
+
},
|
|
545
604
|
2 => {
|
|
546
605
|
Name => 'ColorSpecApproximation',
|
|
606
|
+
Notes => 'default for writing is 0',
|
|
607
|
+
Protected => 1,
|
|
547
608
|
PrintConv => {
|
|
548
609
|
0 => 'Not Specified',
|
|
549
610
|
1 => 'Accurate',
|
|
@@ -568,6 +629,7 @@ my %jumbfTypes = (
|
|
|
568
629
|
Name => 'ColorSpace',
|
|
569
630
|
Condition => '$$self{ColorSpecMethod} == 1',
|
|
570
631
|
Format => 'int32u',
|
|
632
|
+
Protected => 1,
|
|
571
633
|
PrintConv => { # ref 15444-2 2002-05-15
|
|
572
634
|
0 => 'Bi-level',
|
|
573
635
|
1 => 'YCbCr(1)',
|
|
@@ -597,6 +659,8 @@ my %jumbfTypes = (
|
|
|
597
659
|
{
|
|
598
660
|
Name => 'ColorSpecData',
|
|
599
661
|
Format => 'undef[$size-3]',
|
|
662
|
+
Writable => 'undef',
|
|
663
|
+
Protected => 1,
|
|
600
664
|
Binary => 1,
|
|
601
665
|
},
|
|
602
666
|
],
|
|
@@ -690,6 +754,7 @@ sub ProcessJUMD($$$)
|
|
|
690
754
|
if ($len) {
|
|
691
755
|
$name =~ s/[^-_a-zA-Z0-9]([a-z])/\U$1/g; # capitalize characters after illegal characters
|
|
692
756
|
$name =~ tr/-_a-zA-Z0-9//dc; # remove other illegal characters
|
|
757
|
+
$name =~ s/__/_/; # collapse double underlines
|
|
693
758
|
$name = ucfirst $name; # capitalize first letter
|
|
694
759
|
$name = "Tag$name" if length($name) < 2; # must at least 2 characters long
|
|
695
760
|
$$et{JUMBFLabel} = $name;
|
|
@@ -785,6 +850,48 @@ sub CreateNewBoxes($$)
|
|
|
785
850
|
return 1;
|
|
786
851
|
}
|
|
787
852
|
|
|
853
|
+
#------------------------------------------------------------------------------
|
|
854
|
+
# Create Color Specification Box
|
|
855
|
+
# Inputs: 0) ExifTool object ref, 1) Output file or scalar ref
|
|
856
|
+
# Returns: 1 on success
|
|
857
|
+
sub CreateColorSpec($$)
|
|
858
|
+
{
|
|
859
|
+
my ($et, $outfile) = @_;
|
|
860
|
+
my $meth = $et->GetNewValue('Jpeg2000:ColorSpecMethod');
|
|
861
|
+
my $prec = $et->GetNewValue('Jpeg2000:ColorSpecPrecedence') || 0;
|
|
862
|
+
my $approx = $et->GetNewValue('Jpeg2000:ColorSpecApproximation') || 0;
|
|
863
|
+
my $icc = $et->GetNewValue('ICC_Profile');
|
|
864
|
+
my $space = $et->GetNewValue('Jpeg2000:ColorSpace');
|
|
865
|
+
my $cdata = $et->GetNewValue('Jpeg2000:ColorSpecData');
|
|
866
|
+
unless ($meth) {
|
|
867
|
+
if ($icc) {
|
|
868
|
+
$meth = 2;
|
|
869
|
+
} elsif (defined $space) {
|
|
870
|
+
$meth = 1;
|
|
871
|
+
} elsif (defined $cdata) {
|
|
872
|
+
$meth = 4;
|
|
873
|
+
} else {
|
|
874
|
+
$et->Warn('Color space not defined'), return 0;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
if ($meth eq '1') {
|
|
878
|
+
defined $space or $et->Warn('Must specify ColorSpace'), return 0;
|
|
879
|
+
$cdata = pack('N', $space);
|
|
880
|
+
} elsif ($meth eq '2' or $meth eq '3') {
|
|
881
|
+
defined $icc or $et->Warn('Must specify ICC_Profile'), return 0;
|
|
882
|
+
$cdata = $icc;
|
|
883
|
+
} elsif ($meth eq '4') {
|
|
884
|
+
defined $cdata or $et->Warn('Must specify ColorSpecData'), return 0;
|
|
885
|
+
} else {
|
|
886
|
+
$et->Warn('Unknown ColorSpecMethod'), return 0;
|
|
887
|
+
}
|
|
888
|
+
my $boxhdr = pack('N', length($cdata) + 11) . 'colr';
|
|
889
|
+
Write($outfile, $boxhdr, pack('CCC',$meth,$prec,$approx), $cdata) or return 0;
|
|
890
|
+
++$$et{CHANGED};
|
|
891
|
+
$et->VPrint(1, " + Jpeg2000:ColorSpec\n");
|
|
892
|
+
return 1;
|
|
893
|
+
}
|
|
894
|
+
|
|
788
895
|
#------------------------------------------------------------------------------
|
|
789
896
|
# Process JPEG 2000 box
|
|
790
897
|
# Inputs: 0) ExifTool object reference, 1) dirInfo reference, 2) Pointer to tag table
|
|
@@ -802,7 +909,7 @@ sub ProcessJpeg2000Box($$$)
|
|
|
802
909
|
my $raf = $$dirInfo{RAF};
|
|
803
910
|
my $outfile = $$dirInfo{OutFile};
|
|
804
911
|
my $dirEnd = $dirStart + $dirLen;
|
|
805
|
-
my ($err, $outBuff, $verbose);
|
|
912
|
+
my ($err, $outBuff, $verbose, $doColour);
|
|
806
913
|
|
|
807
914
|
if ($outfile) {
|
|
808
915
|
unless ($raf) {
|
|
@@ -810,13 +917,19 @@ sub ProcessJpeg2000Box($$$)
|
|
|
810
917
|
$outBuff = '';
|
|
811
918
|
$outfile = \$outBuff;
|
|
812
919
|
}
|
|
920
|
+
# determine if we will be writing colr box
|
|
921
|
+
if ($$dirInfo{DirName} and $$dirInfo{DirName} eq 'JP2Header') {
|
|
922
|
+
$doColour = 2 if defined $et->GetNewValue('ColorSpecMethod') or $et->GetNewValue('ICC_Profile') or
|
|
923
|
+
defined $et->GetNewValue('ColorSpecPrecedence') or defined $et->GetNewValue('ColorSpace') or
|
|
924
|
+
defined $et->GetNewValue('ColorSpecApproximation') or defined $et->GetNewValue('ColorSpecData');
|
|
925
|
+
}
|
|
813
926
|
} else {
|
|
814
927
|
# (must not set verbose flag when writing!)
|
|
815
928
|
$verbose = $$et{OPTIONS}{Verbose};
|
|
816
929
|
$et->VerboseDir($$dirInfo{DirName}) if $verbose;
|
|
817
930
|
}
|
|
818
931
|
# loop through all contained boxes
|
|
819
|
-
my ($pos, $boxLen);
|
|
932
|
+
my ($pos, $boxLen, $lastBox);
|
|
820
933
|
for ($pos=$dirStart; ; $pos+=$boxLen) {
|
|
821
934
|
my ($boxID, $buff, $valuePtr);
|
|
822
935
|
my $hdrLen = 8; # the box header length
|
|
@@ -825,9 +938,7 @@ sub ProcessJpeg2000Box($$$)
|
|
|
825
938
|
my $n = $raf->Read($buff,$hdrLen);
|
|
826
939
|
unless ($n == $hdrLen) {
|
|
827
940
|
$n and $err = '', last;
|
|
828
|
-
|
|
829
|
-
CreateNewBoxes($et, $outfile) or $err = 1;
|
|
830
|
-
}
|
|
941
|
+
CreateNewBoxes($et, $outfile) or $err = 1 if $outfile;
|
|
831
942
|
last;
|
|
832
943
|
}
|
|
833
944
|
$dataPt = \$buff;
|
|
@@ -839,6 +950,17 @@ sub ProcessJpeg2000Box($$$)
|
|
|
839
950
|
}
|
|
840
951
|
$boxLen = unpack("x$pos N",$$dataPt); # (length includes header and data)
|
|
841
952
|
$boxID = substr($$dataPt, $pos+4, 4);
|
|
953
|
+
# remove old colr boxes if necessary
|
|
954
|
+
if ($doColour and $boxID eq 'colr') {
|
|
955
|
+
if ($doColour == 1) { # did we successfully write the new colr box?
|
|
956
|
+
$et->VPrint(1," - Jpeg2000:ColorSpec\n");
|
|
957
|
+
++$$et{CHANGED};
|
|
958
|
+
next;
|
|
959
|
+
}
|
|
960
|
+
$et->Warn('Out-of-order colr box encountered');
|
|
961
|
+
undef $doColour;
|
|
962
|
+
}
|
|
963
|
+
$lastBox = $boxID;
|
|
842
964
|
$pos += $hdrLen; # move to end of box header
|
|
843
965
|
if ($boxLen == 1) {
|
|
844
966
|
# box header contains an additional 8-byte integer for length
|
|
@@ -932,6 +1054,14 @@ sub ProcessJpeg2000Box($$$)
|
|
|
932
1054
|
}
|
|
933
1055
|
}
|
|
934
1056
|
}
|
|
1057
|
+
# create new tag for JUMBF data values with name corresponding to JUMBFLabel
|
|
1058
|
+
if ($tagInfo and $$et{JUMBFLabel} and (not $$tagInfo{SubDirectory} or $$tagInfo{BlockExtract})) {
|
|
1059
|
+
$tagInfo = { %$tagInfo, Name => $$et{JUMBFLabel} . ($$tagInfo{JUMBF_Suffix} || '') };
|
|
1060
|
+
delete $$tagInfo{Description};
|
|
1061
|
+
AddTagToTable($tagTablePtr, '_JUMBF_' . $$et{JUMBFLabel}, $tagInfo);
|
|
1062
|
+
delete $$tagInfo{Protected}; # (must do this so -j -b returns JUMBF binary data)
|
|
1063
|
+
$$tagInfo{TagID} = $boxID;
|
|
1064
|
+
}
|
|
935
1065
|
if ($verbose) {
|
|
936
1066
|
$et->VerboseInfo($boxID, $tagInfo,
|
|
937
1067
|
Table => $tagTablePtr,
|
|
@@ -942,13 +1072,6 @@ sub ProcessJpeg2000Box($$$)
|
|
|
942
1072
|
);
|
|
943
1073
|
next unless $tagInfo;
|
|
944
1074
|
}
|
|
945
|
-
# create new tag for JUMBF data values with name corresponding to JUMBFLabel
|
|
946
|
-
if ($$et{JUMBFLabel} and (not $$tagInfo{SubDirectory} or $$tagInfo{BlockExtract})) {
|
|
947
|
-
$tagInfo = { %$tagInfo, Name => $$et{JUMBFLabel} };
|
|
948
|
-
AddTagToTable($tagTablePtr, '_JUMBF_' . $$et{JUMBFLabel}, $tagInfo);
|
|
949
|
-
delete $$tagInfo{Protected}; # (must do this so -j -b returns JUMBF binary data)
|
|
950
|
-
$$tagInfo{TagID} = $boxID;
|
|
951
|
-
}
|
|
952
1075
|
if ($$tagInfo{SubDirectory}) {
|
|
953
1076
|
my $subdir = $$tagInfo{SubDirectory};
|
|
954
1077
|
my $subdirStart = $valuePtr;
|
|
@@ -976,8 +1099,10 @@ sub ProcessJpeg2000Box($$$)
|
|
|
976
1099
|
# remove this directory from our create list
|
|
977
1100
|
delete $$et{AddJp2Dirs}{$$tagInfo{Name}};
|
|
978
1101
|
my $newdir;
|
|
979
|
-
# only edit writable UUID and
|
|
980
|
-
if ($uuid or $boxID eq 'Exif' or ($boxID eq 'xml ' and $$et{IsJXL})
|
|
1102
|
+
# only edit writable UUID, Exif and jp2h boxes
|
|
1103
|
+
if ($uuid or $boxID eq 'Exif' or ($boxID eq 'xml ' and $$et{IsJXL}) or
|
|
1104
|
+
($boxID eq 'jp2h' and $$et{EDIT_DIRS}{jp2h}))
|
|
1105
|
+
{
|
|
981
1106
|
$newdir = $et->WriteDirectory(\%subdirInfo, $subTable, $$subdir{WriteProc});
|
|
982
1107
|
next if defined $newdir and not length $newdir; # next if deleting the box
|
|
983
1108
|
} elsif (defined $uuid) {
|
|
@@ -989,6 +1114,11 @@ sub ProcessJpeg2000Box($$$)
|
|
|
989
1114
|
my $boxhdr = pack('N', length($newdir) + 8 + $prefixLen) . $boxID;
|
|
990
1115
|
$boxhdr .= substr($$dataPt, $valuePtr, $prefixLen) if $prefixLen;
|
|
991
1116
|
Write($outfile, $boxhdr, $newdir) or $err = 1;
|
|
1117
|
+
# write new colr box immediately after ihdr
|
|
1118
|
+
if ($doColour and $boxID eq 'ihdr') {
|
|
1119
|
+
# (shouldn't be multiple ihdr boxes, but just in case, write only 1)
|
|
1120
|
+
$doColour = $doColour==2 ? CreateColorSpec($et, $outfile) : 0;
|
|
1121
|
+
}
|
|
992
1122
|
} else {
|
|
993
1123
|
# extract as a block if specified
|
|
994
1124
|
$subdirInfo{BlockInfo} = $tagInfo if $$tagInfo{BlockExtract};
|
|
@@ -1225,7 +1355,7 @@ files.
|
|
|
1225
1355
|
|
|
1226
1356
|
=head1 AUTHOR
|
|
1227
1357
|
|
|
1228
|
-
Copyright 2003-
|
|
1358
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
1229
1359
|
|
|
1230
1360
|
This library is free software; you can redistribute it and/or modify it
|
|
1231
1361
|
under the same terms as Perl itself.
|
|
@@ -3252,7 +3252,7 @@ interpret Kodak maker notes EXIF meta information.
|
|
|
3252
3252
|
|
|
3253
3253
|
=head1 AUTHOR
|
|
3254
3254
|
|
|
3255
|
-
Copyright 2003-
|
|
3255
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
3256
3256
|
|
|
3257
3257
|
This library is free software; you can redistribute it and/or modify it
|
|
3258
3258
|
under the same terms as Perl itself.
|
|
@@ -152,7 +152,7 @@ meta information from Kyocera Contax N Digital RAW images.
|
|
|
152
152
|
|
|
153
153
|
=head1 AUTHOR
|
|
154
154
|
|
|
155
|
-
Copyright 2003-
|
|
155
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
156
156
|
|
|
157
157
|
This library is free software; you can redistribute it and/or modify it
|
|
158
158
|
under the same terms as Perl itself.
|
|
@@ -139,7 +139,7 @@ metadata from Leica Image File (LIF) images.
|
|
|
139
139
|
|
|
140
140
|
=head1 AUTHOR
|
|
141
141
|
|
|
142
|
-
Copyright 2003-
|
|
142
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
143
143
|
|
|
144
144
|
This library is free software; you can redistribute it and/or modify it
|
|
145
145
|
under the same terms as Perl itself.
|