exiftool_vendored 12.35.0 → 12.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/Changes +59 -4
- data/bin/MANIFEST +1 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +45 -45
- data/bin/exiftool +79 -59
- data/bin/lib/File/RandomAccess.pm +1 -1
- data/bin/lib/File/RandomAccess.pod +2 -2
- data/bin/lib/Image/ExifTool/AES.pm +1 -1
- data/bin/lib/Image/ExifTool/AFCP.pm +1 -1
- data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
- data/bin/lib/Image/ExifTool/APE.pm +1 -1
- data/bin/lib/Image/ExifTool/APP12.pm +1 -1
- data/bin/lib/Image/ExifTool/ASF.pm +1 -1
- data/bin/lib/Image/ExifTool/Apple.pm +1 -1
- data/bin/lib/Image/ExifTool/Audible.pm +1 -1
- data/bin/lib/Image/ExifTool/BMP.pm +1 -1
- data/bin/lib/Image/ExifTool/BPG.pm +1 -1
- data/bin/lib/Image/ExifTool/BZZ.pm +1 -1
- data/bin/lib/Image/ExifTool/BigTIFF.pm +1 -1
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +10 -4
- data/bin/lib/Image/ExifTool/CBOR.pm +1 -1
- data/bin/lib/Image/ExifTool/Canon.pm +143 -10
- data/bin/lib/Image/ExifTool/CanonCustom.pm +13 -3
- data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
- data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
- data/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
- data/bin/lib/Image/ExifTool/Casio.pm +1 -1
- data/bin/lib/Image/ExifTool/Charset.pm +1 -1
- data/bin/lib/Image/ExifTool/DICOM.pm +1 -1
- data/bin/lib/Image/ExifTool/DJI.pm +1 -1
- data/bin/lib/Image/ExifTool/DNG.pm +1 -1
- data/bin/lib/Image/ExifTool/DPX.pm +1 -1
- data/bin/lib/Image/ExifTool/DV.pm +1 -1
- data/bin/lib/Image/ExifTool/DarwinCore.pm +3 -3
- data/bin/lib/Image/ExifTool/DjVu.pm +1 -1
- data/bin/lib/Image/ExifTool/EXE.pm +1 -1
- data/bin/lib/Image/ExifTool/Exif.pm +22 -2
- data/bin/lib/Image/ExifTool/FITS.pm +1 -1
- data/bin/lib/Image/ExifTool/FLAC.pm +1 -1
- data/bin/lib/Image/ExifTool/FLIF.pm +1 -1
- data/bin/lib/Image/ExifTool/FLIR.pm +16 -4
- data/bin/lib/Image/ExifTool/Fixup.pm +1 -1
- data/bin/lib/Image/ExifTool/Flash.pm +1 -1
- data/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
- data/bin/lib/Image/ExifTool/Font.pm +1 -1
- data/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
- data/bin/lib/Image/ExifTool/FujiFilm.pm +1 -1
- data/bin/lib/Image/ExifTool/GE.pm +1 -1
- data/bin/lib/Image/ExifTool/GIF.pm +6 -2
- data/bin/lib/Image/ExifTool/GIMP.pm +1 -1
- data/bin/lib/Image/ExifTool/GPS.pm +15 -11
- data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
- data/bin/lib/Image/ExifTool/Geotag.pm +1 -1
- data/bin/lib/Image/ExifTool/GoPro.pm +1 -1
- data/bin/lib/Image/ExifTool/H264.pm +1 -1
- data/bin/lib/Image/ExifTool/HP.pm +1 -1
- data/bin/lib/Image/ExifTool/HTML.pm +1 -1
- data/bin/lib/Image/ExifTool/HtmlDump.pm +1 -1
- data/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
- data/bin/lib/Image/ExifTool/ID3.pm +1 -1
- data/bin/lib/Image/ExifTool/IPTC.pm +1 -1
- data/bin/lib/Image/ExifTool/ISO.pm +1 -1
- data/bin/lib/Image/ExifTool/ITC.pm +1 -1
- data/bin/lib/Image/ExifTool/Import.pm +1 -1
- data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
- data/bin/lib/Image/ExifTool/JPEG.pm +6 -2
- data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
- data/bin/lib/Image/ExifTool/JSON.pm +1 -1
- data/bin/lib/Image/ExifTool/JVC.pm +1 -1
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +4 -1
- data/bin/lib/Image/ExifTool/Kodak.pm +1 -1
- data/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
- data/bin/lib/Image/ExifTool/LIF.pm +1 -1
- data/bin/lib/Image/ExifTool/LNK.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/de.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/en_ca.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/en_gb.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/fi.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/fr.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/it.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/ja.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/ko.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/nl.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/pl.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/tr.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
- data/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
- data/bin/lib/Image/ExifTool/Leaf.pm +1 -1
- data/bin/lib/Image/ExifTool/Lytro.pm +1 -1
- data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
- data/bin/lib/Image/ExifTool/MIE.pm +1 -1
- data/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
- data/bin/lib/Image/ExifTool/MIFF.pm +1 -1
- data/bin/lib/Image/ExifTool/MNG.pm +1 -1
- data/bin/lib/Image/ExifTool/MOI.pm +1 -1
- data/bin/lib/Image/ExifTool/MPC.pm +1 -1
- data/bin/lib/Image/ExifTool/MPEG.pm +1 -1
- data/bin/lib/Image/ExifTool/MPF.pm +1 -1
- data/bin/lib/Image/ExifTool/MRC.pm +1 -1
- data/bin/lib/Image/ExifTool/MWG.pm +1 -1
- data/bin/lib/Image/ExifTool/MXF.pm +1 -1
- data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
- data/bin/lib/Image/ExifTool/MakerNotes.pm +1 -1
- data/bin/lib/Image/ExifTool/Matroska.pm +9 -5
- data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
- data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
- data/bin/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
- data/bin/lib/Image/ExifTool/Motorola.pm +1 -1
- data/bin/lib/Image/ExifTool/Nikon.pm +1870 -83
- data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
- data/bin/lib/Image/ExifTool/NikonCustom.pm +523 -6
- data/bin/lib/Image/ExifTool/NikonSettings.pm +150 -87
- data/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
- data/bin/lib/Image/ExifTool/OOXML.pm +1 -1
- data/bin/lib/Image/ExifTool/Ogg.pm +1 -1
- data/bin/lib/Image/ExifTool/Olympus.pm +1 -1
- data/bin/lib/Image/ExifTool/OpenEXR.pm +5 -3
- data/bin/lib/Image/ExifTool/Opus.pm +1 -1
- data/bin/lib/Image/ExifTool/Other.pm +1 -1
- data/bin/lib/Image/ExifTool/PCX.pm +1 -1
- data/bin/lib/Image/ExifTool/PDF.pm +1 -1
- data/bin/lib/Image/ExifTool/PGF.pm +1 -1
- data/bin/lib/Image/ExifTool/PICT.pm +1 -1
- data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
- data/bin/lib/Image/ExifTool/PLUS.pm +1 -1
- data/bin/lib/Image/ExifTool/PNG.pm +29 -8
- data/bin/lib/Image/ExifTool/PPM.pm +1 -1
- data/bin/lib/Image/ExifTool/PSP.pm +1 -1
- data/bin/lib/Image/ExifTool/Palm.pm +1 -1
- data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
- data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -1
- data/bin/lib/Image/ExifTool/Parrot.pm +1 -1
- data/bin/lib/Image/ExifTool/Pentax.pm +3 -2
- data/bin/lib/Image/ExifTool/PhaseOne.pm +1 -1
- data/bin/lib/Image/ExifTool/PhotoCD.pm +1 -1
- data/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
- data/bin/lib/Image/ExifTool/Photoshop.pm +1 -1
- data/bin/lib/Image/ExifTool/PostScript.pm +1 -1
- data/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
- data/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
- data/bin/lib/Image/ExifTool/QuickTime.pm +4 -3
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +40 -4
- data/bin/lib/Image/ExifTool/RIFF.pm +1 -1
- data/bin/lib/Image/ExifTool/RSRC.pm +1 -1
- data/bin/lib/Image/ExifTool/RTF.pm +1 -1
- data/bin/lib/Image/ExifTool/Radiance.pm +1 -1
- data/bin/lib/Image/ExifTool/Rawzor.pm +1 -1
- data/bin/lib/Image/ExifTool/Real.pm +1 -1
- data/bin/lib/Image/ExifTool/Reconyx.pm +1 -1
- data/bin/lib/Image/ExifTool/Red.pm +1 -1
- data/bin/lib/Image/ExifTool/Ricoh.pm +1 -1
- data/bin/lib/Image/ExifTool/Samsung.pm +1 -1
- data/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
- data/bin/lib/Image/ExifTool/Scalado.pm +1 -1
- data/bin/lib/Image/ExifTool/Shift.pl +3 -1
- data/bin/lib/Image/ExifTool/Shortcuts.pm +1 -1
- data/bin/lib/Image/ExifTool/Sigma.pm +1 -1
- data/bin/lib/Image/ExifTool/SigmaRaw.pm +1 -1
- data/bin/lib/Image/ExifTool/Sony.pm +1 -1
- data/bin/lib/Image/ExifTool/SonyIDC.pm +1 -1
- data/bin/lib/Image/ExifTool/Stim.pm +1 -1
- data/bin/lib/Image/ExifTool/TagInfoXML.pm +11 -6
- data/bin/lib/Image/ExifTool/TagLookup.pm +6496 -5895
- data/bin/lib/Image/ExifTool/TagNames.pod +1507 -43
- data/bin/lib/Image/ExifTool/Text.pm +1 -1
- data/bin/lib/Image/ExifTool/Theora.pm +1 -1
- data/bin/lib/Image/ExifTool/Torrent.pm +1 -1
- data/bin/lib/Image/ExifTool/Unknown.pm +1 -1
- data/bin/lib/Image/ExifTool/VCard.pm +1 -1
- data/bin/lib/Image/ExifTool/Validate.pm +1 -1
- data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
- data/bin/lib/Image/ExifTool/WTV.pm +1 -1
- data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
- data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
- data/bin/lib/Image/ExifTool/WritePNG.pl +30 -10
- data/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
- data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteQuickTime.pl +2 -1
- data/bin/lib/Image/ExifTool/WriteXMP.pl +11 -12
- data/bin/lib/Image/ExifTool/Writer.pl +12 -8
- data/bin/lib/Image/ExifTool/XMP.pm +149 -45
- data/bin/lib/Image/ExifTool/XMP2.pl +3 -2
- data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
- data/bin/lib/Image/ExifTool/ZIP.pm +10 -2
- data/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
- data/bin/lib/Image/ExifTool/iWork.pm +1 -1
- data/bin/lib/Image/ExifTool.pm +24 -10
- data/bin/lib/Image/ExifTool.pod +64 -63
- data/bin/perl-Image-ExifTool.spec +43 -43
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +2 -2
@@ -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.
|
@@ -1335,6 +1335,7 @@ sub WriteQuickTime($$$)
|
|
1335
1335
|
# write the new atom if it was modified
|
1336
1336
|
if (defined $newData) {
|
1337
1337
|
my $sizeDiff = length($buff) - length($newData);
|
1338
|
+
# pad to original size if specified, otherwise give verbose message about the changed size
|
1338
1339
|
if ($sizeDiff > 0 and $$tagInfo{PreservePadding} and $et->Options('QuickTimePad')) {
|
1339
1340
|
$newData .= "\0" x $sizeDiff;
|
1340
1341
|
$et->VPrint(1, " ($$tagInfo{Name} padded to original size)");
|
@@ -1922,7 +1923,7 @@ QuickTime-based file formats like MOV and MP4.
|
|
1922
1923
|
|
1923
1924
|
=head1 AUTHOR
|
1924
1925
|
|
1925
|
-
Copyright 2003-
|
1926
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1926
1927
|
|
1927
1928
|
This library is free software; you can redistribute it and/or modify it
|
1928
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) {
|
@@ -3529,7 +3532,8 @@ PAT: foreach $pattern (@patterns) {
|
|
3529
3532
|
# 2) optional tag value (before RawConv) if deleting specific values
|
3530
3533
|
# Returns: >0 - tag should be overwritten
|
3531
3534
|
# =0 - the tag should be preserved
|
3532
|
-
# <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)
|
3533
3537
|
# Notes: $$nvHash{Value} is updated with the new value when shifting a value
|
3534
3538
|
sub IsOverwriting($$;$)
|
3535
3539
|
{
|
@@ -4775,7 +4779,7 @@ sub InverseDateTime($$;$$)
|
|
4775
4779
|
my ($rtnVal, $tz);
|
4776
4780
|
my $fmt = $$self{OPTIONS}{DateFormat};
|
4777
4781
|
# strip off timezone first if it exists
|
4778
|
-
if (not $fmt and $val =~ s/([
|
4782
|
+
if (not $fmt and $val =~ s/([-+])(\d{1,2}):?(\d{2})\s*(DST)?$//i) {
|
4779
4783
|
$tz = sprintf("$1%.2d:$3", $2);
|
4780
4784
|
} elsif (not $fmt and $val =~ s/Z$//i) {
|
4781
4785
|
$tz = 'Z';
|
@@ -7033,7 +7037,7 @@ used routines.
|
|
7033
7037
|
|
7034
7038
|
=head1 AUTHOR
|
7035
7039
|
|
7036
|
-
Copyright 2003-
|
7040
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
7037
7041
|
|
7038
7042
|
This library is free software; you can redistribute it and/or modify it
|
7039
7043
|
under the same terms as Perl itself.
|