exiftool_vendored 11.50.0 → 11.51.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e698f7b3e0b0d832195da16b3303c8c913fc39ff
4
- data.tar.gz: 56345fda76bb7c49c0fc8d262d53d27f2aec9e55
3
+ metadata.gz: 14d2ae1044ed8d62a0b4efcae5b775fb16db5f4c
4
+ data.tar.gz: 9ff9933b519b5ad645b675891ea048cf077b0d36
5
5
  SHA512:
6
- metadata.gz: '08a077f0a714a29e332430f59981c16ea00d18bbea887c940511cb7f2f4c03403c8b8b63e44328b0d7accec8e992a744eee74868832ced8c4b552e639ddd903d'
7
- data.tar.gz: d96983fd20e4de4d4bd24bf8711cbf063f77c7b21665968fa3b9fb93d29464e77466683d8c7a184794dcfb3557a78c4b94f6be33a0f5478039f33701035f5958
6
+ metadata.gz: a246e28c731ee0349cbf2782052eba51249f4df03dc623046f65250b258bed7179c3c179cb1dd64eddb0965f2518a2631c7cb492339ee54184cf66bd6df46542
7
+ data.tar.gz: 923d024c05145f18099dfc1f8cf6bbd6ccb4cd839ccd7d7af2ff3497298f8aba17ee110adb9e1787ffd1c801b93e656b73d065efaa413c0a8db37b16231608a0
data/bin/Changes CHANGED
@@ -7,6 +7,12 @@ RSS feed: http://owl.phy.queensu.ca/~phil/exiftool/rss.xml
7
7
  Note: The most recent production release is Version 11.50. (Other versions are
8
8
  considered development releases, and are not uploaded to CPAN.)
9
9
 
10
+ June 13, 2019 - Version 11.51
11
+
12
+ - Decode Canon DistortionCorrection tags
13
+ - Removed a minor EXIF warning when processing EPS files with a DOS header
14
+ - Fixed bug which caused an error when rewriting some EPS files multiple times
15
+
10
16
  June 11, 2019 - Version 11.50 (production release)
11
17
 
12
18
  - Added a new Canon LensType and two new Sony LensTypes (thanks LibRaw)
data/bin/META.json CHANGED
@@ -47,6 +47,6 @@
47
47
  }
48
48
  },
49
49
  "release_status" : "stable",
50
- "version" : "11.50",
50
+ "version" : "11.51",
51
51
  "x_serialization_backend" : "JSON::PP version 4.02"
52
52
  }
data/bin/META.yml CHANGED
@@ -28,5 +28,5 @@ recommends:
28
28
  Time::HiRes: '0'
29
29
  requires:
30
30
  perl: '5.004'
31
- version: '11.50'
31
+ version: '11.51'
32
32
  x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
data/bin/README CHANGED
@@ -104,8 +104,8 @@ your home directory, then you would type the following commands in a
104
104
  terminal window to extract and run ExifTool:
105
105
 
106
106
  cd ~/Desktop
107
- gzip -dc Image-ExifTool-11.50.tar.gz | tar -xf -
108
- cd Image-ExifTool-11.50
107
+ gzip -dc Image-ExifTool-11.51.tar.gz | tar -xf -
108
+ cd Image-ExifTool-11.51
109
109
  ./exiftool t/images/ExifTool.jpg
110
110
 
111
111
  Note: These commands extract meta information from one of the test images.
data/bin/exiftool CHANGED
@@ -12,7 +12,7 @@
12
12
  use strict;
13
13
  require 5.004;
14
14
 
15
- my $version = '11.50';
15
+ my $version = '11.51';
16
16
 
17
17
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
18
18
  my $exeDir;
@@ -5119,7 +5119,7 @@ with this command:
5119
5119
 
5120
5120
  produces output like this:
5121
5121
 
5122
- -- Generated by ExifTool 11.50 --
5122
+ -- Generated by ExifTool 11.51 --
5123
5123
  File: a.jpg - 2003:10:31 15:44:19
5124
5124
  (f/5.6, 1/60s, ISO 100)
5125
5125
  File: b.jpg - 2006:05:23 11:57:38
@@ -27,7 +27,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
27
27
  %mimeType $swapBytes $swapWords $currentByteOrder %unpackStd
28
28
  %jpegMarker %specialTags %fileTypeLookup);
29
29
 
30
- $VERSION = '11.50';
30
+ $VERSION = '11.51';
31
31
  $RELEASE = '';
32
32
  @ISA = qw(Exporter);
33
33
  %EXPORT_TAGS = (
@@ -34,12 +34,14 @@ use Image::ExifTool::Nikon;
34
34
  use Image::ExifTool::Validate;
35
35
  use Image::ExifTool::MacOS;
36
36
 
37
- $VERSION = '3.23';
37
+ $VERSION = '3.24';
38
38
  @ISA = qw(Exporter);
39
39
 
40
40
  sub NumbersFirst($$);
41
41
  sub SortedTagTablekeys($);
42
42
 
43
+ my $createDate = 'Feb 15, 2005';
44
+
43
45
  # global variables to control sorting order of table entries
44
46
  my $numbersFirst = 1; # set to -1 to sort numbers last, or 2 to put negative numbers last
45
47
  my $caseInsensitive; # flag to ignore case when sorting tag names
@@ -67,7 +69,8 @@ my %tweakOrder = (
67
69
  Composite => 'Extra',
68
70
  GeoTiff => 'GPS',
69
71
  CanonVRD=> 'CanonCustom',
70
- FLIR => 'Casio',
72
+ DJI => 'Casio',
73
+ FLIR => 'DJI',
71
74
  FujiFilm => 'FLIR',
72
75
  Kodak => 'JVC',
73
76
  Leaf => 'Kodak',
@@ -184,11 +187,11 @@ instead of the descriptions, use C<exiftool -s>.
184
187
  The B<Writable> column indicates whether the tag is writable by ExifTool.
185
188
  Anything but a C<no> in this column means the tag is writable. A C<yes>
186
189
  indicates writable information that is either unformatted or written using
187
- the existing format. Other expressions give details about the information
188
- format, and vary depending on the general type of information. The format
189
- name may be followed by a number in square brackets to indicate the number
190
- of values written, or the number of characters in a fixed-length string
191
- (including a null terminator which is added if required).
190
+ the existing format. Other expressions give details about the format of the
191
+ stored value, and vary depending on the general type of information. The
192
+ format name may be followed by a number in square brackets to indicate the
193
+ number of values written, or the number of characters in a fixed-length
194
+ string (including a null terminator which is added if required).
192
195
 
193
196
  A plus sign (C<+>) after an entry in the B<Writable> column indicates a
194
197
  I<List> tag which supports multiple values and allows individual values to
@@ -1953,6 +1956,7 @@ sub CloseHtmlFiles($)
1953
1956
  # write the trailers
1954
1957
  print HTMLFILE "<hr>\n";
1955
1958
  print HTMLFILE "(This document generated automatically by Image::ExifTool::BuildTagLookup)\n";
1959
+ print HTMLFILE "<br><i>Created $createDate</i>\n" if $htmlFile eq 'html/TagNames/index.html';
1956
1960
  print HTMLFILE "<br><i>Last revised $fileDate</i>\n";
1957
1961
  print HTMLFILE "<p class=lf><a href=";
1958
1962
  if ($htmlFile =~ /index\.html$/) {
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.15';
91
+ $VERSION = '4.16';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -8005,6 +8005,10 @@ my %ciMaxFocal = (
8005
8005
  Name => 'PeripheralLighting',
8006
8006
  PrintConv => \%offOn,
8007
8007
  },
8008
+ 3 => {
8009
+ Name => 'DistortionCorrection',
8010
+ PrintConv => \%offOn,
8011
+ },
8008
8012
  4 => {
8009
8013
  Name => 'ChromaticAberrationCorr',
8010
8014
  PrintConv => \%offOn,
@@ -8014,6 +8018,7 @@ my %ciMaxFocal = (
8014
8018
  PrintConv => \%offOn,
8015
8019
  },
8016
8020
  6 => 'PeripheralLightingValue',
8021
+ 9 => 'DistortionCorrectionValue',
8017
8022
  # 10 - flags?
8018
8023
  11 => {
8019
8024
  Name => 'OriginalImageWidth',
@@ -8049,6 +8054,10 @@ my %ciMaxFocal = (
8049
8054
  Name => 'ChromaticAberrationSetting',
8050
8055
  PrintConv => \%offOn,
8051
8056
  },
8057
+ 7 => {
8058
+ Name => 'DistortionCorrectionSetting',
8059
+ PrintConv => \%offOn,
8060
+ },
8052
8061
  );
8053
8062
 
8054
8063
  # Auto Lighting Optimizater information (MakerNotes tag 0x4018) (ref PH)
@@ -8093,7 +8102,7 @@ my %ciMaxFocal = (
8093
8102
  },
8094
8103
  },
8095
8104
  # 6 - related to ChromaticAberrationCorr
8096
- # 7 - related to DistortionCorrection
8105
+ # 7 - related to DistortionCorrection (0=off, 1=On in a 5DmkIV sample)
8097
8106
  # 8 - related to PeripheralIlluminationCorr and ChromaticAberrationCorr
8098
8107
  );
8099
8108
 
@@ -16,7 +16,7 @@ use strict;
16
16
  use vars qw($VERSION $AUTOLOAD);
17
17
  use Image::ExifTool qw(:DataAccess :Utils);
18
18
 
19
- $VERSION = '1.43';
19
+ $VERSION = '1.44';
20
20
 
21
21
  sub WritePS($$);
22
22
  sub ProcessPS($$;$);
@@ -221,6 +221,97 @@ sub GetInputRecordSeparator($)
221
221
  return $sep;
222
222
  }
223
223
 
224
+ #------------------------------------------------------------------------------
225
+ # Split into lines ending in any CR, LF or CR+LF combination
226
+ # (this is annoying, and could be avoided if EPS files didn't mix linefeeds!)
227
+ # Inputs: 0) data pointer, 1) reference to lines array
228
+ # Notes: Fills @$lines with lines from splitting $$dataPt
229
+ sub SplitLine($$)
230
+ {
231
+ my ($dataPt, $lines) = @_;
232
+ for (;;) {
233
+ my $endl;
234
+ # find the position of the first LF (\x0a)
235
+ $endl = pos($$dataPt), pos($$dataPt) = 0 if $$dataPt =~ /\x0a/g;
236
+ if ($$dataPt =~ /\x0d/g) { # find the first CR (\x0d)
237
+ if (defined $endl) {
238
+ # (remember, CR+LF is a DOS newline...)
239
+ $endl = pos($$dataPt) if pos($$dataPt) < $endl - 1;
240
+ } else {
241
+ $endl = pos($$dataPt);
242
+ }
243
+ } elsif (not defined $endl) {
244
+ push @$lines, $$dataPt;
245
+ last;
246
+ }
247
+ if (length $$dataPt == $endl) {
248
+ push @$lines, $$dataPt;
249
+ last;
250
+ } else {
251
+ # continue to split into separate lines
252
+ push @$lines, substr($$dataPt, 0, $endl);
253
+ $$dataPt = substr($$dataPt, $endl);
254
+ }
255
+ }
256
+ }
257
+
258
+ #------------------------------------------------------------------------------
259
+ # check to be sure we haven't read past end of PS data in DOS-style file
260
+ # Inputs: 0) RAF ref (with PSEnd member), 1) data ref
261
+ # - modifies data and sets RAF to EOF if end of PS is reached
262
+ sub CheckPSEnd($$)
263
+ {
264
+ my ($raf, $dataPt) = @_;
265
+ my $pos = $raf->Tell();
266
+ if ($pos >= $$raf{PSEnd}) {
267
+ $raf->Seek(0, 2); # seek to end of file so we can't read any more
268
+ $$dataPt = substr($$dataPt, 0, length($$dataPt) - $pos + $$raf{PSEnd}) if $pos > $$raf{PSEnd};
269
+ }
270
+ }
271
+
272
+ #------------------------------------------------------------------------------
273
+ # Read next line from EPS file
274
+ # Inputs: 0) RAF ref (with PSEnd member if Postscript ends before end of file)
275
+ # 1) array of lines from file
276
+ # Returns: true on success
277
+ sub GetNextLine($$)
278
+ {
279
+ my ($raf, $lines) = @_;
280
+ my ($data, $changedNL);
281
+ my $altnl = ($/ eq "\x0d") ? "\x0a" : "\x0d";
282
+ for (;;) {
283
+ $raf->ReadLine($data) or last;
284
+ $$raf{PSEnd} and CheckPSEnd($raf, \$data);
285
+ # split line if it contains other newline sequences
286
+ if ($data =~ /$altnl/) {
287
+ if (length($data) > 500000 and IsPC()) {
288
+ # patch for Windows memory problem
289
+ unless ($changedNL) {
290
+ $changedNL = $/;
291
+ $/ = $altnl;
292
+ $altnl = $changedNL;
293
+ $raf->Seek(-length($data), 1);
294
+ next;
295
+ }
296
+ } else {
297
+ # split into separate lines
298
+ # push @$lines, split /$altnl/, $data, -1;
299
+ # if (@$lines == 2 and $$lines[1] eq $/) {
300
+ # # handle case of DOS newline data inside file using Unix newlines
301
+ # $$lines[0] .= pop @$lines;
302
+ # }
303
+ # split into separate lines if necessary
304
+ SplitLine(\$data, $lines);
305
+ }
306
+ } else {
307
+ push @$lines, $data;
308
+ }
309
+ $/ = $changedNL if $changedNL;
310
+ return 1;
311
+ }
312
+ return 0;
313
+ }
314
+
224
315
  #------------------------------------------------------------------------------
225
316
  # Decode comment from PostScript file
226
317
  # Inputs: 0) comment string, 1) RAF ref, 2) reference to lines array
@@ -233,22 +324,7 @@ sub DecodeComment($$$;$)
233
324
  $val =~ s/\x0d*\x0a*$//; # remove trailing CR, LF or CR/LF
234
325
  # check for continuation comments
235
326
  for (;;) {
236
- unless (@$lines) {
237
- my $buff;
238
- $raf->ReadLine($buff) or last;
239
- my $altnl = $/ eq "\x0d" ? "\x0a" : "\x0d";
240
- if ($buff =~ /$altnl/) {
241
- chomp $buff if $/ eq "\x0d\x0a"; # remove DOS newline before splitting
242
- # split into separate lines
243
- @$lines = split /$altnl/, $buff, -1;
244
- # handle case of DOS newline data inside file using Unix newlines
245
- @$lines = ( $$lines[0] . $$lines[1] ) if @$lines == 2 and $$lines[1] eq $/;
246
- # add back trailing DOS newline if necessary
247
- @$lines ? @$lines[-1] .= $/ : push @$lines, $/ if $/ eq "\x0d\x0a";
248
- } else {
249
- push @$lines, $buff;
250
- }
251
- }
327
+ @$lines or GetNextLine($raf, $lines) or last;
252
328
  last unless $$lines[0] =~ /^%%\+/; # is the next line a continuation?
253
329
  $$dataPt .= $$lines[0] if $dataPt; # add to data if necessary
254
330
  $$lines[0] =~ s/\x0d*\x0a*$//; # remove trailing CR, LF or CR/LF
@@ -371,11 +447,13 @@ sub ProcessPS($$;$)
371
447
  # - save DOS header then seek ahead and check PS header
372
448
  $raf->Read($dos, 26) == 26 or return 0;
373
449
  SetByteOrder('II');
374
- unless ($raf->Seek(Get32u(\$dos, 0), 0) and
450
+ my $psStart = Get32u(\$dos, 0);
451
+ unless ($raf->Seek($psStart, 0) and
375
452
  $raf->Read($data, 4) == 4 and $data eq '%!PS')
376
453
  {
377
454
  return PSErr($et, 'invalid header');
378
455
  }
456
+ $$raf{PSEnd} = $psStart + Get32u(\$dos, 4); # set end of PostScript data in RAF
379
457
  } else {
380
458
  # check for PostScript font file (PFA or PFB)
381
459
  my $d2;
@@ -487,7 +565,7 @@ sub ProcessPS($$;$)
487
565
  if ($mode) {
488
566
  if (not $endToken) {
489
567
  $buff .= $data;
490
- next unless $data =~ m{<\?xpacket end=.(w|r).\?>($/|$)};
568
+ next unless $data =~ m{<\?xpacket end=.(w|r).\?>(\n|\r|$)};
491
569
  } elsif ($data !~ /^$endToken/i) {
492
570
  if ($mode eq 'XMP') {
493
571
  $buff .= $data;
@@ -565,7 +643,7 @@ sub ProcessPS($$;$)
565
643
  $buff = $data;
566
644
  undef $endToken; # no end token (just look for xpacket end)
567
645
  # XMP could be contained in a single line (if newlines are different)
568
- next unless $data =~ m{<\?xpacket end=.(w|r).\?>($/|$)};
646
+ next unless $data =~ m{<\?xpacket end=.(w|r).\?>(\n|\r|$)};
569
647
  } elsif ($data =~ /^%%?(\w+): ?(.*)/s and $$tagTablePtr{$1}) {
570
648
  my ($tag, $val) = ($1, $2);
571
649
  # only allow 'ImageData' and AI tags to have single leading '%'
@@ -2029,11 +2029,12 @@ my %tagLookup = (
2029
2029
  'distortion' => { 376 => 0xa050 },
2030
2030
  'distortioncompensation' => { 433 => 0x8040 },
2031
2031
  'distortioncontrol' => { 224 => 0x10 },
2032
- 'distortioncorrection' => { 98 => 0x20705, 104 => 0x67, 114 => 0x7036, 279 => 0x50b, 306 => '7.1', 327 => 0x0, 428 => 0x601, 429 => 0x5b },
2032
+ 'distortioncorrection' => { 75 => 0x3, 98 => 0x20705, 104 => 0x67, 114 => 0x7036, 279 => 0x50b, 306 => '7.1', 327 => 0x0, 428 => 0x601, 429 => 0x5b },
2033
2033
  'distortioncorrection2' => { 283 => 0x1011 },
2034
2034
  'distortioncorrectionalreadyapplied' => { 452 => 'DistortionCorrectionAlreadyApplied' },
2035
2035
  'distortioncorrectionon' => { 98 => '0x20705.0', 104 => 0x63 },
2036
- 'distortioncorrectionsetting' => { 400 => 0x2013 },
2036
+ 'distortioncorrectionsetting' => { 76 => 0x7, 400 => 0x2013 },
2037
+ 'distortioncorrectionvalue' => { 75 => 0x9 },
2037
2038
  'distortioncorrparams' => { 114 => 0x7037, 409 => 0x1a23, 412 => 0x1870, 414 => 0x189c, 415 => 0x18cc, 416 => 0x17d0, 428 => 0x6ca, 429 => 0x64 },
2038
2039
  'distortioncorrparamsnumber' => { 412 => 0x1899, 414 => 0x18c5, 415 => 0x18f5, 416 => 0x17f9 },
2039
2040
  'distortioncorrparamspresent' => { 412 => 0x1898, 414 => 0x18c4, 415 => 0x18f4, 416 => 0x17f8, 418 => 0x10b, 419 => 0x10b, 428 => 0x600, 429 => 0x5a },
@@ -12,7 +12,7 @@ meta information extracted from or written to a file.
12
12
  =head1 TAG TABLES
13
13
 
14
14
  The tables listed below give the names of all tags recognized by ExifTool.
15
- They contain a total of 22568 tags, with 15014 unique tag names.
15
+ They contain a total of 22571 tags, with 15015 unique tag names.
16
16
 
17
17
  B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
18
18
  table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
@@ -37,11 +37,11 @@ instead of the descriptions, use C<exiftool -s>.
37
37
  The B<Writable> column indicates whether the tag is writable by ExifTool.
38
38
  Anything but a C<no> in this column means the tag is writable. A C<yes>
39
39
  indicates writable information that is either unformatted or written using
40
- the existing format. Other expressions give details about the information
41
- format, and vary depending on the general type of information. The format
42
- name may be followed by a number in square brackets to indicate the number
43
- of values written, or the number of characters in a fixed-length string
44
- (including a null terminator which is added if required).
40
+ the existing format. Other expressions give details about the format of the
41
+ stored value, and vary depending on the general type of information. The
42
+ format name may be followed by a number in square brackets to indicate the
43
+ number of values written, or the number of characters in a fixed-length
44
+ string (including a null terminator which is added if required).
45
45
 
46
46
  A plus sign (C<+>) after an entry in the B<Writable> column indicates a
47
47
  I<List> tag which supports multiple values and allows individual values to
@@ -1114,61 +1114,6 @@ IPTC group only in the standard location.
1114
1114
  ------ -------- --------
1115
1115
  [no tags known]
1116
1116
 
1117
- =head2 DJI Tags
1118
-
1119
- This table lists tags found in the maker notes of images from some DJI
1120
- Phantom drones.
1121
-
1122
- Tag ID Tag Name Writable
1123
- ------ -------- --------
1124
- 0x0001 Make string
1125
- 0x0003 SpeedX float
1126
- 0x0004 SpeedY float
1127
- 0x0005 SpeedZ float
1128
- 0x0006 Pitch float
1129
- 0x0007 Yaw float
1130
- 0x0008 Roll float
1131
- 0x0009 CameraPitch float
1132
- 0x000a CameraYaw float
1133
- 0x000b CameraRoll float
1134
-
1135
- =head3 DJI XMP Tags
1136
-
1137
- XMP tags used by DJI for images from drones.
1138
-
1139
- These tags belong to the ExifTool XMP-drone-dji family 1 group.
1140
-
1141
- Tag Name Writable
1142
- -------- --------
1143
- AbsoluteAltitude real
1144
- CalibratedFocalLength real
1145
- CalibratedOpticalCenterX real
1146
- CalibratedOpticalCenterY real
1147
- CamReverse string
1148
- DewarpData string
1149
- DewarpFlag string
1150
- FlightPitchDegree real
1151
- FlightRollDegree real
1152
- FlightXSpeed real
1153
- FlightYSpeed real
1154
- FlightYawDegree real
1155
- FlightZSpeed real
1156
- GPSLatitude real/
1157
- GPSLongitude real/
1158
- GPSLongtitude real
1159
- GimbalPitchDegree real
1160
- GimbalReverse string
1161
- GimbalRollDegree real
1162
- GimbalYawDegree real
1163
- Latitude real
1164
- Longitude real
1165
- RelativeAltitude real
1166
- RtkFlag string
1167
- RtkStdHgt real
1168
- RtkStdLat real
1169
- RtkStdLon real
1170
- SelfData string
1171
-
1172
1117
  =head2 XMP Tags
1173
1118
 
1174
1119
  XMP stands for "Extensible Metadata Platform", an XML/RDF-based metadata
@@ -6928,9 +6873,11 @@ This information is found in images from newer EOS models.
6928
6873
  ------ -------- --------
6929
6874
  0 VignettingCorrVersion no
6930
6875
  2 PeripheralLighting int16s
6876
+ 3 DistortionCorrection int16s
6931
6877
  4 ChromaticAberrationCorr int16s
6932
6878
  5 ChromaticAberrationCorr int16s
6933
6879
  6 PeripheralLightingValue int16s
6880
+ 9 DistortionCorrectionValue int16s
6934
6881
  11 OriginalImageWidth int16s
6935
6882
  12 OriginalImageHeight int16s
6936
6883
 
@@ -6948,6 +6895,7 @@ Vignetting correction from PowerShot models.
6948
6895
  ------ -------- --------
6949
6896
  5 PeripheralLightingSetting int32s
6950
6897
  6 ChromaticAberrationSetting int32s
6898
+ 7 DistortionCorrectionSetting int32s
6951
6899
 
6952
6900
  =head3 Canon LightingOpt Tags
6953
6901
 
@@ -8058,6 +8006,61 @@ This information is found in Casio GV-10 AVI videos.
8058
8006
  ------ -------- --------
8059
8007
  0 Software no
8060
8008
 
8009
+ =head2 DJI Tags
8010
+
8011
+ This table lists tags found in the maker notes of images from some DJI
8012
+ Phantom drones.
8013
+
8014
+ Tag ID Tag Name Writable
8015
+ ------ -------- --------
8016
+ 0x0001 Make string
8017
+ 0x0003 SpeedX float
8018
+ 0x0004 SpeedY float
8019
+ 0x0005 SpeedZ float
8020
+ 0x0006 Pitch float
8021
+ 0x0007 Yaw float
8022
+ 0x0008 Roll float
8023
+ 0x0009 CameraPitch float
8024
+ 0x000a CameraYaw float
8025
+ 0x000b CameraRoll float
8026
+
8027
+ =head3 DJI XMP Tags
8028
+
8029
+ XMP tags used by DJI for images from drones.
8030
+
8031
+ These tags belong to the ExifTool XMP-drone-dji family 1 group.
8032
+
8033
+ Tag Name Writable
8034
+ -------- --------
8035
+ AbsoluteAltitude real
8036
+ CalibratedFocalLength real
8037
+ CalibratedOpticalCenterX real
8038
+ CalibratedOpticalCenterY real
8039
+ CamReverse string
8040
+ DewarpData string
8041
+ DewarpFlag string
8042
+ FlightPitchDegree real
8043
+ FlightRollDegree real
8044
+ FlightXSpeed real
8045
+ FlightYSpeed real
8046
+ FlightYawDegree real
8047
+ FlightZSpeed real
8048
+ GPSLatitude real/
8049
+ GPSLongitude real/
8050
+ GPSLongtitude real
8051
+ GimbalPitchDegree real
8052
+ GimbalReverse string
8053
+ GimbalRollDegree real
8054
+ GimbalYawDegree real
8055
+ Latitude real
8056
+ Longitude real
8057
+ RelativeAltitude real
8058
+ RtkFlag string
8059
+ RtkStdHgt real
8060
+ RtkStdLat real
8061
+ RtkStdLon real
8062
+ SelfData string
8063
+
8061
8064
  =head2 FLIR Tags
8062
8065
 
8063
8066
  Information extracted from the maker notes of JPEG images from thermal
@@ -367,9 +367,11 @@ sub ValidateImageData($$$;$)
367
367
  my $minor;
368
368
  $minor = 1 if $$et{DOC_NUM} or $$et{FILE_TYPE} ne 'TIFF';
369
369
  unless (@bitsPerSample == $samplesPerPix) {
370
- # (just a warning for this problem)
371
- my $s = $samplesPerPix eq '1' ? '' : 's';
372
- $et->Warn("$dirName BitsPerSample should have $samplesPerPix value$s", $minor);
370
+ unless ($$et{FILE_TYPE} eq 'EPS' and @bitsPerSample == 1) {
371
+ # (just a warning for this problem)
372
+ my $s = $samplesPerPix eq '1' ? '' : 's';
373
+ $et->Warn("$dirName BitsPerSample should have $samplesPerPix value$s", $minor);
374
+ }
373
375
  push @bitsPerSample, $bitsPerSample[0] while @bitsPerSample < $samplesPerPix;
374
376
  foreach (@bitsPerSample) {
375
377
  $et->WarnOnce("$dirName BitsPerSample values are different", $minor) if $_ ne $bitsPerSample[0];
@@ -302,54 +302,6 @@ sub WriteNewTags($$$)
302
302
  return $success;
303
303
  }
304
304
 
305
- #------------------------------------------------------------------------------
306
- # check to be sure we haven't read past end of PS data in DOS-style file
307
- # Inputs: 0) RAF ref, 1) pointer to end of PS, 2) data
308
- # - modifies data and sets RAF to EOF if end of PS is reached
309
- sub CheckPSEnd($$$)
310
- {
311
- my $pos = $_[0]->Tell();
312
- if ($pos >= $_[1]) {
313
- $_[0]->Seek(0, 2); # seek to end of file so we can't read any more
314
- $_[2] = substr($_[2], 0, length($_[2]) - $pos + $_[1]) if $pos > $_[1];
315
- }
316
- }
317
-
318
- #------------------------------------------------------------------------------
319
- # Split into lines ending in any CR, LF or CR+LF combination
320
- # (this is annoying, and could be avoided if EPS files didn't mix linefeeds!)
321
- # Inputs: 0) data pointer, 1) reference to lines array
322
- # Notes: Updates data to contain next line and fills list with remaining lines
323
- sub SplitLine($$)
324
- {
325
- my ($dataPt, $lines) = @_;
326
- for (;;) {
327
- my $endl;
328
- # find the position of the first LF (\x0a)
329
- $endl = pos($$dataPt), pos($$dataPt) = 0 if $$dataPt =~ /\x0a/g;
330
- if ($$dataPt =~ /\x0d/g) { # find the first CR (\x0d)
331
- if (defined $endl) {
332
- # (remember, CR+LF is a DOS newline...)
333
- $endl = pos($$dataPt) if pos($$dataPt) < $endl - 1;
334
- } else {
335
- $endl = pos($$dataPt);
336
- }
337
- } elsif (not defined $endl) {
338
- push @$lines, $$dataPt;
339
- last;
340
- }
341
- # split into separate lines
342
- if (length $$dataPt == $endl) {
343
- push @$lines, $$dataPt;
344
- last;
345
- } else {
346
- push @$lines, substr($$dataPt, 0, $endl);
347
- $$dataPt = substr($$dataPt, $endl);
348
- }
349
- }
350
- $$dataPt = shift @$lines; # set $$dataPt to first line
351
- }
352
-
353
305
  #------------------------------------------------------------------------------
354
306
  # Write PS file
355
307
  # Inputs: 0) ExifTool object reference, 1) source dirInfo reference
@@ -365,7 +317,7 @@ sub WritePS($$)
365
317
  my $verbose = $et->Options('Verbose');
366
318
  my $out = $et->Options('TextOut');
367
319
  my ($data, $buff, %flags, $err, $mode, $endToken);
368
- my ($dos, $psStart, $psEnd, $psNewStart, $xmpHint);
320
+ my ($dos, $psStart, $psNewStart, $xmpHint, @lines);
369
321
 
370
322
  $raf->Read($data, 4) == 4 or return 0;
371
323
  return 0 unless $data =~ /^(%!PS|%!Ad|\xc5\xd0\xd3\xc6)/;
@@ -390,7 +342,7 @@ sub WritePS($$)
390
342
  $et->Error('Invalid PS header');
391
343
  return 1;
392
344
  }
393
- $psEnd = $psStart + Get32u(\$dos, 8);
345
+ $$raf{PSEnd} = $psStart + Get32u(\$dos, 8);
394
346
  my $base = Get32u(\$dos, 20);
395
347
  Set16u(0xffff, \$dos, 28); # ignore checksum
396
348
  if ($base) {
@@ -465,34 +417,9 @@ sub WritePS($$)
465
417
  $xmpHint = 0 if $$et{DEL_GROUP}{XMP};
466
418
  $$newTags{XMP_HINT} = $xmpHint if $xmpHint; # add special tag to newTags list
467
419
 
468
- my (@lines, $changedNL);
469
- my $altnl = ($/ eq "\x0d") ? "\x0a" : "\x0d";
470
-
471
420
  for (;;) {
472
- if (@lines) {
473
- $data = shift @lines;
474
- } else {
475
- $raf->ReadLine($data) or last;
476
- $dos and CheckPSEnd($raf, $psEnd, $data);
477
- # split line if it contains other newline sequences
478
- if ($data =~ /$altnl/) {
479
- if (length($data) > 500000 and IsPC()) {
480
- # patch for Windows memory problem
481
- unless ($changedNL) {
482
- $changedNL = 1;
483
- my $t = $/;
484
- $/ = $altnl;
485
- $altnl = $t;
486
- $raf->Seek(-length($data), 1);
487
- next;
488
- }
489
- } else {
490
- # split into separate lines
491
- SplitLine(\$data, \@lines);
492
- }
493
- }
494
- }
495
- undef $changedNL;
421
+ @lines or GetNextLine($raf, \@lines) or last;
422
+ $data = shift @lines;
496
423
  if ($endToken) {
497
424
  # look for end token
498
425
  if ($data =~ m/^$endToken\s*$/is) {
@@ -641,7 +568,7 @@ sub WritePS($$)
641
568
  $data = shift @lines;
642
569
  } else {
643
570
  $raf->ReadLine($data) or undef($data), last;
644
- $dos and CheckPSEnd($raf, $psEnd, $data);
571
+ $dos and CheckPSEnd($raf, \$data);
645
572
  if ($data =~ /[\x0d\x0a]%%EOF\b/g) {
646
573
  # split data before "%%EOF"
647
574
  # (necessary if data contains other newline sequences)
@@ -659,7 +586,7 @@ sub WritePS($$)
659
586
  Write($outfile, $data) or $err = 1;
660
587
  Write($outfile, @lines) or $err = 1 if @lines;
661
588
  while ($raf->Read($data, 65536)) {
662
- $dos and CheckPSEnd($raf, $psEnd, $data);
589
+ $dos and CheckPSEnd($raf, \$data);
663
590
  Write($outfile, $data) or $err = 1;
664
591
  }
665
592
  }
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 11.50
3
+ Version: 11.51
4
4
  Release: 1
5
5
  License: Artistic/GPL
6
6
  Group: Development/Libraries/Perl
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExiftoolVendored
4
- VERSION = Gem::Version.new('11.50.0')
4
+ VERSION = Gem::Version.new('11.51.0')
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exiftool_vendored
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.50.0
4
+ version: 11.51.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew McEachen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-06-11 00:00:00.000000000 Z
12
+ date: 2019-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool