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
|
@@ -223,7 +223,7 @@ characteristics of TXT and CSV files.
|
|
|
223
223
|
|
|
224
224
|
=head1 AUTHOR
|
|
225
225
|
|
|
226
|
-
Copyright 2003-
|
|
226
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
227
227
|
|
|
228
228
|
This library is free software; you can redistribute it and/or modify it
|
|
229
229
|
under the same terms as Perl itself.
|
|
@@ -122,7 +122,7 @@ information from Theora video streams.
|
|
|
122
122
|
|
|
123
123
|
=head1 AUTHOR
|
|
124
124
|
|
|
125
|
-
Copyright 2003-
|
|
125
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
126
126
|
|
|
127
127
|
This library is free software; you can redistribute it and/or modify it
|
|
128
128
|
under the same terms as Perl itself.
|
|
@@ -310,7 +310,7 @@ bencoded information from BitTorrent files.
|
|
|
310
310
|
|
|
311
311
|
=head1 AUTHOR
|
|
312
312
|
|
|
313
|
-
Copyright 2003-
|
|
313
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
314
314
|
|
|
315
315
|
This library is free software; you can redistribute it and/or modify it
|
|
316
316
|
under the same terms as Perl itself.
|
|
@@ -53,7 +53,7 @@ unknown manufacturers.
|
|
|
53
53
|
|
|
54
54
|
=head1 AUTHOR
|
|
55
55
|
|
|
56
|
-
Copyright 2003-
|
|
56
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
57
57
|
|
|
58
58
|
This library is free software; you can redistribute it and/or modify it
|
|
59
59
|
under the same terms as Perl itself.
|
|
@@ -416,7 +416,7 @@ information from vCard VCF and iCalendar ICS files.
|
|
|
416
416
|
|
|
417
417
|
=head1 AUTHOR
|
|
418
418
|
|
|
419
|
-
Copyright 2003-
|
|
419
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
420
420
|
|
|
421
421
|
This library is free software; you can redistribute it and/or modify it
|
|
422
422
|
under the same terms as Perl itself.
|
|
@@ -659,7 +659,7 @@ ExifTool Validate option is enabled.
|
|
|
659
659
|
|
|
660
660
|
=head1 AUTHOR
|
|
661
661
|
|
|
662
|
-
Copyright 2003-
|
|
662
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
663
663
|
|
|
664
664
|
This library is free software; you can redistribute it and/or modify it
|
|
665
665
|
under the same terms as Perl itself.
|
|
@@ -228,7 +228,7 @@ information from Ogg Vorbis audio headers.
|
|
|
228
228
|
|
|
229
229
|
=head1 AUTHOR
|
|
230
230
|
|
|
231
|
-
Copyright 2003-
|
|
231
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
232
232
|
|
|
233
233
|
This library is free software; you can redistribute it and/or modify it
|
|
234
234
|
under the same terms as Perl itself.
|
|
@@ -297,7 +297,7 @@ This module contains definitions required by Image::ExifTool to read WTV
|
|
|
297
297
|
|
|
298
298
|
=head1 AUTHOR
|
|
299
299
|
|
|
300
|
-
Copyright 2003-
|
|
300
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
301
301
|
|
|
302
302
|
This library is free software; you can redistribute it and/or modify it
|
|
303
303
|
under the same terms as Perl itself.
|
|
@@ -623,7 +623,7 @@ JPEG files, and would lead to far fewer problems with corrupted metadata.
|
|
|
623
623
|
|
|
624
624
|
=head1 AUTHOR
|
|
625
625
|
|
|
626
|
-
Copyright 2003-
|
|
626
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
627
627
|
|
|
628
628
|
This library is free software; you can redistribute it and/or modify it
|
|
629
629
|
under the same terms as Perl itself.
|
|
@@ -2563,7 +2563,7 @@ This file contains routines to write EXIF metadata.
|
|
|
2563
2563
|
|
|
2564
2564
|
=head1 AUTHOR
|
|
2565
2565
|
|
|
2566
|
-
Copyright 2003-
|
|
2566
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
2567
2567
|
|
|
2568
2568
|
This library is free software; you can redistribute it and/or modify it
|
|
2569
2569
|
under the same terms as Perl itself.
|
|
@@ -715,7 +715,7 @@ seldom-used routines.
|
|
|
715
715
|
|
|
716
716
|
=head1 AUTHOR
|
|
717
717
|
|
|
718
|
-
Copyright 2003-
|
|
718
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
719
719
|
|
|
720
720
|
This library is free software; you can redistribute it and/or modify it
|
|
721
721
|
under the same terms as Perl itself.
|
|
@@ -750,7 +750,7 @@ C<PDF-update> pseudo group).
|
|
|
750
750
|
|
|
751
751
|
=head1 AUTHOR
|
|
752
752
|
|
|
753
|
-
Copyright 2003-
|
|
753
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
754
754
|
|
|
755
755
|
This library is free software; you can redistribute it and/or modify it
|
|
756
756
|
under the same terms as Perl itself.
|
|
@@ -61,7 +61,7 @@ sub HexEncode($)
|
|
|
61
61
|
|
|
62
62
|
#------------------------------------------------------------------------------
|
|
63
63
|
# Write profile chunk (possibly compressed if Zlib is available)
|
|
64
|
-
# Inputs: 0) outfile, 1) Raw profile type, 2) data ref
|
|
64
|
+
# Inputs: 0) outfile, 1) Raw profile type (SCALAR ref for iCCP name), 2) data ref
|
|
65
65
|
# 3) profile header type (undef if not a text profile)
|
|
66
66
|
# Returns: 1 on success
|
|
67
67
|
sub WriteProfile($$$;$)
|
|
@@ -73,10 +73,10 @@ sub WriteProfile($$$;$)
|
|
|
73
73
|
}
|
|
74
74
|
if (not defined $profile) {
|
|
75
75
|
# write ICC profile as compressed iCCP chunk if possible
|
|
76
|
-
if ($rawType
|
|
76
|
+
if (ref $rawType) {
|
|
77
77
|
return 0 unless $deflate;
|
|
78
78
|
$chunk = 'iCCP';
|
|
79
|
-
$prefix = "
|
|
79
|
+
$prefix = "$$rawType\0\0";
|
|
80
80
|
} else {
|
|
81
81
|
$chunk = $rawType;
|
|
82
82
|
if ($rawType eq $stdCase{zxif}) {
|
|
@@ -116,7 +116,7 @@ sub WriteProfile($$$;$)
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
#------------------------------------------------------------------------------
|
|
119
|
-
# Add iCCP
|
|
119
|
+
# Add iCCP-related chunks to the PNG image if necessary (must come before PLTE and IDAT)
|
|
120
120
|
# Inputs: 0) ExifTool object ref, 1) output file or scalar ref
|
|
121
121
|
# Returns: true on success
|
|
122
122
|
sub Add_iCCP($$)
|
|
@@ -127,9 +127,28 @@ sub Add_iCCP($$)
|
|
|
127
127
|
my $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::ICC_Profile::Main');
|
|
128
128
|
my %dirInfo = ( Parent => 'PNG', DirName => 'ICC_Profile' );
|
|
129
129
|
my $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr);
|
|
130
|
-
if (defined $buff and length $buff
|
|
131
|
-
$et->
|
|
132
|
-
|
|
130
|
+
if (defined $buff and length $buff) {
|
|
131
|
+
my $profileName = $et->GetNewValue($Image::ExifTool::PNG::Main{'iCCP-name'});
|
|
132
|
+
$profileName = 'icm' unless defined $profileName;
|
|
133
|
+
if (WriteProfile($outfile, \$profileName, \$buff)) {
|
|
134
|
+
$et->VPrint(0, "Created ICC profile with name '${profileName}'\n");
|
|
135
|
+
delete $$et{ADD_DIRS}{ICC_Profile}; # don't add it again
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
# must also add sRGB and gAMA before PLTE and IDAT
|
|
140
|
+
if ($$et{ADD_PNG}) {
|
|
141
|
+
my ($tag, %addBeforePLTE);
|
|
142
|
+
foreach $tag (qw(sRGB gAMA)) {
|
|
143
|
+
next unless $$et{ADD_PNG}{$tag};
|
|
144
|
+
$addBeforePLTE{$tag} = $$et{ADD_PNG}{$tag};
|
|
145
|
+
delete $$et{ADD_PNG}{$tag};
|
|
146
|
+
}
|
|
147
|
+
if (%addBeforePLTE) {
|
|
148
|
+
my $save = $$et{ADD_PNG};
|
|
149
|
+
$$et{ADD_PNG} = \%addBeforePLTE;
|
|
150
|
+
AddChunks($et, $outfile);
|
|
151
|
+
$$et{ADD_PNG} = $save;
|
|
133
152
|
}
|
|
134
153
|
}
|
|
135
154
|
return 1;
|
|
@@ -244,9 +263,10 @@ sub AddChunks($$;@)
|
|
|
244
263
|
# write any outstanding PNG tags
|
|
245
264
|
foreach $tag (sort keys %$addTags) {
|
|
246
265
|
my $tagInfo = $$addTags{$tag};
|
|
266
|
+
next if $$tagInfo{FakeTag}; # (iCCP-name)
|
|
247
267
|
my $nvHash = $et->GetNewValueHash($tagInfo);
|
|
248
|
-
# (native PNG information is always preferred, so don't
|
|
249
|
-
next unless $et->IsOverwriting($nvHash);
|
|
268
|
+
# (native PNG information is always preferred, so don't rely on just IsCreating)
|
|
269
|
+
next unless $$nvHash{IsCreating} or $et->IsOverwriting($nvHash) > 0;
|
|
250
270
|
my $val = $et->GetNewValue($nvHash);
|
|
251
271
|
if (defined $val) {
|
|
252
272
|
next if $$nvHash{EditOnly};
|
|
@@ -381,7 +401,7 @@ strings).
|
|
|
381
401
|
|
|
382
402
|
=head1 AUTHOR
|
|
383
403
|
|
|
384
|
-
Copyright 2003-
|
|
404
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
385
405
|
|
|
386
406
|
This library is free software; you can redistribute it and/or modify it
|
|
387
407
|
under the same terms as Perl itself.
|
|
@@ -257,7 +257,7 @@ default resource name, and applied if no appended name is provided.
|
|
|
257
257
|
|
|
258
258
|
=head1 AUTHOR
|
|
259
259
|
|
|
260
|
-
Copyright 2003-
|
|
260
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
261
261
|
|
|
262
262
|
This library is free software; you can redistribute it and/or modify it
|
|
263
263
|
under the same terms as Perl itself.
|
|
@@ -687,7 +687,7 @@ Thanks to Tim Kordick for his help testing the EPS writer.
|
|
|
687
687
|
|
|
688
688
|
=head1 AUTHOR
|
|
689
689
|
|
|
690
|
-
Copyright 2003-
|
|
690
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
691
691
|
|
|
692
692
|
This library is free software; you can redistribute it and/or modify it
|
|
693
693
|
under the same terms as Perl itself.
|
|
@@ -1067,6 +1067,9 @@ sub WriteQuickTime($$$)
|
|
|
1067
1067
|
# 3=optional base offset, 4=optional item ID)
|
|
1068
1068
|
ChunkOffset => \@chunkOffset,
|
|
1069
1069
|
);
|
|
1070
|
+
# set InPlace flag so XMP will be padded properly when
|
|
1071
|
+
# QuickTimePad is used if this is an XMP directory
|
|
1072
|
+
$subdirInfo{InPlace} = 2 if $et->Options('QuickTimePad');
|
|
1070
1073
|
# pass the header pointer if necessary (for EXIF IFD's
|
|
1071
1074
|
# where the Base offset is at the end of the header)
|
|
1072
1075
|
if ($hdrLen and $hdrLen < $size) {
|
|
@@ -1331,6 +1334,14 @@ sub WriteQuickTime($$$)
|
|
|
1331
1334
|
}
|
|
1332
1335
|
# write the new atom if it was modified
|
|
1333
1336
|
if (defined $newData) {
|
|
1337
|
+
my $sizeDiff = length($buff) - length($newData);
|
|
1338
|
+
# pad to original size if specified, otherwise give verbose message about the changed size
|
|
1339
|
+
if ($sizeDiff > 0 and $$tagInfo{PreservePadding} and $et->Options('QuickTimePad')) {
|
|
1340
|
+
$newData .= "\0" x $sizeDiff;
|
|
1341
|
+
$et->VPrint(1, " ($$tagInfo{Name} padded to original size)");
|
|
1342
|
+
} elsif ($sizeDiff) {
|
|
1343
|
+
$et->VPrint(1, " ($$tagInfo{Name} changed size)");
|
|
1344
|
+
}
|
|
1334
1345
|
my $len = length($newData) + 8;
|
|
1335
1346
|
$len > 0x7fffffff and $et->Error("$$tagInfo{Name} to large to write"), last;
|
|
1336
1347
|
# update size in ChunkOffset list for modified 'uuid' atom
|
|
@@ -1912,7 +1923,7 @@ QuickTime-based file formats like MOV and MP4.
|
|
|
1912
1923
|
|
|
1913
1924
|
=head1 AUTHOR
|
|
1914
1925
|
|
|
1915
|
-
Copyright 2003-
|
|
1926
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
1916
1927
|
|
|
1917
1928
|
This library is free software; you can redistribute it and/or modify it
|
|
1918
1929
|
under the same terms as Perl itself.
|
|
@@ -1418,9 +1418,15 @@ sub WriteXMP($$;$)
|
|
|
1418
1418
|
unless ($uri) {
|
|
1419
1419
|
$uri = $nsURI{$1}; # we must have added a namespace
|
|
1420
1420
|
unless ($uri) {
|
|
1421
|
-
# (namespace may be empty if trying to write empty XMP structure, forum12384)
|
|
1422
|
-
|
|
1423
|
-
|
|
1421
|
+
# (namespace prefix may be empty if trying to write empty XMP structure, forum12384)
|
|
1422
|
+
if (length $1) {
|
|
1423
|
+
my $err = "Undefined XMP namespace: $1";
|
|
1424
|
+
if (not $xmpErr or $err ne $xmpErr) {
|
|
1425
|
+
$xmpFile ? $et->Error($err) : $et->Warn($err);
|
|
1426
|
+
$xmpErr = $err;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
next;
|
|
1424
1430
|
}
|
|
1425
1431
|
}
|
|
1426
1432
|
$nsNew{$1} = $uri;
|
|
@@ -1586,14 +1592,7 @@ sub WriteXMP($$;$)
|
|
|
1586
1592
|
unless (%capture or $xmpFile or $$dirInfo{InPlace} or $$dirInfo{NoDelete}) {
|
|
1587
1593
|
$long[-2] = '';
|
|
1588
1594
|
}
|
|
1589
|
-
if
|
|
1590
|
-
if ($xmpFile) {
|
|
1591
|
-
$et->Error($xmpErr);
|
|
1592
|
-
return -1;
|
|
1593
|
-
}
|
|
1594
|
-
$et->Warn($xmpErr);
|
|
1595
|
-
return undef;
|
|
1596
|
-
}
|
|
1595
|
+
return($xmpFile ? -1 : undef) if $xmpErr;
|
|
1597
1596
|
$$et{CHANGED} += $changed;
|
|
1598
1597
|
$debug > 1 and $long[-2] and print $long[-2],"\n";
|
|
1599
1598
|
return $long[-2] unless $xmpFile;
|
|
@@ -1620,7 +1619,7 @@ This file contains routines to write XMP metadata.
|
|
|
1620
1619
|
|
|
1621
1620
|
=head1 AUTHOR
|
|
1622
1621
|
|
|
1623
|
-
Copyright 2003-
|
|
1622
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
1624
1623
|
|
|
1625
1624
|
This library is free software; you can redistribute it and/or modify it
|
|
1626
1625
|
under the same terms as Perl itself.
|
|
@@ -136,9 +136,9 @@ my %rawType = (
|
|
|
136
136
|
my @delGroups = qw(
|
|
137
137
|
Adobe AFCP APP0 APP1 APP2 APP3 APP4 APP5 APP6 APP7 APP8 APP9 APP10 APP11
|
|
138
138
|
APP12 APP13 APP14 APP15 CanonVRD CIFF Ducky EXIF ExifIFD File FlashPix
|
|
139
|
-
FotoStation GlobParamIFD GPS ICC_Profile IFD0 IFD1 Insta360 InteropIFD
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
FotoStation GlobParamIFD GPS ICC_Profile IFD0 IFD1 Insta360 InteropIFD IPTC
|
|
140
|
+
ItemList JFIF Jpeg2000 Keys MakerNotes Meta MetaIFD Microsoft MIE MPF
|
|
141
|
+
NikonApp NikonCapture PDF PDF-update PhotoMechanic Photoshop PNG PNG-pHYs
|
|
142
142
|
PrintIM QuickTime RMETA RSRC SubIFD Trailer UserData XML XML-* XMP XMP-*
|
|
143
143
|
);
|
|
144
144
|
# family 2 group names that we can delete
|
|
@@ -154,7 +154,7 @@ my %delMore = (
|
|
|
154
154
|
);
|
|
155
155
|
|
|
156
156
|
# family 0 groups where directories should never be deleted
|
|
157
|
-
my %permanentDir = ( QuickTime => 1 );
|
|
157
|
+
my %permanentDir = ( QuickTime => 1, Jpeg2000 => 1 );
|
|
158
158
|
|
|
159
159
|
# lookup for all valid family 2 groups (lower case)
|
|
160
160
|
my %family2groups = map { lc $_ => 1 } @delGroup2, 'Unknown';
|
|
@@ -1400,7 +1400,10 @@ sub SetNewValuesFromFile($$;@)
|
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
1402
|
# validate tag name(s)
|
|
1403
|
-
$$opts{EXPR} or ValidTagName($tag)
|
|
1403
|
+
unless ($$opts{EXPR} or ValidTagName($tag)) {
|
|
1404
|
+
$self->Warn("Invalid tag name '${tag}'. Use '=' not '<' to assign a tag value");
|
|
1405
|
+
next;
|
|
1406
|
+
}
|
|
1404
1407
|
ValidTagName($dstTag) or $self->Warn("Invalid tag name '${dstTag}'"), next;
|
|
1405
1408
|
# translate '+' and '-' to appropriate SetNewValue option
|
|
1406
1409
|
if ($opt) {
|
|
@@ -2074,6 +2077,46 @@ sub SetSystemTags($$)
|
|
|
2074
2077
|
last;
|
|
2075
2078
|
}
|
|
2076
2079
|
}
|
|
2080
|
+
# delete Windows Zone.Identifier if specified
|
|
2081
|
+
my $zhash = $self->GetNewValueHash($Image::ExifTool::Extra{ZoneIdentifier});
|
|
2082
|
+
if ($zhash) {
|
|
2083
|
+
my $res = -1;
|
|
2084
|
+
if ($^O ne 'MSWin32') {
|
|
2085
|
+
$self->Warn('ZoneIdentifer is a Windows-only tag');
|
|
2086
|
+
} elsif (ref $file) {
|
|
2087
|
+
$self->Warn('Writing ZoneIdentifer requires a file name');
|
|
2088
|
+
} elsif (defined $self->GetNewValue('ZoneIdentifier', \$zhash)) {
|
|
2089
|
+
$self->Warn('ZoneIndentifier may only be delted');
|
|
2090
|
+
} elsif (not eval { require Win32API::File }) {
|
|
2091
|
+
$self->Warn('Install Win32API::File to write ZoneIdentifier');
|
|
2092
|
+
} else {
|
|
2093
|
+
my ($wattr, $wide);
|
|
2094
|
+
my $zfile = "${file}:Zone.Identifier";
|
|
2095
|
+
if ($self->EncodeFileName($zfile)) {
|
|
2096
|
+
$wide = 1;
|
|
2097
|
+
$wattr = eval { Win32API::File::GetFileAttributesW($zfile) };
|
|
2098
|
+
} else {
|
|
2099
|
+
$wattr = eval { Win32API::File::GetFileAttributes($zfile) };
|
|
2100
|
+
}
|
|
2101
|
+
if ($wattr == Win32API::File::INVALID_FILE_ATTRIBUTES()) {
|
|
2102
|
+
$res = 0; # file doesn't exist, nothing to do
|
|
2103
|
+
} elsif ($wattr & Win32API::File::FILE_ATTRIBUTE_READONLY()) {
|
|
2104
|
+
$self->Warn('Zone.Identifier stream is read-only');
|
|
2105
|
+
} else {
|
|
2106
|
+
if ($wide) {
|
|
2107
|
+
$res = 1 if eval { Win32API::File::DeleteFileW($zfile) };
|
|
2108
|
+
} else {
|
|
2109
|
+
$res = 1 if eval { Win32API::File::DeleteFile($zfile) };
|
|
2110
|
+
}
|
|
2111
|
+
if ($res > 0) {
|
|
2112
|
+
$self->VPrint(0, " Deleting Zone.Identifier stream\n");
|
|
2113
|
+
} else {
|
|
2114
|
+
$self->Warn('Error deleting Zone.Identifier stream');
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
$result = $res if $res == 1 or not $result;
|
|
2119
|
+
}
|
|
2077
2120
|
return $result;
|
|
2078
2121
|
}
|
|
2079
2122
|
|
|
@@ -3489,7 +3532,8 @@ PAT: foreach $pattern (@patterns) {
|
|
|
3489
3532
|
# 2) optional tag value (before RawConv) if deleting specific values
|
|
3490
3533
|
# Returns: >0 - tag should be overwritten
|
|
3491
3534
|
# =0 - the tag should be preserved
|
|
3492
|
-
# <0 - not sure, we need the value to
|
|
3535
|
+
# <0 - not sure, we need the old value to tell (if there is no old value
|
|
3536
|
+
# then the tag should be written if $$nvHash{IsCreating} is true)
|
|
3493
3537
|
# Notes: $$nvHash{Value} is updated with the new value when shifting a value
|
|
3494
3538
|
sub IsOverwriting($$;$)
|
|
3495
3539
|
{
|
|
@@ -4735,7 +4779,7 @@ sub InverseDateTime($$;$$)
|
|
|
4735
4779
|
my ($rtnVal, $tz);
|
|
4736
4780
|
my $fmt = $$self{OPTIONS}{DateFormat};
|
|
4737
4781
|
# strip off timezone first if it exists
|
|
4738
|
-
if (not $fmt and $val =~ s/([
|
|
4782
|
+
if (not $fmt and $val =~ s/([-+])(\d{1,2}):?(\d{2})\s*(DST)?$//i) {
|
|
4739
4783
|
$tz = sprintf("$1%.2d:$3", $2);
|
|
4740
4784
|
} elsif (not $fmt and $val =~ s/Z$//i) {
|
|
4741
4785
|
$tz = 'Z';
|
|
@@ -4758,6 +4802,8 @@ sub InverseDateTime($$;$$)
|
|
|
4758
4802
|
$strptimeLib = '';
|
|
4759
4803
|
}
|
|
4760
4804
|
}
|
|
4805
|
+
# handle factional seconds (%f), but only at the end of the string
|
|
4806
|
+
my $fs = ($fmt =~ s/%f$// and $val =~ s/(\.\d+)\s*$//) ? $1 : '';
|
|
4761
4807
|
my ($lib, $wrn, @a);
|
|
4762
4808
|
TryLib: for ($lib=$strptimeLib; ; $lib='') {
|
|
4763
4809
|
if (not $lib) {
|
|
@@ -4794,10 +4840,10 @@ TryLib: for ($lib=$strptimeLib; ; $lib='') {
|
|
|
4794
4840
|
next TryLib;
|
|
4795
4841
|
}
|
|
4796
4842
|
} elsif (length($a[$i]) < 2) {
|
|
4797
|
-
|
|
4843
|
+
$a[$i] = "0$a[$i]"; # pad to 2 digits if necessary
|
|
4798
4844
|
}
|
|
4799
4845
|
}
|
|
4800
|
-
$val = join(':', @a[5,4,3]) . ' ' . join(':', @a[2,1,0]);
|
|
4846
|
+
$val = join(':', @a[5,4,3]) . ' ' . join(':', @a[2,1,0]) . $fs;
|
|
4801
4847
|
last;
|
|
4802
4848
|
}
|
|
4803
4849
|
}
|
|
@@ -6991,7 +7037,7 @@ used routines.
|
|
|
6991
7037
|
|
|
6992
7038
|
=head1 AUTHOR
|
|
6993
7039
|
|
|
6994
|
-
Copyright 2003-
|
|
7040
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
|
6995
7041
|
|
|
6996
7042
|
This library is free software; you can redistribute it and/or modify it
|
|
6997
7043
|
under the same terms as Perl itself.
|