exiftool_vendored 12.57.0 → 12.59.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +39 -0
  3. data/bin/MANIFEST +3 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +2 -2
  7. data/bin/config_files/example.config +1 -0
  8. data/bin/config_files/rotate_regions.config +1 -1
  9. data/bin/exiftool +76 -57
  10. data/bin/lib/Image/ExifTool/AIFF.pm +2 -2
  11. data/bin/lib/Image/ExifTool/APE.pm +2 -2
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +13 -14
  13. data/bin/lib/Image/ExifTool/Canon.pm +26 -6
  14. data/bin/lib/Image/ExifTool/DJI.pm +28 -2
  15. data/bin/lib/Image/ExifTool/Exif.pm +24 -5
  16. data/bin/lib/Image/ExifTool/FlashPix.pm +28 -10
  17. data/bin/lib/Image/ExifTool/FujiFilm.pm +1 -0
  18. data/bin/lib/Image/ExifTool/JPEG.pm +14 -2
  19. data/bin/lib/Image/ExifTool/LIF.pm +10 -2
  20. data/bin/lib/Image/ExifTool/LNK.pm +5 -4
  21. data/bin/lib/Image/ExifTool/MPEG.pm +2 -2
  22. data/bin/lib/Image/ExifTool/MakerNotes.pm +2 -2
  23. data/bin/lib/Image/ExifTool/Minolta.pm +6 -7
  24. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +9 -1
  25. data/bin/lib/Image/ExifTool/Nikon.pm +390 -114
  26. data/bin/lib/Image/ExifTool/Olympus.pm +87 -7
  27. data/bin/lib/Image/ExifTool/PNG.pm +15 -2
  28. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +27 -1
  29. data/bin/lib/Image/ExifTool/Pentax.pm +8 -5
  30. data/bin/lib/Image/ExifTool/PhaseOne.pm +14 -1
  31. data/bin/lib/Image/ExifTool/Photoshop.pm +3 -3
  32. data/bin/lib/Image/ExifTool/QuickTime.pm +16 -11
  33. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +38 -6
  34. data/bin/lib/Image/ExifTool/README +8 -0
  35. data/bin/lib/Image/ExifTool/RIFF.pm +41 -13
  36. data/bin/lib/Image/ExifTool/Rawzor.pm +2 -2
  37. data/bin/lib/Image/ExifTool/Sigma.pm +4 -4
  38. data/bin/lib/Image/ExifTool/Sony.pm +23 -1
  39. data/bin/lib/Image/ExifTool/TagLookup.pm +4464 -4441
  40. data/bin/lib/Image/ExifTool/TagNames.pod +117 -36
  41. data/bin/lib/Image/ExifTool/Validate.pm +5 -5
  42. data/bin/lib/Image/ExifTool/WriteExif.pl +49 -0
  43. data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
  44. data/bin/lib/Image/ExifTool/Writer.pl +74 -14
  45. data/bin/lib/Image/ExifTool/XMP.pm +19 -4
  46. data/bin/lib/Image/ExifTool/XMP2.pl +2 -1
  47. data/bin/lib/Image/ExifTool.pm +131 -17
  48. data/bin/lib/Image/ExifTool.pod +40 -5
  49. data/bin/perl-Image-ExifTool.spec +1 -1
  50. data/lib/exiftool_vendored/version.rb +1 -1
  51. metadata +2 -2
@@ -843,7 +843,8 @@ my %prismPublicationDate = (
843
843
  AVOID => 1,
844
844
  NOTES => q{
845
845
  Publishing Requirements for Industry Standard Metadata 3.0 namespace
846
- tags. (see L<http://www.prismstandard.org/>)
846
+ tags. (see
847
+ L<https://www.w3.org/Submission/2020/SUBM-prism-20200910/prism-basic.html/>)
847
848
  },
848
849
  academicField => { }, # (3.0)
849
850
  aggregateIssueNumber => { Writable => 'integer' }, # (3.0)
@@ -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);
31
31
 
32
- $VERSION = '12.57';
32
+ $VERSION = '12.59';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -75,6 +75,7 @@ sub GetAllGroups($;$);
75
75
  sub GetNewGroups($);
76
76
  sub GetDeleteGroups();
77
77
  sub AddUserDefinedTags($%);
78
+ sub SetAlternateFile($$$);
78
79
  # non-public routines below
79
80
  sub InsertTagValues($$$;$$$);
80
81
  sub IsWritable($);
@@ -1821,6 +1822,16 @@ my %systemTagsNotes = (
1821
1822
  if specifically requested
1822
1823
  },
1823
1824
  },
1825
+ ImageDataMD5 => {
1826
+ Notes => q{
1827
+ MD5 of image data. Generated only if specifically requested for JPEG and
1828
+ TIFF-based images, CR3, MRW and PNG images, MOV/MP4 videos, and RIFF-based
1829
+ files. The MD5 includes the main image data, plus JpgFromRaw/OtherImage for
1830
+ some formats, but does not include ThumbnailImage or PreviewImage. Includes
1831
+ video and audio data for MOV/MP4. The L<XMP-et:OriginalImageMD5
1832
+ tag|XMP.html#ExifTool> provides a place to store these values in the file.
1833
+ },
1834
+ },
1824
1835
  );
1825
1836
 
1826
1837
  # tags defined by UserParam option (added at runtime)
@@ -2045,6 +2056,7 @@ sub new
2045
2056
  $$self{FILE_SEQUENCE} = 0; # sequence number for files when reading
2046
2057
  $$self{FILES_WRITTEN} = 0; # count of files successfully written
2047
2058
  $$self{INDENT2} = ''; # indentation of verbose messages from SetNewValue
2059
+ $$self{ALT_EXIFTOOL} = { }; # alternate exiftool objects
2048
2060
 
2049
2061
  # initialize our new groups for writing
2050
2062
  $self->SetNewGroups(@defaultWriteGroups);
@@ -2479,8 +2491,33 @@ sub ExtractInfo($;@)
2479
2491
  $self->WarnOnce('Install Time::HiRes to generate ProcessingTime');
2480
2492
  }
2481
2493
  }
2482
-
2494
+
2495
+ # create MD5 object if ImageDataMD5 is requested
2496
+ if ($$req{imagedatamd5} and not $$self{ImageDataMD5}) {
2497
+ if (require Digest::MD5) {
2498
+ $$self{ImageDataMD5} = Digest::MD5->new;
2499
+ } else {
2500
+ $self->WarnOnce('Install Digest::MD5 to calculate image data MD5');
2501
+ }
2502
+ }
2483
2503
  ++$$self{FILE_SEQUENCE}; # count files read
2504
+ # extract information from alternate files if necessary
2505
+ my ($g8, $altExifTool);
2506
+ foreach $g8 (keys %{$$self{ALT_EXIFTOOL}}) {
2507
+ $altExifTool = $$self{ALT_EXIFTOOL}{$g8};
2508
+ next if $$altExifTool{DID_EXTRACT}; # avoid extracting twice
2509
+ $$altExifTool{OPTIONS} = $$self{OPTIONS};
2510
+ $$altExifTool{GLOBAL_TIME_OFFSET} = $$self{GLOBAL_TIME_OFFSET};
2511
+ $$altExifTool{REQ_TAG_LOOKUP} = $$self{REQ_TAG_LOOKUP};
2512
+ $altExifTool->ExtractInfo($$altExifTool{ALT_FILE});
2513
+ # set family 8 group name for all tags
2514
+ foreach (keys %{$$altExifTool{VALUE}}) {
2515
+ my $ex = $$altExifTool{TAG_EXTRA}{$_};
2516
+ $ex or $ex = $$altExifTool{TAG_EXTRA}{$_} = { };
2517
+ $$ex{G8} = $g8;
2518
+ }
2519
+ $$altExifTool{DID_EXTRACT} = 1;
2520
+ }
2484
2521
  }
2485
2522
 
2486
2523
  my $filename = $$self{FILENAME}; # image file name ('' if already open)
@@ -2870,6 +2907,10 @@ sub ExtractInfo($;@)
2870
2907
  # restore necessary members when exiting re-entrant code
2871
2908
  $$self{$_} = $$reEntry{$_} foreach keys %$reEntry;
2872
2909
  SetByteOrder($saveOrder);
2910
+ } elsif ($$self{ImageDataMD5}) {
2911
+ my $digest = $$self{ImageDataMD5}->hexdigest;
2912
+ # (don't store empty digest)
2913
+ $self->FoundTag(ImageDataMD5 => $digest) unless $digest eq 'd41d8cd98f00b204e9800998ecf8427e';
2873
2914
  }
2874
2915
 
2875
2916
  # ($type may be undef without an Error when processing sub-documents)
@@ -3501,6 +3542,10 @@ sub GetGroup($$;$)
3501
3542
  $groups[6] = $$ex{G6};
3502
3543
  }
3503
3544
  }
3545
+ if ($$ex{G8}) {
3546
+ $groups[7] = '';
3547
+ $groups[8] = $$ex{G8};
3548
+ }
3504
3549
  # generate tag ID group names unless obviously not needed
3505
3550
  unless ($noID) {
3506
3551
  my $id = $$tagInfo{KeysID} || $$tagInfo{TagID};
@@ -4134,7 +4179,11 @@ sub SplitFileName($)
4134
4179
  } else {
4135
4180
  ($name = $file) =~ tr/\\/\//;
4136
4181
  # remove path
4137
- $dir = length($1) ? $1 : '/' if $name =~ s/(.*)\///;
4182
+ if ($name =~ s/(.*)\///) {
4183
+ $dir = length($1) ? $1 : '/';
4184
+ } else {
4185
+ $dir = '.';
4186
+ }
4138
4187
  }
4139
4188
  return ($dir, $name);
4140
4189
  }
@@ -4297,9 +4346,9 @@ sub GetFileTime($$)
4297
4346
  # on Windows, try to work around incorrect file times when daylight saving time is in effect
4298
4347
  if ($^O eq 'MSWin32') {
4299
4348
  if (not eval { require Win32::API }) {
4300
- $self->WarnOnce('Install Win32::API for proper handling of Windows file times');
4349
+ $self->WarnOnce('Install Win32::API for proper handling of Windows file times', 1);
4301
4350
  } elsif (not eval { require Win32API::File }) {
4302
- $self->WarnOnce('Install Win32API::File for proper handling of Windows file times');
4351
+ $self->WarnOnce('Install Win32API::File for proper handling of Windows file times', 1);
4303
4352
  } else {
4304
4353
  # get Win32 handle, needed for GetFileTime
4305
4354
  my $win32Handle = eval { Win32API::File::GetOsFHandle($file) };
@@ -4575,11 +4624,18 @@ sub SetFoundTags($)
4575
4624
  my $tagHash = $$self{VALUE};
4576
4625
  my $reqTag;
4577
4626
  foreach $reqTag (@$reqTags) {
4578
- my (@matches, $group, $allGrp, $allTag, $byValue);
4627
+ my (@matches, $group, $allGrp, $allTag, $byValue, $g8, $altOrder);
4628
+ my $et = $self;
4579
4629
  if ($reqTag =~ /^(.*):(.+)/) {
4580
4630
  ($group, $tag) = ($1, $2);
4581
4631
  if ($group =~ /^(\*|all)$/i) {
4582
4632
  $allGrp = 1;
4633
+ } elsif ($reqTag =~ /\bfile(\d+):/i) {
4634
+ $g8 = "File$1";
4635
+ $altOrder = ($1 + 1) * 100000;
4636
+ $et = $$self{ALT_EXIFTOOL}{$g8} || $self;
4637
+ $fileOrder = $$et{FILE_ORDER};
4638
+ $tagHash = $$et{VALUE};
4583
4639
  } elsif ($group !~ /^[-\w:]*$/) {
4584
4640
  $self->Warn("Invalid group name '${group}'");
4585
4641
  $group = 'invalid';
@@ -4621,7 +4677,7 @@ sub SetFoundTags($)
4621
4677
  }
4622
4678
  if (defined $group and not $allGrp) {
4623
4679
  # keep only specified group
4624
- @matches = $self->GroupMatches($group, \@matches);
4680
+ @matches = $et->GroupMatches($group, \@matches);
4625
4681
  next unless @matches or not $allTag;
4626
4682
  }
4627
4683
  if (@matches > 1) {
@@ -4630,9 +4686,9 @@ sub SetFoundTags($)
4630
4686
  # return only the highest priority tag unless duplicates wanted
4631
4687
  unless ($doDups or $allTag or $allGrp) {
4632
4688
  $tag = shift @matches;
4633
- my $oldPriority = $$self{PRIORITY}{$tag} || 1;
4689
+ my $oldPriority = $$et{PRIORITY}{$tag} || 1;
4634
4690
  foreach (@matches) {
4635
- my $priority = $$self{PRIORITY}{$_};
4691
+ my $priority = $$et{PRIORITY}{$_};
4636
4692
  $priority = 1 unless defined $priority;
4637
4693
  next unless $priority >= $oldPriority;
4638
4694
  $tag = $_;
@@ -4646,6 +4702,22 @@ sub SetFoundTags($)
4646
4702
  # bogus file order entry to avoid warning if sorting in file order
4647
4703
  $$self{FILE_ORDER}{$matches[0]} = 9999;
4648
4704
  }
4705
+ # copy over necessary information for tags from alternate files
4706
+ if ($g8) {
4707
+ my $tag;
4708
+ foreach $tag (@matches) {
4709
+ my $vtag = $tag;
4710
+ $vtag =~ s/( |$)/ #[$g8]/;
4711
+ $$self{VALUE}{$vtag} = $$et{VALUE}{$tag};
4712
+ $$self{TAG_INFO}{$vtag} = $$et{TAG_INFO}{$tag};
4713
+ $$self{TAG_EXTRA}{$vtag} = $$et{TAG_EXTRA}{$tag} || { };
4714
+ $$self{FILE_ORDER}{$vtag} = ($$et{FILE_ORDER}{$tag} || 0) + $altOrder;
4715
+ $tag = $vtag;
4716
+ }
4717
+ # restore variables to original values for main file
4718
+ $fileOrder = $$self{FILE_ORDER};
4719
+ $tagHash = $$self{VALUE};
4720
+ }
4649
4721
  # save indices of tags extracted by value
4650
4722
  push @byValue, scalar(@$rtnTags) .. (scalar(@$rtnTags)+scalar(@matches)-1) if $byValue;
4651
4723
  # save indices of wildcard tags
@@ -5868,7 +5940,8 @@ sub ConvertTimeSpan($;$)
5868
5940
  #------------------------------------------------------------------------------
5869
5941
  # Patched timelocal() that fixes ActivePerl timezone bug
5870
5942
  # Inputs/Returns: same as timelocal()
5871
- # Notes: must 'require Time::Local' before calling this routine
5943
+ # Notes: must 'require Time::Local' before calling this routine.
5944
+ # Also note that year should be full year, and not relative to 1900 as with localtime
5872
5945
  sub TimeLocal(@)
5873
5946
  {
5874
5947
  my $tm = Time::Local::timelocal(@_);
@@ -6327,7 +6400,6 @@ sub ProcessJPEG($$)
6327
6400
  {
6328
6401
  local $_;
6329
6402
  my ($self, $dirInfo) = @_;
6330
- my ($ch, $s, $length);
6331
6403
  my $options = $$self{OPTIONS};
6332
6404
  my $verbose = $$options{Verbose};
6333
6405
  my $out = $$options{TextOut};
@@ -6336,10 +6408,17 @@ sub ProcessJPEG($$)
6336
6408
  my $req = $$self{REQ_TAG_LOOKUP};
6337
6409
  my $htmlDump = $$self{HTML_DUMP};
6338
6410
  my %dumpParms = ( Out => $out );
6411
+ my ($ch, $s, $length, $md5, $md5size);
6339
6412
  my ($success, $wantTrailer, $trailInfo, $foundSOS, %jumbfChunk);
6340
6413
  my (@iccChunk, $iccChunkCount, $iccChunksTotal, @flirChunk, $flirCount, $flirTotal);
6341
6414
  my ($preview, $scalado, @dqt, $subSampling, $dumpEnd, %extendedXMP);
6342
6415
 
6416
+ # get pointer to MD5 object if it exists and we are the top-level JPEG
6417
+ if ($$self{FILE_TYPE} eq 'JPEG' and not $$self{DOC_NUM}) {
6418
+ $md5 = $$self{ImageDataMD5};
6419
+ $md5size = 0;
6420
+ }
6421
+
6343
6422
  # check to be sure this is a valid JPG (or J2C, or EXV) file
6344
6423
  return 0 unless $raf->Read($s, 2) == 2 and $s =~ /^\xff[\xd8\x4f\x01]/;
6345
6424
  if ($s eq "\xff\x01") {
@@ -6386,7 +6465,9 @@ sub ProcessJPEG($$)
6386
6465
  #
6387
6466
  # read ahead to the next segment unless we have reached EOI, SOS or SOD
6388
6467
  #
6389
- unless ($marker and ($marker==0xd9 or ($marker==0xda and not $wantTrailer) or $marker==0x93)) {
6468
+ unless ($marker and ($marker==0xd9 or ($marker==0xda and not $wantTrailer and not $md5) or
6469
+ $marker==0x93))
6470
+ {
6390
6471
  # read up to next marker (JPEG markers begin with 0xff)
6391
6472
  my $buff;
6392
6473
  $raf->ReadLine($buff) or last;
@@ -6416,6 +6497,19 @@ sub ProcessJPEG($$)
6416
6497
  $nextSegPos = $raf->Tell();
6417
6498
  $len -= 4; # subtract size of length word
6418
6499
  last unless $raf->Seek($len, 1);
6500
+ } elsif ($md5 and defined $marker and ($marker == 0x00 or $marker == 0xda or
6501
+ ($marker >= 0xd0 and $marker <= 0xd7)))
6502
+ {
6503
+ # calculate MD5 for image data (includes leading ff d9 but not trailing ff da)
6504
+ $md5->add("\xff" . chr($marker));
6505
+ my $n = $skipped - (length($buff) - 1); # number of extra 0xff's
6506
+ if (not $n) {
6507
+ $buff = substr($buff, 0, -1); # remove trailing 0xff
6508
+ } elsif ($n > 1) {
6509
+ $buff .= "\xff" x ($n - 1); # add back extra 0xff's
6510
+ }
6511
+ $md5->add($buff);
6512
+ $md5size += $skipped + 2;
6419
6513
  }
6420
6514
  # read second segment too if this was the first
6421
6515
  next unless defined $marker;
@@ -6626,7 +6720,7 @@ sub ProcessJPEG($$)
6626
6720
  next if $trailInfo or $wantTrailer or $verbose > 2 or $htmlDump;
6627
6721
  }
6628
6722
  # must scan to EOI if Validate or JpegCompressionFactor used
6629
- next if $$options{Validate} or $calcImageLen or $$req{trailer};
6723
+ next if $$options{Validate} or $calcImageLen or $$req{trailer} or $md5;
6630
6724
  # nothing interesting to parse after start of scan (SOS)
6631
6725
  $success = 1;
6632
6726
  last; # all done parsing file
@@ -7009,7 +7103,7 @@ sub ProcessJPEG($$)
7009
7103
  $self->FoundTag('PreviewImage', $preview);
7010
7104
  undef $preview;
7011
7105
  }
7012
- } elsif ($marker == 0xe4) { # APP4 (InfiRay, "SCALADO", FPXR, PreviewImage)
7106
+ } elsif ($marker == 0xe4) { # APP4 (InfiRay, "SCALADO", FPXR, DJI, PreviewImage)
7013
7107
  if ($$segDataPt =~ /^SCALADO\0/ and $length >= 16) {
7014
7108
  $dumpType = 'SCALADO';
7015
7109
  my ($num, $idx, $len) = unpack('x8n2N', $$segDataPt);
@@ -7040,6 +7134,16 @@ sub ProcessJPEG($$)
7040
7134
  DirStart(\%dirInfo, 0, 0);
7041
7135
  my $tagTablePtr = GetTagTable('Image::ExifTool::DJI::ThermalParams');
7042
7136
  $self->ProcessDirectory(\%dirInfo, $tagTablePtr);
7137
+ } elsif ($$self{Make} eq 'DJI' and $$segDataPt =~ /^(.{32})?.{32}\x2c\x01\x20\0/s) {
7138
+ $dumpType = 'DJI ThermalParams2';
7139
+ DirStart(\%dirInfo, $1 ? 32 : 0, 0);
7140
+ my $tagTablePtr = GetTagTable('Image::ExifTool::DJI::ThermalParams2');
7141
+ $self->ProcessDirectory(\%dirInfo, $tagTablePtr);
7142
+ } elsif ($$self{Make} eq 'DJI' and $$segDataPt =~ /^.{32}\xaa\x55\x38\0/s) {
7143
+ $dumpType = 'DJI ThermalParams3';
7144
+ DirStart(\%dirInfo, 32, 0);
7145
+ my $tagTablePtr = GetTagTable('Image::ExifTool::DJI::ThermalParams3');
7146
+ $self->ProcessDirectory(\%dirInfo, $tagTablePtr);
7043
7147
  } elsif ($$self{HasIJPEG} and $length >= 120) {
7044
7148
  $dumpType = 'InfiRay Factory';
7045
7149
  SetByteOrder('II');
@@ -7153,6 +7257,13 @@ sub ProcessJPEG($$)
7153
7257
  $self->ProcessDirectory(\%dirInfo, $tagTablePtr);
7154
7258
  delete $$self{SET_GROUP0};
7155
7259
  delete $$self{SET_GROUP1};
7260
+ } elsif ($$segDataPt =~ /^DJI-DBG\0/) {
7261
+ $dumpType = 'DJI Info';
7262
+ my $tagTablePtr = GetTagTable('Image::ExifTool::DJI::Info');
7263
+ DirStart(\%dirInfo, 8, 0);
7264
+ $$self{SET_GROUP0} = 'APP7';
7265
+ $self->ProcessDirectory(\%dirInfo, $tagTablePtr);
7266
+ delete $$self{SET_GROUP0};
7156
7267
  } elsif ($$segDataPt =~ /^\x1aQualcomm Camera Attributes/) {
7157
7268
  # found in HP iPAQ_VoiceMessenger
7158
7269
  $dumpType = 'Qualcomm';
@@ -7413,6 +7524,8 @@ sub ProcessJPEG($$)
7413
7524
  delete $extendedXMP{$guid};
7414
7525
  }
7415
7526
  }
7527
+ # print verbose MD5 message if necessary
7528
+ print $out "$$self{INDENT}(ImageDataMD5: $md5size bytes of JPEG image data)\n" if $md5size and $verbose;
7416
7529
  # calculate JPEGDigest if requested
7417
7530
  if (@dqt) {
7418
7531
  require Image::ExifTool::JPEGDigest;
@@ -7681,7 +7794,7 @@ sub DoProcessTIFF($$;$)
7681
7794
  }
7682
7795
  }
7683
7796
  # update FileType if necessary now that we know more about the file
7684
- if ($$self{DNGVersion} and $$self{VALUE}{FileType} !~ /^(DNG|GPR)$/) {
7797
+ if ($$self{DNGVersion} and $$self{FileType} !~ /^(DNG|GPR)$/) {
7685
7798
  # override whatever FileType we set since we now know it is DNG
7686
7799
  $self->OverrideFileType($$self{TIFF_TYPE} = 'DNG');
7687
7800
  }
@@ -8567,7 +8680,7 @@ sub DoEscape($$)
8567
8680
  sub SetFileType($;$$$)
8568
8681
  {
8569
8682
  my ($self, $fileType, $mimeType, $normExt) = @_;
8570
- unless ($$self{VALUE}{FileType} and not $$self{DOC_NUM}) {
8683
+ unless ($$self{FileType} and not $$self{DOC_NUM}) {
8571
8684
  my $baseType = $$self{FILE_TYPE};
8572
8685
  my $ext = $$self{FILE_EXT};
8573
8686
  $fileType or $fileType = $baseType;
@@ -8586,7 +8699,8 @@ sub SetFileType($;$$$)
8586
8699
  $normExt = $fileTypeExt{$fileType};
8587
8700
  $normExt = $fileType unless defined $normExt;
8588
8701
  }
8589
- $$self{FileType} = $fileType;
8702
+ # ($$self{FileType} is the file type of the main document)
8703
+ $$self{FileType} = $fileType unless $$self{DOC_NUM};
8590
8704
  $self->FoundTag('FileType', $fileType);
8591
8705
  $self->FoundTag('FileTypeExtension', uc $normExt);
8592
8706
  $self->FoundTag('MIMEType', $mimeType || 'application/unknown');
@@ -1727,10 +1727,11 @@ sensitive, and may be prefixed by one or more family 0, 1, 2 or 7 group
1727
1727
  names with optional leading family numbers, separated by colons (eg.
1728
1728
  'exif:iso'). A leading '-' indicates tags to be excluded (eg. '-comment'),
1729
1729
  or a trailing '#' causes the ValueConv value to be copied (same as setting
1730
- the Type option to 'ValueConv' for this tag only). Wildcards ('*' and '?')
1731
- may be used in the tag name. A tag name of '*' is commonly used when a
1732
- group is specified to copy all tags in the group (eg. 'XMP:*'). A special
1733
- feature allows tag names of the form 'DSTTAGE<lt>SRCTAG' (or
1730
+ the Type option to 'ValueConv' for this tag only). A leading '+' sets the
1731
+ Replace option to 0 on a per-tag basis (see Options below). Wildcards ('*'
1732
+ and '?') may be used in the tag name. A tag name of '*' is commonly used
1733
+ when a group is specified to copy all tags in the group (eg. 'XMP:*'). A
1734
+ special feature allows tag names of the form 'DSTTAGE<lt>SRCTAG' (or
1734
1735
  'SRCTAGE<gt>DSTTAG') to be specified to copy information to a tag with a
1735
1736
  different name or a specified group. Both 'SRCTAG' and 'DSTTAG' may contain
1736
1737
  wildcards and/or be prefixed by a group name (eg.
@@ -1769,7 +1770,9 @@ copies all information while preserving the original family 1 groups, while
1769
1770
  The options are the same was for L</SetNewValue>, and are passed directly
1770
1771
  to L</SetNewValue> internally, with a few exceptions:
1771
1772
 
1772
- - The Replace option defaults to 1 instead of 0 as with L</SetNewValue>.
1773
+ - The Replace option defaults to 1 instead of 0 as with L</SetNewValue>,
1774
+ however the tag name argument may be prefixed with '+' to set the Replace
1775
+ option to 0 for this argument only.
1773
1776
 
1774
1777
  - The AddValue or DelValue option is set for individual tags if '+>' or '->'
1775
1778
  (or '+E<lt>' or '-E<lt>') are used.
@@ -1870,6 +1873,31 @@ None.
1870
1873
 
1871
1874
  =back
1872
1875
 
1876
+ =head2 SetAlternateFile
1877
+
1878
+ Specify alternate file from which to read metadata. Tags from the alternate
1879
+ file are available after L</ExtractInfo> is called or during a call to
1880
+ L</SetNewValuesFromFile> by using a family 8 group name (eg. 'File1' in the
1881
+ example below).
1882
+
1883
+ $exifTool->SetAlternateFile(File1 => 'images/test1.jpg');
1884
+
1885
+ =over 4
1886
+
1887
+ =item Inputs:
1888
+
1889
+ 0) ExifTool object reference
1890
+
1891
+ 1) Family 8 group name, case insensitive (eg. 'File1', 'File2'...)
1892
+
1893
+ 2) Name of alternate input file, or undef to reset
1894
+
1895
+ =item Return Values:
1896
+
1897
+ 1 on success, or 0 if the group name is invalid.
1898
+
1899
+ =back
1900
+
1873
1901
  =head2 SetFileModifyDate
1874
1902
 
1875
1903
  Write the filesystem modification or creation time from the new value of the
@@ -2088,6 +2116,7 @@ The group family numbers are currently available:
2088
2116
  5) Metadata Path (eg. JPEG-APP1-IFD0-ExifIFD)
2089
2117
  6) EXIF/TIFF Format (eg. int8u, int32u, undef, string)
2090
2118
  7) Tag ID (eg. ID-271, ID-rights, ID-a9aut)
2119
+ 8) Alternate File Number (eg. File1, File2, File3...)
2091
2120
 
2092
2121
  Families 0 and 1 are based on the file structure, and are similar except
2093
2122
  that family 1 is more specific and sub-divides some groups to give more
@@ -2140,6 +2169,8 @@ non-numerical ID's may or may not have characters other than [-_A-Za-z0-9]
2140
2169
  converted to hex. Note that unlike other group names, the tag ID's of
2141
2170
  family 7 group names are case sensitive (but the leading "ID-" is not).
2142
2171
 
2172
+ Family 8 specifies the alternate file set from a call to L</SetAlternateFile>.
2173
+
2143
2174
  See L</GetAllGroups [static]> for complete lists of group names.
2144
2175
 
2145
2176
  =back
@@ -2392,6 +2423,10 @@ leading "0x" if the HexTagIDs option is set, or decimal otherwise.
2392
2423
  Characters in non-numerical ID's which are not valid in a group name are
2393
2424
  returned as 2 hex digits.)
2394
2425
 
2426
+ =item Family 8 (Alternate File):
2427
+
2428
+ File#
2429
+
2395
2430
  =back
2396
2431
 
2397
2432
  Note: This function may also be called as an ExifTool member function to
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.57
3
+ Version: 12.59
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('12.57.0')
4
+ VERSION = Gem::Version.new('12.59.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: 12.57.0
4
+ version: 12.59.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: 2023-02-23 00:00:00.000000000 Z
12
+ date: 2023-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool