exiftool_vendored 13.19.0 → 13.22.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.
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.83';
43
+ $VERSION = '2.84';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -442,6 +442,7 @@ my %olympusCameraTypes = (
442
442
  S0089 => 'E-M5MarkIII',
443
443
  S0092 => 'E-M1MarkIII', #IB
444
444
  S0093 => 'E-P7', #IB
445
+ S0094 => 'E-M10MarkIIIS', #forum17050
445
446
  S0095 => 'OM-1', #IB
446
447
  S0101 => 'OM-5', #IB
447
448
  S0121 => 'OM-1MarkII', #forum15652
@@ -132,6 +132,7 @@ my %plistType = (
132
132
  },
133
133
  adjustmentData => { # AAE file
134
134
  Name => 'AdjustmentData',
135
+ CompressedPLIST => 1,
135
136
  SubDirectory => { TagTable => 'Image::ExifTool::PLIST::Main' },
136
137
  },
137
138
  );
@@ -213,8 +214,22 @@ sub FoundTag($$$$;$)
213
214
  $$et{LastPListTag} = $tagInfo;
214
215
  # override file type if applicable
215
216
  $et->OverrideFileType($plistType{$tag}) if $plistType{$tag} and $$et{FILE_TYPE} eq 'XMP';
217
+ # handle compressed PLIST/JSON data
218
+ my $proc;
219
+ if ($$tagInfo{CompressedPLIST} and ref $val eq 'SCALAR' and $$val !~ /^bplist00/) {
220
+ if (eval { require IO::Uncompress::RawInflate }) {
221
+ my $inflated;
222
+ if (IO::Uncompress::RawInflate::rawinflate($val => \$inflated)) {
223
+ $val = \$inflated;
224
+ } else {
225
+ $et->Warn("Error inflating PLIST::$$tagInfo{Name}");
226
+ }
227
+ } else {
228
+ $et->Warn('Install IO::Uncompress to decode compressed PLIST data');
229
+ }
230
+ }
216
231
  # save the tag
217
- $et->HandleTag($tagTablePtr, $tag, $val);
232
+ $et->HandleTag($tagTablePtr, $tag, $val, ProcessProc => $proc);
218
233
 
219
234
  return 1;
220
235
  }
@@ -423,44 +438,54 @@ sub ProcessBinaryPLIST($$;$)
423
438
  }
424
439
 
425
440
  #------------------------------------------------------------------------------
426
- # Extract information from a PLIST file
441
+ # Extract information from a PLIST file (binary, XML or JSON format)
427
442
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
428
443
  # Returns: 1 on success, 0 if this wasn't valid PLIST
429
444
  sub ProcessPLIST($$;$)
430
445
  {
431
446
  my ($et, $dirInfo, $tagTablePtr) = @_;
447
+ my $dataPt = $$dirInfo{DataPt};
448
+ my ($result, $notXML);
432
449
 
433
- # process XML PLIST data using the XMP module
434
- $$dirInfo{XMPParseOpts}{FoundProc} = \&FoundTag;
435
- my $result = Image::ExifTool::XMP::ProcessXMP($et, $dirInfo, $tagTablePtr);
436
- delete $$dirInfo{XMPParseOpts};
437
-
438
- unless ($result) {
439
- my $buff;
440
- my $raf = $$dirInfo{RAF};
441
- if ($raf) {
442
- $raf->Seek(0,0) and $raf->Read($buff, 64) or return 0;
443
- } else {
444
- return 0 unless $$dirInfo{DataPt};
445
- $buff = ${$$dirInfo{DataPt}};
446
- }
447
- if ($buff =~ /^bplist0/) {
448
- # binary PLIST file
449
- my $tagTablePtr = GetTagTable('Image::ExifTool::PLIST::Main');
450
- $et->SetFileType('PLIST', 'application/x-plist');
451
- $$et{SET_GROUP1} = 'PLIST';
452
- unless (ProcessBinaryPLIST($et, $dirInfo, $tagTablePtr)) {
453
- $et->Error('Error reading binary PLIST file');
454
- }
455
- delete $$et{SET_GROUP1};
456
- $result = 1;
457
- } elsif ($$et{FILE_EXT} and $$et{FILE_EXT} eq 'PLIST' and
458
- $buff =~ /^\xfe\xff\x00/)
459
- {
460
- # (have seen very old PLIST files encoded as UCS-2BE with leading BOM)
461
- $et->Error('Old PLIST format currently not supported');
462
- $result = 1;
450
+ if ($dataPt) {
451
+ pos($$dataPt) = $$dirInfo{DirStart} || 0;
452
+ $notXML = 1 unless $$dataPt =~ /\G</g;
453
+ }
454
+ unless ($notXML) {
455
+ # process XML PLIST data using the XMP module
456
+ $$dirInfo{XMPParseOpts}{FoundProc} = \&FoundTag;
457
+ $result = Image::ExifTool::XMP::ProcessXMP($et, $dirInfo, $tagTablePtr);
458
+ delete $$dirInfo{XMPParseOpts};
459
+ return $result if $result;
460
+ }
461
+ my $buff;
462
+ my $raf = $$dirInfo{RAF};
463
+ if ($raf) {
464
+ $raf->Seek(0,0) and $raf->Read($buff, 64) or return 0;
465
+ $dataPt = \$buff;
466
+ } else {
467
+ return 0 unless $dataPt;
468
+ }
469
+ if ($$dataPt =~ /^bplist0/) { # binary PLIST
470
+ # binary PLIST file
471
+ my $tagTablePtr = GetTagTable('Image::ExifTool::PLIST::Main');
472
+ $et->SetFileType('PLIST', 'application/x-plist');
473
+ $$et{SET_GROUP1} = 'PLIST';
474
+ unless (ProcessBinaryPLIST($et, $dirInfo, $tagTablePtr)) {
475
+ $et->Error('Error reading binary PLIST file');
463
476
  }
477
+ delete $$et{SET_GROUP1};
478
+ $result = 1;
479
+ } elsif ($$dataPt =~ /^\{"/) { # JSON PLIST
480
+ $raf and $raf->Seek(0);
481
+ require Image::ExifTool::JSON;
482
+ $result = Image::ExifTool::JSON::ProcessJSON($et, $dirInfo);
483
+ } elsif ($$et{FILE_EXT} and $$et{FILE_EXT} eq 'PLIST' and
484
+ $$dataPt =~ /^\xfe\xff\x00/)
485
+ {
486
+ # (have seen very old PLIST files encoded as UCS-2BE with leading BOM)
487
+ $et->Error('Old PLIST format currently not supported');
488
+ $result = 1;
464
489
  }
465
490
  return $result;
466
491
  }
@@ -36,7 +36,7 @@ use strict;
36
36
  use vars qw($VERSION $AUTOLOAD %stdCase);
37
37
  use Image::ExifTool qw(:DataAccess :Utils);
38
38
 
39
- $VERSION = '1.70';
39
+ $VERSION = '1.71';
40
40
 
41
41
  sub ProcessPNG_tEXt($$$);
42
42
  sub ProcessPNG_iTXt($$$);
@@ -371,6 +371,12 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
371
371
  IgnoreProp => { meta => 1 }, # ignore 'meta' container
372
372
  },
373
373
  },
374
+ gdAT => {
375
+ Name => 'GainMapImage',
376
+ Groups => { 2 => 'Preview' },
377
+ Binary => 1,
378
+ },
379
+ # gmAP - https://github.com/w3c/png/issues/380 does't correspond to my only sample
374
380
  seAl => {
375
381
  Name => 'SEAL',
376
382
  SubDirectory => { TagTable => 'Image::ExifTool::XMP::SEAL' },