exiftool_vendored 13.04.0 → 13.08.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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +48 -0
  3. data/bin/MANIFEST +1 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +2 -2
  7. data/bin/exiftool +30 -23
  8. data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
  9. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  10. data/bin/lib/Image/ExifTool/ASF.pm +1 -1
  11. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +4 -3
  12. data/bin/lib/Image/ExifTool/Canon.pm +19 -1
  13. data/bin/lib/Image/ExifTool/DJI.pm +91 -29
  14. data/bin/lib/Image/ExifTool/Exif.pm +2 -2
  15. data/bin/lib/Image/ExifTool/FITS.pm +2 -2
  16. data/bin/lib/Image/ExifTool/FLIF.pm +2 -2
  17. data/bin/lib/Image/ExifTool/FlashPix.pm +11 -11
  18. data/bin/lib/Image/ExifTool/Font.pm +1 -1
  19. data/bin/lib/Image/ExifTool/Geolocation.pm +2 -1
  20. data/bin/lib/Image/ExifTool/GoPro.pm +3 -3
  21. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  22. data/bin/lib/Image/ExifTool/ID3.pm +3 -3
  23. data/bin/lib/Image/ExifTool/IPTC.pm +2 -2
  24. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  25. data/bin/lib/Image/ExifTool/JPEG.pm +19 -4
  26. data/bin/lib/Image/ExifTool/Jpeg2000.pm +6 -6
  27. data/bin/lib/Image/ExifTool/M2TS.pm +39 -9
  28. data/bin/lib/Image/ExifTool/MXF.pm +2 -2
  29. data/bin/lib/Image/ExifTool/Matroska.pm +1 -1
  30. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  31. data/bin/lib/Image/ExifTool/PDF.pm +15 -15
  32. data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
  33. data/bin/lib/Image/ExifTool/PNG.pm +4 -4
  34. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
  35. data/bin/lib/Image/ExifTool/PhaseOne.pm +3 -3
  36. data/bin/lib/Image/ExifTool/Photoshop.pm +63 -3
  37. data/bin/lib/Image/ExifTool/Protobuf.pm +242 -0
  38. data/bin/lib/Image/ExifTool/QuickTime.pm +23 -14
  39. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +395 -109
  40. data/bin/lib/Image/ExifTool/README +4 -1
  41. data/bin/lib/Image/ExifTool/RIFF.pm +3 -3
  42. data/bin/lib/Image/ExifTool/RTF.pm +1 -1
  43. data/bin/lib/Image/ExifTool/Ricoh.pm +3 -3
  44. data/bin/lib/Image/ExifTool/Sony.pm +4 -3
  45. data/bin/lib/Image/ExifTool/TagInfoXML.pm +4 -3
  46. data/bin/lib/Image/ExifTool/TagLookup.pm +6988 -6967
  47. data/bin/lib/Image/ExifTool/TagNames.pod +85 -5
  48. data/bin/lib/Image/ExifTool/VCard.pm +2 -2
  49. data/bin/lib/Image/ExifTool/Validate.pm +3 -3
  50. data/bin/lib/Image/ExifTool/WriteExif.pl +2 -2
  51. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +4 -4
  52. data/bin/lib/Image/ExifTool/WriteXMP.pl +2 -2
  53. data/bin/lib/Image/ExifTool/Writer.pl +17 -17
  54. data/bin/lib/Image/ExifTool/XMP.pm +20 -10
  55. data/bin/lib/Image/ExifTool/XMP2.pl +38 -0
  56. data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
  57. data/bin/lib/Image/ExifTool.pm +109 -82
  58. data/bin/lib/Image/ExifTool.pod +8 -7
  59. data/bin/perl-Image-ExifTool.spec +1 -1
  60. data/lib/exiftool_vendored/version.rb +1 -1
  61. metadata +3 -2
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
29
29
  %jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
30
30
  %static_vars $advFmtSelf);
31
31
 
32
- $VERSION = '13.04';
32
+ $VERSION = '13.08';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -1142,6 +1142,7 @@ my @availableOptions = (
1142
1142
  [ 'ListJoin', ', ', 'join lists together with this separator' ],
1143
1143
  [ 'ListSep', ', ', '[deprecated, use ListSplit and ListJoin instead]', 1 ],
1144
1144
  [ 'ListSplit', undef, 'regex for splitting list-type tag values when writing' ],
1145
+ # LigoGPSScale - undocumented scale for unfuzzing LIGO GPS: 1,2,3 for standard scales (1 default), or scale value
1145
1146
  [ 'MakerNotes', undef, 'extract maker notes as a block' ],
1146
1147
  [ 'MDItemTags', undef, 'extract MacOS metadata item tags' ],
1147
1148
  [ 'MissingTagValue', undef, 'value for missing tags when expanded in expressions' ],
@@ -1173,7 +1174,7 @@ my @availableOptions = (
1173
1174
  [ 'UserParam', { }, 'user parameters for additional user-defined tag values' ],
1174
1175
  [ 'Validate', undef, 'perform additional validation' ],
1175
1176
  [ 'Verbose', 0, 'print verbose messages (0-5, higher # = more verbose)' ],
1176
- [ 'WindowsLongPath', undef, 'enable support for long pathnames (enables WindowsWideFile)' ],
1177
+ [ 'WindowsLongPath', 1, 'enable support for long pathnames (enables WindowsWideFile)' ],
1177
1178
  [ 'WindowsWideFile', undef, 'force the use of Windows wide-character file routines' ], # (see forum15208)
1178
1179
  [ 'WriteMode', 'wcg', 'enable all write modes by default' ],
1179
1180
  [ 'XAttrTags', undef, 'extract MacOS extended attribute tags' ],
@@ -1265,7 +1266,9 @@ my %systemTagsNotes = (
1265
1266
  Use the -a or L<Duplicates|../ExifTool.html#Duplicates> option to see all warnings if more than one
1266
1267
  occurred. Minor warnings may be ignored with the -m or L<IgnoreMinorErrors|../ExifTool.html#IgnoreMinorErrors>
1267
1268
  option. Minor warnings with a capital "M" in the "[Minor]" designation
1268
- indicate that the processing is affected by ignoring the warning
1269
+ indicate that the processing is affected by ignoring the warning. Multiple
1270
+ identical warnings are indicated by a count after the warning message, eg.
1271
+ "[x2]" if the same warning occurred twice
1269
1272
  },
1270
1273
  },
1271
1274
  Comment => {
@@ -2661,7 +2664,7 @@ sub ExtractInfo($;@)
2661
2664
  my $fast = $$options{FastScan} || 0;
2662
2665
  my $req = $$self{REQ_TAG_LOOKUP};
2663
2666
  my $reqAll = $$options{RequestAll} || 0;
2664
- my (%saveOptions, $reEntry, $rsize, $zid, $type, @startTime, $saveOrder, $isDir);
2667
+ my (%saveOptions, $reEntry, $rsize, $zid, $type, @startTime, $saveOrder, $isDir, $i);
2665
2668
 
2666
2669
  # check for internal ReEntry option to allow recursive calls to ExtractInfo
2667
2670
  if (ref $_[1] eq 'HASH' and $_[1]{ReEntry} and
@@ -2718,7 +2721,7 @@ sub ExtractInfo($;@)
2718
2721
  if ($$req{processingtime} or $reqAll) {
2719
2722
  eval { require Time::HiRes; @startTime = Time::HiRes::gettimeofday() };
2720
2723
  if (not @startTime and $$req{processingtime}) {
2721
- $self->WarnOnce('Install Time::HiRes to generate ProcessingTime');
2724
+ $self->Warn('Install Time::HiRes to generate ProcessingTime');
2722
2725
  }
2723
2726
  }
2724
2727
 
@@ -2729,12 +2732,12 @@ sub ExtractInfo($;@)
2729
2732
  if (require Digest::SHA) {
2730
2733
  $$self{ImageDataHash} = Digest::SHA->new($1);
2731
2734
  } else {
2732
- $self->WarnOnce("Install Digest::SHA to calculate image data SHA$1");
2735
+ $self->Warn("Install Digest::SHA to calculate image data SHA$1");
2733
2736
  }
2734
2737
  } elsif (require Digest::MD5) {
2735
2738
  $$self{ImageDataHash} = Digest::MD5->new;
2736
2739
  } else {
2737
- $self->WarnOnce('Install Digest::MD5 to calculate image data MD5');
2740
+ $self->Warn('Install Digest::MD5 to calculate image data MD5');
2738
2741
  }
2739
2742
  }
2740
2743
  ++$$self{FILE_SEQUENCE}; # count files read
@@ -2763,12 +2766,18 @@ sub ExtractInfo($;@)
2763
2766
  if ($$req{filepath} or
2764
2767
  ($reqAll and not $$self{EXCL_TAG_LOOKUP}{filepath}))
2765
2768
  {
2769
+ my $path;
2766
2770
  local $SIG{'__WARN__'} = \&SetWarning;
2767
- if (eval { require Cwd }) {
2768
- my $path = eval { Cwd::abs_path($filename) };
2769
- $self->FoundTag('FilePath', $path) if defined $path;
2771
+ if ($^O eq 'MSWin32' and $$options{WindowsLongPath}) {
2772
+ $path = $self->WindowsLongPath($filename);
2773
+ } elsif (eval { require Cwd }) {
2774
+ $path = eval { Cwd::abs_path($filename) };
2775
+ }
2776
+ if (defined $path) {
2777
+ $path =~ tr/\\/\// if $^O eq 'MSWin32'; # return forward slashes
2778
+ $self->FoundTag('FilePath', $path);
2770
2779
  } elsif ($$req{filepath}) {
2771
- $self->WarnOnce('The Perl Cwd module must be installed to use FilePath');
2780
+ $self->Warn('The Perl Cwd module must be installed to use FilePath');
2772
2781
  }
2773
2782
  }
2774
2783
  # get size of resource fork on Mac OS
@@ -3107,6 +3116,15 @@ sub ExtractInfo($;@)
3107
3116
  # and as such it can't be used in user-defined Composite tags
3108
3117
  @startTime and $self->FoundTag('ProcessingTime', Time::HiRes::tv_interval(\@startTime));
3109
3118
 
3119
+ # add numbers to warnings with multiple occurrences
3120
+ if (%{$$self{WAS_WARNED}}) {
3121
+ my ($tag, $val) = ( 'Warning', $$self{VALUE} );
3122
+ for ($i=1; $$val{$tag}; ++$i) {
3123
+ my $n = $$self{WAS_WARNED}{$$val{$tag}};
3124
+ $$val{$tag} .= " [x$n]" if $n and $n > 1;
3125
+ $tag = "Warning ($i)";
3126
+ }
3127
+ }
3110
3128
  # restore original options
3111
3129
  %saveOptions and $$self{OPTIONS} = \%saveOptions;
3112
3130
 
@@ -4246,7 +4264,7 @@ sub Init($)
4246
4264
  $$self{PROCESSED} = { }; # hash of processed directory start positions
4247
4265
  $$self{DIR_COUNT} = { }; # count various types of directories
4248
4266
  $$self{DUPL_TAG} = { }; # last-used index for duplicate-tag keys
4249
- $$self{WARNED_ONCE}= { }; # WarnOnce() warnings already issued
4267
+ $$self{WAS_WARNED} = { }; # number of times each warning was issued
4250
4268
  $$self{WRITTEN} = { }; # list of tags written (selected tags only)
4251
4269
  $$self{FORCE_WRITE}= { }; # ForceWrite lookup (set from ForceWrite tag)
4252
4270
  $$self{FOUND_DIR} = { }; # hash of directory names found in file
@@ -4620,21 +4638,21 @@ sub SplitFileName($)
4620
4638
  sub EncodeFileName($$;$)
4621
4639
  {
4622
4640
  my ($self, $file, $force) = @_;
4641
+ return 0 if $file eq '-'; # special case for stdin pipe
4623
4642
  my $enc = $$self{OPTIONS}{CharsetFileName};
4624
4643
  my $hasSpecialChars;
4625
4644
  if ($file =~ /[\x80-\xff]/) {
4626
4645
  $hasSpecialChars = 1;
4627
4646
  if (not $enc and $^O eq 'MSWin32') {
4628
4647
  if (IsUTF8(\$file) < 0) {
4629
- $self->WarnOnce('FileName encoding must be specified') if not defined $enc;
4648
+ $self->Warn('FileName encoding must be specified') if not defined $enc;
4630
4649
  return 0;
4631
4650
  } else {
4632
4651
  $enc = 'UTF8'; # assume UTF8
4633
4652
  }
4634
4653
  }
4635
4654
  }
4636
- $force = 1 if $$self{OPTIONS}{WindowsWideFile} or $$self{OPTIONS}{WindowsLongPath};
4637
- if ($hasSpecialChars or $force) {
4655
+ if ($hasSpecialChars or $force or $$self{OPTIONS}{WindowsLongPath} or $$self{OPTIONS}{WindowsWideFile}) {
4638
4656
  $enc or $enc = 'UTF8';
4639
4657
  if ($^O eq 'MSWin32') {
4640
4658
  local $SIG{'__WARN__'} = \&SetWarning;
@@ -4644,7 +4662,7 @@ sub EncodeFileName($$;$)
4644
4662
  $_[1] = $self->Decode($file, $enc, undef, 'UTF16', 'II') . "\0\0";
4645
4663
  return 1;
4646
4664
  }
4647
- $self->WarnOnce('Install Win32API::File for Windows wide/long file name support');
4665
+ $self->Warn('Install Win32API::File for Windows wide/long file name support');
4648
4666
  } elsif ($enc ne 'UTF8') {
4649
4667
  # recode as UTF-8 for other platforms if necessary
4650
4668
  $_[1] = $self->Decode($file, $enc, undef, 'UTF8');
@@ -4655,8 +4673,8 @@ sub EncodeFileName($$;$)
4655
4673
 
4656
4674
  #------------------------------------------------------------------------------
4657
4675
  # Rebuild a path as an absolute long path to be usable in Windows system calls
4658
- # Inputs: 0) ExifTool ref, 1) path string
4659
- # Returns: normalized long path
4676
+ # Inputs: 0) ExifTool ref, 1) path string (CharsetFileName)
4677
+ # Returns: normalized long path (CharsetFileName)
4660
4678
  # Note: this should only be called for Windows systems
4661
4679
  # References:
4662
4680
  # - https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats
@@ -4675,17 +4693,30 @@ sub WindowsLongPath($$)
4675
4693
  my ($self, $path) = @_;
4676
4694
  my $debug = $$self{OPTIONS}{Debug};
4677
4695
  my $out = $$self{OPTIONS}{TextOut};
4696
+ my $suffix = '';
4697
+ my $longPath;
4678
4698
 
4679
- $debug and print $out "WindowsLongPath input : $path\n";
4699
+ # remove common suffixes to make cache more effective
4700
+ if ($path =~ s/(_original|_exiftool_tmp|:Zone\.Identifier)$//) {
4701
+ $suffix = $1;
4702
+ if (not length $path or $path =~ m([:./\\]$)) {
4703
+ # don't remove suffix if it could be the whole file name
4704
+ $path .= $suffix;
4705
+ $suffix = '';
4706
+ }
4707
+ }
4708
+ return $$self{LONG_PATH_OUT}.$suffix if defined $$self{LONG_PATH_IN} and $$self{LONG_PATH_IN} eq $path;
4709
+
4710
+ $debug and print $out "WindowsLongPath input : $path$suffix\n";
4680
4711
 
4681
4712
  for (;;) { # (cheap goto)
4682
- $path =~ tr(/)(\\); # convert slashes to backslashes
4683
- last if $path =~ /^\\\\\?\\/; # already a device path in the format we want
4684
-
4713
+ ($longPath = $path) =~ tr(/)(\\); # convert slashes to backslashes
4714
+ last if $longPath =~ /^\\\\\?\\/; # already a device path in the format we want
4715
+
4685
4716
  unless ($k32GetFullPathName) { # need to import (once) GetFullPathNameW
4686
4717
  last if defined $k32GetFullPathName;
4687
4718
  unless (eval { require Win32::API }) {
4688
- $self->WarnOnce('Install Win32::API to use WindowsLongPath option');
4719
+ $self->Warn('Install Win32::API to use WindowsLongPath option');
4689
4720
  last;
4690
4721
  }
4691
4722
  $k32GetFullPathName = Win32::API->new('KERNEL32', 'GetFullPathNameW', 'PNPP', 'I');
@@ -4695,24 +4726,28 @@ sub WindowsLongPath($$)
4695
4726
  last;
4696
4727
  }
4697
4728
  }
4698
- my $enc = $$self{OPTIONS}{CharsetFileName};
4699
- my $encPath = $self->Encode($path, 'UTF16', 'II', $enc); # need to encode to UTF16
4729
+ my $enc = $$self{OPTIONS}{CharsetFileName} || 'UTF8';
4730
+ my $encPath = $self->Decode($longPath, $enc, undef, 'UTF16', 'II');# need to encode to UTF16
4700
4731
  my $lenReq = $k32GetFullPathName->Call($encPath,0,0,0) + 1; # first pass gets length required, +1 for safety (null?)
4701
4732
  my $fullPath = "\0" x $lenReq x 2; # create buffer to hold full path
4702
4733
  $k32GetFullPathName->Call($encPath, $lenReq, $fullPath, 0); # fullPath is UTF16 now
4703
- $path = $self->Decode($fullPath, 'UTF16', 'II', $enc);
4704
-
4705
- last if length($path) <= 247;
4734
+ $longPath = $self->Decode($fullPath, 'UTF16', 'II', $enc);
4706
4735
 
4707
- if ($path =~ /^\\\\/) {
4708
- $path = '\\\\?\\UNC' . substr($path, 1);
4736
+ last if length($longPath) <= 247 - length($suffix);
4737
+
4738
+ if ($longPath =~ /^\\\\/) {
4739
+ $longPath = '\\\\?\\UNC' . substr($longPath, 1);
4709
4740
  } else {
4710
- $path = '\\\\?\\' . $path;
4741
+ $longPath = '\\\\?\\' . $longPath;
4711
4742
  }
4712
4743
  last;
4713
4744
  }
4714
- $debug and print $out "WindowsLongPath return: $path\n";
4715
- return $path;
4745
+ # this may be called repeatedly for the same file file (exists, stat, open),
4746
+ # so cache the last return value (without any of the suffixes that we use)
4747
+ $$self{LONG_PATH_IN} = $path;
4748
+ $$self{LONG_PATH_OUT} = $longPath;
4749
+ $debug and print $out "WindowsLongPath return: $longPath$suffix\n";
4750
+ return $longPath . $suffix;
4716
4751
  }
4717
4752
 
4718
4753
  #------------------------------------------------------------------------------
@@ -4894,9 +4929,9 @@ sub GetFileTime($$)
4894
4929
  # on Windows, try to work around incorrect file times when daylight saving time is in effect
4895
4930
  if ($^O eq 'MSWin32') {
4896
4931
  if (not eval { require Win32::API }) {
4897
- $self->WarnOnce('Install Win32::API for proper handling of Windows file times', 1);
4932
+ $self->Warn('Install Win32::API for proper handling of Windows file times', 1);
4898
4933
  } elsif (not eval { require Win32API::File }) {
4899
- $self->WarnOnce('Install Win32API::File for proper handling of Windows file times', 1);
4934
+ $self->Warn('Install Win32API::File for proper handling of Windows file times', 1);
4900
4935
  } else {
4901
4936
  # get Win32 handle, needed for GetFileTime
4902
4937
  my $win32Handle = eval { Win32API::File::GetOsFHandle($file) };
@@ -5472,28 +5507,21 @@ sub AddCleanup($)
5472
5507
  sub Warn($$;$)
5473
5508
  {
5474
5509
  my ($self, $str, $ignorable) = @_;
5475
- my $noWarn = $self->Options('NoWarning');
5510
+ my $noWarn = $$self{OPTIONS}{NoWarning};
5476
5511
  if ($ignorable) {
5477
5512
  return 0 if $$self{OPTIONS}{IgnoreMinorErrors};
5478
5513
  return 0 if $ignorable eq '3' and $$self{OPTIONS}{Validate};
5479
5514
  return 1 if defined $noWarn and eval { $str =~ /$noWarn/ };
5480
5515
  $str = $ignorable eq '2' ? "[Minor] $str" : "[minor] $str";
5481
5516
  }
5482
- $self->FoundTag('Warning', $str) unless defined $noWarn and eval { $str =~ /$noWarn/ };
5483
- return 1;
5484
- }
5485
-
5486
- #------------------------------------------------------------------------------
5487
- # Add warning tag only once per processed file
5488
- # Inputs: 0) ExifTool object reference, 1) warning message, 2) true if minor
5489
- # Returns: true if warning tag was added
5490
- sub WarnOnce($$;$)
5491
- {
5492
- my ($self, $str, $ignorable) = @_;
5493
- return 0 if $ignorable and $$self{OPTIONS}{IgnoreMinorErrors};
5494
- unless ($$self{WARNED_ONCE}{$str}) {
5495
- $self->Warn($str, $ignorable);
5496
- $$self{WARNED_ONCE}{$str} = 1;
5517
+ unless (defined $noWarn and eval { $str =~ /$noWarn/ }) {
5518
+ # add each warning only once but count number of occurrences
5519
+ if ($$self{WAS_WARNED}{$str}) {
5520
+ ++$$self{WAS_WARNED}{$str};
5521
+ } else {
5522
+ $self->FoundTag('Warning', $str);
5523
+ $$self{WAS_WARNED}{$str} = 1;
5524
+ }
5497
5525
  }
5498
5526
  return 1;
5499
5527
  }
@@ -6224,7 +6252,7 @@ sub Decode($$$;$$$)
6224
6252
  }
6225
6253
 
6226
6254
  #------------------------------------------------------------------------------
6227
- # Encode string with specified encoding
6255
+ # Encode string (in Charset encoding) to specified encoding
6228
6256
  # Inputs: 0) ExifTool object ref, 1) string, 2) destination character set name,
6229
6257
  # 3) optional destination byte order (2-byte and 4-byte fixed-width sets only)
6230
6258
  # Returns: string in specified encoding
@@ -7433,7 +7461,7 @@ sub ProcessJPEG($$;$)
7433
7461
  }
7434
7462
  # handle all other markers
7435
7463
  my $dumpType = '';
7436
- my ($desc, $tip, $xtra);
7464
+ my ($desc, $tip, $xtra, $useJpegMain);
7437
7465
  $length = length $$segDataPt;
7438
7466
  $appBytes += $length + 4 if ($marker & 0xf0) == 0xe0; # total size of APP segments
7439
7467
  if ($verbose) {
@@ -7568,13 +7596,13 @@ sub ProcessJPEG($$;$)
7568
7596
  my ($size, $off) = unpack('x67N2', $$segDataPt);
7569
7597
  my $guid = substr($$segDataPt, 35, 32);
7570
7598
  if ($guid =~ /[^A-Za-z0-9]/) { # (technically, should be uppercase)
7571
- $self->WarnOnce($tip = 'Invalid extended XMP GUID');
7599
+ $self->Warn($tip = 'Invalid extended XMP GUID');
7572
7600
  } else {
7573
7601
  my $extXMP = $extendedXMP{$guid};
7574
7602
  if (not $extXMP) {
7575
7603
  $extXMP = $extendedXMP{$guid} = { };
7576
7604
  } elsif ($size != $$extXMP{Size}) {
7577
- $self->WarnOnce('Inconsistent extended XMP size');
7605
+ $self->Warn('Inconsistent extended XMP size');
7578
7606
  }
7579
7607
  $$extXMP{Size} = $size;
7580
7608
  $$extXMP{$off} = substr($$segDataPt, 75);
@@ -7583,7 +7611,7 @@ sub ProcessJPEG($$;$)
7583
7611
  # (delay processing extended XMP until after reading all segments)
7584
7612
  }
7585
7613
  } else {
7586
- $self->WarnOnce($tip = 'Invalid extended XMP segment');
7614
+ $self->Warn($tip = 'Invalid extended XMP segment');
7587
7615
  }
7588
7616
  } elsif ($$segDataPt =~ /^QVCI\0/) {
7589
7617
  $dumpType = 'QVCI';
@@ -7606,7 +7634,7 @@ sub ProcessJPEG($$;$)
7606
7634
  }
7607
7635
  if (defined $flirCount) {
7608
7636
  if (defined $flirChunk[$chunkNum]) {
7609
- $self->WarnOnce('Duplicate FLIR chunk number(s)');
7637
+ $self->Warn('Duplicate FLIR chunk number(s)');
7610
7638
  $flirChunk[$chunkNum] .= substr($$segDataPt, 8);
7611
7639
  } else {
7612
7640
  $flirChunk[$chunkNum] = substr($$segDataPt, 8);
@@ -7626,7 +7654,7 @@ sub ProcessJPEG($$;$)
7626
7654
  undef $flirCount; # prevent reprocessing
7627
7655
  }
7628
7656
  } else {
7629
- $self->WarnOnce('Invalid or extraneous FLIR chunk(s)');
7657
+ $self->Warn('Invalid or extraneous FLIR chunk(s)');
7630
7658
  }
7631
7659
  } elsif ($$segDataPt =~ /^PARROT\0(II\x2a\0|MM\0\x2a)/) {
7632
7660
  # (don't know if this could span multiple segments)
@@ -7653,7 +7681,7 @@ sub ProcessJPEG($$;$)
7653
7681
  $self->Warn("Ignored APP1 segment length $length (unknown header)");
7654
7682
  }
7655
7683
  }
7656
- } elsif ($marker == 0xe2) { # APP2 (ICC Profile, FPXR, MPF, InfiRay, PreviewImage)
7684
+ } elsif ($marker == 0xe2) { # APP2 (ICC Profile, FPXR, MPF, InfiRay, URN, PreviewImage)
7657
7685
  if ($$segDataPt =~ /^ICC_PROFILE\0/ and $length >= 14) {
7658
7686
  $dumpType = 'ICC_Profile';
7659
7687
  # must concatenate profile chunks (note: handle the case where
@@ -7671,7 +7699,7 @@ sub ProcessJPEG($$;$)
7671
7699
  }
7672
7700
  if (defined $iccChunkCount) {
7673
7701
  if (defined $iccChunk[$chunkNum]) {
7674
- $self->WarnOnce('Duplicate ICC_Profile chunk number(s)');
7702
+ $self->Warn('Duplicate ICC_Profile chunk number(s)');
7675
7703
  $iccChunk[$chunkNum] .= substr($$segDataPt, 14);
7676
7704
  } else {
7677
7705
  $iccChunk[$chunkNum] = substr($$segDataPt, 14);
@@ -7694,7 +7722,7 @@ sub ProcessJPEG($$;$)
7694
7722
  undef $iccChunkCount; # prevent reprocessing
7695
7723
  }
7696
7724
  } else {
7697
- $self->WarnOnce('Invalid or extraneous ICC_Profile chunk(s)');
7725
+ $self->Warn('Invalid or extraneous ICC_Profile chunk(s)');
7698
7726
  }
7699
7727
  } elsif ($$segDataPt =~ /^FPXR\0/) {
7700
7728
  next if $fast > 1; # skip processing for very fast
@@ -7726,6 +7754,9 @@ sub ProcessJPEG($$;$)
7726
7754
  # Digilife DDC-690/Rollei="BGTH"
7727
7755
  $dumpType = 'Preview Image';
7728
7756
  $preview = substr($$segDataPt, length($1));
7757
+ } elsif ($$segDataPt =~ /^urn:/) { # (found in Apple HDR images)
7758
+ $dumpType = 'URN';
7759
+ $useJpegMain = 1;
7729
7760
  } elsif ($preview) {
7730
7761
  $dumpType = 'Preview Image';
7731
7762
  $preview .= $$segDataPt;
@@ -7995,17 +8026,14 @@ sub ProcessJPEG($$;$)
7995
8026
  DirStart(\%dirInfo, 5);
7996
8027
  $self->ProcessDirectory(\%dirInfo, GetTagTable("Image::ExifTool::XMP::SEAL"));
7997
8028
  }
7998
- } elsif ($marker == 0xea) { # APP10 (PhotoStudio Unicode comments)
8029
+ } elsif ($marker == 0xea) { # APP10 (PhotoStudio Unicode comments, HDR gain curve)
7999
8030
  if ($$segDataPt =~ /^UNICODE\0/) {
8000
8031
  $dumpType = 'PhotoStudio';
8001
8032
  my $comment = $self->Decode(substr($$segDataPt,8), 'UCS2', 'MM');
8002
8033
  $self->FoundTag('Comment', $comment);
8003
- } elsif ($$segDataPt =~ /^AROT\0/ and $length > 10) {
8004
- # iPhone "AROT" segment containing integrated intensity per 16 scan lines
8005
- # (with number of elements N = ImageHeight / 16 - 1, ref PH/NealKrawetz)
8006
- # "Absolute ROTational difference between two frames"
8007
- # (see https://www.hackerfactor.com/blog/index.php?/archives/822-Apple-Rot.html)
8008
- $xtra = 'segment (N=' . unpack('x6N', $$segDataPt) . ')';
8034
+ } elsif ($$segDataPt =~ /^AROT\0\0.{4}/s) {
8035
+ $dumpType = 'AROT', # (HDR gain curve? PH guess)
8036
+ $useJpegMain = 1;
8009
8037
  }
8010
8038
  } elsif ($marker == 0xeb) { # APP11 (JPEG-HDR, JUMBF)
8011
8039
  if ($$segDataPt =~ /^HDR_RI /) {
@@ -8038,7 +8066,7 @@ sub ProcessJPEG($$;$)
8038
8066
  my $type = substr($$segDataPt, 12, 4);
8039
8067
  # a Microsoft bug writes $len and $type incorrectly as little-endian
8040
8068
  if ($type eq 'bmuj') {
8041
- $self->WarnOnce('Wrong byte order in C2PA APP11 JUMBF header');
8069
+ $self->Warn('Wrong byte order in C2PA APP11 JUMBF header');
8042
8070
  $type = 'jumb';
8043
8071
  $len = unpack('x8V', $$segDataPt);
8044
8072
  # fix the header
@@ -8172,6 +8200,10 @@ sub ProcessJPEG($$;$)
8172
8200
  $desc = "[JPEG $markerName]"; # (other known JPEG segments)
8173
8201
  }
8174
8202
  if (defined $dumpType) {
8203
+ if ($useJpegMain) {
8204
+ my $tagTablePtr = GetTagTable('Image::ExifTool::JPEG::Main');
8205
+ $self->HandleTag($tagTablePtr, $markerName, $$segDataPt);
8206
+ }
8175
8207
  if (not $dumpType and ($$options{Unknown} or $$options{Validate})) {
8176
8208
  my $str = ($$segDataPt =~ /^([\x20-\x7e]{1,20})\0/) ? " '${1}'" : '';
8177
8209
  $xtra = 'segment' unless $xtra;
@@ -8711,23 +8743,18 @@ sub GetTagTable($)
8711
8743
  # try to load module for this table
8712
8744
  if ($tableName =~ /(.*)::/) {
8713
8745
  my $module = $1;
8714
- if (eval "require $module") {
8746
+ if (not eval "require $module") {
8747
+ $@ and warn $@;
8748
+ } elsif (not %$tableName) {
8715
8749
  # load additional modules if required
8716
- if (not %$tableName) {
8717
- if ($module eq 'Image::ExifTool::XMP') {
8718
- require 'Image/ExifTool/XMP2.pl';
8719
- } elsif ($tableName eq 'Image::ExifTool::QuickTime::Stream') {
8720
- require 'Image/ExifTool/QuickTimeStream.pl';
8721
- }
8750
+ if ($module eq 'Image::ExifTool::XMP') {
8751
+ require 'Image/ExifTool/XMP2.pl';
8752
+ } elsif ($tableName eq 'Image::ExifTool::QuickTime::Stream') {
8753
+ require 'Image/ExifTool/QuickTimeStream.pl';
8722
8754
  }
8723
- } else {
8724
- $@ and warn $@;
8725
8755
  }
8726
8756
  }
8727
- unless (%$tableName) {
8728
- warn "Can't find table $tableName\n";
8729
- return undef;
8730
- }
8757
+ %$tableName or warn("Can't find table $tableName\n"), return undef;
8731
8758
  }
8732
8759
  no strict 'refs';
8733
8760
  $table = \%$tableName;
@@ -1197,14 +1197,15 @@ on tag values and JPEG segment data respectively.
1197
1197
  =item WindowsLongPath
1198
1198
 
1199
1199
  Support long path names in Windows. Enabling this option automatically
1200
- enables the WindowsWideFile feature.
1200
+ enables the WindowsWideFile feature. Default is 1.
1201
1201
 
1202
1202
  =item WindowsWideFile
1203
1203
 
1204
1204
  Force the use of wide-character Windows I/O functions. This may be
1205
1205
  necessary when files are on a network drive and the current directory name
1206
- contains Unicode characters. By default, the wide-character functions are
1207
- used only if the specified file path contains Unicode characters.
1206
+ contains Unicode characters. Without this option the wide-character
1207
+ functions are used only if the specified file path contains Unicode
1208
+ characters.
1208
1209
 
1209
1210
  =item WriteMode
1210
1211
 
@@ -2545,9 +2546,9 @@ GoPro, H264, HTML, ICC_Profile, ID3, IPTC, ISO, ITC, JFIF, JPEG, JSON,
2545
2546
  JUMBF, Jpeg2000, LNK, Leaf, Lytro, M2TS, MIE, MIFF, MISB, MNG, MOI, MPC,
2546
2547
  MPEG, MPF, MXF, MakerNotes, Matroska, Meta, Ogg, OpenEXR, Opus, PDF, PICT,
2547
2548
  PLIST, PNG, PSP, Palm, PanasonicRaw, Parrot, PhotoCD, PhotoMechanic,
2548
- Photoshop, PostScript, PrintIM, QuickTime, RAF, RIFF, RSRC, RTF, Radiance,
2549
- Rawzor, Real, Red, SVG, SigmaRaw, Sony, Stim, Theora, Torrent, Trailer,
2550
- VCard, Vorbis, WTV, XML, XMP, ZIP
2549
+ Photoshop, PostScript, PrintIM, Protobuf, QuickTime, RAF, RIFF, RSRC, RTF,
2550
+ Radiance, Rawzor, Real, Red, SVG, SigmaRaw, Sony, Stim, Theora, Torrent,
2551
+ Trailer, VCard, Vorbis, WTV, XML, XMP, ZIP
2551
2552
 
2552
2553
  =item Family 1 (Specific Location):
2553
2554
 
@@ -2562,7 +2563,7 @@ ICC-chrm, ICC-clrt, ICC-header, ICC-meas, ICC-meta, ICC-view, ICC_Profile,
2562
2563
  ICC_Profile#, ID3, ID3v1, ID3v1_Enh, ID3v2_2, ID3v2_3, ID3v2_4, IFD0, IFD1,
2563
2564
  IPTC, IPTC#, ISO, ITC, InfiRay, Insta360, InteropIFD, ItemList, JFIF, JFXX,
2564
2565
  JPEG, JPEG-HDR, JPS, JSON, JUMBF, JVC, Jpeg2000, KDC_IFD, Keys, Kodak,
2565
- KodakBordersIFD, KodakEffectsIFD, KodakIFD, KyoceraRaw, LNK, Leaf,
2566
+ KodakBordersIFD, KodakEffectsIFD, KodakIFD, KyoceraRaw, LIGO, LNK, Leaf,
2566
2567
  LeafSubIFD, Leica, Lyrics3, Lytro, M-RAW, M2TS, MAC, MIE-Audio, MIE-Camera,
2567
2568
  MIE-Canon, MIE-Doc, MIE-Extender, MIE-Flash, MIE-GPS, MIE-Geo, MIE-Image,
2568
2569
  MIE-Lens, MIE-Main, MIE-MakerNotes, MIE-Meta, MIE-Orient, MIE-Preview,
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 13.04
3
+ Version: 13.08
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('13.04.0')
4
+ VERSION = Gem::Version.new('13.08.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: 13.04.0
4
+ version: 13.08.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: 2024-11-27 00:00:00.000000000 Z
12
+ date: 2024-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool
@@ -257,6 +257,7 @@ files:
257
257
  - bin/lib/Image/ExifTool/Photoshop.pm
258
258
  - bin/lib/Image/ExifTool/PostScript.pm
259
259
  - bin/lib/Image/ExifTool/PrintIM.pm
260
+ - bin/lib/Image/ExifTool/Protobuf.pm
260
261
  - bin/lib/Image/ExifTool/Qualcomm.pm
261
262
  - bin/lib/Image/ExifTool/QuickTime.pm
262
263
  - bin/lib/Image/ExifTool/QuickTimeStream.pl