exiftool_vendored 11.97.0 → 12.09.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of exiftool_vendored might be problematic. Click here for more details.

Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +196 -2
  3. data/bin/MANIFEST +8 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +43 -42
  7. data/bin/exiftool +150 -102
  8. data/bin/lib/Image/ExifTool.pm +162 -111
  9. data/bin/lib/Image/ExifTool.pod +123 -90
  10. data/bin/lib/Image/ExifTool/AIFF.pm +2 -2
  11. data/bin/lib/Image/ExifTool/APE.pm +2 -2
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +21 -10
  13. data/bin/lib/Image/ExifTool/Canon.pm +201 -14
  14. data/bin/lib/Image/ExifTool/CanonCustom.pm +82 -16
  15. data/bin/lib/Image/ExifTool/DPX.pm +56 -2
  16. data/bin/lib/Image/ExifTool/DarwinCore.pm +22 -3
  17. data/bin/lib/Image/ExifTool/EXE.pm +8 -5
  18. data/bin/lib/Image/ExifTool/Exif.pm +15 -6
  19. data/bin/lib/Image/ExifTool/Font.pm +9 -2
  20. data/bin/lib/Image/ExifTool/GIF.pm +6 -1
  21. data/bin/lib/Image/ExifTool/GeoTiff.pm +2 -0
  22. data/bin/lib/Image/ExifTool/Geotag.pm +2 -2
  23. data/bin/lib/Image/ExifTool/GoPro.pm +48 -22
  24. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  25. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -2
  26. data/bin/lib/Image/ExifTool/ID3.pm +91 -12
  27. data/bin/lib/Image/ExifTool/IPTC.pm +1 -0
  28. data/bin/lib/Image/ExifTool/JSON.pm +27 -4
  29. data/bin/lib/Image/ExifTool/Lang/de.pm +3 -1
  30. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  31. data/bin/lib/Image/ExifTool/M2TS.pm +44 -24
  32. data/bin/lib/Image/ExifTool/MacOS.pm +152 -38
  33. data/bin/lib/Image/ExifTool/Matroska.pm +3 -1
  34. data/bin/lib/Image/ExifTool/Minolta.pm +7 -2
  35. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +11 -10
  36. data/bin/lib/Image/ExifTool/Nikon.pm +163 -18
  37. data/bin/lib/Image/ExifTool/Olympus.pm +39 -17
  38. data/bin/lib/Image/ExifTool/PNG.pm +14 -3
  39. data/bin/lib/Image/ExifTool/PPM.pm +5 -5
  40. data/bin/lib/Image/ExifTool/Panasonic.pm +148 -14
  41. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +34 -0
  42. data/bin/lib/Image/ExifTool/Parrot.pm +2 -1
  43. data/bin/lib/Image/ExifTool/Pentax.pm +3 -1
  44. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  45. data/bin/lib/Image/ExifTool/QuickTime.pm +294 -34
  46. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +419 -60
  47. data/bin/lib/Image/ExifTool/README +26 -22
  48. data/bin/lib/Image/ExifTool/RIFF.pm +15 -3
  49. data/bin/lib/Image/ExifTool/RSRC.pm +17 -11
  50. data/bin/lib/Image/ExifTool/RTF.pm +12 -7
  51. data/bin/lib/Image/ExifTool/Radiance.pm +7 -2
  52. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  53. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  54. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  55. data/bin/lib/Image/ExifTool/Sony.pm +420 -34
  56. data/bin/lib/Image/ExifTool/TagLookup.pm +5799 -5671
  57. data/bin/lib/Image/ExifTool/TagNames.pod +583 -95
  58. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  59. data/bin/lib/Image/ExifTool/WriteExif.pl +3 -2
  60. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +26 -18
  61. data/bin/lib/Image/ExifTool/Writer.pl +44 -21
  62. data/bin/lib/Image/ExifTool/XMP.pm +99 -17
  63. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  64. data/bin/lib/Image/ExifTool/ZISRAW.pm +123 -0
  65. data/bin/perl-Image-ExifTool.spec +42 -41
  66. data/lib/exiftool_vendored/version.rb +1 -1
  67. metadata +8 -7
@@ -11,7 +11,7 @@ package Image::ExifTool::Lang::de;
11
11
  use strict;
12
12
  use vars qw($VERSION);
13
13
 
14
- $VERSION = '1.35';
14
+ $VERSION = '1.36';
15
15
 
16
16
  %Image::ExifTool::Lang::de::Translate = (
17
17
  'AEAperture' => 'AE-Blende',
@@ -993,7 +993,9 @@ $VERSION = '1.35';
993
993
  },
994
994
  },
995
995
  'AdvancedSceneMode' => {
996
+ Description => 'Erweiteter Szenenmodus',
996
997
  PrintConv => {
998
+ 'Off' => 'Aus',
997
999
  'Creative Macro' => 'Makro kreativ',
998
1000
  'Flower' => 'Blumen',
999
1001
  'HDR B&W' => 'HDR Schwarz-Weiß',
@@ -1302,7 +1302,7 @@ $VERSION = '1.16';
1302
1302
  'ExifImageHeight' => 'Alto Imagen',
1303
1303
  'ExifImageWidth' => 'Ancho Imagen',
1304
1304
  'ExifOffset' => 'Puntero Exif IFD',
1305
- 'ExifToolVersion' => 'Versión Exiftool',
1305
+ 'ExifToolVersion' => 'Versión ExifTool',
1306
1306
  'ExifVersion' => 'Versión Exif',
1307
1307
  'ExpandFilm' => 'Película Expandida',
1308
1308
  'ExpandFilterLens' => 'Filtro Objetivo Expandida',
@@ -31,7 +31,7 @@ use strict;
31
31
  use vars qw($VERSION);
32
32
  use Image::ExifTool qw(:DataAccess :Utils);
33
33
 
34
- $VERSION = '1.16';
34
+ $VERSION = '1.18';
35
35
 
36
36
  # program map table "stream_type" lookup (ref 6/1)
37
37
  my %streamType = (
@@ -262,7 +262,7 @@ sub ParseAC3Descriptor($$)
262
262
 
263
263
  #------------------------------------------------------------------------------
264
264
  # Parse PID stream data
265
- # Inputs: 0) Exiftool ref, 1) PID number, 2) PID type, 3) PID name, 4) data ref
265
+ # Inputs: 0) ExifTool ref, 1) PID number, 2) PID type, 3) PID name, 4) data ref
266
266
  # Returns: 0=stream parsed OK,
267
267
  # 1=stream parsed but we want to parse more of these,
268
268
  # -1=can't parse yet because we don't know the type
@@ -313,7 +313,7 @@ sub ProcessM2TS($$)
313
313
  my $raf = $$dirInfo{RAF};
314
314
  my ($buff, $pLen, $upkPrefix, $j, $fileType, $eof);
315
315
  my (%pmt, %pidType, %data, %sectLen);
316
- my ($startTime, $endTime, $backScan, $maxBack);
316
+ my ($startTime, $endTime, $fwdTime, $backScan, $maxBack);
317
317
  my $verbose = $et->Options('Verbose');
318
318
  my $out = $et->Options('TextOut');
319
319
 
@@ -330,7 +330,7 @@ sub ProcessM2TS($$)
330
330
  $upkPrefix = 'x4N';
331
331
  }
332
332
  my $prePos = $pLen - 188; # byte position of packet prefix
333
- my $readSize = 64 * $pLen; # read 64 packets at once
333
+ my $readSize = 64 * $pLen; # size of our read buffer
334
334
  $raf->Seek(0,0); # rewind to start
335
335
  $raf->Read($buff, $readSize) >= $pLen * 4 or return 0; # require at least 4 packets
336
336
  # validate the sync byte in the next 3 packets
@@ -351,39 +351,58 @@ sub ProcessM2TS($$)
351
351
  my %didPID = ( 1 => 0, 2 => 0, 0x1fff => 0 );
352
352
  my %needPID = ( 0 => 1 ); # lookup for stream PID's that we still need to parse
353
353
  my $pEnd = 0;
354
- my $i = 0;
355
354
 
356
355
  # parse packets from MPEG-2 Transport Stream
357
356
  for (;;) {
358
357
 
359
358
  unless (%needPID) {
360
359
  last unless defined $startTime;
361
- # seek backwards to find last PCR
362
- if (defined $backScan) {
363
- last if defined $endTime;
364
- $backScan -= $pLen;
365
- last if $backScan < $maxBack;
366
- } else {
360
+ # reconfigure to seek backwards for last PCR
361
+ unless (defined $backScan) {
362
+ my $saveTime = $endTime;
367
363
  undef $endTime;
368
364
  last if $et->Options('FastScan');
369
- $verbose and print "[Starting backscan for last PCR]\n";
370
- # calculate position of last complete packet
371
- my $fwdPos = $raf->Tell();
365
+ $verbose and print $out "[Starting backscan for last PCR]\n";
366
+ # remember how far we got when reading forward through the file
367
+ my $fwdPos = $raf->Tell() - length($buff) + $pEnd;
368
+ # determine the position of the last packet relative to the EOF
372
369
  $raf->Seek(0, 2) or last;
373
370
  my $fsize = $raf->Tell();
374
- my $nPack = int($fsize / $pLen);
375
- $backScan = ($nPack - 1) * $pLen - $fsize;
371
+ $backScan = int($fsize / $pLen) * $pLen - $fsize;
376
372
  # set limit on how far back we will go
377
373
  $maxBack = $fwdPos - $fsize;
378
- $maxBack = -256000 if $maxBack < -256000;
374
+ # scan back a maximum of 512k (have seen last PCR at -276k)
375
+ my $nMax = int(512000 / $pLen); # max packets to backscan
376
+ if ($nMax < int(-$maxBack / $pLen)) {
377
+ $maxBack = $backScan - $nMax * $pLen;
378
+ } else {
379
+ # use this time if none found in all remaining packets
380
+ $fwdTime = $saveTime;
381
+ }
382
+ $pEnd = 0;
379
383
  }
380
- $raf->Seek($backScan, 2) or last;
381
384
  }
382
- my $pos = $pEnd;
385
+ my $pos;
383
386
  # read more if necessary
384
- if ($pos + $pLen > length $buff) {
385
- $raf->Read($buff, $readSize) >= $pLen or $eof = 1, last;
386
- $pos = $pEnd = 0;
387
+ if (defined $backScan) {
388
+ last if defined $endTime;
389
+ $pos = $pEnd = $pEnd - 2 * $pLen; # step back to previous packet
390
+ if ($pos < 0) {
391
+ # read another buffer from end of file
392
+ last if $backScan <= $maxBack;
393
+ my $buffLen = $backScan - $maxBack;
394
+ $buffLen = $readSize if $buffLen > $readSize;
395
+ $backScan -= $buffLen;
396
+ $raf->Seek($backScan, 2) or last;
397
+ $raf->Read($buff, $buffLen) == $buffLen or last;
398
+ $pos = $pEnd = $buffLen - $pLen;
399
+ }
400
+ } else {
401
+ $pos = $pEnd;
402
+ if ($pos + $pLen > length $buff) {
403
+ $raf->Read($buff, $readSize) >= $pLen or $eof = 1, last;
404
+ $pos = $pEnd = 0;
405
+ }
387
406
  }
388
407
  $pEnd += $pLen;
389
408
  # decode the packet prefix
@@ -404,8 +423,8 @@ sub ProcessM2TS($$)
404
423
  # my $continuity_counter = $prefix & 0x0000000f;
405
424
 
406
425
  if ($verbose > 1) {
426
+ my $i = ($raf->Tell() - length($buff) + $pEnd) / $pLen - 1;
407
427
  print $out "Transport packet $i:\n";
408
- ++$i;
409
428
  $et->VerboseDump(\$buff, Len => $pLen, Addr => $i * $pLen, Start => $pos - $prePos);
410
429
  my $str = $pidName{$pid} ? " ($pidName{$pid})" : '';
411
430
  printf $out " Timecode: 0x%.4x\n", Get32u(\$buff, $pos - $prePos) if $pLen == 192;
@@ -646,7 +665,8 @@ sub ProcessM2TS($$)
646
665
  }
647
666
 
648
667
  # calculate Duration if available
649
- if (defined $startTime and defined $endTime and $startTime != $endTime) {
668
+ $endTime = $fwdTime unless defined $endTime;
669
+ if (defined $startTime and defined $endTime) {
650
670
  $endTime += 0x80000000 * 1200 if $startTime > $endTime; # handle 33-bit wrap
651
671
  $et->HandleTag($tagTablePtr, 'Duration', $endTime - $startTime);
652
672
  }
@@ -4,6 +4,7 @@
4
4
  # Description: Read/write MacOS system tags
5
5
  #
6
6
  # Revisions: 2017/03/01 - P. Harvey Created
7
+ # 2020/10/13 - PH Added ability to read MacOS "._" files
7
8
  #------------------------------------------------------------------------------
8
9
 
9
10
  package Image::ExifTool::MacOS;
@@ -11,15 +12,38 @@ use strict;
11
12
  use vars qw($VERSION);
12
13
  use Image::ExifTool qw(:DataAccess :Utils);
13
14
 
14
- $VERSION = '1.09';
15
+ $VERSION = '1.10';
15
16
 
16
17
  sub MDItemLocalTime($);
18
+ sub ProcessATTR($$$);
17
19
 
18
20
  my %mdDateInfo = (
19
21
  ValueConv => \&MDItemLocalTime,
20
22
  PrintConv => '$self->ConvertDateTime($val)',
21
23
  );
22
24
 
25
+ # Information decoded from Mac OS sidecar files
26
+ %Image::ExifTool::MacOS::Main = (
27
+ GROUPS => { 0 => 'File', 1 => 'MacOS' },
28
+ NOTES => q{
29
+ Note that on some filesystems, MacOS creates sidecar files with names that
30
+ begin with "._". ExifTool will read these files if specified, and extract
31
+ the information listed in the following table without the need for extra
32
+ options, but these files are not writable directly.
33
+ },
34
+ 2 => {
35
+ Name => 'RSRC',
36
+ SubDirectory => { TagTable => 'Image::ExifTool::RSRC::Main' },
37
+ },
38
+ 9 => {
39
+ Name => 'ATTR',
40
+ SubDirectory => {
41
+ TagTable => 'Image::ExifTool::MacOS::XAttr',
42
+ ProcessProc => \&ProcessATTR,
43
+ },
44
+ },
45
+ );
46
+
23
47
  # "mdls" tags (ref PH)
24
48
  %Image::ExifTool::MacOS::MDItem = (
25
49
  WRITE_PROC => \&Image::ExifTool::DummyWriteProc,
@@ -221,6 +245,8 @@ my %mdDateInfo = (
221
245
  XAttr tags are extracted using the "xattr" utility. They are extracted if
222
246
  any "XAttr*" tag or the MacOS group is specifically requested, or by setting
223
247
  the L<XAttrTags|../ExifTool.html#XAttrTags> API option to 1 or the L<RequestAll|../ExifTool.html#RequestAll> API option to 2 or higher.
248
+ And they extracted by default from MacOS "._" files when reading
249
+ these files directly.
224
250
  },
225
251
  'com.apple.FinderInfo' => {
226
252
  Name => 'XAttrFinderInfo',
@@ -325,7 +351,7 @@ sub MDItemLocalTime($)
325
351
 
326
352
  #------------------------------------------------------------------------------
327
353
  # Set MacOS MDItem and XAttr tags from new tag values
328
- # Inputs: 0) Exiftool ref, 1) file name, 2) list of tags to set
354
+ # Inputs: 0) ExifTool ref, 1) file name, 2) list of tags to set
329
355
  # Returns: 1=something was set OK, 0=didn't try, -1=error (and warning set)
330
356
  # Notes: There may be errors even if 1 is returned
331
357
  sub SetMacOSTags($$$)
@@ -486,8 +512,50 @@ sub ExtractMDItemTags($$)
486
512
  $$et{INDENT} =~ s/\| $//;
487
513
  }
488
514
 
515
+
489
516
  #------------------------------------------------------------------------------
490
- # Extract MacOS extended attribute tags
517
+ # Read MacOS XAttr value
518
+ # Inputs: 0) ExifTool object ref, 1) file name
519
+ sub ReadXAttrValue($$$$)
520
+ {
521
+ my ($et, $tagTablePtr, $tag, $val) = @_;
522
+ # add to our table if necessary
523
+ unless ($$tagTablePtr{$tag}) {
524
+ my $name;
525
+ # generate tag name from attribute name
526
+ if ($tag =~ /^com\.apple\.(.*)$/) {
527
+ ($name = $1) =~ s/^metadata:_?k//;
528
+ $name =~ s/^metadata:(com_)?//;
529
+ } else {
530
+ $name = $tag;
531
+ }
532
+ $name =~ s/[.:_]([a-z])/\U$1/g;
533
+ $name = 'XAttr' . ucfirst $name;
534
+ my %tagInfo = ( Name => $name );
535
+ $tagInfo{Groups} = { 2 => 'Time' } if $tag=~/Date$/;
536
+ $et->VPrint(0, " [adding $tag]\n");
537
+ AddTagToTable($tagTablePtr, $tag, \%tagInfo);
538
+ }
539
+ if ($val =~ /^bplist0/) {
540
+ my %dirInfo = ( DataPt => \$val );
541
+ require Image::ExifTool::PLIST;
542
+ if (Image::ExifTool::PLIST::ProcessBinaryPLIST($et, \%dirInfo, $tagTablePtr)) {
543
+ return undef if ref $dirInfo{Value} eq 'HASH';
544
+ $val = $dirInfo{Value}
545
+ } else {
546
+ $et->Warn("Error decoding $$tagTablePtr{$tag}{Name}");
547
+ return undef;
548
+ }
549
+ }
550
+ if (not ref $val and ($val =~ /\0/ or length($val) > 200) or $tag eq 'XAttrMDLabel') {
551
+ my $buff = $val;
552
+ $val = \$buff;
553
+ }
554
+ return $val;
555
+ }
556
+
557
+ #------------------------------------------------------------------------------
558
+ # Read MacOS extended attribute tags using 'xattr' utility
491
559
  # Inputs: 0) ExifTool object ref, 1) file name
492
560
  sub ExtractXAttrTags($$)
493
561
  {
@@ -517,39 +585,8 @@ sub ExtractXAttrTags($$)
517
585
  $val .= pack('H*', $_);
518
586
  next;
519
587
  } elsif ($tag and defined $val) {
520
- # add to our table if necessary
521
- unless ($$tagTablePtr{$tag}) {
522
- my $name;
523
- # generate tag name from attribute name
524
- if ($tag =~ /^com\.apple\.(.*)$/) {
525
- ($name = $1) =~ s/^metadata:_?k//;
526
- $name =~ s/^metadata:(com_)?//;
527
- } else {
528
- $name = $tag;
529
- }
530
- $name =~ s/[.:_]([a-z])/\U$1/g;
531
- $name = 'XAttr' . ucfirst $name;
532
- my %tagInfo = ( Name => $name );
533
- $tagInfo{Groups} = { 2 => 'Time' } if $tag=~/Date$/;
534
- $et->VPrint(0, " [adding $tag]\n");
535
- AddTagToTable($tagTablePtr, $tag, \%tagInfo);
536
- }
537
- if ($val =~ /^bplist0/) {
538
- my %dirInfo = ( DataPt => \$val );
539
- require Image::ExifTool::PLIST;
540
- if (Image::ExifTool::PLIST::ProcessBinaryPLIST($et, \%dirInfo, $tagTablePtr)) {
541
- next if ref $dirInfo{Value} eq 'HASH';
542
- $val = $dirInfo{Value}
543
- } else {
544
- $et->Warn("Error decoding $$tagTablePtr{$tag}{Name}");
545
- next;
546
- }
547
- }
548
- if (not ref $val and ($val =~ /\0/ or length($val) > 200) or $tag eq 'XAttrMDLabel') {
549
- my $buff = $val;
550
- $val = \$buff;
551
- }
552
- $et->HandleTag($tagTablePtr, $tag, $val);
588
+ $val = ReadXAttrValue($et, $tagTablePtr, $tag, $val);
589
+ $et->HandleTag($tagTablePtr, $tag, $val) if defined $val;
553
590
  undef $tag;
554
591
  undef $val;
555
592
  }
@@ -584,6 +621,82 @@ sub GetFileCreateDate($$)
584
621
  delete $$et{SET_GROUP1};
585
622
  }
586
623
 
624
+ #------------------------------------------------------------------------------
625
+ # Read ATTR metadata from "._" file
626
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
627
+ # Return: 1 on success
628
+ # (ref https://www.swiftforensics.com/2018/11/the-dot-underscore-file-format.html)
629
+ sub ProcessATTR($$$)
630
+ {
631
+ my ($et, $dirInfo, $tagTablePtr) = @_;
632
+ my $dataPt = $$dirInfo{DataPt};
633
+ my $dataPos = $$dirInfo{DataPos};
634
+ my $dataLen = length $$dataPt;
635
+
636
+ $dataLen >= 58 and $$dataPt =~ /^.{34}ATTR/s or $et->Warn('Invalid ATTR header'), return 0;
637
+ my $entries = Get32u($dataPt, 66);
638
+ $et->VerboseDir('ATTR', $entries);
639
+ # (Note: The RAF is not in $dirInfo because it would break RSRC reading --
640
+ # the RSCR block uses relative offsets, while the ATTR block uses absolute! grrr!)
641
+ my $raf = $$et{RAF};
642
+ my $pos = 70; # first entry is after ATTR header
643
+ my $i;
644
+ for ($i=0; $i<$entries; ++$i) {
645
+ $pos + 12 > $dataLen and $et->Warn('Truncated ATTR entry'), last;
646
+ my $off = Get32u($dataPt, $pos);
647
+ my $len = Get32u($dataPt, $pos + 4);
648
+ my $n = Get8u($dataPt, $pos + 10); # number of characters in tag name
649
+ $pos + 11 + $n > $dataLen and $et->Warn('Truncated ATTR name'), last;
650
+ $off -= $dataPos; # convert to relative offset (grrr!)
651
+ $off < 0 or $off > $dataLen and $et->Warn('Invalid ATTR offset'), last;
652
+ my $tag = substr($$dataPt, $pos + 11, $n);
653
+ $tag =~ s/\0+$//; # remove null terminator
654
+ $off + $len > $dataLen and $et->Warn('Truncated ATTR value'), last;
655
+ my $val = ReadXAttrValue($et, $tagTablePtr, $tag, substr($$dataPt, $off, $len));
656
+ $et->HandleTag($tagTablePtr, $tag, $val,
657
+ DataPt => $dataPt,
658
+ DataPos => $dataPos,
659
+ Start => $off,
660
+ Size => $len,
661
+ ) if defined $val;
662
+ $pos += (11 + $n + 3) & -4; # step to next entry (on even 4-byte boundary)
663
+ }
664
+ return 1;
665
+ }
666
+
667
+ #------------------------------------------------------------------------------
668
+ # Read information from a MacOS "._" sidecar file
669
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref
670
+ # Returns: 1 on success, 0 if this wasn't a valid "._" file
671
+ # (ref https://www.swiftforensics.com/2018/11/the-dot-underscore-file-format.html)
672
+ sub ProcessMacOS($$)
673
+ {
674
+ my ($et, $dirInfo) = @_;
675
+ my $raf = $$dirInfo{RAF};
676
+ my ($hdr, $buff, $i);
677
+
678
+ return 0 unless $raf->Read($hdr, 26) == 26 and $hdr =~ /^\0\x05\x16\x07\0(.)\0\0Mac OS X /s;
679
+ my $ver = ord $1;
680
+ # (extension may be anything, so just echo back the incoming file extension if it exists)
681
+ $et->SetFileType(undef, undef, $$et{FILE_EXT});
682
+ $ver == 2 or $et->Warn("Unsupported file version $ver"), return 1;
683
+ SetByteOrder('MM');
684
+ my $tagTablePtr = GetTagTable('Image::ExifTool::MacOS::Main');
685
+ my $entries = Get16u(\$hdr, 0x18);
686
+ $et->VerboseDir('MacOS', $entries);
687
+ $raf->Read($hdr, $entries * 12) == $entries * 12 or $et->Warn('Truncated header'), return 1;
688
+ for ($i=0; $i<$entries; ++$i) {
689
+ my $pos = $i * 12;
690
+ my $tag = Get32u(\$hdr, $pos);
691
+ my $off = Get32u(\$hdr, $pos + 4);
692
+ my $len = Get32u(\$hdr, $pos + 8);
693
+ $len > 100000000 and $et->Warn('Record size too large'), last;
694
+ $raf->Seek($off,0) and $raf->Read($buff,$len) == $len or $et->Warn('Truncated record'), last;
695
+ $et->HandleTag($tagTablePtr, $tag, undef, DataPt => \$buff, DataPos => $off, Index => $i);
696
+ }
697
+ return 1;
698
+ }
699
+
587
700
  1; # end
588
701
 
589
702
  __END__
@@ -600,8 +713,9 @@ This module is used by Image::ExifTool
600
713
 
601
714
  This module contains definitions required by Image::ExifTool to extract
602
715
  MDItem* and XAttr* tags on MacOS systems using the "mdls" and "xattr"
603
- utilities respectively. Writable tags use "xattr", "setfile" or "osascript"
604
- for writing.
716
+ utilities respectively. It also reads metadata directly from the MacOS "_."
717
+ sidecar files that are used on some filesystems to store file attributes.
718
+ Writable tags use "xattr", "setfile" or "osascript" for writing.
605
719
 
606
720
  =head1 AUTHOR
607
721
 
@@ -14,7 +14,7 @@ use strict;
14
14
  use vars qw($VERSION);
15
15
  use Image::ExifTool qw(:DataAccess :Utils);
16
16
 
17
- $VERSION = '1.09';
17
+ $VERSION = '1.10';
18
18
 
19
19
  my %noYes = ( 0 => 'No', 1 => 'Yes' );
20
20
 
@@ -221,6 +221,8 @@ my %noYes = ( 0 => 'No', 1 => 'Yes' );
221
221
  },
222
222
  0x2e => {
223
223
  Name => 'TrackEntry',
224
+ # reset TrackType member at the start of each track
225
+ Condition => 'delete $$self{TrackType}; 1',
224
226
  SubDirectory => { TagTable => 'Image::ExifTool::Matroska::Main' },
225
227
  },
226
228
  0x57 => { Name => 'TrackNumber', Format => 'unsigned' },
@@ -49,7 +49,7 @@ use vars qw($VERSION %minoltaLensTypes %minoltaTeleconverters %minoltaColorMode
49
49
  use Image::ExifTool qw(:DataAccess :Utils);
50
50
  use Image::ExifTool::Exif;
51
51
 
52
- $VERSION = '2.83';
52
+ $VERSION = '2.87';
53
53
 
54
54
  # Full list of product codes for Sony-compatible Minolta lenses
55
55
  # (ref http://www.kb.sony.com/selfservice/documentLink.do?externalId=C1000570)
@@ -602,13 +602,18 @@ $VERSION = '2.83';
602
602
  15 => 'Light', #JR (NC)
603
603
  16 => 'Autumn Leaves', #JR (NC)
604
604
  17 => 'Sepia', #JR
605
+ 18 => 'FL', #JR (7SM3)
606
+ 19 => 'Vivid 2', #JR (7SM3)
607
+ 20 => 'IN', #JR (7SM3)
608
+ 21 => 'SH', #JR (7SM3)
605
609
  100 => 'Neutral', #JD
606
610
  101 => 'Clear', #JD
607
611
  102 => 'Deep', #JD
608
612
  103 => 'Light', #JD
609
613
  104 => 'Night View', #JD
610
614
  105 => 'Autumn Leaves', #JD
611
- 0xffffffff => 'n/a', #PH
615
+ 255 => 'Off', #JR (new for ILCE-7SM3, July 2020)
616
+ 0xffffffff => 'n/a', #PH
612
617
  );
613
618
 
614
619
  %minoltaSceneMode = (