exiftool_vendored 12.37.0 → 12.41.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 +73 -0
- data/bin/MANIFEST +2 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +45 -45
- data/bin/arg_files/exif2xmp.args +5 -0
- data/bin/arg_files/xmp2exif.args +6 -0
- data/bin/config_files/acdsee.config +6 -6
- data/bin/config_files/photoshop_paths.config +30 -7
- data/bin/config_files/picasa_faces.config +1 -1
- data/bin/config_files/pix4d.config +2 -2
- data/bin/config_files/tiff_version.config +2 -2
- data/bin/exiftool +100 -67
- 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 +6 -4
- data/bin/lib/Image/ExifTool/CBOR.pm +1 -1
- data/bin/lib/Image/ExifTool/Canon.pm +79 -5
- 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 +1 -1
- 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 +53 -21
- 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 +1 -1
- data/bin/lib/Image/ExifTool/GIMP.pm +1 -1
- data/bin/lib/Image/ExifTool/GPS.pm +1 -1
- data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
- data/bin/lib/Image/ExifTool/Geotag.pm +4 -3
- 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 +1 -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 +10 -10
- data/bin/lib/Image/ExifTool/MakerNotes.pm +13 -2
- 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 +1062 -189
- data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
- data/bin/lib/Image/ExifTool/NikonCustom.pm +519 -6
- data/bin/lib/Image/ExifTool/NikonSettings.pm +17 -18
- 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 +8 -7
- 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 +28 -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 +10 -6
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +16 -5
- 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 +6 -2
- 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 +3 -2
- 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 +11 -5
- 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 +2 -2
- data/bin/lib/Image/ExifTool/TagLookup.pm +6385 -6290
- data/bin/lib/Image/ExifTool/TagNames.pod +361 -22
- 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 +9 -4
- data/bin/lib/Image/ExifTool/WriteXMP.pl +3 -1
- data/bin/lib/Image/ExifTool/Writer.pl +6 -5
- data/bin/lib/Image/ExifTool/XMP.pm +51 -25
- data/bin/lib/Image/ExifTool/XMP2.pl +3 -2
- data/bin/lib/Image/ExifTool/XMPStruct.pl +22 -8
- 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 +23 -6
- data/bin/lib/Image/ExifTool.pod +71 -69
- data/bin/perl-Image-ExifTool.spec +43 -43
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +2 -2
@@ -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)");
|
@@ -1390,9 +1391,13 @@ sub WriteQuickTime($$$)
|
|
1390
1391
|
$pos += $siz;
|
1391
1392
|
}
|
1392
1393
|
if ($msg) {
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1394
|
+
# (allow empty sample description for non-audio/video handler types, eg. 'url ', 'meta')
|
1395
|
+
if ($$et{HandlerType}) {
|
1396
|
+
my $grp = $$et{CUR_WRITE_GROUP} || $parent;
|
1397
|
+
$et->Error("$msg for $grp");
|
1398
|
+
return $rtnErr;
|
1399
|
+
}
|
1400
|
+
$flg = 1; # (this seems to be the case)
|
1396
1401
|
}
|
1397
1402
|
$$et{QtDataFlg} = $flg;
|
1398
1403
|
}
|
@@ -1922,7 +1927,7 @@ QuickTime-based file formats like MOV and MP4.
|
|
1922
1927
|
|
1923
1928
|
=head1 AUTHOR
|
1924
1929
|
|
1925
|
-
Copyright 2003-
|
1930
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1926
1931
|
|
1927
1932
|
This library is free software; you can redistribute it and/or modify it
|
1928
1933
|
under the same terms as Perl itself.
|
@@ -298,6 +298,8 @@ sub SetPropertyPath($$;$$$$)
|
|
298
298
|
$flatInfo = $$tagTablePtr{$flatID};
|
299
299
|
if ($flatInfo) {
|
300
300
|
return if $$flatInfo{PropertyPath};
|
301
|
+
} elsif (@$propList > 50) {
|
302
|
+
return; # avoid deep recursion
|
301
303
|
} else {
|
302
304
|
# flattened tag doesn't exist, so create it now
|
303
305
|
# (could happen if we were just writing a structure)
|
@@ -1619,7 +1621,7 @@ This file contains routines to write XMP metadata.
|
|
1619
1621
|
|
1620
1622
|
=head1 AUTHOR
|
1621
1623
|
|
1622
|
-
Copyright 2003-
|
1624
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1623
1625
|
|
1624
1626
|
This library is free software; you can redistribute it and/or modify it
|
1625
1627
|
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
|
@@ -3532,7 +3532,8 @@ PAT: foreach $pattern (@patterns) {
|
|
3532
3532
|
# 2) optional tag value (before RawConv) if deleting specific values
|
3533
3533
|
# Returns: >0 - tag should be overwritten
|
3534
3534
|
# =0 - the tag should be preserved
|
3535
|
-
# <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)
|
3536
3537
|
# Notes: $$nvHash{Value} is updated with the new value when shifting a value
|
3537
3538
|
sub IsOverwriting($$;$)
|
3538
3539
|
{
|
@@ -7036,7 +7037,7 @@ used routines.
|
|
7036
7037
|
|
7037
7038
|
=head1 AUTHOR
|
7038
7039
|
|
7039
|
-
Copyright 2003-
|
7040
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
7040
7041
|
|
7041
7042
|
This library is free software; you can redistribute it and/or modify it
|
7042
7043
|
under the same terms as Perl itself.
|
@@ -50,7 +50,7 @@ use Image::ExifTool::Exif;
|
|
50
50
|
use Image::ExifTool::GPS;
|
51
51
|
require Exporter;
|
52
52
|
|
53
|
-
$VERSION = '3.
|
53
|
+
$VERSION = '3.51';
|
54
54
|
@ISA = qw(Exporter);
|
55
55
|
@EXPORT_OK = qw(EscapeXML UnescapeXML);
|
56
56
|
|
@@ -192,6 +192,9 @@ my %xmpNS = (
|
|
192
192
|
GettyImagesGIFT => 'http://xmp.gettyimages.com/gift/1.0/',
|
193
193
|
LImage => 'http://ns.leiainc.com/photos/1.0/image/',
|
194
194
|
Profile => 'http://ns.google.com/photos/dd/1.0/profile/',
|
195
|
+
sdc => 'http://ns.nikon.com/sdc/1.0/',
|
196
|
+
ast => 'http://ns.nikon.com/asteroid/1.0/',
|
197
|
+
nine => 'http://ns.nikon.com/nine/1.0/',
|
195
198
|
);
|
196
199
|
|
197
200
|
# build reverse namespace lookup
|
@@ -878,6 +881,18 @@ my %sRangeMask = (
|
|
878
881
|
Name => 'Device',
|
879
882
|
SubDirectory => { TagTable => 'Image::ExifTool::XMP::Device' },
|
880
883
|
},
|
884
|
+
sdc => {
|
885
|
+
Name => 'sdc',
|
886
|
+
SubDirectory => { TagTable => 'Image::ExifTool::Nikon::sdc' },
|
887
|
+
},
|
888
|
+
ast => {
|
889
|
+
Name => 'ast',
|
890
|
+
SubDirectory => { TagTable => 'Image::ExifTool::Nikon::ast' },
|
891
|
+
},
|
892
|
+
nine => {
|
893
|
+
Name => 'nine',
|
894
|
+
SubDirectory => { TagTable => 'Image::ExifTool::Nikon::nine' },
|
895
|
+
},
|
881
896
|
);
|
882
897
|
|
883
898
|
# hack to allow XML containing Dublin Core metadata to be handled like XMP (eg. EPUB - see ZIP.pm)
|
@@ -2134,8 +2149,8 @@ my %sPantryItem = (
|
|
2134
2149
|
Groups => { 2 => 'Location' },
|
2135
2150
|
Writable => 'integer',
|
2136
2151
|
PrintConv => {
|
2137
|
-
2 => '2-Dimensional',
|
2138
|
-
3 => '3-Dimensional',
|
2152
|
+
2 => '2-Dimensional Measurement',
|
2153
|
+
3 => '3-Dimensional Measurement',
|
2139
2154
|
},
|
2140
2155
|
},
|
2141
2156
|
GPSDOP => { Groups => { 2 => 'Location' }, Writable => 'rational' },
|
@@ -3384,6 +3399,10 @@ NoLoop:
|
|
3384
3399
|
}
|
3385
3400
|
# save property list for verbose "adding" message unless this tag already exists
|
3386
3401
|
$added = \@tagList unless $$tagTablePtr{$tagID};
|
3402
|
+
# if this is an empty structure, we must add a Struct field
|
3403
|
+
if (not length $val and $$attrs{'rdf:parseType'} and $$attrs{'rdf:parseType'} eq 'Resource') {
|
3404
|
+
$$tagInfo{Struct} = { STRUCT_NAME => 'XMP Unknown' };
|
3405
|
+
}
|
3387
3406
|
AddTagToTable($tagTablePtr, $tagID, $tagInfo);
|
3388
3407
|
last;
|
3389
3408
|
}
|
@@ -3438,26 +3457,6 @@ NoLoop:
|
|
3438
3457
|
my $key = $et->FoundTag($tagInfo, $val) or return 0;
|
3439
3458
|
# save original components of rational numbers (used when copying)
|
3440
3459
|
$$et{RATIONAL}{$key} = $rational if defined $rational;
|
3441
|
-
# allow read-only subdirectories (eg. embedded base64 XMP/IPTC in NKSC files)
|
3442
|
-
if ($$tagInfo{SubDirectory} and not $$et{IsWriting}) {
|
3443
|
-
my $subdir = $$tagInfo{SubDirectory};
|
3444
|
-
my $dataPt = ref $$et{VALUE}{$key} ? $$et{VALUE}{$key} : \$$et{VALUE}{$key};
|
3445
|
-
# process subdirectory information
|
3446
|
-
my %dirInfo = (
|
3447
|
-
DirName => $$subdir{DirName} || $$tagInfo{Name},
|
3448
|
-
DataPt => $dataPt,
|
3449
|
-
DirLen => length $$dataPt,
|
3450
|
-
IsExtended => 1, # (hack to avoid Duplicate warning for embedded XMP)
|
3451
|
-
);
|
3452
|
-
my $oldOrder = GetByteOrder();
|
3453
|
-
SetByteOrder($$subdir{ByteOrder}) if $$subdir{ByteOrder};
|
3454
|
-
my $oldNS = $$et{definedNS};
|
3455
|
-
delete $$et{definedNS};
|
3456
|
-
my $subTablePtr = GetTagTable($$subdir{TagTable}) || $tagTablePtr;
|
3457
|
-
$et->ProcessDirectory(\%dirInfo, $subTablePtr, $$subdir{ProcessProc});
|
3458
|
-
SetByteOrder($oldOrder);
|
3459
|
-
$$et{definedNS} = $oldNS;
|
3460
|
-
}
|
3461
3460
|
# save structure/list information if necessary
|
3462
3461
|
if (@structProps and (@structProps > 1 or defined $structProps[0][1]) and
|
3463
3462
|
not $$et{NO_STRUCT})
|
@@ -3488,6 +3487,29 @@ NoLoop:
|
|
3488
3487
|
my $tagID = join('/',@$props);
|
3489
3488
|
$et->VerboseInfo($tagID, $tagInfo, Value => $rawVal || $val);
|
3490
3489
|
}
|
3490
|
+
# allow read-only subdirectories (eg. embedded base64 XMP/IPTC in NKSC files)
|
3491
|
+
if ($$tagInfo{SubDirectory} and not $$et{IsWriting}) {
|
3492
|
+
my $subdir = $$tagInfo{SubDirectory};
|
3493
|
+
my $dataPt = ref $$et{VALUE}{$key} ? $$et{VALUE}{$key} : \$$et{VALUE}{$key};
|
3494
|
+
# decode if necessary (eg. Nikon XMP-ast:XMLPackets)
|
3495
|
+
$dataPt = DecodeBase64($$dataPt) if $$tagInfo{Encoding} and $$tagInfo{Encoding} eq 'Base64';
|
3496
|
+
# process subdirectory information
|
3497
|
+
my %dirInfo = (
|
3498
|
+
DirName => $$subdir{DirName} || $$tagInfo{Name},
|
3499
|
+
DataPt => $dataPt,
|
3500
|
+
DirLen => length $$dataPt,
|
3501
|
+
IgnoreProp => $$subdir{IgnoreProp}, # (allow XML to ignore specified properties)
|
3502
|
+
IsExtended => 1, # (hack to avoid Duplicate warning for embedded XMP)
|
3503
|
+
);
|
3504
|
+
my $oldOrder = GetByteOrder();
|
3505
|
+
SetByteOrder($$subdir{ByteOrder}) if $$subdir{ByteOrder};
|
3506
|
+
my $oldNS = $$et{definedNS};
|
3507
|
+
delete $$et{definedNS};
|
3508
|
+
my $subTablePtr = GetTagTable($$subdir{TagTable}) || $tagTablePtr;
|
3509
|
+
$et->ProcessDirectory(\%dirInfo, $subTablePtr, $$subdir{ProcessProc});
|
3510
|
+
SetByteOrder($oldOrder);
|
3511
|
+
$$et{definedNS} = $oldNS;
|
3512
|
+
}
|
3491
3513
|
return 1;
|
3492
3514
|
}
|
3493
3515
|
|
@@ -3712,7 +3734,11 @@ sub ParseXMPElement($$$;$$$$)
|
|
3712
3734
|
} elsif ($prop eq 'rdf:Description') {
|
3713
3735
|
# remove unnecessary rdf:Description elements since parseType='Resource'
|
3714
3736
|
# is more efficient (also necessary to make property path consistent)
|
3715
|
-
|
3737
|
+
if (grep /^rdf:Description$/, @$propList) {
|
3738
|
+
$parseResource = 1;
|
3739
|
+
# set parseType so we know this is a structure
|
3740
|
+
$attrs{'rdf:parseType'} = 'Resource';
|
3741
|
+
}
|
3716
3742
|
} elsif ($prop eq 'xmp:xmpmeta') {
|
3717
3743
|
# patch MicrosoftPhoto unconformity
|
3718
3744
|
$prop = 'x:xmpmeta';
|
@@ -4347,7 +4373,7 @@ information.
|
|
4347
4373
|
|
4348
4374
|
=head1 AUTHOR
|
4349
4375
|
|
4350
|
-
Copyright 2003-
|
4376
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
4351
4377
|
|
4352
4378
|
This library is free software; you can redistribute it and/or modify it
|
4353
4379
|
under the same terms as Perl itself.
|
@@ -16,6 +16,7 @@
|
|
16
16
|
# 11) http://www.extensis.com/en/support/kb_article.jsp?articleNumber=6102211
|
17
17
|
# 12) XMPSpecificationPart3_May2013, page 58
|
18
18
|
# 13) https://developer.android.com/training/camera2/Dynamic-depth-v1.0.pdf
|
19
|
+
# 14) http://www.iptc.org/standards/photo-metadata/iptc-standard/
|
19
20
|
#------------------------------------------------------------------------------
|
20
21
|
|
21
22
|
package Image::ExifTool::XMP;
|
@@ -530,7 +531,7 @@ my %sImageRegion = ( # new in 1.5
|
|
530
531
|
rRole => { Namespace => 'Iptc4xmpExt', FlatName => 'Role', List => 'Bag', Struct => \%sEntity },
|
531
532
|
);
|
532
533
|
|
533
|
-
# IPTC Extension namespace properties (Iptc4xmpExt) (ref 4)
|
534
|
+
# IPTC Extension namespace properties (Iptc4xmpExt) (ref 4, 14)
|
534
535
|
%Image::ExifTool::XMP::iptcExt = (
|
535
536
|
%xmpTableDefaults,
|
536
537
|
GROUPS => { 1 => 'XMP-iptcExt', 2 => 'Author' },
|
@@ -2125,7 +2126,7 @@ This file contains definitions for less common XMP namespaces.
|
|
2125
2126
|
|
2126
2127
|
=head1 AUTHOR
|
2127
2128
|
|
2128
|
-
Copyright 2003-
|
2129
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
2129
2130
|
|
2130
2131
|
This library is free software; you can redistribute it and/or modify it
|
2131
2132
|
under the same terms as Perl itself.
|
@@ -634,15 +634,14 @@ sub RestoreStruct($;$)
|
|
634
634
|
local $_;
|
635
635
|
my ($et, $keepFlat) = @_;
|
636
636
|
my ($key, %structs, %var, %lists, $si, %listKeys, @siList);
|
637
|
-
my $ex = $$et{TAG_EXTRA};
|
638
637
|
my $valueHash = $$et{VALUE};
|
639
638
|
my $fileOrder = $$et{FILE_ORDER};
|
640
639
|
my $tagExtra = $$et{TAG_EXTRA};
|
641
640
|
foreach $key (keys %{$$et{TAG_INFO}}) {
|
642
|
-
$$
|
643
|
-
my $structProps = $$
|
644
|
-
delete $$
|
645
|
-
my $tagInfo = $$et{TAG_INFO}{$key};
|
641
|
+
$$tagExtra{$key} or next;
|
642
|
+
my $structProps = $$tagExtra{$key}{Struct} or next;
|
643
|
+
delete $$tagExtra{$key}{Struct}; # (don't re-use)
|
644
|
+
my $tagInfo = $$et{TAG_INFO}{$key}; # tagInfo for flattened tag
|
646
645
|
my $table = $$tagInfo{Table};
|
647
646
|
my $prop = shift @$structProps;
|
648
647
|
my $tag = $$prop[0];
|
@@ -829,8 +828,23 @@ sub RestoreStruct($;$)
|
|
829
828
|
$var{$_} and push @siList, $_ foreach keys %structs;
|
830
829
|
# save new structures in the same order they were read from file
|
831
830
|
foreach $si (sort { $var{$a}[1] <=> $var{$b}[1] } @siList) {
|
832
|
-
|
833
|
-
|
831
|
+
# test to see if a tag for this structure has already been generated
|
832
|
+
# (this could happen only if one of the structures in a list was empty)
|
833
|
+
$key = $var{$si}[0]{Name};
|
834
|
+
my $found;
|
835
|
+
if ($$valueHash{$key}) {
|
836
|
+
my @keys = grep /^$key( \(\d+\))?$/, keys %$valueHash;
|
837
|
+
foreach $key (@keys) {
|
838
|
+
next unless $$valueHash{$key} eq $structs{$si};
|
839
|
+
$found = 1;
|
840
|
+
last;
|
841
|
+
}
|
842
|
+
}
|
843
|
+
unless ($found) {
|
844
|
+
# otherwise, generate a new tag for this structure
|
845
|
+
$key = $et->FoundTag($var{$si}[0], '');
|
846
|
+
$$valueHash{$key} = $structs{$si};
|
847
|
+
}
|
834
848
|
$$fileOrder{$key} = $var{$si}[1];
|
835
849
|
}
|
836
850
|
}
|
@@ -855,7 +869,7 @@ information.
|
|
855
869
|
|
856
870
|
=head1 AUTHOR
|
857
871
|
|
858
|
-
Copyright 2003-
|
872
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
859
873
|
|
860
874
|
This library is free software; you can redistribute it and/or modify it
|
861
875
|
under the same terms as Perl itself.
|
@@ -19,7 +19,7 @@ use strict;
|
|
19
19
|
use vars qw($VERSION $warnString);
|
20
20
|
use Image::ExifTool qw(:DataAccess :Utils);
|
21
21
|
|
22
|
-
$VERSION = '1.
|
22
|
+
$VERSION = '1.27';
|
23
23
|
|
24
24
|
sub WarnProc($) { $warnString = $_[0]; }
|
25
25
|
|
@@ -125,6 +125,7 @@ my %iWorkType = (
|
|
125
125
|
Name => 'ZipFileName',
|
126
126
|
Format => 'string[$$self{ZipFileNameLength}]',
|
127
127
|
},
|
128
|
+
_com => 'ZipFileComment',
|
128
129
|
);
|
129
130
|
|
130
131
|
# GNU ZIP tags (ref 3)
|
@@ -380,6 +381,8 @@ sub HandleMember($$;$)
|
|
380
381
|
$et->HandleTag($tagTablePtr, 9, $member->compressedSize());
|
381
382
|
$et->HandleTag($tagTablePtr, 11, $member->uncompressedSize());
|
382
383
|
$et->HandleTag($tagTablePtr, 15, $member->fileName());
|
384
|
+
my $com = $member->fileComment();
|
385
|
+
$et->HandleTag($tagTablePtr, '_com', $com) if defined $com and length $com;
|
383
386
|
}
|
384
387
|
|
385
388
|
#------------------------------------------------------------------------------
|
@@ -448,6 +451,10 @@ sub ProcessZIP($$)
|
|
448
451
|
$et->Warn("$err reading ZIP file");
|
449
452
|
last;
|
450
453
|
}
|
454
|
+
# extract zip file comment
|
455
|
+
my $comment = $zip->zipfileComment();
|
456
|
+
$et->FoundTag(Comment => $comment) if defined $comment and length $comment;
|
457
|
+
|
451
458
|
$$dirInfo{ZIP} = $zip;
|
452
459
|
|
453
460
|
# check for an Office Open file (DOCX, etc)
|
@@ -655,6 +662,7 @@ sub ProcessZIP($$)
|
|
655
662
|
DataLen => 30 + $len,
|
656
663
|
DirStart => 0,
|
657
664
|
DirLen => 30 + $len,
|
665
|
+
MixedTags => 1, # (to ignore FileComment tag)
|
658
666
|
);
|
659
667
|
$et->ProcessDirectory(\%dirInfo, $tagTablePtr);
|
660
668
|
my $flags = Get16u(\$buff, 6);
|
@@ -700,7 +708,7 @@ Electronic Publication (EPUB), and Sketch design files (SKETCH).
|
|
700
708
|
|
701
709
|
=head1 AUTHOR
|
702
710
|
|
703
|
-
Copyright 2003-
|
711
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
704
712
|
|
705
713
|
This library is free software; you can redistribute it and/or modify it
|
706
714
|
under the same terms as Perl itself.
|
@@ -220,7 +220,7 @@ metadata from Zeiss Integrated Software RAW (ZISRAW) CZI files.
|
|
220
220
|
|
221
221
|
=head1 AUTHOR
|
222
222
|
|
223
|
-
Copyright 2003-
|
223
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
224
224
|
|
225
225
|
This library is free software; you can redistribute it and/or modify it
|
226
226
|
under the same terms as Perl itself.
|
@@ -215,7 +215,7 @@ information from Apple iWork '09 XML+ZIP files.
|
|
215
215
|
|
216
216
|
=head1 AUTHOR
|
217
217
|
|
218
|
-
Copyright 2003-
|
218
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
219
219
|
|
220
220
|
This library is free software; you can redistribute it and/or modify it
|
221
221
|
under the same terms as Perl itself.
|
data/bin/lib/Image/ExifTool.pm
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
# Revisions: Nov. 12/2003 - P. Harvey Created
|
9
9
|
# (See html/history.html for revision history)
|
10
10
|
#
|
11
|
-
# Legal: Copyright (c) 2003-
|
11
|
+
# Legal: Copyright (c) 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
12
12
|
# This library is free software; you can redistribute it and/or
|
13
13
|
# modify it under the same terms as Perl itself.
|
14
14
|
#------------------------------------------------------------------------------
|
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
|
|
29
29
|
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
|
30
30
|
%static_vars);
|
31
31
|
|
32
|
-
$VERSION = '12.
|
32
|
+
$VERSION = '12.41';
|
33
33
|
$RELEASE = '';
|
34
34
|
@ISA = qw(Exporter);
|
35
35
|
%EXPORT_TAGS = (
|
@@ -320,7 +320,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
|
|
320
320
|
FPF => ['FPF', 'FLIR Public image Format'],
|
321
321
|
FPX => ['FPX', 'FlashPix'],
|
322
322
|
GIF => ['GIF', 'Compuserve Graphics Interchange Format'],
|
323
|
-
GPR => ['TIFF', '
|
323
|
+
GPR => ['TIFF', 'General Purpose RAW'], # https://gopro.github.io/gpr/
|
324
324
|
GZ => 'GZIP',
|
325
325
|
GZIP => ['GZIP', 'GNU ZIP compressed archive'],
|
326
326
|
HDP => ['TIFF', 'Windows HD Photo'],
|
@@ -406,6 +406,8 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
|
|
406
406
|
# NDPI => ['TIFF', 'Hamamatsu NanoZoomer Digital Pathology Image'],
|
407
407
|
NEF => ['TIFF', 'Nikon (RAW) Electronic Format'],
|
408
408
|
NEWER => 'COS',
|
409
|
+
NKSC => ['XMP', 'Nikon Sidecar'],
|
410
|
+
|
409
411
|
NMBTEMPLATE => ['ZIP','Apple Numbers Template'],
|
410
412
|
NRW => ['TIFF', 'Nikon RAW (2)'],
|
411
413
|
NUMBERS => ['ZIP','Apple Numbers spreadsheet'],
|
@@ -691,6 +693,7 @@ my %fileDescription = (
|
|
691
693
|
MRW => 'image/x-minolta-mrw',
|
692
694
|
MXF => 'application/mxf',
|
693
695
|
NEF => 'image/x-nikon-nef',
|
696
|
+
NKSC => 'application/x-nikon-nxstudio',
|
694
697
|
NRW => 'image/x-nikon-nrw',
|
695
698
|
NUMBERS => 'application/x-iwork-numbers-sffnumbers',
|
696
699
|
ODB => 'application/vnd.oasis.opendocument.database',
|
@@ -1796,6 +1799,7 @@ my %systemTagsNotes = (
|
|
1796
1799
|
Writable => 1,
|
1797
1800
|
Protected => 1,
|
1798
1801
|
},
|
1802
|
+
PageCount => { Notes => 'the number of pages in a multi-page TIFF document' },
|
1799
1803
|
);
|
1800
1804
|
|
1801
1805
|
# tags defined by UserParam option (added at runtime)
|
@@ -4088,8 +4092,9 @@ sub Open($*$;$)
|
|
4088
4092
|
my ($self, $fh, $file, $mode) = @_;
|
4089
4093
|
|
4090
4094
|
$file =~ s/^([\s&])/.\/$1/; # protect leading whitespace or ampersand
|
4091
|
-
# default to read mode ('<') unless input is a pipe
|
4092
|
-
$mode = ($file =~ /\|$/ ? '' : '<') unless $mode;
|
4095
|
+
# default to read mode ('<') unless input is a trusted pipe
|
4096
|
+
$mode = (($file =~ /\|$/ and $$self{TRUST_PIPE}) ? '' : '<') unless $mode;
|
4097
|
+
delete $$self{TRUST_PIPE};
|
4093
4098
|
if ($mode) {
|
4094
4099
|
if ($self->EncodeFileName($file)) {
|
4095
4100
|
# handle Windows Unicode file name
|
@@ -6028,6 +6033,8 @@ sub IdentifyTrailer($;$)
|
|
6028
6033
|
$type = 'Samsung';
|
6029
6034
|
} elsif ($buff =~ /8db42d694ccc418790edff439fe026bf$/s) {
|
6030
6035
|
$type = 'Insta360';
|
6036
|
+
} elsif ($buff =~ m(\0{6}/NIKON APP$)) {
|
6037
|
+
$type = 'NikonApp';
|
6031
6038
|
}
|
6032
6039
|
last;
|
6033
6040
|
}
|
@@ -6063,6 +6070,9 @@ sub ProcessTrailers($$)
|
|
6063
6070
|
if ($dirName eq 'Insta360') {
|
6064
6071
|
require 'Image/ExifTool/QuickTimeStream.pl';
|
6065
6072
|
$proc = 'Image::ExifTool::QuickTime::ProcessInsta360';
|
6073
|
+
} elsif ($dirName eq 'NikonApp') {
|
6074
|
+
require Image::ExifTool::Nikon;
|
6075
|
+
$proc = 'Image::ExifTool::Nikon::ProcessNikonApp';
|
6066
6076
|
} else {
|
6067
6077
|
require "Image/ExifTool/$dirName.pm";
|
6068
6078
|
$proc = "Image::ExifTool::${dirName}::Process$dirName";
|
@@ -7439,7 +7449,11 @@ sub DoProcessTIFF($$;$)
|
|
7439
7449
|
# this looks like a BigTIFF image
|
7440
7450
|
$raf->Seek(0);
|
7441
7451
|
require Image::ExifTool::BigTIFF;
|
7442
|
-
|
7452
|
+
my $result = Image::ExifTool::BigTIFF::ProcessBTF($self, $dirInfo);
|
7453
|
+
if ($result) {
|
7454
|
+
$self->FoundTag(PageCount => $$self{PageCount}) if $$self{MultiPage};
|
7455
|
+
return 1;
|
7456
|
+
}
|
7443
7457
|
} elsif ($identifier == 0x4f52 or $identifier == 0x5352) {
|
7444
7458
|
# Olympus ORF image (set FileType now because base type is 'ORF')
|
7445
7459
|
$self->SetFileType($fileType = 'ORF');
|
@@ -7532,6 +7546,9 @@ sub DoProcessTIFF($$;$)
|
|
7532
7546
|
# override whatever FileType we set since we now know it is DNG
|
7533
7547
|
$self->OverrideFileType($$self{TIFF_TYPE} = 'DNG');
|
7534
7548
|
}
|
7549
|
+
if ($$self{TIFF_TYPE} eq 'TIFF') {
|
7550
|
+
$self->FoundTag(PageCount => $$self{PageCount}) if $$self{MultiPage};
|
7551
|
+
}
|
7535
7552
|
return 1;
|
7536
7553
|
}
|
7537
7554
|
#
|