exiftool-vendored.pl 12.39.0 → 12.40.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.
@@ -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 25764 tags, with 16462 unique tag names.
15
+ They contain a total of 25775 tags, with 16465 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
@@ -7346,6 +7346,7 @@ Unknown only to reduce the volume of the normal output.
7346
7346
  0x4021 MultiExp Canon MultiExp
7347
7347
  0x4024 FilterInfo Canon FilterInfo
7348
7348
  0x4025 HDRInfo Canon HDRInfo
7349
+ 0x4026 LogInfo Canon LogInfo
7349
7350
  0x4028 AFConfig Canon AFConfig
7350
7351
  0x403f RawBurstModeRoll Canon RawBurstInfo
7351
7352
 
@@ -9515,6 +9516,18 @@ Information about creative filter settings.
9515
9516
  1 HDR int32s
9516
9517
  2 HDREffect int32s
9517
9518
 
9519
+ =head3 Canon LogInfo Tags
9520
+
9521
+ Index4 Tag Name Writable
9522
+ ------ -------- --------
9523
+ 4 CompressionFormat int32s
9524
+ 6 Sharpness int32s
9525
+ 7 Saturation int32s
9526
+ 8 ColorTone int32s
9527
+ 9 ColorSpace2 int32s
9528
+ 10 ColorMatrix int32s
9529
+ 11 CanonLogVersion int32s
9530
+
9518
9531
  =head3 Canon AFConfig Tags
9519
9532
 
9520
9533
  Index4 Tag Name Writable
@@ -13591,6 +13604,8 @@ These tags belong to the ExifTool XMP-ast family 1 group.
13591
13604
  About no
13592
13605
  GPSAltitude no
13593
13606
  GPSAltitudeRef no
13607
+ GPSImgDirection no
13608
+ GPSImgDirectionRef no
13594
13609
  GPSLatitude no
13595
13610
  GPSLatitudeRef no
13596
13611
  GPSLongitude no
@@ -14317,6 +14332,7 @@ These tags are used by the Z9.
14317
14332
  434 FlashOutput? int8u
14318
14333
  444 FlashRemoteControl? int8u
14319
14334
  456 FlashWirelessOption? int8u
14335
+ 528 AFAreaMode int8u
14320
14336
  530 VRMode int8u
14321
14337
  534 BracketSet int8u
14322
14338
  536 BracketProgram int8u
@@ -14710,7 +14726,7 @@ These tags are used by the D4S, D750, D810, D5500, D7200 (FlashInfoVersion
14710
14726
  0 AFInfo2Version no
14711
14727
  62 AFImageWidth int16u
14712
14728
  64 AFImageHeight int16u
14713
- 67 FocusPositionHoriontal int8u~
14729
+ 67 FocusPositionHorizontal int8u~
14714
14730
  69 FocusPositionVertical int8u~
14715
14731
  70 AFAreaWidth int16u
14716
14732
  72 AFAreaHeight int16u
@@ -37010,6 +37026,7 @@ FileName.
37010
37026
  NewGUID ExifTool no
37011
37027
  Now ExifTool no
37012
37028
  OtherImage File no
37029
+ PageCount File no
37013
37030
  PreviewImage File yes
37014
37031
  PreviewPDF File no
37015
37032
  PreviewPNG File no
@@ -1391,9 +1391,13 @@ sub WriteQuickTime($$$)
1391
1391
  $pos += $siz;
1392
1392
  }
1393
1393
  if ($msg) {
1394
- my $grp = $$et{CUR_WRITE_GROUP} || $parent;
1395
- $et->Error("$msg for $grp");
1396
- return $rtnErr;
1394
+ # (allow empty sample description for 'url ' handler type)
1395
+ if ($$et{HandlerType} or length($buff) > 8) {
1396
+ my $grp = $$et{CUR_WRITE_GROUP} || $parent;
1397
+ $et->Error("$msg for $grp");
1398
+ return $rtnErr;
1399
+ }
1400
+ $flg = 1; # (this seems to be the case)
1397
1401
  }
1398
1402
  $$et{QtDataFlg} = $flg;
1399
1403
  }
@@ -298,6 +298,8 @@ sub SetPropertyPath($$;$$$$)
298
298
  $flatInfo = $$tagTablePtr{$flatID};
299
299
  if ($flatInfo) {
300
300
  return if $$flatInfo{PropertyPath};
301
+ } elsif (@$propList > 50) {
302
+ return; # avoid deep recursion
301
303
  } else {
302
304
  # flattened tag doesn't exist, so create it now
303
305
  # (could happen if we were just writing a structure)
@@ -3399,6 +3399,10 @@ NoLoop:
3399
3399
  }
3400
3400
  # save property list for verbose "adding" message unless this tag already exists
3401
3401
  $added = \@tagList unless $$tagTablePtr{$tagID};
3402
+ # if this is an empty structure, we must add a Struct field
3403
+ if (not length $val and $$attrs{'rdf:parseType'} and $$attrs{'rdf:parseType'} eq 'Resource') {
3404
+ $$tagInfo{Struct} = { STRUCT_NAME => 'XMP Unknown' };
3405
+ }
3402
3406
  AddTagToTable($tagTablePtr, $tagID, $tagInfo);
3403
3407
  last;
3404
3408
  }
@@ -3730,7 +3734,11 @@ sub ParseXMPElement($$$;$$$$)
3730
3734
  } elsif ($prop eq 'rdf:Description') {
3731
3735
  # remove unnecessary rdf:Description elements since parseType='Resource'
3732
3736
  # is more efficient (also necessary to make property path consistent)
3733
- $parseResource = 1 if grep /^rdf:Description$/, @$propList;
3737
+ if (grep /^rdf:Description$/, @$propList) {
3738
+ $parseResource = 1;
3739
+ # set parseType so we know this is a structure
3740
+ $attrs{'rdf:parseType'} = 'Resource';
3741
+ }
3734
3742
  } elsif ($prop eq 'xmp:xmpmeta') {
3735
3743
  # patch MicrosoftPhoto unconformity
3736
3744
  $prop = 'x:xmpmeta';
@@ -634,15 +634,14 @@ sub RestoreStruct($;$)
634
634
  local $_;
635
635
  my ($et, $keepFlat) = @_;
636
636
  my ($key, %structs, %var, %lists, $si, %listKeys, @siList);
637
- my $ex = $$et{TAG_EXTRA};
638
637
  my $valueHash = $$et{VALUE};
639
638
  my $fileOrder = $$et{FILE_ORDER};
640
639
  my $tagExtra = $$et{TAG_EXTRA};
641
640
  foreach $key (keys %{$$et{TAG_INFO}}) {
642
- $$ex{$key} or next;
643
- my $structProps = $$ex{$key}{Struct} or next;
644
- delete $$ex{$key}{Struct}; # (don't re-use)
645
- my $tagInfo = $$et{TAG_INFO}{$key}; # tagInfo for flattened tag
641
+ $$tagExtra{$key} or next;
642
+ my $structProps = $$tagExtra{$key}{Struct} or next;
643
+ delete $$tagExtra{$key}{Struct}; # (don't re-use)
644
+ my $tagInfo = $$et{TAG_INFO}{$key}; # tagInfo for flattened tag
646
645
  my $table = $$tagInfo{Table};
647
646
  my $prop = shift @$structProps;
648
647
  my $tag = $$prop[0];
@@ -829,8 +828,23 @@ sub RestoreStruct($;$)
829
828
  $var{$_} and push @siList, $_ foreach keys %structs;
830
829
  # save new structures in the same order they were read from file
831
830
  foreach $si (sort { $var{$a}[1] <=> $var{$b}[1] } @siList) {
832
- $key = $et->FoundTag($var{$si}[0], '');
833
- $$valueHash{$key} = $structs{$si};
831
+ # test to see if a tag for this structure has already been generated
832
+ # (this could happen only if one of the structures in a list was empty)
833
+ $key = $var{$si}[0]{Name};
834
+ my $found;
835
+ if ($$valueHash{$key}) {
836
+ my @keys = grep /^$key( \(\d+\))?$/, keys %$valueHash;
837
+ foreach $key (@keys) {
838
+ next unless $$valueHash{$key} eq $structs{$si};
839
+ $found = 1;
840
+ last;
841
+ }
842
+ }
843
+ unless ($found) {
844
+ # otherwise, generate a new tag for this structure
845
+ $key = $et->FoundTag($var{$si}[0], '');
846
+ $$valueHash{$key} = $structs{$si};
847
+ }
834
848
  $$fileOrder{$key} = $var{$si}[1];
835
849
  }
836
850
  }
@@ -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.39';
32
+ $VERSION = '12.40';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -320,7 +320,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
320
320
  FPF => ['FPF', 'FLIR Public image Format'],
321
321
  FPX => ['FPX', 'FlashPix'],
322
322
  GIF => ['GIF', 'Compuserve Graphics Interchange Format'],
323
- GPR => ['TIFF', 'GoPro RAW'],
323
+ GPR => ['TIFF', 'General Purpose RAW'], # https://gopro.github.io/gpr/
324
324
  GZ => 'GZIP',
325
325
  GZIP => ['GZIP', 'GNU ZIP compressed archive'],
326
326
  HDP => ['TIFF', 'Windows HD Photo'],
@@ -1799,6 +1799,7 @@ my %systemTagsNotes = (
1799
1799
  Writable => 1,
1800
1800
  Protected => 1,
1801
1801
  },
1802
+ PageCount => { Notes => 'the number of pages in a multi-page TIFF document' },
1802
1803
  );
1803
1804
 
1804
1805
  # tags defined by UserParam option (added at runtime)
@@ -7448,7 +7449,11 @@ sub DoProcessTIFF($$;$)
7448
7449
  # this looks like a BigTIFF image
7449
7450
  $raf->Seek(0);
7450
7451
  require Image::ExifTool::BigTIFF;
7451
- return 1 if Image::ExifTool::BigTIFF::ProcessBTF($self, $dirInfo);
7452
+ my $result = Image::ExifTool::BigTIFF::ProcessBTF($self, $dirInfo);
7453
+ if ($result) {
7454
+ $self->FoundTag(PageCount => $$self{PageCount}) if $$self{MultiPage};
7455
+ return 1;
7456
+ }
7452
7457
  } elsif ($identifier == 0x4f52 or $identifier == 0x5352) {
7453
7458
  # Olympus ORF image (set FileType now because base type is 'ORF')
7454
7459
  $self->SetFileType($fileType = 'ORF');
@@ -7541,6 +7546,9 @@ sub DoProcessTIFF($$;$)
7541
7546
  # override whatever FileType we set since we now know it is DNG
7542
7547
  $self->OverrideFileType($$self{TIFF_TYPE} = 'DNG');
7543
7548
  }
7549
+ if ($$self{TIFF_TYPE} eq 'TIFF') {
7550
+ $self->FoundTag(PageCount => $$self{PageCount}) if $$self{MultiPage};
7551
+ }
7544
7552
  return 1;
7545
7553
  }
7546
7554
  #
@@ -593,12 +593,13 @@ different when copying tags with L</SetNewValuesFromFile>.
593
593
  =item DateFormat
594
594
 
595
595
  Format for printing date/time values. See C<strftime> in the L<POSIX>
596
- package for details about the format string. If date can not be converted,
597
- value is left unchanged unless the StrictDate option is set. Timezones are
598
- ignored. The inverse conversion (ie. when calling L</SetNewValue>) is
599
- performed only if POSIX::strptime or Time::Piece is installed. The default
600
- setting of undef causes date/time values to remain in standard EXIF format
601
- (similar to a DateFormat of "%Y:%m:%d %H:%M:%S").
596
+ package and L<https://exiftool.org/filename.html#codes> for details about
597
+ the format string. If the date can not be converted, the value is left
598
+ unchanged unless the StrictDate option is set. Timezones are ignored. The
599
+ inverse conversion (ie. when calling L</SetNewValue>) is performed only if
600
+ POSIX::strptime or Time::Piece is installed. The default setting of undef
601
+ causes date/time values to remain in standard EXIF format (similar to a
602
+ DateFormat of "%Y:%m:%d %H:%M:%S").
602
603
 
603
604
  =item Duplicates
604
605
 
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.39
3
+ Version: 12.40
4
4
  Release: 1
5
5
  License: Artistic/GPL
6
6
  Group: Development/Libraries/Perl
@@ -21,10 +21,10 @@
21
21
  # 10) Copy zip archive to web servers.
22
22
  # 11) Update zip file version in link and text of html/index.html.
23
23
  #------------------------------------------------------------------------------
24
- -T exiftool-12.39
25
- #--info=FileVersion=12.3.9.0
26
- #--info=ProductVersion=12.3.9.0
27
- ##"--info=Build Date=2022:01:13 07:56:50-05:00"
24
+ -T exiftool-12.40
25
+ #--info=FileVersion=12.4.0.0
26
+ #--info=ProductVersion=12.4.0.0
27
+ ##"--info=Build Date=2022:02:08 10:30:47-05:00"
28
28
  ##"--info=Bundled Perl Version=ActivePerl 5.24.0"
29
29
  ##"--info=LegalCopyright=Copyright (c) 2003-2022, Phil Harvey"
30
30
  ##"--info=ProductName=ExifTool"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exiftool-vendored.pl",
3
- "version": "12.39.0",
3
+ "version": "12.40.0",
4
4
  "description": "Vendored perl ExifTool for Node.js",
5
5
  "main": "./index.js",
6
6
  "homepage": "https://github.com/mceachen/exiftool-vendored.pl#readme",
@@ -31,7 +31,7 @@
31
31
  "update": "bash -c ./update.sh"
32
32
  },
33
33
  "devDependencies": {
34
- "mocha": "^9.1.4",
34
+ "mocha": "^9.2.0",
35
35
  "prettier": "^2.5.1",
36
36
  "rimraf": "^3.0.2"
37
37
  }