exiftool_vendored 13.10.0 → 13.14.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.
- checksums.yaml +4 -4
- data/bin/Changes +82 -19
- data/bin/MANIFEST +6 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +3 -3
- data/bin/arg_files/exif2xmp.args +4 -0
- data/bin/arg_files/xmp2exif.args +2 -1
- data/bin/build_geolocation +1 -1
- data/bin/exiftool +208 -150
- data/bin/lib/File/RandomAccess.pm +1 -1
- data/bin/lib/File/RandomAccess.pod +2 -2
- data/bin/lib/Image/ExifTool/AAC.pm +1 -1
- data/bin/lib/Image/ExifTool/AES.pm +1 -1
- data/bin/lib/Image/ExifTool/AFCP.pm +6 -6
- 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 +29 -18
- data/bin/lib/Image/ExifTool/CBOR.pm +1 -1
- data/bin/lib/Image/ExifTool/Canon.pm +8 -4
- data/bin/lib/Image/ExifTool/CanonCustom.pm +1 -1
- 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 +150 -46
- 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 +123 -32
- data/bin/lib/Image/ExifTool/Exif.pm +7 -4
- 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 +1 -1
- 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/GM.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/Geolocation.pm +17 -8
- 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/ICO.pm +1 -1
- data/bin/lib/Image/ExifTool/ID3.pm +1 -1
- data/bin/lib/Image/ExifTool/IPTC.pm +8 -5
- 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 +5 -4
- data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
- data/bin/lib/Image/ExifTool/InfiRay.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/sk.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/LigoGPS.pm +409 -0
- data/bin/lib/Image/ExifTool/Lytro.pm +1 -1
- data/bin/lib/Image/ExifTool/M2TS.pm +22 -13
- 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/MISB.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 +12 -4
- 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 +166 -35
- data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
- data/bin/lib/Image/ExifTool/NikonCustom.pm +1 -1
- data/bin/lib/Image/ExifTool/NikonSettings.pm +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +20 -2
- 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 +1 -1
- 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/Protobuf.pm +48 -20
- data/bin/lib/Image/ExifTool/Qualcomm.pm +1 -1
- data/bin/lib/Image/ExifTool/QuickTime.pm +206 -66
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +21 -303
- data/bin/lib/Image/ExifTool/README +4 -0
- 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 +2 -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 +1 -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 +2 -2
- data/bin/lib/Image/ExifTool/TagLookup.pm +3449 -3435
- data/bin/lib/Image/ExifTool/TagNames.pod +164 -47
- 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 +3 -3
- 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/Vivo.pm +124 -0
- data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
- data/bin/lib/Image/ExifTool/WPG.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 +1 -1
- 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 +74 -43
- data/bin/lib/Image/ExifTool/WriteRIFF.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
- data/bin/lib/Image/ExifTool/Writer.pl +21 -16
- data/bin/lib/Image/ExifTool/XISF.pm +1 -1
- data/bin/lib/Image/ExifTool/XMP.pm +1 -1
- data/bin/lib/Image/ExifTool/XMP2.pl +1 -1
- data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
- data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
- data/bin/lib/Image/ExifTool/ZISRAW.pm +1 -1
- data/bin/lib/Image/ExifTool/iWork.pm +1 -1
- data/bin/lib/Image/ExifTool.pm +34 -12
- data/bin/lib/Image/ExifTool.pod +57 -46
- data/bin/perl-Image-ExifTool.spec +1 -1
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +4 -2
@@ -1698,7 +1698,7 @@ and JNG (JPEG Network Graphics) images.
|
|
1698
1698
|
|
1699
1699
|
=head1 AUTHOR
|
1700
1700
|
|
1701
|
-
Copyright 2003-
|
1701
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
1702
1702
|
|
1703
1703
|
This library is free software; you can redistribute it and/or modify it
|
1704
1704
|
under the same terms as Perl itself.
|
@@ -152,7 +152,7 @@ BitMap) images.
|
|
152
152
|
|
153
153
|
=head1 AUTHOR
|
154
154
|
|
155
|
-
Copyright 2003-
|
155
|
+
Copyright 2003-2025, 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.
|
@@ -284,7 +284,7 @@ information from Paint Shop Pro images.
|
|
284
284
|
|
285
285
|
=head1 AUTHOR
|
286
286
|
|
287
|
-
Copyright 2003-
|
287
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
288
288
|
|
289
289
|
This library is free software; you can redistribute it and/or modify it
|
290
290
|
under the same terms as Perl itself.
|
@@ -379,7 +379,7 @@ KF7 and KF8 books (AZW and AZW3).
|
|
379
379
|
|
380
380
|
=head1 AUTHOR
|
381
381
|
|
382
|
-
Copyright 2003-
|
382
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
383
383
|
|
384
384
|
This library is free software; you can redistribute it and/or modify it
|
385
385
|
under the same terms as Perl itself.
|
@@ -37,7 +37,7 @@ use vars qw($VERSION %leicaLensTypes);
|
|
37
37
|
use Image::ExifTool qw(:DataAccess :Utils);
|
38
38
|
use Image::ExifTool::Exif;
|
39
39
|
|
40
|
-
$VERSION = '2.
|
40
|
+
$VERSION = '2.23';
|
41
41
|
|
42
42
|
sub ProcessLeicaLEIC($$$);
|
43
43
|
sub WhiteBalanceConv($;$$);
|
@@ -360,12 +360,16 @@ my %shootingMode = (
|
|
360
360
|
'16' => 'Normal?', # (only mode for DMC-LC20)
|
361
361
|
'16 0' => '1-area', # (FZ8)
|
362
362
|
'16 16' => '1-area (high speed)', # (FZ8)
|
363
|
+
'16 32' => '1-area +', #forum16903 (G9M2)
|
364
|
+
'17 0' => 'Full Area', #forum16903 (G9M2)
|
363
365
|
# '32 0' is Face Detect for FS7, and Face Detect or Focus Tracking
|
364
366
|
# for the DMC-FZ200 (ref 17), and Auto is DMC-L1 guess,
|
365
367
|
'32 0' => 'Tracking',
|
366
368
|
'32 1' => '3-area (left)?', # (DMC-L1 guess)
|
367
369
|
'32 2' => '3-area (center)?', # (DMC-L1 guess)
|
368
370
|
'32 3' => '3-area (right)?', # (DMC-L1 guess)
|
371
|
+
'32 16' => 'Zone', #forum16903 (G9M2)
|
372
|
+
'32 18' => 'Zone (horizontal/vertical)', #forum16903 (G9M2)
|
369
373
|
# '32 16' ? (DC-GH6)
|
370
374
|
'64 0' => 'Face Detect',
|
371
375
|
'64 1' => 'Face Detect (animal detect on)', #forum11194
|
@@ -1448,6 +1452,20 @@ my %shootingMode = (
|
|
1448
1452
|
Name => 'MinimumISO',
|
1449
1453
|
Writable => 'int32u',
|
1450
1454
|
},
|
1455
|
+
0xe9 => { #forum16903 (DC-G9M2)
|
1456
|
+
Name => 'AFSubjectDetection',
|
1457
|
+
Writable => 'int16u',
|
1458
|
+
PrintConv => {
|
1459
|
+
0 => 'n/a',
|
1460
|
+
1 => 'Human Eye/Face/Body',
|
1461
|
+
2 => 'Animal', #PH (NC) (DC-S5 and DC-S5M2)
|
1462
|
+
3 => 'Human Eye/Face',
|
1463
|
+
4 => 'Animal Body',
|
1464
|
+
5 => 'Animal Eye/Body',
|
1465
|
+
6 => 'Car',
|
1466
|
+
7 => 'Motorcycle',
|
1467
|
+
}
|
1468
|
+
},
|
1451
1469
|
0xee => { #PH (DC-GH6)
|
1452
1470
|
Name => 'DynamicRangeBoost',
|
1453
1471
|
Writable => 'int16u',
|
@@ -2902,7 +2920,7 @@ Panasonic and Leica maker notes in EXIF information.
|
|
2902
2920
|
|
2903
2921
|
=head1 AUTHOR
|
2904
2922
|
|
2905
|
-
Copyright 2003-
|
2923
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
2906
2924
|
|
2907
2925
|
This library is free software; you can redistribute it and/or modify it
|
2908
2926
|
under the same terms as Perl itself.
|
@@ -935,7 +935,7 @@ write meta information in Panasonic/Leica RAW, RW2 and RWL images.
|
|
935
935
|
|
936
936
|
=head1 AUTHOR
|
937
937
|
|
938
|
-
Copyright 2003-
|
938
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
939
939
|
|
940
940
|
This library is free software; you can redistribute it and/or modify it
|
941
941
|
under the same terms as Perl itself.
|
@@ -825,7 +825,7 @@ timed metadata from the 'mett' frame found in Parrot drone MP4 videos.
|
|
825
825
|
|
826
826
|
=head1 AUTHOR
|
827
827
|
|
828
|
-
Copyright 2003-
|
828
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
829
829
|
|
830
830
|
This library is free software; you can redistribute it and/or modify it
|
831
831
|
under the same terms as Perl itself.
|
@@ -6477,7 +6477,7 @@ tags, and everyone who helped contribute to the LensType values.
|
|
6477
6477
|
|
6478
6478
|
=head1 AUTHOR
|
6479
6479
|
|
6480
|
-
Copyright 2003-
|
6480
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
6481
6481
|
|
6482
6482
|
This library is free software; you can redistribute it and/or modify it
|
6483
6483
|
under the same terms as Perl itself.
|
@@ -726,7 +726,7 @@ One maker notes.
|
|
726
726
|
|
727
727
|
=head1 AUTHOR
|
728
728
|
|
729
|
-
Copyright 2003-
|
729
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
730
730
|
|
731
731
|
This library is free software; you can redistribute it and/or modify it
|
732
732
|
under the same terms as Perl itself.
|
@@ -484,7 +484,7 @@ information from Kodak Photo CD Image Pac (PCD) files.
|
|
484
484
|
|
485
485
|
=head1 AUTHOR
|
486
486
|
|
487
|
-
Copyright 2003-
|
487
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
488
488
|
|
489
489
|
This library is free software; you can redistribute it and/or modify it
|
490
490
|
under the same terms as Perl itself.
|
@@ -237,7 +237,7 @@ write information written by the Camera Bits Photo Mechanic software.
|
|
237
237
|
|
238
238
|
=head1 AUTHOR
|
239
239
|
|
240
|
-
Copyright 2003-
|
240
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
241
241
|
|
242
242
|
This library is free software; you can redistribute it and/or modify it
|
243
243
|
under the same terms as Perl itself.
|
@@ -1262,7 +1262,7 @@ be preserved when copying Photoshop information via user-defined tags.
|
|
1262
1262
|
|
1263
1263
|
=head1 AUTHOR
|
1264
1264
|
|
1265
|
-
Copyright 2003-
|
1265
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
1266
1266
|
|
1267
1267
|
This library is free software; you can redistribute it and/or modify it
|
1268
1268
|
under the same terms as Perl itself.
|
@@ -768,7 +768,7 @@ This code reads meta information from EPS (Encapsulated PostScript), PS
|
|
768
768
|
|
769
769
|
=head1 AUTHOR
|
770
770
|
|
771
|
-
Copyright 2003-
|
771
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
772
772
|
|
773
773
|
This library is free software; you can redistribute it and/or modify it
|
774
774
|
under the same terms as Perl itself.
|
@@ -112,7 +112,7 @@ Print Image Matching meta information.
|
|
112
112
|
|
113
113
|
=head1 AUTHOR
|
114
114
|
|
115
|
-
Copyright 2003-
|
115
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
116
116
|
|
117
117
|
This library is free software; you can redistribute it and/or modify it
|
118
118
|
under the same terms as Perl itself.
|
@@ -5,8 +5,9 @@
|
|
5
5
|
#
|
6
6
|
# Revisions: 2024-12-04 - P. Harvey Created
|
7
7
|
#
|
8
|
-
# Notes: Tag definitions for Protobuf tags support additional 'signed'
|
9
|
-
# and '
|
8
|
+
# Notes: Tag definitions for Protobuf tags support additional 'signed',
|
9
|
+
# 'unsigned' and 'int64s' formats for varInt (type 0) values,
|
10
|
+
# and 'rational' for byte (type 2) values
|
10
11
|
#
|
11
12
|
# References: 1) https://protobuf.dev/programming-guides/encoding/
|
12
13
|
#------------------------------------------------------------------------------
|
@@ -17,13 +18,13 @@ use strict;
|
|
17
18
|
use vars qw($VERSION);
|
18
19
|
use Image::ExifTool qw(:DataAccess :Utils);
|
19
20
|
|
20
|
-
$VERSION = '1.
|
21
|
+
$VERSION = '1.02';
|
21
22
|
|
22
23
|
sub ProcessProtobuf($$$;$);
|
23
24
|
|
24
25
|
#------------------------------------------------------------------------------
|
25
26
|
# Read bytes from dirInfo object
|
26
|
-
# Inputs: 0) dirInfo ref, 1) number of bytes
|
27
|
+
# Inputs: 0) dirInfo ref (with DataPt and Pos set), 1) number of bytes
|
27
28
|
# Returns: binary data or undef on error
|
28
29
|
sub GetBytes($$)
|
29
30
|
{
|
@@ -105,7 +106,7 @@ sub IsProtobuf($)
|
|
105
106
|
|
106
107
|
#------------------------------------------------------------------------------
|
107
108
|
# Process protobuf data (eg. DJI djmd timed data from Action4 videos) (ref 1)
|
108
|
-
# Inputs: 0) ExifTool ref, 1) dirInfo ref with DataPt, DirName and Base,
|
109
|
+
# Inputs: 0) ExifTool ref, 1) dirInfo ref with DataPt, DataPos, DirName and Base,
|
109
110
|
# 2) tag table ptr, 3) prefix of parent protobuf ID's
|
110
111
|
# Returns: true on success
|
111
112
|
sub ProcessProtobuf($$$;$)
|
@@ -113,27 +114,32 @@ sub ProcessProtobuf($$$;$)
|
|
113
114
|
my ($et, $dirInfo, $tagTbl, $prefix) = @_;
|
114
115
|
my $dataPt = $$dirInfo{DataPt};
|
115
116
|
my $dirName = $$dirInfo{DirName};
|
117
|
+
my $dirStart = $$dirInfo{DirStart} || 0;
|
118
|
+
my $dirLen = $$dirInfo{DirLen} || (length($$dataPt) - $dirStart);
|
119
|
+
my $dirEnd = $dirStart + $dirLen;
|
120
|
+
my $dataPos = ($$dirInfo{Base} || 0) + ($$dirInfo{DataPos} || 0);
|
116
121
|
my $unknown = $et->Options('Unknown') || $et->Options('Verbose');
|
117
122
|
|
118
123
|
$$dirInfo{Pos} = $$dirInfo{DirStart} || 0; # initialize buffer Pos
|
124
|
+
$et->VerboseDir('Protobuf', undef, $dirLen);
|
119
125
|
|
120
126
|
unless ($prefix) {
|
121
127
|
$prefix = '';
|
122
|
-
$$et{
|
128
|
+
$$et{ProtoPrefix}{$dirName} = '' unless defined $$et{ProtoPrefix}{$dirName};
|
123
129
|
SetByteOrder('II');
|
124
130
|
}
|
125
131
|
# loop through protobuf records
|
126
132
|
for (;;) {
|
127
133
|
my $pos = $$dirInfo{Pos};
|
128
|
-
last if $pos >=
|
134
|
+
last if $pos >= $dirEnd;
|
129
135
|
my ($buff, $id, $type) = ReadRecord($dirInfo);
|
130
136
|
defined $buff or $et->Warn('Protobuf format error'), last;
|
131
137
|
if ($type == 2 and $buff =~ /\.proto$/) {
|
132
138
|
# save protocol name separately for directory type
|
133
|
-
$$et{
|
139
|
+
$$et{ProtoPrefix}{$dirName} = substr($buff, 0, -6) . '_';
|
134
140
|
$et->HandleTag($tagTbl, Protocol => $buff);
|
135
141
|
}
|
136
|
-
my $tag = "$$et{
|
142
|
+
my $tag = "$$et{ProtoPrefix}{$dirName}$prefix$id";
|
137
143
|
my $tagInfo = $$tagTbl{$tag};
|
138
144
|
if ($tagInfo) {
|
139
145
|
next if $type != 2 and $$tagInfo{Unknown} and not $unknown;
|
@@ -157,23 +163,45 @@ sub ProcessProtobuf($$$;$)
|
|
157
163
|
if ($$tagInfo{Format}) {
|
158
164
|
if ($type == 0) {
|
159
165
|
$val = $buff;
|
160
|
-
|
166
|
+
if ($$tagInfo{Format} eq 'signed') {
|
167
|
+
$val = ($val & 1) ? -($val >> 1)-1 : ($val >> 1);
|
168
|
+
} elsif ($$tagInfo{Format} eq 'int64s' and $val > 0xffffffff) {
|
169
|
+
# hack for DJI drones which store 64-bit signed integers improperly
|
170
|
+
# (just toss upper 32 bits which should be all 1's anyway)
|
171
|
+
$val = ($val & 0xffffffff) - 4294967296;
|
172
|
+
}
|
173
|
+
} elsif ($type == 2 and $$tagInfo{Format} eq 'rational') {
|
174
|
+
my $dir = { DataPt => \$buff, Pos => 0 };
|
175
|
+
my $num = VarInt($dir);
|
176
|
+
my $den = VarInt($dir);
|
177
|
+
$val = (defined $num and $den) ? "$num/$den" : 'err';
|
161
178
|
} else {
|
162
179
|
$val = ReadValue(\$buff, 0, $$tagInfo{Format}, undef, length($buff));
|
163
180
|
}
|
164
181
|
} elsif ($type == 0) {
|
165
182
|
$val = $buff;
|
166
|
-
my $
|
167
|
-
$
|
183
|
+
my $hex = sprintf('%x', $val);
|
184
|
+
if (length($hex) == 16 and $hex =~ /^ffffffff/) {
|
185
|
+
my $s64 = hex(substr($hex, 8)) - 4294967296;
|
186
|
+
$val .= " (0x$hex, int64s $s64)";
|
187
|
+
} else {
|
188
|
+
my $signed = ($val & 1) ? -($val >> 1)-1 : ($val >> 1);
|
189
|
+
$val .= " (0x$hex, signed $signed)";
|
190
|
+
}
|
168
191
|
} elsif ($type == 1) {
|
169
192
|
$val = '0x' . unpack('H*', $buff) . ' (double ' . GetDouble(\$buff,0) . ')';
|
170
193
|
} elsif ($type == 2) {
|
171
|
-
if ($$tagInfo{
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
194
|
+
if ($$tagInfo{SubDirectory}) {
|
195
|
+
# (fall through to process known SubDirectory)
|
196
|
+
} elsif ($$tagInfo{IsProtobuf}) {
|
197
|
+
# process Unknown protobuf directories
|
198
|
+
$et->VPrint(1, "$$et{INDENT}Protobuf $tag (" . length($buff) . " bytes) -->\n");
|
199
|
+
my $addr = $dataPos + $$dirInfo{Pos} - length($buff);
|
200
|
+
$et->VerboseDump(\$buff, Addr => $addr, Prefix => $$et{INDENT});
|
201
|
+
my %subdir = ( DataPt => \$buff, DataPos => $addr, DirName => $dirName );
|
202
|
+
$$et{INDENT} .= '| ';
|
176
203
|
ProcessProtobuf($et, \%subdir, $tagTbl, "$prefix$id-");
|
204
|
+
$$et{INDENT} = substr($$et{INDENT}, 0, -2);
|
177
205
|
next;
|
178
206
|
} elsif ($buff !~ /[^\x20-\x7e]/) {
|
179
207
|
$val = $buff; # assume this is an ASCII string
|
@@ -193,7 +221,7 @@ sub ProcessProtobuf($$$;$)
|
|
193
221
|
my $start = $type == 0 ? $pos + 1 : $$dirInfo{Pos} - length $buff;
|
194
222
|
$et->HandleTag($tagTbl, $tag, $val,
|
195
223
|
DataPt => $dataPt,
|
196
|
-
DataPos=>
|
224
|
+
DataPos=> $dataPos,
|
197
225
|
Start => $start,
|
198
226
|
Size => $$dirInfo{Pos} - $start,
|
199
227
|
Extra => ", type=$type",
|
@@ -201,7 +229,7 @@ sub ProcessProtobuf($$$;$)
|
|
201
229
|
);
|
202
230
|
}
|
203
231
|
# warn if we didn't finish exactly at the end of the buffer
|
204
|
-
$et->Warn('Truncated protobuf data') unless $prefix or $$dirInfo{Pos} ==
|
232
|
+
$et->Warn('Truncated protobuf data') unless $prefix or $$dirInfo{Pos} == $dirEnd;
|
205
233
|
return 1;
|
206
234
|
}
|
207
235
|
|
@@ -222,7 +250,7 @@ information in protocol buffer (protobuf) format.
|
|
222
250
|
|
223
251
|
=head1 AUTHOR
|
224
252
|
|
225
|
-
Copyright 2003-
|
253
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
226
254
|
|
227
255
|
This library is free software; you can redistribute it and/or modify it
|
228
256
|
under the same terms as Perl itself.
|
@@ -1331,7 +1331,7 @@ information from the APP7 Qualcomm segment in JPEG images.
|
|
1331
1331
|
|
1332
1332
|
=head1 AUTHOR
|
1333
1333
|
|
1334
|
-
Copyright 2003-
|
1334
|
+
Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)
|
1335
1335
|
|
1336
1336
|
This library is free software; you can redistribute it and/or modify it
|
1337
1337
|
under the same terms as Perl itself.
|