exiftool_vendored 12.22.0 → 12.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +201 -5
  3. data/bin/MANIFEST +22 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +45 -43
  7. data/bin/arg_files/xmp2exif.args +2 -1
  8. data/bin/config_files/acdsee.config +193 -6
  9. data/bin/config_files/convert_regions.config +25 -14
  10. data/bin/config_files/cuepointlist.config +70 -0
  11. data/bin/config_files/example.config +1 -1
  12. data/bin/exiftool +89 -70
  13. data/bin/fmt_files/gpx.fmt +1 -1
  14. data/bin/fmt_files/gpx_wpt.fmt +1 -1
  15. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +17 -4
  16. data/bin/lib/Image/ExifTool/CBOR.pm +331 -0
  17. data/bin/lib/Image/ExifTool/Canon.pm +53 -21
  18. data/bin/lib/Image/ExifTool/Charset.pm +2 -0
  19. data/bin/lib/Image/ExifTool/DPX.pm +13 -2
  20. data/bin/lib/Image/ExifTool/DjVu.pm +6 -5
  21. data/bin/lib/Image/ExifTool/Exif.pm +120 -12
  22. data/bin/lib/Image/ExifTool/FlashPix.pm +35 -10
  23. data/bin/lib/Image/ExifTool/FujiFilm.pm +19 -8
  24. data/bin/lib/Image/ExifTool/Geotag.pm +13 -2
  25. data/bin/lib/Image/ExifTool/GoPro.pm +16 -1
  26. data/bin/lib/Image/ExifTool/ICC_Profile.pm +96 -4
  27. data/bin/lib/Image/ExifTool/ID3.pm +15 -3
  28. data/bin/lib/Image/ExifTool/JPEG.pm +74 -4
  29. data/bin/lib/Image/ExifTool/JSON.pm +30 -5
  30. data/bin/lib/Image/ExifTool/Jpeg2000.pm +395 -16
  31. data/bin/lib/Image/ExifTool/LIF.pm +153 -0
  32. data/bin/lib/Image/ExifTool/Lang/nl.pm +60 -59
  33. data/bin/lib/Image/ExifTool/M2TS.pm +103 -7
  34. data/bin/lib/Image/ExifTool/MIE.pm +2 -1
  35. data/bin/lib/Image/ExifTool/MRC.pm +341 -0
  36. data/bin/lib/Image/ExifTool/MWG.pm +3 -3
  37. data/bin/lib/Image/ExifTool/MXF.pm +1 -1
  38. data/bin/lib/Image/ExifTool/MacOS.pm +3 -3
  39. data/bin/lib/Image/ExifTool/Microsoft.pm +5 -3
  40. data/bin/lib/Image/ExifTool/Nikon.pm +17 -5
  41. data/bin/lib/Image/ExifTool/NikonSettings.pm +19 -2
  42. data/bin/lib/Image/ExifTool/Olympus.pm +9 -2
  43. data/bin/lib/Image/ExifTool/Other.pm +93 -0
  44. data/bin/lib/Image/ExifTool/PDF.pm +11 -12
  45. data/bin/lib/Image/ExifTool/PNG.pm +8 -7
  46. data/bin/lib/Image/ExifTool/Panasonic.pm +28 -3
  47. data/bin/lib/Image/ExifTool/Pentax.pm +28 -5
  48. data/bin/lib/Image/ExifTool/PhaseOne.pm +4 -3
  49. data/bin/lib/Image/ExifTool/Photoshop.pm +6 -0
  50. data/bin/lib/Image/ExifTool/QuickTime.pm +210 -65
  51. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +280 -139
  52. data/bin/lib/Image/ExifTool/README +9 -2
  53. data/bin/lib/Image/ExifTool/RIFF.pm +89 -12
  54. data/bin/lib/Image/ExifTool/Samsung.pm +48 -10
  55. data/bin/lib/Image/ExifTool/Sony.pm +204 -61
  56. data/bin/lib/Image/ExifTool/TagLookup.pm +206 -19
  57. data/bin/lib/Image/ExifTool/TagNames.pod +634 -195
  58. data/bin/lib/Image/ExifTool/Torrent.pm +18 -11
  59. data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  60. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -0
  61. data/bin/lib/Image/ExifTool/WritePNG.pl +2 -0
  62. data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -0
  63. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +58 -16
  64. data/bin/lib/Image/ExifTool/WriteXMP.pl +7 -3
  65. data/bin/lib/Image/ExifTool/Writer.pl +44 -0
  66. data/bin/lib/Image/ExifTool/XMP.pm +51 -18
  67. data/bin/lib/Image/ExifTool/XMP2.pl +4 -1
  68. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  69. data/bin/lib/Image/ExifTool/ZISRAW.pm +121 -2
  70. data/bin/lib/Image/ExifTool.pm +188 -61
  71. data/bin/lib/Image/ExifTool.pod +89 -68
  72. data/bin/perl-Image-ExifTool.spec +43 -42
  73. data/lib/exiftool_vendored/version.rb +1 -1
  74. metadata +10 -9
@@ -408,6 +408,9 @@ numerical, and generated automatically otherwise.
408
408
  to be evaluated. Expression may access $val and $et,
409
409
  and is evaluated only when reading.
410
410
 
411
+ 'iTXt' - [PNG TextualData tags only] flag to write tag as PNG
412
+ iTXt chunk even if it contains no special characters.
413
+
411
414
  'List' - flag indicating that duplicate entries of this tag
412
415
  are allowed, and will be accumulated in a list. Note that for
413
416
  XMP information, 3 different types of lists are supported and
@@ -447,6 +450,10 @@ numerical, and generated automatically otherwise.
447
450
  may be written if the tag already exists. By default, all
448
451
  MakerNotes tags are permanent unless otherwise specified.
449
452
 
453
+ 'PreservePadding' - [QuickTime only] flag to preserve the
454
+ original size of the QuickTime atom by padding with nulls when
455
+ writing with the QuickTimePad option.
456
+
450
457
  'PrintHex' - specifies that unknown PrintConv values should
451
458
  be printed in hex (eg. 'Unknown (0x1)'). Also causes
452
459
  numerical tag values to be printed in hex in the HTML tag name
@@ -471,9 +478,9 @@ numerical, and generated automatically otherwise.
471
478
  tags in IFD1 of JPEG images which default to priority 0.
472
479
 
473
480
  'Protected' - bit mask to protect tags from writing:
474
- Bit 0x01 indicates an 'unsafe' tag, which is not set via
481
+ Bit 0x01 indicates an 'Unsafe' tag, which is not set via
475
482
  SetNewValuesFromFile() unless specified explicitly.
476
- Bit 0x02 indicates a 'protected' tag, which should not be set
483
+ Bit 0x02 indicates a 'Protected' tag, which should not be set
477
484
  directly by the user.
478
485
 
479
486
  'PutFirst' - [EXIF only] flag to place this value before IFD0
@@ -21,6 +21,7 @@
21
21
  # 13) http://tech.ebu.ch/docs/tech/tech3285.pdf
22
22
  # 14) https://developers.google.com/speed/webp/docs/riff_container
23
23
  # 15) https://tech.ebu.ch/docs/tech/tech3306-2009.pdf
24
+ # 16) https://sites.google.com/site/musicgapi/technical-documents/wav-file-format
24
25
  #------------------------------------------------------------------------------
25
26
 
26
27
  package Image::ExifTool::RIFF;
@@ -29,7 +30,7 @@ use strict;
29
30
  use vars qw($VERSION);
30
31
  use Image::ExifTool qw(:DataAccess :Utils);
31
32
 
32
- $VERSION = '1.57';
33
+ $VERSION = '1.59';
33
34
 
34
35
  sub ConvertTimecode($);
35
36
  sub ProcessSGLT($$$);
@@ -354,9 +355,35 @@ my %code2charset = (
354
355
  SubDirectory => { TagTable => 'Image::ExifTool::RIFF::DS64' },
355
356
  },
356
357
  list => 'ListType', #15
357
- labl => { #15
358
- Name => 'Label',
359
- SubDirectory => { TagTable => 'Image::ExifTool::RIFF::Label' },
358
+ labl => { #16 (in 'adtl' chunk)
359
+ Name => 'CuePointLabel',
360
+ Priority => 0, # (so they are stored in sequence)
361
+ ValueConv => 'my $str=substr($val,4); $str=~s/\0+$//; unpack("V",$val) . " " . $str',
362
+ },
363
+ note => { #16 (in 'adtl' chunk)
364
+ Name => 'CuePointNote',
365
+ Priority => 0, # (so they are stored in sequence)
366
+ ValueConv => 'my $str=substr($val,4); $str=~s/\0+$//; unpack("V",$val) . " " . $str',
367
+ },
368
+ ltxt => { #16 (in 'adtl' chunk)
369
+ Name => 'LabeledText',
370
+ Notes => 'CuePointID Length Purpose Country Language Dialect Codepage Text',
371
+ Priority => 0, # (so they are stored in sequence)
372
+ ValueConv => q{
373
+ my @a = unpack('VVa4vvvv', $val);
374
+ $a[2] = "'$a[2]'";
375
+ my $txt = substr($val, 18);
376
+ $txt =~ s/\0+$//; # remove null terminator
377
+ return join(' ', @a, $txt);
378
+ },
379
+ },
380
+ smpl => { #16
381
+ Name => 'Sampler',
382
+ SubDirectory => { TagTable => 'Image::ExifTool::RIFF::Sampler' },
383
+ },
384
+ inst => { #16
385
+ Name => 'Instrument',
386
+ SubDirectory => { TagTable => 'Image::ExifTool::RIFF::Instrument' },
360
387
  },
361
388
  LIST_INFO => {
362
389
  Name => 'Info',
@@ -396,6 +423,10 @@ my %code2charset = (
396
423
  ProcessProc => \&Image::ExifTool::RIFF::ProcessChunks,
397
424
  },
398
425
  },
426
+ LIST_adtl => { #PH (ref 16, forum12387)
427
+ Name => 'AssociatedDataList',
428
+ SubDirectory => { TagTable => 'Image::ExifTool::RIFF::Main' },
429
+ },
399
430
  # seen LIST_JUNK
400
431
  JUNK => [
401
432
  {
@@ -466,10 +497,15 @@ my %code2charset = (
466
497
  Name => 'NumberOfSamples',
467
498
  RawConv => 'Get32u(\$val, 0)',
468
499
  },
469
- 'cue ' => {
500
+ 'cue '=> {
470
501
  Name => 'CuePoints',
471
502
  Binary => 1,
503
+ Notes => q{
504
+ config_files/cutepointlist.config from full distribution will decode this
505
+ and generate a list of cue points with labels
506
+ },
472
507
  },
508
+ plst => { Name => 'Playlist', Binary => 1 }, #16
473
509
  afsp => { },
474
510
  IDIT => {
475
511
  Name => 'DateTimeOriginal',
@@ -491,6 +527,10 @@ my %code2charset = (
491
527
  Name => 'Text',
492
528
  Notes => 'streamed text, extracted when the ExtractEmbedded option is used',
493
529
  },
530
+ 'id3 ' => {
531
+ Name => 'ID3',
532
+ SubDirectory => { TagTable => 'Image::ExifTool::ID3::Main' },
533
+ },
494
534
  #
495
535
  # WebP-specific tags
496
536
  #
@@ -704,16 +744,52 @@ my %code2charset = (
704
744
  # very unlikely, support for these is not yet implemented)
705
745
  );
706
746
 
707
- # cue point labels (ref 15)
708
- %Image::ExifTool::RIFF::Label = (
747
+ # Sampler chunk (ref 16)
748
+ %Image::ExifTool::RIFF::Sampler = (
709
749
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
710
750
  GROUPS => { 2 => 'Audio' },
711
751
  FORMAT => 'int32u',
712
- 0 => 'LabelID',
713
- 1 => {
714
- Name => 'LabelText',
715
- Format => 'string[$size-4]',
752
+ 0 => 'Manufacturer',
753
+ 1 => 'Product',
754
+ 2 => 'SamplePeriod',
755
+ 3 => 'MIDIUnityNote',
756
+ 4 => 'MIDIPitchFraction',
757
+ 5 => {
758
+ Name => 'SMPTEFormat',
759
+ PrintConv => {
760
+ 0 => 'none',
761
+ 24 => '24 fps',
762
+ 25 => '25 fps',
763
+ 29 => '29 fps',
764
+ 30 => '30 fps',
765
+ },
716
766
  },
767
+ 6 => {
768
+ Name => 'SMPTEOffset',
769
+ Notes => 'HH:MM:SS:FF',
770
+ ValueConv => q{
771
+ my $str = sprintf('%.8x', $val);
772
+ $str =~ s/(..)(..)(..)(..)/$1:$2:$3:$4/;
773
+ return $str;
774
+ },
775
+ },
776
+ 7 => 'NumSampleLoops',
777
+ 8 => 'SamplerDataLen',
778
+ 9 => { Name => 'SamplerData', Format => 'undef[$size-40]', Binary => 1 },
779
+ );
780
+
781
+ # Instrument chunk (ref 16)
782
+ %Image::ExifTool::RIFF::Instrument = (
783
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
784
+ GROUPS => { 2 => 'Audio' },
785
+ FORMAT => 'int8s',
786
+ 0 => 'UnshiftedNote',
787
+ 1 => 'FineTune',
788
+ 2 => 'Gain',
789
+ 3 => 'LowNote',
790
+ 4 => 'HighNote',
791
+ 5 => 'LowVelocity',
792
+ 6 => 'HighVelocity',
717
793
  );
718
794
 
719
795
  # Sub chunks of INFO LIST chunk
@@ -746,6 +822,7 @@ my %code2charset = (
746
822
  ILGT => 'Lightness',
747
823
  IMED => 'Medium',
748
824
  INAM => 'Title',
825
+ ITRK => 'TrackNumber',
749
826
  IPLT => 'NumColors',
750
827
  IPRD => 'Product',
751
828
  ISBJ => 'Subject',
@@ -1008,7 +1085,7 @@ my %code2charset = (
1008
1085
  Name => 'TextFormat',
1009
1086
  Condition => '$$self{RIFFStreamType} eq "txts"',
1010
1087
  Hidden => 1,
1011
- RawConv => '$self->Options("ExtractEmbedded") or $self->WarnOnce("Use ExtractEmbedded option to extract timed text"); undef',
1088
+ RawConv => '$self->Options("ExtractEmbedded") or $self->WarnOnce("Use ExtractEmbedded option to extract timed text",3); undef',
1012
1089
  },
1013
1090
  ],
1014
1091
  );
@@ -22,12 +22,13 @@ use vars qw($VERSION %samsungLensTypes);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
  use Image::ExifTool::Exif;
24
24
 
25
- $VERSION = '1.48';
25
+ $VERSION = '1.50';
26
26
 
27
27
  sub WriteSTMN($$$);
28
28
  sub ProcessINFO($$$);
29
29
  sub ProcessSamsungMeta($$$);
30
30
  sub ProcessSamsungIFD($$$);
31
+ sub ProcessSamsung($$$);
31
32
 
32
33
  # Samsung LensType lookup
33
34
  %samsungLensTypes = (
@@ -940,13 +941,31 @@ my %formatMinMax = (
940
941
  %Image::ExifTool::Samsung::Trailer = (
941
942
  GROUPS => { 0 => 'MakerNotes', 2 => 'Other' },
942
943
  VARS => { NO_ID => 1, HEX_ID => 0 },
944
+ PROCESS_PROC => \&ProcessSamsung,
945
+ PRIORITY => 0, # (first one takes priority so DepthMapWidth/Height match first DepthMapData)
943
946
  NOTES => q{
944
947
  Tags extracted from the trailer of JPEG images written when using certain
945
948
  features (such as "Sound & Shot" or "Shot & More") from Samsung models such
946
- as the Galaxy S4 and Tab S.
947
- },
948
- '0x0001-name' => 'EmbeddedImageName', # ("DualShot_1","DualShot_2")
949
- '0x0001' => { Name => 'EmbeddedImage', Groups => { 2 => 'Preview' }, Binary => 1 },
949
+ as the Galaxy S4 and Tab S, and from the 'sefd' atom in HEIC images from the
950
+ Samsung S10+.
951
+ },
952
+ '0x0001-name' => {
953
+ Name => 'EmbeddedImageName', # ("DualShot_1","DualShot_2")
954
+ RawConv => '$$self{EmbeddedImageName} = $val',
955
+ },
956
+ '0x0001' => [
957
+ {
958
+ Name => 'EmbeddedImage',
959
+ Condition => '$$self{EmbeddedImageName} eq "DualShot_1"',
960
+ Groups => { 2 => 'Preview' },
961
+ Binary => 1,
962
+ },
963
+ {
964
+ Name => 'EmbeddedImage2',
965
+ Groups => { 2 => 'Preview' },
966
+ Binary => 1,
967
+ },
968
+ ],
950
969
  '0x0100-name' => 'EmbeddedAudioFileName', # ("SoundShot_000")
951
970
  '0x0100' => { Name => 'EmbeddedAudioFile', Groups => { 2 => 'Audio' }, Binary => 1 },
952
971
  '0x0201-name' => 'SurroundShotVideoName', # ("Interactive_Panorama_000")
@@ -976,10 +995,24 @@ my %formatMinMax = (
976
995
  '0x0a30-name' => 'EmbeddedVideoType', # ("MotionPhoto_Data")
977
996
  '0x0a30' => { Name => 'EmbeddedVideoFile', Groups => { 2 => 'Video' }, Binary => 1 }, #forum7161
978
997
  # 0x0aa1-name - seen 'MCC_Data'
979
- # 0x0aa1 - seen '234','222','429'
998
+ # 0x0aa1 - seen '204','222','234','302','429'
999
+ '0x0aa1' => 'MCCData', # (unknown meaning)
980
1000
  # 0x0ab0-name - seen 'DualShot_Meta_Info'
981
- '0x0ab1-name' => 'DepthMapName', # seen 'DualShot_DepthMap_1' (SM-N950U)
982
- '0x0ab1' => { Name => 'DepthMapData', Binary => 1 },
1001
+ '0x0ab1-name' => {
1002
+ Name => 'DepthMapName',
1003
+ # seen 'DualShot_DepthMap_1' (SM-N950U), DualShot_DepthMap_5 (SM-G998W)
1004
+ RawConv => '$$self{DepthMapName} = $val',
1005
+ },
1006
+ '0x0ab1' => [
1007
+ {
1008
+ Name => 'DepthMapData',
1009
+ Condition => '$$self{DepthMapName} eq "DualShot_DepthMap_1"',
1010
+ Binary => 1,
1011
+ },{
1012
+ Name => 'DepthMapData2',
1013
+ Binary => 1,
1014
+ },
1015
+ ],
983
1016
  # 0x0ab3-name - seen 'DualShot_Extra_Info' (SM-N950U)
984
1017
  '0x0ab3' => { # (SM-N950U)
985
1018
  Name => 'DualShotExtra',
@@ -1014,7 +1047,8 @@ my %formatMinMax = (
1014
1047
  Hook => q{
1015
1048
  if ($size >= 96) {
1016
1049
  my $tmp = substr($$dataPt, $pos, 64);
1017
- if ($tmp =~ /\x01\0\xff\xff/g and not pos($tmp) % 4) {
1050
+ # (have seen 0x01,0x03 and 0x07)
1051
+ if ($tmp =~ /[\x01-\x09]\0\xff\xff/g and not pos($tmp) % 4) {
1018
1052
  $$self{DepthMapTagPos} = pos($tmp);
1019
1053
  $varSize += $$self{DepthMapTagPos} - 32;
1020
1054
  }
@@ -1273,6 +1307,10 @@ sub ProcessSamsung($$$)
1273
1307
  my $unknown = $et->Options('Unknown');
1274
1308
  my ($buff, $buf2, $index, $offsetPos, $audioNOff, $audioSize);
1275
1309
 
1310
+ unless ($raf) {
1311
+ $raf = new File::RandomAccess($$dirInfo{DataPt});
1312
+ $et->VerboseDir('SamsungTrailer');
1313
+ }
1276
1314
  return 0 unless $raf->Seek(-6-$offset, 2) and $raf->Read($buff, 6) == 6 and
1277
1315
  ($buff eq 'QDIOBS' or $buff eq "\0\0SEFT");
1278
1316
  my $endPos = $raf->Tell();
@@ -1327,7 +1365,7 @@ SamBlock:
1327
1365
  # save trailer position and length
1328
1366
  my $dataPos = $$dirInfo{DataPos} = $dirPos - $firstBlock;
1329
1367
  my $dirLen = $$dirInfo{DirLen} = $endPos - $dataPos;
1330
- if (($verbose or $$et{HTML_DUMP}) and not $outfile) {
1368
+ if (($verbose or $$et{HTML_DUMP}) and not $outfile and $$dirInfo{RAF}) {
1331
1369
  $et->DumpTrailer($dirInfo);
1332
1370
  return 1 if $$et{HTML_DUMP};
1333
1371
  }