exiftool_vendored 12.98.0 → 13.02.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +73 -1
  3. data/bin/META.json +1 -1
  4. data/bin/META.yml +1 -1
  5. data/bin/README +2 -2
  6. data/bin/arg_files/exif2xmp.args +4 -0
  7. data/bin/arg_files/xmp2exif.args +4 -0
  8. data/bin/config_files/example.config +2 -1
  9. data/bin/exiftool +297 -66
  10. data/bin/lib/Image/ExifTool/APP12.pm +3 -2
  11. data/bin/lib/Image/ExifTool/CBOR.pm +4 -1
  12. data/bin/lib/Image/ExifTool/Canon.pm +36 -26
  13. data/bin/lib/Image/ExifTool/Exif.pm +8 -9
  14. data/bin/lib/Image/ExifTool/FlashPix.pm +5 -9
  15. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  16. data/bin/lib/Image/ExifTool/Geotag.pm +6 -5
  17. data/bin/lib/Image/ExifTool/GoPro.pm +2 -2
  18. data/bin/lib/Image/ExifTool/Import.pm +7 -3
  19. data/bin/lib/Image/ExifTool/JSON.pm +3 -4
  20. data/bin/lib/Image/ExifTool/Jpeg2000.pm +2 -2
  21. data/bin/lib/Image/ExifTool/LNK.pm +1 -1
  22. data/bin/lib/Image/ExifTool/Lytro.pm +2 -2
  23. data/bin/lib/Image/ExifTool/M2TS.pm +2 -2
  24. data/bin/lib/Image/ExifTool/MIE.pm +9 -3
  25. data/bin/lib/Image/ExifTool/MacOS.pm +2 -1
  26. data/bin/lib/Image/ExifTool/Nikon.pm +5 -2
  27. data/bin/lib/Image/ExifTool/PDF.pm +7 -3
  28. data/bin/lib/Image/ExifTool/PhaseOne.pm +2 -1
  29. data/bin/lib/Image/ExifTool/QuickTime.pm +11 -1
  30. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +88 -9
  31. data/bin/lib/Image/ExifTool/TagLookup.pm +14 -9
  32. data/bin/lib/Image/ExifTool/TagNames.pod +37 -20
  33. data/bin/lib/Image/ExifTool/Text.pm +3 -2
  34. data/bin/lib/Image/ExifTool/Validate.pm +2 -2
  35. data/bin/lib/Image/ExifTool/WriteXMP.pl +16 -4
  36. data/bin/lib/Image/ExifTool/Writer.pl +42 -61
  37. data/bin/lib/Image/ExifTool/XMP.pm +13 -3
  38. data/bin/lib/Image/ExifTool/XMPStruct.pl +16 -9
  39. data/bin/lib/Image/ExifTool.pm +190 -77
  40. data/bin/lib/Image/ExifTool.pod +73 -36
  41. data/bin/perl-Image-ExifTool.spec +1 -1
  42. data/lib/exiftool_vendored/version.rb +1 -1
  43. metadata +2 -2
@@ -50,7 +50,7 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.67';
53
+ $VERSION = '3.68';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
@@ -2016,6 +2016,7 @@ my %sPantryItem = (
2016
2016
  Writable => 'integer',
2017
2017
  List => 'Seq',
2018
2018
  AutoSplit => 1,
2019
+ Notes => 'deprecated',
2019
2020
  },
2020
2021
  OECF => {
2021
2022
  Name => 'Opto-ElectricConvFactor',
@@ -2267,7 +2268,7 @@ my %sPantryItem = (
2267
2268
  3 => 'Distant',
2268
2269
  },
2269
2270
  },
2270
- ImageUniqueID => { },
2271
+ ImageUniqueID => { Avoid => 1, Notes => 'moved to exifEX namespace in 2024 spec' },
2271
2272
  GPSVersionID => { Groups => { 2 => 'Location' } },
2272
2273
  GPSLatitude => { Groups => { 2 => 'Location' }, %latConv },
2273
2274
  GPSLongitude => { Groups => { 2 => 'Location' }, %longConv },
@@ -2509,6 +2510,15 @@ my %sPantryItem = (
2509
2510
  Values => { List => 'Seq', Writable => 'rational' },
2510
2511
  },
2511
2512
  },
2513
+ # new in Exif 3.0
2514
+ ImageUniqueID => { },
2515
+ ImageTitle => { },
2516
+ ImageEditor => { },
2517
+ Photographer => { Groups => { 2 => 'Author' } },
2518
+ CameraFirmware => { Groups => { 2 => 'Camera' } },
2519
+ RAWDevelopingSoftware => { },
2520
+ ImageEditingSoftware => { },
2521
+ MetadataEditingSoftware => { },
2512
2522
  );
2513
2523
 
2514
2524
  # Auxiliary namespace properties (aux) - not fully documented (ref PH)
@@ -3616,7 +3626,7 @@ NoLoop:
3616
3626
  # store the value for this tag
3617
3627
  my $key = $et->FoundTag($tagInfo, $val) or return 0;
3618
3628
  # save original components of rational numbers (used when copying)
3619
- $$et{RATIONAL}{$key} = $rational if defined $rational;
3629
+ $$et{TAG_EXTRA}{$key}{Rational} = $rational if defined $rational;
3620
3630
  # save structure/list information if necessary
3621
3631
  if (@structProps and (@structProps > 1 or defined $structProps[0][1]) and
3622
3632
  not $$et{NO_STRUCT})
@@ -39,8 +39,7 @@ sub SerializeStruct($$;$)
39
39
 
40
40
  if (ref $obj eq 'HASH') {
41
41
  # support hashes with ordered keys
42
- my @keys = $$obj{_ordered_keys_} ? @{$$obj{_ordered_keys_}} : sort keys %$obj;
43
- foreach $key (@keys) {
42
+ foreach $key (Image::ExifTool::OrderedKeys($obj)) {
44
43
  my $hdr = $sfmt ? EscapeJSON($key) . ':' : $key . '=';
45
44
  push @vals, $hdr . SerializeStruct($et, $$obj{$key}, '}');
46
45
  }
@@ -218,7 +217,7 @@ sub DumpStruct($;$)
218
217
  $indent or $indent = '';
219
218
  if (ref $obj eq 'HASH') {
220
219
  print "{\n";
221
- foreach (sort keys %$obj) {
220
+ foreach (Image::ExifTool::OrderedKeys($obj)) {
222
221
  print "$indent $_ = ";
223
222
  DumpStruct($$obj{$_}, "$indent ");
224
223
  }
@@ -253,8 +252,10 @@ sub CheckStruct($$$)
253
252
  ref $struct eq 'HASH' or return wantarray ? (undef, "Expecting $strName structure") : undef;
254
253
 
255
254
  my ($key, $err, $warn, %copy, $rtnVal, $val);
255
+ # copy the ordered keys if they exist
256
+ $copy{_ordered_keys_} = [ ] if $$struct{_ordered_keys_};
256
257
  Key:
257
- foreach $key (keys %$struct) {
258
+ foreach $key (Image::ExifTool::OrderedKeys($struct)) {
258
259
  my $tag = $key;
259
260
  # allow trailing '#' to disable print conversion on a per-field basis
260
261
  my ($type, $fieldInfo);
@@ -377,6 +378,7 @@ Key:
377
378
  $copy{$tag} = \@copy;
378
379
  } elsif ($$fieldInfo{Struct}) {
379
380
  $warn = "Improperly formed structure in $strName $tag";
381
+ next;
380
382
  } else {
381
383
  $et->Sanitize(\$$struct{$key});
382
384
  ($val,$err) = $et->ConvInv($$struct{$key},$fieldInfo,$tag,$strName,$type,'');
@@ -387,6 +389,7 @@ Key:
387
389
  # turn this into a list if necessary
388
390
  $copy{$tag} = $$fieldInfo{List} ? [ $val ] : $val;
389
391
  }
392
+ push @{$copy{_ordered_keys_}}, $tag if $copy{_ordered_keys_}; # save ordered keys
390
393
  }
391
394
  if (%copy or not $warn) {
392
395
  $rtnVal = \%copy;
@@ -562,7 +565,7 @@ sub AddNewStruct($$$$$$)
562
565
  # after all valid structure fields, which is necessary when serializing the XMP later)
563
566
  %$struct or $$struct{'~dummy~'} = '';
564
567
 
565
- foreach $tag (sort keys %$struct) {
568
+ foreach $tag (Image::ExifTool::OrderedKeys($struct)) {
566
569
  my $fieldInfo = $$strTable{$tag};
567
570
  unless ($fieldInfo) {
568
571
  next unless $tag eq '~dummy~'; # check for dummy field
@@ -652,7 +655,8 @@ sub ConvertStruct($$$$;$)
652
655
  my (%struct, $key);
653
656
  my $table = $$tagInfo{Table};
654
657
  $parentID = $$tagInfo{TagID} unless $parentID;
655
- foreach $key (keys %$value) {
658
+ $struct{_ordered_keys_} = [ ] if $$value{_ordered_keys_};
659
+ foreach $key (Image::ExifTool::OrderedKeys($value)) {
656
660
  my $tagID = $parentID . ucfirst($key);
657
661
  my $flatInfo = $$table{$tagID};
658
662
  unless ($flatInfo) {
@@ -669,7 +673,11 @@ sub ConvertStruct($$$$;$)
669
673
  } else {
670
674
  $v = $et->GetValue($flatInfo, $type, $v);
671
675
  }
672
- $struct{$key} = $v if defined $v; # save the converted value
676
+ if (defined $v) {
677
+ $struct{$key} = $v; # save the converted value
678
+ # maintain ordered keys if necessary
679
+ push @{$struct{_ordered_keys_}}, $key if $struct{_ordered_keys_};
680
+ }
673
681
  }
674
682
  return \%struct;
675
683
  } elsif (ref $value eq 'ARRAY') {
@@ -706,7 +714,6 @@ sub RestoreStruct($;$)
706
714
  my $fileOrder = $$et{FILE_ORDER};
707
715
  my $tagExtra = $$et{TAG_EXTRA};
708
716
  foreach $key (keys %{$$et{TAG_INFO}}) {
709
- $$tagExtra{$key} or next;
710
717
  my $structProps = $$tagExtra{$key}{Struct} or next;
711
718
  delete $$tagExtra{$key}{Struct}; # (don't re-use)
712
719
  my $tagInfo = $$et{TAG_INFO}{$key}; # tagInfo for flattened tag
@@ -872,7 +879,7 @@ sub RestoreStruct($;$)
872
879
  }
873
880
  # preserve original flattened tags if requested
874
881
  if ($keepFlat) {
875
- my $extra = $$tagExtra{$key} or next;
882
+ my $extra = $$tagExtra{$key};
876
883
  # restore list behaviour of this flattened tag
877
884
  if ($$extra{NoList}) {
878
885
  $$valueHash{$key} = $$extra{NoList};