exiftool_vendored 12.76.1 → 12.81.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +105 -4
  3. data/bin/MANIFEST +29 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +4 -3
  7. data/bin/config_files/acdsee.config +37 -57
  8. data/bin/config_files/example.config +16 -2
  9. data/bin/exiftool +102 -31
  10. data/bin/lib/Image/ExifTool/Canon.pm +12 -9
  11. data/bin/lib/Image/ExifTool/CanonVRD.pm +8 -2
  12. data/bin/lib/Image/ExifTool/Exif.pm +52 -4
  13. data/bin/lib/Image/ExifTool/FujiFilm.pm +14 -5
  14. data/bin/lib/Image/ExifTool/GPS.pm +5 -3
  15. data/bin/lib/Image/ExifTool/GeoLang/cs.pm +978 -0
  16. data/bin/lib/Image/ExifTool/GeoLang/de.pm +1975 -0
  17. data/bin/lib/Image/ExifTool/GeoLang/en_ca.pm +44 -0
  18. data/bin/lib/Image/ExifTool/GeoLang/en_gb.pm +124 -0
  19. data/bin/lib/Image/ExifTool/GeoLang/es.pm +2921 -0
  20. data/bin/lib/Image/ExifTool/GeoLang/fi.pm +1116 -0
  21. data/bin/lib/Image/ExifTool/GeoLang/fr.pm +3171 -0
  22. data/bin/lib/Image/ExifTool/GeoLang/it.pm +2750 -0
  23. data/bin/lib/Image/ExifTool/GeoLang/ja.pm +10256 -0
  24. data/bin/lib/Image/ExifTool/GeoLang/ko.pm +4499 -0
  25. data/bin/lib/Image/ExifTool/GeoLang/nl.pm +1270 -0
  26. data/bin/lib/Image/ExifTool/GeoLang/pl.pm +3019 -0
  27. data/bin/lib/Image/ExifTool/GeoLang/ru.pm +18220 -0
  28. data/bin/lib/Image/ExifTool/GeoLang/sk.pm +441 -0
  29. data/bin/lib/Image/ExifTool/GeoLang/sv.pm +714 -0
  30. data/bin/lib/Image/ExifTool/GeoLang/tr.pm +452 -0
  31. data/bin/lib/Image/ExifTool/GeoLang/zh_cn.pm +2225 -0
  32. data/bin/lib/Image/ExifTool/GeoLang/zh_tw.pm +72 -0
  33. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  34. data/bin/lib/Image/ExifTool/Geolocation.pm +935 -0
  35. data/bin/lib/Image/ExifTool/Geotag.pm +14 -2
  36. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -1
  37. data/bin/lib/Image/ExifTool/Import.pm +5 -2
  38. data/bin/lib/Image/ExifTool/JSON.pm +15 -10
  39. data/bin/lib/Image/ExifTool/M2TS.pm +32 -4
  40. data/bin/lib/Image/ExifTool/MWG.pm +1 -0
  41. data/bin/lib/Image/ExifTool/MacOS.pm +19 -4
  42. data/bin/lib/Image/ExifTool/MakerNotes.pm +2 -2
  43. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  44. data/bin/lib/Image/ExifTool/Nikon.pm +331 -23
  45. data/bin/lib/Image/ExifTool/NikonCustom.pm +55 -1
  46. data/bin/lib/Image/ExifTool/Ogg.pm +3 -2
  47. data/bin/lib/Image/ExifTool/Olympus.pm +4 -1
  48. data/bin/lib/Image/ExifTool/OpenEXR.pm +37 -19
  49. data/bin/lib/Image/ExifTool/PDF.pm +5 -5
  50. data/bin/lib/Image/ExifTool/PNG.pm +3 -3
  51. data/bin/lib/Image/ExifTool/Pentax.pm +1 -1
  52. data/bin/lib/Image/ExifTool/QuickTime.pm +195 -12
  53. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +253 -237
  54. data/bin/lib/Image/ExifTool/README +6 -5
  55. data/bin/lib/Image/ExifTool/Sony.pm +1 -1
  56. data/bin/lib/Image/ExifTool/TagLookup.pm +4871 -4752
  57. data/bin/lib/Image/ExifTool/TagNames.pod +722 -383
  58. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +43 -9
  59. data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
  60. data/bin/lib/Image/ExifTool/Writer.pl +65 -8
  61. data/bin/lib/Image/ExifTool/XMP.pm +18 -2
  62. data/bin/lib/Image/ExifTool/XMP2.pl +64 -0
  63. data/bin/lib/Image/ExifTool.pm +265 -49
  64. data/bin/lib/Image/ExifTool.pod +63 -25
  65. data/bin/perl-Image-ExifTool.spec +2 -2
  66. data/lib/exiftool_vendored/version.rb +1 -1
  67. metadata +22 -2
@@ -29,7 +29,7 @@ use vars qw($VERSION);
29
29
  use Image::ExifTool qw(:Public);
30
30
  use Image::ExifTool::GPS;
31
31
 
32
- $VERSION = '1.74';
32
+ $VERSION = '1.75';
33
33
 
34
34
  sub JITTER() { return 2 } # maximum time jitter
35
35
 
@@ -1109,7 +1109,7 @@ sub SetGeoValues($$;$)
1109
1109
  $iExt = $i1;
1110
1110
  }
1111
1111
  if (abs($time - $tn) > $geoMaxExtSecs) {
1112
- $err or $err = 'Time is too far from nearest GPS fix'.' '.abs($time-$tn).' '.$geoMaxExtSecs;
1112
+ $err or $err = 'Time is too far from nearest GPS fix'.' '.abs($time-$tn).' > '.$geoMaxExtSecs;
1113
1113
  $et->VPrint(2, ' Nearest fix: ', PrintFixTime($tn), "\n") if $verbose > 2;
1114
1114
  $fix = { } if $$geotag{DateTimeOnly};
1115
1115
  } else {
@@ -1218,6 +1218,18 @@ Category: foreach $category (qw{pos track alt orient atemp}) {
1218
1218
  $coords .= " $alt";
1219
1219
  }
1220
1220
  @r = $et->SetNewValue(GPSCoordinates => $coords, %opts);
1221
+ # also Geolocate if specified
1222
+ my $nvHash;
1223
+ my $geoloc = $et->GetNewValue('Geolocate', \$nvHash);
1224
+ if ($geoloc and $geoloc =~ /\bgeotag\b/i) {
1225
+ my $tag = ($$nvHash{WantGroup} ? "$$nvHash{WantGroup}:" : '') . 'Geolocate';
1226
+ # pass along any regular expressions to qualify geolocation search
1227
+ my $parms = join ',', grep m(/), split /\s*,\s*/, $geoloc;
1228
+ $parms and $parms = ",$parms,both";
1229
+ $et->SetNewValue($tag => "$$fix{lat},$$fix{lon}$parms");
1230
+ # (the Geolocate tag will be restored to its original value
1231
+ # by RestoreNewValues before the next file in batch processing)
1232
+ }
1221
1233
  return $err if $qt; # all done if writing to QuickTime only
1222
1234
  # (capture error messages by calling SetNewValue in list context)
1223
1235
  @r = $et->SetNewValue(GPSLatitude => $$fix{lat}, %opts);
@@ -13,7 +13,7 @@ use vars qw($VERSION);
13
13
  use Image::ExifTool; # only for FinishTiffDump()
14
14
  use Image::ExifTool::HTML qw(EscapeHTML);
15
15
 
16
- $VERSION = '1.41';
16
+ $VERSION = '1.42';
17
17
 
18
18
  sub DumpTable($$$;$$$$$$);
19
19
  sub Open($$$;@);
@@ -769,6 +769,7 @@ sub FinishTiffDump($$$)
769
769
  PreviewImageStart => 'PreviewImageLength',
770
770
  JpgFromRawStart => 'JpgFromRawLength',
771
771
  OtherImageStart => 'OtherImageLength',
772
+ PreviewJXLStart => 'PreviewJXLLength',
772
773
  ImageOffset => 'ImageByteCount',
773
774
  AlphaOffset => 'AlphaByteCount',
774
775
  MPImageStart => 'MPImageLength',
@@ -12,7 +12,7 @@ require Exporter;
12
12
 
13
13
  use vars qw($VERSION @ISA @EXPORT_OK);
14
14
 
15
- $VERSION = '1.11';
15
+ $VERSION = '1.12';
16
16
  @ISA = qw(Exporter);
17
17
  @EXPORT_OK = qw(ReadCSV ReadJSON);
18
18
 
@@ -238,7 +238,7 @@ Tok: for (;;) {
238
238
 
239
239
  #------------------------------------------------------------------------------
240
240
  # Read JSON file
241
- # Inputs: 0) JSON file name, file ref or RAF ref, 1) database hash ref,
241
+ # Inputs: 0) JSON file name, file ref, RAF ref or SCALAR ref, 1) database hash ref,
242
242
  # 2) flag to delete "-" tags, 3) character set
243
243
  # Returns: undef on success, or error string
244
244
  sub ReadJSON($$;$$)
@@ -255,6 +255,9 @@ sub ReadJSON($$;$$)
255
255
  } elsif (ref $file eq 'GLOB') {
256
256
  $raf = File::RandomAccess->new($file);
257
257
  $file = 'JSON file';
258
+ } elsif (ref $file eq 'SCALAR') {
259
+ $raf = File::RandomAccess->new($file);
260
+ $file = 'in memory';
258
261
  } else {
259
262
  open JSONFILE, $file or return "Error opening JSON file '${file}'";
260
263
  binmode JSONFILE;
@@ -14,7 +14,7 @@ use vars qw($VERSION);
14
14
  use Image::ExifTool qw(:DataAccess :Utils);
15
15
  use Image::ExifTool::Import;
16
16
 
17
- $VERSION = '1.07';
17
+ $VERSION = '1.08';
18
18
 
19
19
  sub ProcessJSON($$);
20
20
  sub ProcessTag($$$$%);
@@ -60,15 +60,20 @@ sub FoundTag($$$$%)
60
60
  # avoid conflict with special table entries
61
61
  $tag .= '!' if $Image::ExifTool::specialTags{$tag};
62
62
 
63
- # use underline instead of colon if necessary in tag name
64
- $tag =~ s/([A-Z]):([A-Z]{2})/${1}_$2/g;
65
-
66
- AddTagToTable($tagTablePtr, $tag, {
67
- Name => Image::ExifTool::MakeTagName($tag),
68
- %flags,
69
- Temporary => 1,
70
- }) unless $$tagTablePtr{$tag};
71
-
63
+ unless ($$tagTablePtr{$tag}) {
64
+ my $name = $tag;
65
+ $name =~ tr/:/_/; # use underlines in place of colons in tag name
66
+ $name =~ s/^c2pa/C2PA/i; # hack to fix "C2PA" case
67
+ $name = Image::ExifTool::MakeTagName($name);
68
+ my $desc = Image::ExifTool::MakeDescription($name);
69
+ $desc =~ s/^C2 PA/C2PA/; # hack to get "C2PA" correct
70
+ AddTagToTable($tagTablePtr, $tag, {
71
+ Name => $name,
72
+ Description => $desc,
73
+ %flags,
74
+ Temporary => 1,
75
+ });
76
+ }
72
77
  $et->HandleTag($tagTablePtr, $tag, $val);
73
78
  }
74
79
 
@@ -32,7 +32,7 @@ use strict;
32
32
  use vars qw($VERSION);
33
33
  use Image::ExifTool qw(:DataAccess :Utils);
34
34
 
35
- $VERSION = '1.24';
35
+ $VERSION = '1.25';
36
36
 
37
37
  # program map table "stream_type" lookup (ref 6/1/9)
38
38
  my %streamType = (
@@ -379,7 +379,7 @@ sub ParsePID($$$$$)
379
379
  $et->HandleTag($tagTbl, Accelerometer => "@acc");
380
380
  }
381
381
  SetByteOrder('MM');
382
- $$et{HasINNOV} = 1; # (necessary to skip over empty/unknown INNOV records)
382
+ $$et{FoundGoodGPS} = 1; # (necessary to skip over empty/unknown INNOV records)
383
383
  $more = 1;
384
384
  } elsif ($$dataPt =~ /^\$(GPSINFO|GSNRINFO),/) {
385
385
  # $GPSINFO,0x0004,2021.08.09 13:27:36,2341.54561,12031.70135,8.0,51,153,0,0,\x0d
@@ -481,7 +481,35 @@ sub ParsePID($$$$$)
481
481
  $et->HandleTag($tagTbl, GPSTrackRef => 'T');
482
482
  SetByteOrder('MM');
483
483
  $more = 1;
484
- } elsif ($$et{HasINNOV}) {
484
+ } elsif (length($$dataPt) >= 64 and substr($$dataPt, 32, 2) eq '$S') {
485
+ # DOD_LS600W.TS
486
+ my $tagTbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
487
+ # find the earliest sample time in the cyclical list
488
+ my ($n, $last) = (32, "\0");
489
+ for (my $i=32; $i<length($$dataPt)-32; $i+=32) {
490
+ last unless substr($$dataPt, $n, 2) eq '$S';
491
+ my $dateTime = substr($$dataPt, $i+6, 8);
492
+ $last gt $dateTime and $n = $i, last; # earliest sample if time goes backwards
493
+ $last = $dateTime;
494
+ }
495
+ for (my $i=32; $i<length($$dataPt)-32; $i+=32, $n+=32) {
496
+ $n = 32 if $n > length($$dataPt)-32;
497
+ last unless substr($$dataPt, $n, 2) eq '$S';
498
+ my @a = unpack("x${n}nnnnCCCCnCNNC", $$dataPt);
499
+ $a[8] /= 10; # 1/10 sec
500
+ $a[2] += (36000 - 65536) if $a[2] & 0x8000; # convert signed integer into range 0-36000
501
+ $$et{DOC_NUM} = ++$$et{DOC_COUNT};
502
+ $et->HandleTag($tagTbl, GPSDateTime => sprintf('%.4d:%.2d:%.2d %.2d:%.2d:%04.1fZ', @a[3..8]));
503
+ $et->HandleTag($tagTbl, GPSLatitude => $a[10] * 1e-7);
504
+ $et->HandleTag($tagTbl, GPSLongitude => $a[11] * 1e-7);
505
+ $et->HandleTag($tagTbl, GPSSpeed => $a[1] * 0.036); # convert from metres per 100 s
506
+ $et->HandleTag($tagTbl, GPSTrack => $a[2] / 100);
507
+ }
508
+ # Note: 10 bytes after last GPS record look like a single 3-axis accelerometer reading:
509
+ # eg. fd ff 00 00 ff ff 00 00 01 00
510
+ $$et{FoundGoodGPS} = 1; # so we skip over unrecognized packets
511
+ $more = 1;
512
+ } elsif ($$et{FoundGoodGPS}) {
485
513
  $more = 1;
486
514
  }
487
515
  delete $$et{DOC_NUM};
@@ -538,7 +566,7 @@ sub ProcessM2TS($$)
538
566
  my %needPID = ( 0 => 1 ); # lookup for stream PID's that we still need to parse
539
567
  # PID's that may contain GPS info
540
568
  my %gpsPID = (
541
- 0x0300 => 1, # Novatek INNOVV
569
+ 0x0300 => 1, # Novatek INNOVV, DOD_LS600W
542
570
  0x01e4 => 1, # vsys a6l dashcam
543
571
  0x0e1b => 1, # Jomise T860S-GM dashcam
544
572
  );
@@ -441,6 +441,7 @@ my %sRegionStruct = (
441
441
  Writable => 'real',
442
442
  Notes => 'not part of MWG 2.0 spec',
443
443
  },
444
+ # Title - seen in sample XMP of MWG 2.0 specification, but not in spec itself
444
445
  seeAlso => { Namespace => 'rdfs', Resource => 1 },
445
446
  );
446
447
  my %sKeywordStruct;
@@ -12,7 +12,7 @@ use strict;
12
12
  use vars qw($VERSION);
13
13
  use Image::ExifTool qw(:DataAccess :Utils);
14
14
 
15
- $VERSION = '1.12';
15
+ $VERSION = '1.13';
16
16
 
17
17
  sub MDItemLocalTime($);
18
18
  sub ProcessATTR($$$);
@@ -22,6 +22,11 @@ my %mdDateInfo = (
22
22
  PrintConv => '$self->ConvertDateTime($val)',
23
23
  );
24
24
 
25
+ my %delXAttr = (
26
+ XAttrQuarantine => 'com.apple.quarantine',
27
+ XAttrMDItemWhereFroms => 'com.apple.metadata:kMDItemWhereFroms',
28
+ );
29
+
25
30
  # Information decoded from Mac OS sidecar files
26
31
  %Image::ExifTool::MacOS::Main = (
27
32
  GROUPS => { 0 => 'File', 1 => 'MacOS' },
@@ -320,7 +325,17 @@ my %mdDateInfo = (
320
325
  Groups => { 2 => 'Time' },
321
326
  },
322
327
  'com.apple.metadata:kMDItemFinderComment' => { Name => 'XAttrMDItemFinderComment' },
323
- 'com.apple.metadata:kMDItemWhereFroms' => { Name => 'XAttrMDItemWhereFroms' },
328
+ 'com.apple.metadata:kMDItemWhereFroms' => {
329
+ Name => 'XAttrMDItemWhereFroms',
330
+ Writable => 1,
331
+ WritePseudo => 1,
332
+ WriteCheck => '"May only delete this tag"',
333
+ Protected => 1,
334
+ Notes => q{
335
+ information about where the file came from. May only be deleted when
336
+ writing
337
+ },
338
+ },
324
339
  'com.apple.metadata:kMDLabel' => { Name => 'XAttrMDLabel', Binary => 1 },
325
340
  'com.apple.ResourceFork' => { Name => 'XAttrResourceFork', Binary => 1 },
326
341
  'com.apple.lastuseddate#PS' => {
@@ -407,9 +422,9 @@ sub SetMacOSTags($$$)
407
422
  $et->VPrint(1," - $tag = (all)\n") if $overwrite > 0;
408
423
  undef $val if $val eq '';
409
424
  }
410
- } elsif ($tag eq 'XAttrQuarantine') {
425
+ } elsif ($delXAttr{$tag}) {
411
426
  ($f = $file) =~ s/'/'\\''/g;
412
- $cmd = "/usr/bin/xattr -d com.apple.quarantine '${f}'";
427
+ $cmd = "/usr/bin/xattr -d $delXAttr{$tag} '${f}'";
413
428
  $silentErr = 256; # (will get this error if attribute doesn't exist)
414
429
  } else {
415
430
  ($f = $file) =~ s/(["\\])/\\$1/g; # escape necessary characters for script
@@ -21,7 +21,7 @@ sub ProcessKodakPatch($$$);
21
21
  sub WriteUnknownOrPreview($$$);
22
22
  sub FixLeicaBase($$;$);
23
23
 
24
- $VERSION = '2.15';
24
+ $VERSION = '2.16';
25
25
 
26
26
  my $debug; # set to 1 to enable debugging code
27
27
 
@@ -195,7 +195,7 @@ my $debug; # set to 1 to enable debugging code
195
195
  },
196
196
  {
197
197
  Name => 'MakerNoteHP4', # PhotoSmart M627
198
- Condition => '$$valPt =~ /^IIII\x04\0/',
198
+ Condition => '$$valPt =~ /^IIII[\x04|\x05]\0/',
199
199
  NotIFD => 1,
200
200
  SubDirectory => {
201
201
  TagTable => 'Image::ExifTool::HP::Type4',
@@ -245,7 +245,7 @@ my %sRegions = (
245
245
  Copyright => { Groups => { 2 => 'Author' } },
246
246
  Count => { },
247
247
  CurrentBitrate => { },
248
- Description => { },
248
+ Description => { Writable => 'Unicode', Avoid => 1 },
249
249
  DisplayArtist => { },
250
250
  DLNAServerUDN => { },
251
251
  DLNASourceURI => { },