exiftool_vendored 12.38.0 → 12.42.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 +83 -1
- 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 +98 -66
- 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 +90 -7
- 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 +60 -2
- data/bin/lib/Image/ExifTool/DNG.pm +9 -3
- 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 +62 -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 +11 -9
- data/bin/lib/Image/ExifTool/ID3.pm +6 -6
- 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 +18 -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 +929 -184
- data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
- data/bin/lib/Image/ExifTool/NikonCustom.pm +522 -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 +28 -8
- 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 +3 -2
- 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 +11 -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 +4 -3
- 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 +7 -6
- 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 +238 -3
- 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 +4 -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 +6398 -6290
- data/bin/lib/Image/ExifTool/TagNames.pod +397 -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 +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 +7 -6
- data/bin/lib/Image/ExifTool/XMP.pm +49 -23
- 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 +30 -14
- 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
@@ -2873,7 +2873,7 @@ Image::ExifTool to read this information.
|
|
2873
2873
|
|
2874
2874
|
=head1 AUTHOR
|
2875
2875
|
|
2876
|
-
Copyright 2003-
|
2876
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
2877
2877
|
|
2878
2878
|
This library is free software; you can redistribute it and/or modify it
|
2879
2879
|
under the same terms as Perl itself.
|
@@ -877,7 +877,7 @@ tags.)
|
|
877
877
|
|
878
878
|
=head1 AUTHOR
|
879
879
|
|
880
|
-
Copyright 2003-
|
880
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
881
881
|
|
882
882
|
This library is free software; you can redistribute it and/or modify it
|
883
883
|
under the same terms as Perl itself.
|
@@ -2264,7 +2264,7 @@ files, and as a trailer in JPEG, CRW, CR2 and TIFF images.
|
|
2264
2264
|
|
2265
2265
|
=head1 AUTHOR
|
2266
2266
|
|
2267
|
-
Copyright 2003-
|
2267
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
2268
2268
|
|
2269
2269
|
This library is free software; you can redistribute it and/or modify it
|
2270
2270
|
under the same terms as Perl itself.
|
@@ -221,7 +221,7 @@ settings files (COS).
|
|
221
221
|
|
222
222
|
=head1 AUTHOR
|
223
223
|
|
224
|
-
Copyright 2003-
|
224
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
225
225
|
|
226
226
|
This library is free software; you can redistribute it and/or modify it
|
227
227
|
under the same terms as Perl itself.
|
@@ -2034,7 +2034,7 @@ Casio maker notes in EXIF information.
|
|
2034
2034
|
|
2035
2035
|
=head1 AUTHOR
|
2036
2036
|
|
2037
|
-
Copyright 2003-
|
2037
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
2038
2038
|
|
2039
2039
|
This library is free software; you can redistribute it and/or modify it
|
2040
2040
|
under the same terms as Perl itself.
|
@@ -422,7 +422,7 @@ when decoding certain types of information.
|
|
422
422
|
|
423
423
|
=head1 AUTHOR
|
424
424
|
|
425
|
-
Copyright 2003-
|
425
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
426
426
|
|
427
427
|
This library is free software; you can redistribute it and/or modify it
|
428
428
|
under the same terms as Perl itself.
|
@@ -3853,7 +3853,7 @@ No translation of special characters sets is done.
|
|
3853
3853
|
|
3854
3854
|
=head1 AUTHOR
|
3855
3855
|
|
3856
|
-
Copyright 2003-
|
3856
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
3857
3857
|
|
3858
3858
|
This library is free software; you can redistribute it and/or modify it
|
3859
3859
|
under the same terms as Perl itself.
|
@@ -11,11 +11,14 @@ package Image::ExifTool::DJI;
|
|
11
11
|
|
12
12
|
use strict;
|
13
13
|
use vars qw($VERSION);
|
14
|
+
use Image::ExifTool qw(:DataAccess :Utils);
|
14
15
|
use Image::ExifTool::Exif;
|
15
16
|
use Image::ExifTool::XMP;
|
16
17
|
use Image::ExifTool::GPS;
|
17
18
|
|
18
|
-
$VERSION = '1.
|
19
|
+
$VERSION = '1.05';
|
20
|
+
|
21
|
+
sub ProcessDJIInfo($$$);
|
19
22
|
|
20
23
|
my %convFloat2 = (
|
21
24
|
PrintConv => 'sprintf("%+.2f", $val)',
|
@@ -44,6 +47,29 @@ my %convFloat2 = (
|
|
44
47
|
0x0b => { Name => 'CameraRoll', Writable => 'float', %convFloat2 },
|
45
48
|
);
|
46
49
|
|
50
|
+
# DJI debug maker notes
|
51
|
+
%Image::ExifTool::DJI::Info = (
|
52
|
+
PROCESS_PROC => \&ProcessDJIInfo,
|
53
|
+
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
|
54
|
+
NOTES => 'Tags written by some DJI drones.',
|
55
|
+
VARS => { LONG_TAGS => 2 },
|
56
|
+
ae_dbg_info => { Name => 'AEDebugInfo' },
|
57
|
+
ae_histogram_info => { Name => 'AEHistogramInfo' },
|
58
|
+
ae_local_histogram => { Name => 'AELocalHistogram' },
|
59
|
+
ae_liveview_histogram_info => { Name => 'AELiveViewHistogramInfo' },
|
60
|
+
ae_liveview_local_histogram => { Name => 'AELiveViewLocalHistogram' },
|
61
|
+
awb_dbg_info => { Name => 'AWBDebugInfo' },
|
62
|
+
af_dbg_info => { Name => 'AFDebugInfo' },
|
63
|
+
hiso => { Name => 'Histogram' },
|
64
|
+
xidiri => { Name => 'Xidiri' },
|
65
|
+
'GimbalDegree(Y,P,R)'=> { Name => 'GimbalDegree' },
|
66
|
+
'FlightDegree(Y,P,R)'=> { Name => 'FlightDegree' },
|
67
|
+
adj_dbg_info => { Name => 'ADJDebugInfo' },
|
68
|
+
sensor_id => { Name => 'SensorID' },
|
69
|
+
'FlightSpeed(X,Y,Z)' => { Name => 'FlightSpeed' },
|
70
|
+
hyperlapse_dbg_info => { Name => 'HyperlapsDebugInfo' },
|
71
|
+
);
|
72
|
+
|
47
73
|
# thermal parameters in APP4 of DJI ZH20T images (ref forum11401)
|
48
74
|
%Image::ExifTool::DJI::ThermalParams = (
|
49
75
|
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
@@ -134,6 +160,38 @@ my %convFloat2 = (
|
|
134
160
|
},
|
135
161
|
);
|
136
162
|
|
163
|
+
#------------------------------------------------------------------------------
|
164
|
+
# Process DJI infor (ref PH)
|
165
|
+
# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
|
166
|
+
# Returns: 1 on success
|
167
|
+
sub ProcessDJIInfo($$$)
|
168
|
+
{
|
169
|
+
my ($et, $dirInfo, $tagTbl) = @_;
|
170
|
+
my $dataPt = $$dirInfo{DataPt};
|
171
|
+
my $dirStart = $$dirInfo{DirStart} || 0;
|
172
|
+
my $dirLen = $$dirInfo{DirLen} || (length($$dataPt) - $dirStart);
|
173
|
+
if ($dirStart) {
|
174
|
+
my $buff = substr($$dataPt, $dirStart, $dirLen);
|
175
|
+
$dataPt = \$buff;
|
176
|
+
}
|
177
|
+
while ($$dataPt =~ /\G\[(.*?)\](?=(\[|$))/sg) {
|
178
|
+
my ($tag, $val) = split /:/, $1, 2;
|
179
|
+
if ($val =~ /^([\x20-\x7f]+)\0*$/) {
|
180
|
+
$val = $1;
|
181
|
+
} else {
|
182
|
+
my $buff = $val;
|
183
|
+
$val = \$buff;
|
184
|
+
}
|
185
|
+
if (not $$tagTbl{$tag} and $tag=~ /^[-_a-zA-Z0-9]+$/) {
|
186
|
+
my $name = $tag;
|
187
|
+
$name =~ s/_([a-z])/_\U$1/g;
|
188
|
+
AddTagToTable($tagTbl, $tag, { Name => Image::ExifTool::MakeTagName($name) });
|
189
|
+
}
|
190
|
+
$et->HandleTag($tagTbl, $tag, $val);
|
191
|
+
}
|
192
|
+
return 1;
|
193
|
+
}
|
194
|
+
|
137
195
|
__END__
|
138
196
|
|
139
197
|
=head1 NAME
|
@@ -151,7 +209,7 @@ the maker notes in images from some DJI Phantom drones.
|
|
151
209
|
|
152
210
|
=head1 AUTHOR
|
153
211
|
|
154
|
-
Copyright 2003-
|
212
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
155
213
|
|
156
214
|
This library is free software; you can redistribute it and/or modify it
|
157
215
|
under the same terms as Perl itself.
|
@@ -680,8 +680,14 @@ sub ProcessAdobeMakN($$$)
|
|
680
680
|
my $dataPos = $$dirInfo{DataPos};
|
681
681
|
my $hdrLen = 6;
|
682
682
|
|
683
|
-
# hack for extra 12 bytes in MakN header of JPEG converted to DNG
|
684
|
-
# (4 bytes "00 00 00 01" followed by 8 unknown bytes)
|
683
|
+
# 2018-09-27: hack for extra 12 bytes in MakN header of JPEG converted to DNG
|
684
|
+
# by Adobe Camera Raw (4 bytes "00 00 00 01" followed by 8 unknown bytes)
|
685
|
+
# - this is because CameraRaw copies the maker notes from the wrong location
|
686
|
+
# in a JPG image (off by 12 bytes presumably due to the JPEG headers)
|
687
|
+
# - this hack won't work in most cases because the extra bytes are not consistent
|
688
|
+
# since they are just the data that existed in the JPG before the maker notes
|
689
|
+
# - also, the last 12 bytes of the maker notes will be missing
|
690
|
+
# - 2022-04-26: this bug still exists in Camera Raw 14.3
|
685
691
|
$hdrLen += 12 if $len >= 18 and substr($$dataPt, $start+6, 4) eq "\0\0\0\x01";
|
686
692
|
|
687
693
|
my $dirStart = $start + $hdrLen; # pointer to maker note directory
|
@@ -820,7 +826,7 @@ information in DNG (Digital Negative) images.
|
|
820
826
|
|
821
827
|
=head1 AUTHOR
|
822
828
|
|
823
|
-
Copyright 2003-
|
829
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
824
830
|
|
825
831
|
This library is free software; you can redistribute it and/or modify it
|
826
832
|
under the same terms as Perl itself.
|
@@ -225,7 +225,7 @@ metadata from DPX (Digital Picture Exchange) images.
|
|
225
225
|
|
226
226
|
=head1 AUTHOR
|
227
227
|
|
228
|
-
Copyright 2003-
|
228
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
229
229
|
|
230
230
|
This library is free software; you can redistribute it and/or modify it
|
231
231
|
under the same terms as Perl itself.
|
@@ -291,7 +291,7 @@ information from DV (raw Digital Video) files.
|
|
291
291
|
|
292
292
|
=head1 AUTHOR
|
293
293
|
|
294
|
-
Copyright 2003-
|
294
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
295
295
|
|
296
296
|
This library is free software; you can redistribute it and/or modify it
|
297
297
|
under the same terms as Perl itself.
|
@@ -360,7 +360,7 @@ This file contains tag definitions for the Darwin Core XMP namespace.
|
|
360
360
|
|
361
361
|
=head1 AUTHOR
|
362
362
|
|
363
|
-
Copyright 2003-
|
363
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
364
364
|
|
365
365
|
This library is free software; you can redistribute it and/or modify it
|
366
366
|
under the same terms as Perl itself.
|
@@ -353,7 +353,7 @@ Image::ExifTool::AIFF.
|
|
353
353
|
|
354
354
|
=head1 AUTHOR
|
355
355
|
|
356
|
-
Copyright 2003-
|
356
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
357
357
|
|
358
358
|
This library is free software; you can redistribute it and/or modify it
|
359
359
|
under the same terms as Perl itself.
|
@@ -1398,7 +1398,7 @@ library files.
|
|
1398
1398
|
|
1399
1399
|
=head1 AUTHOR
|
1400
1400
|
|
1401
|
-
Copyright 2003-
|
1401
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1402
1402
|
|
1403
1403
|
This library is free software; you can redistribute it and/or modify it
|
1404
1404
|
under the same terms as Perl itself.
|
@@ -56,7 +56,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
|
|
56
56
|
use Image::ExifTool qw(:DataAccess :Utils);
|
57
57
|
use Image::ExifTool::MakerNotes;
|
58
58
|
|
59
|
-
$VERSION = '4.
|
59
|
+
$VERSION = '4.40';
|
60
60
|
|
61
61
|
sub ProcessExif($$$);
|
62
62
|
sub WriteExif($$$);
|
@@ -415,7 +415,14 @@ my %opcodeInfo = (
|
|
415
415
|
WriteGroup => 'IFD0',
|
416
416
|
# set priority directory if this is the full resolution image
|
417
417
|
DataMember => 'SubfileType',
|
418
|
-
RawConv =>
|
418
|
+
RawConv => q{
|
419
|
+
if ($val == ($val & 0x02)) {
|
420
|
+
$self->SetPriorityDir() if $val == 0;
|
421
|
+
$$self{PageCount} = ($$self{PageCount} || 0) + 1;
|
422
|
+
$$self{MultiPage} = 1 if $val == 2 or $$self{PageCount} > 1;
|
423
|
+
}
|
424
|
+
$$self{SubfileType} = $val;
|
425
|
+
},
|
419
426
|
PrintConv => \%subfileType,
|
420
427
|
},
|
421
428
|
0xff => {
|
@@ -425,7 +432,14 @@ my %opcodeInfo = (
|
|
425
432
|
Writable => 'int16u',
|
426
433
|
WriteGroup => 'IFD0',
|
427
434
|
# set priority directory if this is the full resolution image
|
428
|
-
RawConv =>
|
435
|
+
RawConv => q{
|
436
|
+
if ($val == 1 or $val == 3) {
|
437
|
+
$self->SetPriorityDir() if $val == 1;
|
438
|
+
$$self{PageCount} = ($$self{PageCount} || 0) + 1;
|
439
|
+
$$self{MultiPage} = 1 if $val == 3 or $$self{PageCount} > 1;
|
440
|
+
}
|
441
|
+
$val;
|
442
|
+
},
|
429
443
|
PrintConv => {
|
430
444
|
1 => 'Full-resolution image',
|
431
445
|
2 => 'Reduced-resolution image',
|
@@ -2144,7 +2158,7 @@ my %opcodeInfo = (
|
|
2144
2158
|
Notes => 'displayed in seconds, but stored as an APEX value',
|
2145
2159
|
Format => 'rational64s', # Leica M8 patch (incorrectly written as rational64u)
|
2146
2160
|
Writable => 'rational64s',
|
2147
|
-
ValueConv => 'abs($val)<100 ? 2**(-$val) : 0',
|
2161
|
+
ValueConv => 'IsFloat($val) && abs($val)<100 ? 2**(-$val) : 0',
|
2148
2162
|
ValueConvInv => '$val>0 ? -log($val)/log(2) : -100',
|
2149
2163
|
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
|
2150
2164
|
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
|
@@ -3383,6 +3397,15 @@ my %opcodeInfo = (
|
|
3383
3397
|
},
|
3384
3398
|
# the DJI FC2103 writes some interesting stuff here (with sections labelled
|
3385
3399
|
# awb_dbg_info, ae_dbg_info, ae_histogram_info, af_dbg_info, hiso, xidiri) - PH
|
3400
|
+
{
|
3401
|
+
Name => 'MakerNoteDJIInfo',
|
3402
|
+
Condition => '$$valPt =~ /^\[ae_dbg_info:/',
|
3403
|
+
MakerNotes => 1,
|
3404
|
+
Binary => 1,
|
3405
|
+
WriteGroup => 'IFD0', # (for Validate)
|
3406
|
+
SubDirectory => { TagTable => 'Image::ExifTool::DJI::Info' },
|
3407
|
+
Format => 'undef',
|
3408
|
+
},
|
3386
3409
|
{
|
3387
3410
|
Name => 'DNGPrivateData',
|
3388
3411
|
Flags => [ 'Binary', 'Protected' ],
|
@@ -4817,12 +4840,21 @@ my %subSecConv = (
|
|
4817
4840
|
GPSPosition => {
|
4818
4841
|
Groups => { 2 => 'Location' },
|
4819
4842
|
Writable => 1,
|
4843
|
+
Protected => 1,
|
4820
4844
|
WriteAlso => {
|
4821
4845
|
GPSLatitude => '$val =~ /(.*?)( ?[NS])?,/ ? $1 : undef',
|
4822
4846
|
GPSLatitudeRef => '$val =~ /(-?)(.*?) ?([NS]?),/ ? ($3 || ($1 ? "S" : "N")) : undef',
|
4823
4847
|
GPSLongitude => '$val =~ /, ?(.*?)( ?[EW]?)$/ ? $1 : undef',
|
4824
4848
|
GPSLongitudeRef => '$val =~ /, ?(-?)(.*?) ?([EW]?)$/ ? ($3 || ($1 ? "W" : "E")) : undef',
|
4825
4849
|
},
|
4850
|
+
PrintConvInv => q{
|
4851
|
+
return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/;
|
4852
|
+
my ($lat, $lon) = ($1, $2);
|
4853
|
+
require Image::ExifTool::GPS;
|
4854
|
+
$lat = Image::ExifTool::GPS::ToDegrees($lat, 1, "lat");
|
4855
|
+
$lon = Image::ExifTool::GPS::ToDegrees($lon, 1, "lon");
|
4856
|
+
return "$lat, $lon";
|
4857
|
+
},
|
4826
4858
|
Require => {
|
4827
4859
|
0 => 'GPSLatitude',
|
4828
4860
|
1 => 'GPSLongitude',
|
@@ -5240,6 +5272,7 @@ sub RedBlueBalance($@)
|
|
5240
5272
|
sub PrintExposureTime($)
|
5241
5273
|
{
|
5242
5274
|
my $secs = shift;
|
5275
|
+
return $secs unless Image::ExifTool::IsFloat($secs);
|
5243
5276
|
if ($secs < 0.25001 and $secs > 0) {
|
5244
5277
|
return sprintf("1/%d",int(0.5 + 1/$secs));
|
5245
5278
|
}
|
@@ -5845,7 +5878,7 @@ sub ProcessExif($$$)
|
|
5845
5878
|
unless ($path =~ /^(JPEG-APP1-IFD0|TIFF-IFD0|PSD-EXIFInfo-IFD0)$/) {
|
5846
5879
|
if ($Image::ExifTool::MWG::strict) {
|
5847
5880
|
$et->Warn("Ignored non-standard EXIF at $path");
|
5848
|
-
return
|
5881
|
+
return 0;
|
5849
5882
|
} else {
|
5850
5883
|
$et->Warn("Non-standard EXIF at $path", 1);
|
5851
5884
|
}
|
@@ -5888,10 +5921,6 @@ sub ProcessExif($$$)
|
|
5888
5921
|
# also read next IFD pointer if available
|
5889
5922
|
if ($raf->Read($buf2, $len+4) >= $len) {
|
5890
5923
|
$buff .= $buf2;
|
5891
|
-
# make copy of dirInfo since we're going to modify it
|
5892
|
-
my %newDirInfo = %$dirInfo;
|
5893
|
-
$dirInfo = \%newDirInfo;
|
5894
|
-
# update directory parameters for the newly loaded IFD
|
5895
5924
|
$dataPt = $$dirInfo{DataPt} = \$buff;
|
5896
5925
|
$dataPos = $$dirInfo{DataPos} = $offset;
|
5897
5926
|
$dataLen = $$dirInfo{DataLen} = length $buff;
|
@@ -6585,7 +6614,7 @@ sub ProcessExif($$$)
|
|
6585
6614
|
#### eval Validate ($val, $dirData, $subdirStart, $size)
|
6586
6615
|
my $ok = 0;
|
6587
6616
|
if (defined $$subdir{Validate} and not eval $$subdir{Validate}) {
|
6588
|
-
$et->Warn("Invalid $tagStr data");
|
6617
|
+
$et->Warn("Invalid $tagStr data", $inMakerNotes);
|
6589
6618
|
$invalid = 1;
|
6590
6619
|
} else {
|
6591
6620
|
if (not $subdirInfo{DirName} and $inMakerNotes) {
|
@@ -6698,28 +6727,40 @@ sub ProcessExif($$$)
|
|
6698
6727
|
|
6699
6728
|
# scan for subsequent IFD's if specified
|
6700
6729
|
if ($$dirInfo{Multi} and $bytesFromEnd >= 4) {
|
6701
|
-
|
6702
|
-
|
6703
|
-
|
6704
|
-
|
6705
|
-
|
6706
|
-
|
6707
|
-
|
6708
|
-
|
6730
|
+
# use same directory information for trailing directory,
|
6731
|
+
# but change the start location (ProcessDirectory will
|
6732
|
+
# test to make sure we don't reprocess the same dir twice)
|
6733
|
+
my %newDirInfo = %$dirInfo;
|
6734
|
+
$newDirInfo{Multi} = 0; # prevent recursion
|
6735
|
+
$newDirInfo{OffsetName} = $nextOffName;
|
6736
|
+
$$et{INDENT} =~ s/..$//; # keep indent the same
|
6737
|
+
for (;;) {
|
6738
|
+
my $offset = Get32u($dataPt, $dirEnd) or last;
|
6739
|
+
$newDirInfo{DirStart} = $offset - $dataPos;
|
6709
6740
|
# increment IFD number
|
6710
6741
|
my $ifdNum = $newDirInfo{DirName} =~ s/(\d+)$// ? $1 : 0;
|
6711
6742
|
$newDirInfo{DirName} .= $ifdNum + 1;
|
6712
|
-
$newDirInfo{OffsetName} = $nextOffName;
|
6713
6743
|
# must validate SubIFD1 because the nextIFD pointer is invalid for some RAW formats
|
6714
6744
|
if ($newDirInfo{DirName} ne 'SubIFD1' or ValidateIFD(\%newDirInfo)) {
|
6715
|
-
$$et{INDENT} =~ s/..$//; # keep indent the same
|
6716
6745
|
my $cur = pop @{$$et{PATH}};
|
6717
6746
|
$et->ProcessDirectory(\%newDirInfo, $tagTablePtr) or $success = 0;
|
6718
6747
|
push @{$$et{PATH}}, $cur;
|
6748
|
+
if ($success and $newDirInfo{BytesFromEnd} >= 4) {
|
6749
|
+
$dataPt = $newDirInfo{DataPt};
|
6750
|
+
$dataPos = $newDirInfo{DataPos};
|
6751
|
+
$dirEnd = $newDirInfo{DirEnd};
|
6752
|
+
next;
|
6753
|
+
}
|
6719
6754
|
} elsif ($verbose or $$et{TIFF_TYPE} eq 'TIFF') {
|
6720
6755
|
$et->Warn('Ignored bad IFD linked from SubIFD');
|
6721
6756
|
}
|
6757
|
+
last;
|
6722
6758
|
}
|
6759
|
+
} elsif (defined $$dirInfo{Multi}) {
|
6760
|
+
# return necessary parameters for parsing next IFD
|
6761
|
+
$$dirInfo{DirEnd} = $dirEnd;
|
6762
|
+
$$dirInfo{OffsetName} = $nextOffName;
|
6763
|
+
$$dirInfo{BytesFromEnd} = $bytesFromEnd;
|
6723
6764
|
}
|
6724
6765
|
return $success;
|
6725
6766
|
}
|
@@ -6743,7 +6784,7 @@ EXIF and TIFF meta information.
|
|
6743
6784
|
|
6744
6785
|
=head1 AUTHOR
|
6745
6786
|
|
6746
|
-
Copyright 2003-
|
6787
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
6747
6788
|
|
6748
6789
|
This library is free software; you can redistribute it and/or modify it
|
6749
6790
|
under the same terms as Perl itself.
|
@@ -137,7 +137,7 @@ information from FITS (Flexible Image Transport System) images.
|
|
137
137
|
|
138
138
|
=head1 AUTHOR
|
139
139
|
|
140
|
-
Copyright 2003-
|
140
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
141
141
|
|
142
142
|
This library is free software; you can redistribute it and/or modify it
|
143
143
|
under the same terms as Perl itself.
|
@@ -284,7 +284,7 @@ information from Free Lossless Audio Codec (FLAC) audio files.
|
|
284
284
|
|
285
285
|
=head1 AUTHOR
|
286
286
|
|
287
|
-
Copyright 2003-
|
287
|
+
Copyright 2003-2022, 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.
|
@@ -329,7 +329,7 @@ meta information in FLIF (Free Lossless Image Format) images.
|
|
329
329
|
|
330
330
|
=head1 AUTHOR
|
331
331
|
|
332
|
-
Copyright 2003-
|
332
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
333
333
|
|
334
334
|
This library is free software; you can redistribute it and/or modify it
|
335
335
|
under the same terms as Perl itself.
|
@@ -24,7 +24,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
|
|
24
24
|
use Image::ExifTool::Exif;
|
25
25
|
use Image::ExifTool::GPS;
|
26
26
|
|
27
|
-
$VERSION = '1.
|
27
|
+
$VERSION = '1.20';
|
28
28
|
|
29
29
|
sub ProcessFLIR($$;$);
|
30
30
|
sub ProcessFLIRText($$$);
|
@@ -691,7 +691,15 @@ my %float8g = ( Format => 'float', PrintConv => 'sprintf("%.8g",$val)' );
|
|
691
691
|
T => 'True North',
|
692
692
|
},
|
693
693
|
},
|
694
|
-
|
694
|
+
0x48 => { #PH (NC)
|
695
|
+
Name => 'GPSImgDirectionRef',
|
696
|
+
Format => 'string[2]',
|
697
|
+
RawConv => 'length($val) ? $val : undef',
|
698
|
+
PrintConv => {
|
699
|
+
M => 'Magnetic North',
|
700
|
+
T => 'True North',
|
701
|
+
},
|
702
|
+
},
|
695
703
|
0x4c => {
|
696
704
|
Name => 'GPSSpeed',
|
697
705
|
%float2f,
|
@@ -702,7 +710,11 @@ my %float8g = ( Format => 'float', PrintConv => 'sprintf("%.8g",$val)' );
|
|
702
710
|
%float2f,
|
703
711
|
RawConv => '$val < 0 ? undef : $val',
|
704
712
|
},
|
705
|
-
|
713
|
+
0x54 => {
|
714
|
+
Name => 'GPSImgDirection',
|
715
|
+
%float2f,
|
716
|
+
RawConv => '$val < 0 ? undef : $val',
|
717
|
+
},
|
706
718
|
0x58 => {
|
707
719
|
Name => 'GPSMapDatum',
|
708
720
|
Format => 'string[16]',
|
@@ -1619,7 +1631,7 @@ Systems Inc. thermal image files (FFF, FPF and JPEG format).
|
|
1619
1631
|
|
1620
1632
|
=head1 AUTHOR
|
1621
1633
|
|
1622
|
-
Copyright 2003-
|
1634
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1623
1635
|
|
1624
1636
|
This library is free software; you can redistribute it and/or modify it
|
1625
1637
|
under the same terms as Perl itself.
|
@@ -354,7 +354,7 @@ linear list when ApplyFixups() is called.
|
|
354
354
|
|
355
355
|
=head1 AUTHOR
|
356
356
|
|
357
|
-
Copyright 2003-
|
357
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
358
358
|
|
359
359
|
This library is free software; you can redistribute it and/or modify it
|
360
360
|
under the same terms as Perl itself.
|
@@ -721,7 +721,7 @@ will add AMF3 support.
|
|
721
721
|
|
722
722
|
=head1 AUTHOR
|
723
723
|
|
724
|
-
Copyright 2003-
|
724
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
725
725
|
|
726
726
|
This library is free software; you can redistribute it and/or modify it
|
727
727
|
under the same terms as Perl itself.
|
@@ -2395,7 +2395,7 @@ JPEG images.
|
|
2395
2395
|
|
2396
2396
|
=head1 AUTHOR
|
2397
2397
|
|
2398
|
-
Copyright 2003-
|
2398
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
2399
2399
|
|
2400
2400
|
This library is free software; you can redistribute it and/or modify it
|
2401
2401
|
under the same terms as Perl itself.
|
@@ -622,7 +622,7 @@ extracted from these formats.
|
|
622
622
|
|
623
623
|
=head1 AUTHOR
|
624
624
|
|
625
|
-
Copyright 2003-
|
625
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
626
626
|
|
627
627
|
This library is free software; you can redistribute it and/or modify it
|
628
628
|
under the same terms as Perl itself.
|
@@ -243,7 +243,7 @@ write information from the FotoWare FotoStation trailer.
|
|
243
243
|
|
244
244
|
=head1 AUTHOR
|
245
245
|
|
246
|
-
Copyright 2003-
|
246
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
247
247
|
|
248
248
|
This library is free software; you can redistribute it and/or modify it
|
249
249
|
under the same terms as Perl itself.
|
@@ -1670,7 +1670,7 @@ FujiFilm maker notes in EXIF information, and to read/write FujiFilm RAW
|
|
1670
1670
|
|
1671
1671
|
=head1 AUTHOR
|
1672
1672
|
|
1673
|
-
Copyright 2003-
|
1673
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1674
1674
|
|
1675
1675
|
This library is free software; you can redistribute it and/or modify it
|
1676
1676
|
under the same terms as Perl itself.
|
@@ -68,7 +68,7 @@ General Imaging maker notes.
|
|
68
68
|
|
69
69
|
=head1 AUTHOR
|
70
70
|
|
71
|
-
Copyright 2003-
|
71
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
72
72
|
|
73
73
|
This library is free software; you can redistribute it and/or modify it
|
74
74
|
under the same terms as Perl itself.
|
@@ -541,7 +541,7 @@ write GIF meta information.
|
|
541
541
|
|
542
542
|
=head1 AUTHOR
|
543
543
|
|
544
|
-
Copyright 2003-
|
544
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
545
545
|
|
546
546
|
This library is free software; you can redistribute it and/or modify it
|
547
547
|
under the same terms as Perl itself.
|
@@ -270,7 +270,7 @@ GIMP software.
|
|
270
270
|
|
271
271
|
=head1 AUTHOR
|
272
272
|
|
273
|
-
Copyright 2003-
|
273
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
274
274
|
|
275
275
|
This library is free software; you can redistribute it and/or modify it
|
276
276
|
under the same terms as Perl itself.
|
@@ -579,7 +579,7 @@ GPS (Global Positioning System) meta information in EXIF data.
|
|
579
579
|
|
580
580
|
=head1 AUTHOR
|
581
581
|
|
582
|
-
Copyright 2003-
|
582
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
583
583
|
|
584
584
|
This library is free software; you can redistribute it and/or modify it
|
585
585
|
under the same terms as Perl itself.
|
@@ -2242,7 +2242,7 @@ coordinates.
|
|
2242
2242
|
|
2243
2243
|
=head1 AUTHOR
|
2244
2244
|
|
2245
|
-
Copyright 2003-
|
2245
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
2246
2246
|
|
2247
2247
|
This library is free software; you can redistribute it and/or modify it
|
2248
2248
|
under the same terms as Perl itself.
|
@@ -28,7 +28,7 @@ use vars qw($VERSION);
|
|
28
28
|
use Image::ExifTool qw(:Public);
|
29
29
|
use Image::ExifTool::GPS;
|
30
30
|
|
31
|
-
$VERSION = '1.
|
31
|
+
$VERSION = '1.66';
|
32
32
|
|
33
33
|
sub JITTER() { return 2 } # maximum time jitter
|
34
34
|
|
@@ -210,13 +210,14 @@ sub LoadTrackLog($$;$)
|
|
210
210
|
$raf->ReadLine($_) or last;
|
211
211
|
# determine file format
|
212
212
|
if (not $format) {
|
213
|
+
s/^\xef\xbb\xbf//; # remove leading BOM if it exists
|
213
214
|
if (/^<(\?xml|gpx)[\s>]/) { # look for XML or GPX header
|
214
215
|
$format = 'XML';
|
215
216
|
# check for NMEA sentence
|
216
217
|
# (must ONLY start with ones that have timestamps! eg. not GSA or PTNTHPR!)
|
217
218
|
} elsif (/^.*\$([A-Z]{2}(RMC|GGA|GLL|ZDA)|PMGNTRK),/) {
|
218
219
|
$format = 'NMEA';
|
219
|
-
$nmeaStart = $2 || $1;
|
220
|
+
$nmeaStart = $2 || $1; # save type of first sentence
|
220
221
|
} elsif (/^A(FLA|XSY|FIL)/) {
|
221
222
|
# (don't set format yet because we want to read HFDTE first)
|
222
223
|
$nmeaStart = 'B' ;
|
@@ -1423,7 +1424,7 @@ user-defined tag GPSRoll, must be active.
|
|
1423
1424
|
|
1424
1425
|
=head1 AUTHOR
|
1425
1426
|
|
1426
|
-
Copyright 2003-
|
1427
|
+
Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)
|
1427
1428
|
|
1428
1429
|
This library is free software; you can redistribute it and/or modify it
|
1429
1430
|
under the same terms as Perl itself.
|