exiftool-vendored.exe 12.28.0 → 12.34.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 (49) hide show
  1. package/bin/exiftool_files/Changes +108 -5
  2. package/bin/exiftool_files/README +2 -2
  3. package/bin/exiftool_files/arg_files/xmp2exif.args +2 -1
  4. package/bin/exiftool_files/config_files/example.config +1 -1
  5. package/bin/exiftool_files/exiftool.pl +40 -26
  6. package/bin/exiftool_files/fmt_files/gpx.fmt +1 -1
  7. package/bin/exiftool_files/fmt_files/gpx_wpt.fmt +1 -1
  8. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +16 -3
  9. package/bin/exiftool_files/lib/Image/ExifTool/CBOR.pm +331 -0
  10. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +35 -5
  11. package/bin/exiftool_files/lib/Image/ExifTool/Charset.pm +2 -0
  12. package/bin/exiftool_files/lib/Image/ExifTool/DPX.pm +13 -2
  13. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +98 -4
  14. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +1 -0
  15. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +13 -2
  16. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +16 -1
  17. package/bin/exiftool_files/lib/Image/ExifTool/ICC_Profile.pm +96 -4
  18. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +15 -3
  19. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +7 -3
  20. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +60 -26
  21. package/bin/exiftool_files/lib/Image/ExifTool/Lang/nl.pm +60 -59
  22. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +81 -14
  23. package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +2 -2
  24. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +12 -3
  25. package/bin/exiftool_files/lib/Image/ExifTool/NikonSettings.pm +10 -2
  26. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +8 -1
  27. package/bin/exiftool_files/lib/Image/ExifTool/Other.pm +93 -0
  28. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +11 -12
  29. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +7 -6
  30. package/bin/exiftool_files/lib/Image/ExifTool/Panasonic.pm +2 -2
  31. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +2 -1
  32. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +67 -9
  33. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +133 -119
  34. package/bin/exiftool_files/lib/Image/ExifTool/README +9 -2
  35. package/bin/exiftool_files/lib/Image/ExifTool/RIFF.pm +6 -1
  36. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +47 -10
  37. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +80 -32
  38. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +139 -4
  39. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +224 -30
  40. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -0
  41. package/bin/exiftool_files/lib/Image/ExifTool/WritePNG.pl +2 -0
  42. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +17 -3
  43. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +43 -0
  44. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +21 -8
  45. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +4 -1
  46. package/bin/exiftool_files/lib/Image/ExifTool/XMPStruct.pl +3 -1
  47. package/bin/exiftool_files/lib/Image/ExifTool.pm +8892 -8839
  48. package/bin/exiftool_files/lib/Image/ExifTool.pod +24 -15
  49. package/package.json +3 -3
@@ -179,6 +179,8 @@ sub BuildTextChunk($$$$$)
179
179
  $tag =~ s/-$lang$//; # remove language code from tagID
180
180
  } elsif ($$et{OPTIONS}{Charset} ne 'Latin' and $val =~ /[\x80-\xff]/) {
181
181
  $iTXt = 1; # write as iTXt if it contains non-Latin special characters
182
+ } elsif ($$tagInfo{iTXt}) {
183
+ $iTXt = 1; # write as iTXt if specified in user-defined tag
182
184
  }
183
185
  }
184
186
  if ($comp) {
@@ -849,7 +849,7 @@ sub WriteQuickTime($$$)
849
849
  # --> hold this terminator to the end
850
850
  $term = $hdr;
851
851
  } elsif ($n != 0) {
852
- $et->Error('File format error');
852
+ $et->Error("Unknown $n bytes at end of file", 1);
853
853
  }
854
854
  last;
855
855
  }
@@ -1067,6 +1067,9 @@ sub WriteQuickTime($$$)
1067
1067
  # 3=optional base offset, 4=optional item ID)
1068
1068
  ChunkOffset => \@chunkOffset,
1069
1069
  );
1070
+ # set InPlace flag so XMP will be padded properly when
1071
+ # QuickTimePad is used if this is an XMP directory
1072
+ $subdirInfo{InPlace} = 2 if $et->Options('QuickTimePad');
1070
1073
  # pass the header pointer if necessary (for EXIF IFD's
1071
1074
  # where the Base offset is at the end of the header)
1072
1075
  if ($hdrLen and $hdrLen < $size) {
@@ -1089,7 +1092,9 @@ sub WriteQuickTime($$$)
1089
1092
  $$et{CHANGED} = $oldChanged if $$et{DemoteErrors} > 1;
1090
1093
  delete $$et{DemoteErrors};
1091
1094
  }
1092
- if (defined $newData and not length $newData and $$tagTablePtr{PERMANENT}) {
1095
+ if (defined $newData and not length $newData and ($$tagInfo{Permanent} or
1096
+ ($$tagTablePtr{PERMANENT} and not defined $$tagInfo{Permanent})))
1097
+ {
1093
1098
  # do nothing if trying to delete tag from a PERMANENT table
1094
1099
  $$et{CHANGED} = $oldChanged;
1095
1100
  undef $newData;
@@ -1097,7 +1102,9 @@ sub WriteQuickTime($$$)
1097
1102
  $$et{CUR_WRITE_GROUP} = $oldWriteGroup;
1098
1103
  SetByteOrder('MM');
1099
1104
  # add back header if necessary
1100
- if ($start and defined $newData and length $newData) {
1105
+ if ($start and defined $newData and (length $newData or
1106
+ (defined $$tagInfo{Permanent} and not $$tagInfo{Permanent})))
1107
+ {
1101
1108
  $newData = substr($buff,0,$start) . $newData;
1102
1109
  $$_[1] += $start foreach @chunkOffset;
1103
1110
  }
@@ -1327,6 +1334,13 @@ sub WriteQuickTime($$$)
1327
1334
  }
1328
1335
  # write the new atom if it was modified
1329
1336
  if (defined $newData) {
1337
+ my $sizeDiff = length($buff) - length($newData);
1338
+ if ($sizeDiff > 0 and $$tagInfo{PreservePadding} and $et->Options('QuickTimePad')) {
1339
+ $newData .= "\0" x $sizeDiff;
1340
+ $et->VPrint(1, " ($$tagInfo{Name} padded to original size)");
1341
+ } elsif ($sizeDiff) {
1342
+ $et->VPrint(1, " ($$tagInfo{Name} changed size)");
1343
+ }
1330
1344
  my $len = length($newData) + 8;
1331
1345
  $len > 0x7fffffff and $et->Error("$$tagInfo{Name} to large to write"), last;
1332
1346
  # update size in ChunkOffset list for modified 'uuid' atom
@@ -574,6 +574,9 @@ sub SetNewValue($;$$%)
574
574
  my $pre = $wantGroup ? $wantGroup . ':' : '';
575
575
  $err = "Tag '$pre${origTag}' is not defined";
576
576
  $err .= ' or has a bad language code' if $origTag =~ /-/;
577
+ if (not $pre and uc($origTag) eq 'TAG') {
578
+ $err .= " (specify a writable tag name, not '${origTag}' literally)"
579
+ }
577
580
  } else {
578
581
  $err = "Invalid tag name '${tag}'";
579
582
  $err .= " (remove the leading '\$')" if $tag =~ /^\$/;
@@ -2071,6 +2074,46 @@ sub SetSystemTags($$)
2071
2074
  last;
2072
2075
  }
2073
2076
  }
2077
+ # delete Windows Zone.Identifier if specified
2078
+ my $zhash = $self->GetNewValueHash($Image::ExifTool::Extra{ZoneIdentifier});
2079
+ if ($zhash) {
2080
+ my $res = -1;
2081
+ if ($^O ne 'MSWin32') {
2082
+ $self->Warn('ZoneIdentifer is a Windows-only tag');
2083
+ } elsif (ref $file) {
2084
+ $self->Warn('Writing ZoneIdentifer requires a file name');
2085
+ } elsif (defined $self->GetNewValue('ZoneIdentifier', \$zhash)) {
2086
+ $self->Warn('ZoneIndentifier may only be delted');
2087
+ } elsif (not eval { require Win32API::File }) {
2088
+ $self->Warn('Install Win32API::File to write ZoneIdentifier');
2089
+ } else {
2090
+ my ($wattr, $wide);
2091
+ my $zfile = "${file}:Zone.Identifier";
2092
+ if ($self->EncodeFileName($zfile)) {
2093
+ $wide = 1;
2094
+ $wattr = eval { Win32API::File::GetFileAttributesW($zfile) };
2095
+ } else {
2096
+ $wattr = eval { Win32API::File::GetFileAttributes($zfile) };
2097
+ }
2098
+ if ($wattr == Win32API::File::INVALID_FILE_ATTRIBUTES()) {
2099
+ $res = 0; # file doesn't exist, nothing to do
2100
+ } elsif ($wattr & Win32API::File::FILE_ATTRIBUTE_READONLY()) {
2101
+ $self->Warn('Zone.Identifier stream is read-only');
2102
+ } else {
2103
+ if ($wide) {
2104
+ $res = 1 if eval { Win32API::File::DeleteFileW($zfile) };
2105
+ } else {
2106
+ $res = 1 if eval { Win32API::File::DeleteFile($zfile) };
2107
+ }
2108
+ if ($res > 0) {
2109
+ $self->VPrint(0, " Deleting Zone.Identifier stream\n");
2110
+ } else {
2111
+ $self->Warn('Error deleting Zone.Identifier stream');
2112
+ }
2113
+ }
2114
+ }
2115
+ $result = $res if $res == 1 or not $result;
2116
+ }
2074
2117
  return $result;
2075
2118
  }
2076
2119
 
@@ -50,7 +50,7 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.43';
53
+ $VERSION = '3.47';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
@@ -1533,6 +1533,9 @@ my %sPantryItem = (
1533
1533
  CameraProfile => { },
1534
1534
  LookTable => { },
1535
1535
  ToneCurvePV2012 => { List => 'Seq' },
1536
+ ToneCurvePV2012Red => { List => 'Seq' },
1537
+ ToneCurvePV2012Green => { List => 'Seq' },
1538
+ ToneCurvePV2012Blue => { List => 'Seq' },
1536
1539
  },
1537
1540
  },
1538
1541
  }
@@ -2017,6 +2020,11 @@ my %sPantryItem = (
2017
2020
  Groups => { 2 => 'Location' },
2018
2021
  Writable => 'integer',
2019
2022
  PrintConv => {
2023
+ OTHER => sub {
2024
+ my ($val, $inv) = @_;
2025
+ return undef unless $inv and $val =~ /^([-+0-9])/;
2026
+ return($1 eq '-' ? 1 : 0);
2027
+ },
2020
2028
  0 => 'Above Sea Level',
2021
2029
  1 => 'Below Sea Level',
2022
2030
  },
@@ -2134,8 +2142,8 @@ my %sPantryItem = (
2134
2142
  NAMESPACE => 'exifEX',
2135
2143
  PRIORITY => 0, # not as reliable as actual EXIF tags
2136
2144
  NOTES => q{
2137
- EXIF tags added by the EXIF 2.31 for XMP specification (see
2138
- L<http://www.cipa.jp/std/documents/e/DC-X010-2017.pdf>).
2145
+ EXIF tags added by the EXIF 2.32 for XMP specification (see
2146
+ L<https://cipa.jp/std/documents/download_e.html?DC-010-2020_E>).
2139
2147
  },
2140
2148
  Gamma => { Writable => 'rational' },
2141
2149
  PhotographicSensitivity => { Writable => 'integer' },
@@ -2341,6 +2349,9 @@ my %sPantryItem = (
2341
2349
  Scene => { Groups => { 2 => 'Other' }, List => 'Bag' },
2342
2350
  SubjectCode => { Groups => { 2 => 'Other' }, List => 'Bag' },
2343
2351
  # Copyright - have seen this in a sample (Jan 2021), but I think it is non-standard
2352
+ # new IPTC Core 1.3 properties
2353
+ AltTextAccessibility => { Groups => { 2 => 'Other' }, Writable => 'lang-alt' },
2354
+ ExtDescrAccessibility => { Groups => { 2 => 'Other' }, Writable => 'lang-alt' },
2344
2355
  );
2345
2356
 
2346
2357
  # Adobe Lightroom namespace properties (lr) (ref PH)
@@ -3955,7 +3966,7 @@ sub ProcessXMP($$;$)
3955
3966
  } elsif ($1 eq 'REDXIF') {
3956
3967
  $type = 'RMD';
3957
3968
  $mime = 'application/xml';
3958
- } else {
3969
+ } elsif ($1 ne 'fcpxml') { # Final Cut Pro XML
3959
3970
  return 0;
3960
3971
  }
3961
3972
  } elsif ($buf2 =~ /<svg[\s>]/) {
@@ -3965,14 +3976,16 @@ sub ProcessXMP($$;$)
3965
3976
  } elsif ($buf2 =~ /<plist[\s>]/) {
3966
3977
  $type = 'PLIST';
3967
3978
  }
3968
- if ($isSVG and $$et{XMP_CAPTURE}) {
3969
- $et->Error("ExifTool does not yet support writing of SVG images");
3970
- return 0;
3971
- }
3972
3979
  }
3973
3980
  $isXML = 1;
3974
3981
  } elsif ($2 eq '<rdf:RDF') {
3975
3982
  $isRDF = 1; # recognize XMP without x:xmpmeta element
3983
+ } elsif ($2 eq '<svg') {
3984
+ $isSVG = $isXML = 1;
3985
+ }
3986
+ if ($isSVG and $$et{XMP_CAPTURE}) {
3987
+ $et->Error("ExifTool does not yet support writing of SVG images");
3988
+ return 0;
3976
3989
  }
3977
3990
  if ($buff =~ /^\0\0/) {
3978
3991
  $fmt = 'N'; # UTF-32 MM with or without BOM
@@ -539,7 +539,8 @@ my %sImageRegion = ( # new in 1.5
539
539
  NOTES => q{
540
540
  This table contains tags defined by the IPTC Extension schema version 1.5.
541
541
  The actual namespace prefix is "Iptc4xmpExt", but ExifTool shortens this for
542
- the family 1 group name. (see L<http://www.iptc.org/IPTC4XMP/>)
542
+ the family 1 group name. (see
543
+ L<http://www.iptc.org/standards/photo-metadata/iptc-standard/>)
543
544
  },
544
545
  AboutCvTerm => {
545
546
  Struct => \%sCVTermDetails,
@@ -796,6 +797,8 @@ my %sImageRegion = ( # new in 1.5
796
797
  audioBitsPerSample => { Groups => { 2 => 'Audio' }, Writable => 'integer' },
797
798
  # new IPTC Extension schema 1.5 property
798
799
  ImageRegion => { Groups => { 2 => 'Image' }, List => 'Bag', Struct => \%sImageRegion },
800
+ # new Extension 1.6 property
801
+ EventId => { Name => 'EventID', List => 'Bag' },
799
802
  );
800
803
 
801
804
  #------------------------------------------------------------------------------
@@ -32,7 +32,9 @@ sub SerializeStruct($;$)
32
32
  my ($key, $val, @vals, $rtnVal);
33
33
 
34
34
  if (ref $obj eq 'HASH') {
35
- foreach $key (sort keys %$obj) {
35
+ # support hashes with ordered keys
36
+ my @keys = $$obj{_ordered_keys_} ? @{$$obj{_ordered_keys_}} : sort keys %$obj;
37
+ foreach $key (@keys) {
36
38
  push @vals, $key . '=' . SerializeStruct($$obj{$key}, '}');
37
39
  }
38
40
  $rtnVal = '{' . join(',', @vals) . '}';