exiftool_vendored 12.39.0 → 12.41.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +45 -0
  3. data/bin/MANIFEST +1 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +2 -2
  7. data/bin/arg_files/exif2xmp.args +5 -0
  8. data/bin/arg_files/xmp2exif.args +6 -0
  9. data/bin/config_files/acdsee.config +6 -6
  10. data/bin/config_files/photoshop_paths.config +30 -7
  11. data/bin/config_files/picasa_faces.config +1 -1
  12. data/bin/config_files/pix4d.config +2 -2
  13. data/bin/config_files/tiff_version.config +2 -2
  14. data/bin/exiftool +52 -21
  15. data/bin/lib/Image/ExifTool/Canon.pm +78 -4
  16. data/bin/lib/Image/ExifTool/Exif.pm +44 -20
  17. data/bin/lib/Image/ExifTool/Geotag.pm +3 -2
  18. data/bin/lib/Image/ExifTool/MacOS.pm +9 -9
  19. data/bin/lib/Image/ExifTool/MakerNotes.pm +12 -1
  20. data/bin/lib/Image/ExifTool/Nikon.pm +39 -12
  21. data/bin/lib/Image/ExifTool/Olympus.pm +7 -6
  22. data/bin/lib/Image/ExifTool/QuickTime.pm +9 -5
  23. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +2 -2
  24. data/bin/lib/Image/ExifTool/Samsung.pm +5 -1
  25. data/bin/lib/Image/ExifTool/Shortcuts.pm +2 -1
  26. data/bin/lib/Image/ExifTool/Sony.pm +10 -4
  27. data/bin/lib/Image/ExifTool/TagLookup.pm +6360 -6354
  28. data/bin/lib/Image/ExifTool/TagNames.pod +22 -2
  29. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +7 -3
  30. data/bin/lib/Image/ExifTool/WriteXMP.pl +2 -0
  31. data/bin/lib/Image/ExifTool/XMP.pm +9 -1
  32. data/bin/lib/Image/ExifTool/XMPStruct.pl +21 -7
  33. data/bin/lib/Image/ExifTool.pm +11 -3
  34. data/bin/lib/Image/ExifTool.pod +7 -6
  35. data/bin/perl-Image-ExifTool.spec +1 -1
  36. data/lib/exiftool_vendored/version.rb +1 -1
  37. metadata +2 -2
@@ -56,7 +56,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
56
56
  use Image::ExifTool qw(:DataAccess :Utils);
57
57
  use Image::ExifTool::MakerNotes;
58
58
 
59
- $VERSION = '4.38';
59
+ $VERSION = '4.40';
60
60
 
61
61
  sub ProcessExif($$$);
62
62
  sub WriteExif($$$);
@@ -415,7 +415,14 @@ my %opcodeInfo = (
415
415
  WriteGroup => 'IFD0',
416
416
  # set priority directory if this is the full resolution image
417
417
  DataMember => 'SubfileType',
418
- RawConv => '$self->SetPriorityDir() if $val eq "0"; $$self{SubfileType} = $val',
418
+ RawConv => q{
419
+ if ($val == ($val & 0x02)) {
420
+ $self->SetPriorityDir() if $val == 0;
421
+ $$self{PageCount} = ($$self{PageCount} || 0) + 1;
422
+ $$self{MultiPage} = 1 if $val == 2 or $$self{PageCount} > 1;
423
+ }
424
+ $$self{SubfileType} = $val;
425
+ },
419
426
  PrintConv => \%subfileType,
420
427
  },
421
428
  0xff => {
@@ -425,7 +432,14 @@ my %opcodeInfo = (
425
432
  Writable => 'int16u',
426
433
  WriteGroup => 'IFD0',
427
434
  # set priority directory if this is the full resolution image
428
- RawConv => '$self->SetPriorityDir() if $val eq "1"; $val',
435
+ RawConv => q{
436
+ if ($val == 1 or $val == 3) {
437
+ $self->SetPriorityDir() if $val == 1;
438
+ $$self{PageCount} = ($$self{PageCount} || 0) + 1;
439
+ $$self{MultiPage} = 1 if $val == 3 or $$self{PageCount} > 1;
440
+ }
441
+ $val;
442
+ },
429
443
  PrintConv => {
430
444
  1 => 'Full-resolution image',
431
445
  2 => 'Reduced-resolution image',
@@ -2144,7 +2158,7 @@ my %opcodeInfo = (
2144
2158
  Notes => 'displayed in seconds, but stored as an APEX value',
2145
2159
  Format => 'rational64s', # Leica M8 patch (incorrectly written as rational64u)
2146
2160
  Writable => 'rational64s',
2147
- ValueConv => 'abs($val)<100 ? 2**(-$val) : 0',
2161
+ ValueConv => 'IsFloat($val) && abs($val)<100 ? 2**(-$val) : 0',
2148
2162
  ValueConvInv => '$val>0 ? -log($val)/log(2) : -100',
2149
2163
  PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2150
2164
  PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
@@ -4827,6 +4841,7 @@ my %subSecConv = (
4827
4841
  PrintConvInv => q{
4828
4842
  return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/;
4829
4843
  my ($lat, $lon) = ($1, $2);
4844
+ require Image::ExifTool::GPS;
4830
4845
  $lat = Image::ExifTool::GPS::ToDegrees($lat, 1, "lat");
4831
4846
  $lon = Image::ExifTool::GPS::ToDegrees($lon, 1, "lon");
4832
4847
  return "$lat, $lon";
@@ -5248,6 +5263,7 @@ sub RedBlueBalance($@)
5248
5263
  sub PrintExposureTime($)
5249
5264
  {
5250
5265
  my $secs = shift;
5266
+ return $secs unless Image::ExifTool::IsFloat($secs);
5251
5267
  if ($secs < 0.25001 and $secs > 0) {
5252
5268
  return sprintf("1/%d",int(0.5 + 1/$secs));
5253
5269
  }
@@ -5853,7 +5869,7 @@ sub ProcessExif($$$)
5853
5869
  unless ($path =~ /^(JPEG-APP1-IFD0|TIFF-IFD0|PSD-EXIFInfo-IFD0)$/) {
5854
5870
  if ($Image::ExifTool::MWG::strict) {
5855
5871
  $et->Warn("Ignored non-standard EXIF at $path");
5856
- return 1;
5872
+ return 0;
5857
5873
  } else {
5858
5874
  $et->Warn("Non-standard EXIF at $path", 1);
5859
5875
  }
@@ -5896,10 +5912,6 @@ sub ProcessExif($$$)
5896
5912
  # also read next IFD pointer if available
5897
5913
  if ($raf->Read($buf2, $len+4) >= $len) {
5898
5914
  $buff .= $buf2;
5899
- # make copy of dirInfo since we're going to modify it
5900
- my %newDirInfo = %$dirInfo;
5901
- $dirInfo = \%newDirInfo;
5902
- # update directory parameters for the newly loaded IFD
5903
5915
  $dataPt = $$dirInfo{DataPt} = \$buff;
5904
5916
  $dataPos = $$dirInfo{DataPos} = $offset;
5905
5917
  $dataLen = $$dirInfo{DataLen} = length $buff;
@@ -6593,7 +6605,7 @@ sub ProcessExif($$$)
6593
6605
  #### eval Validate ($val, $dirData, $subdirStart, $size)
6594
6606
  my $ok = 0;
6595
6607
  if (defined $$subdir{Validate} and not eval $$subdir{Validate}) {
6596
- $et->Warn("Invalid $tagStr data");
6608
+ $et->Warn("Invalid $tagStr data", $inMakerNotes);
6597
6609
  $invalid = 1;
6598
6610
  } else {
6599
6611
  if (not $subdirInfo{DirName} and $inMakerNotes) {
@@ -6706,28 +6718,40 @@ sub ProcessExif($$$)
6706
6718
 
6707
6719
  # scan for subsequent IFD's if specified
6708
6720
  if ($$dirInfo{Multi} and $bytesFromEnd >= 4) {
6709
- my $offset = Get32u($dataPt, $dirEnd);
6710
- if ($offset) {
6711
- my $subdirStart = $offset - $dataPos;
6712
- # use same directory information for trailing directory,
6713
- # but change the start location (ProcessDirectory will
6714
- # test to make sure we don't reprocess the same dir twice)
6715
- my %newDirInfo = %$dirInfo;
6716
- $newDirInfo{DirStart} = $subdirStart;
6721
+ # use same directory information for trailing directory,
6722
+ # but change the start location (ProcessDirectory will
6723
+ # test to make sure we don't reprocess the same dir twice)
6724
+ my %newDirInfo = %$dirInfo;
6725
+ $newDirInfo{Multi} = 0; # prevent recursion
6726
+ $newDirInfo{OffsetName} = $nextOffName;
6727
+ $$et{INDENT} =~ s/..$//; # keep indent the same
6728
+ for (;;) {
6729
+ my $offset = Get32u($dataPt, $dirEnd) or last;
6730
+ $newDirInfo{DirStart} = $offset - $dataPos;
6717
6731
  # increment IFD number
6718
6732
  my $ifdNum = $newDirInfo{DirName} =~ s/(\d+)$// ? $1 : 0;
6719
6733
  $newDirInfo{DirName} .= $ifdNum + 1;
6720
- $newDirInfo{OffsetName} = $nextOffName;
6721
6734
  # must validate SubIFD1 because the nextIFD pointer is invalid for some RAW formats
6722
6735
  if ($newDirInfo{DirName} ne 'SubIFD1' or ValidateIFD(\%newDirInfo)) {
6723
- $$et{INDENT} =~ s/..$//; # keep indent the same
6724
6736
  my $cur = pop @{$$et{PATH}};
6725
6737
  $et->ProcessDirectory(\%newDirInfo, $tagTablePtr) or $success = 0;
6726
6738
  push @{$$et{PATH}}, $cur;
6739
+ if ($success and $newDirInfo{BytesFromEnd} >= 4) {
6740
+ $dataPt = $newDirInfo{DataPt};
6741
+ $dataPos = $newDirInfo{DataPos};
6742
+ $dirEnd = $newDirInfo{DirEnd};
6743
+ next;
6744
+ }
6727
6745
  } elsif ($verbose or $$et{TIFF_TYPE} eq 'TIFF') {
6728
6746
  $et->Warn('Ignored bad IFD linked from SubIFD');
6729
6747
  }
6748
+ last;
6730
6749
  }
6750
+ } elsif (defined $$dirInfo{Multi}) {
6751
+ # return necessary parameters for parsing next IFD
6752
+ $$dirInfo{DirEnd} = $dirEnd;
6753
+ $$dirInfo{OffsetName} = $nextOffName;
6754
+ $$dirInfo{BytesFromEnd} = $bytesFromEnd;
6731
6755
  }
6732
6756
  return $success;
6733
6757
  }
@@ -28,7 +28,7 @@ use vars qw($VERSION);
28
28
  use Image::ExifTool qw(:Public);
29
29
  use Image::ExifTool::GPS;
30
30
 
31
- $VERSION = '1.65';
31
+ $VERSION = '1.66';
32
32
 
33
33
  sub JITTER() { return 2 } # maximum time jitter
34
34
 
@@ -210,13 +210,14 @@ sub LoadTrackLog($$;$)
210
210
  $raf->ReadLine($_) or last;
211
211
  # determine file format
212
212
  if (not $format) {
213
+ s/^\xef\xbb\xbf//; # remove leading BOM if it exists
213
214
  if (/^<(\?xml|gpx)[\s>]/) { # look for XML or GPX header
214
215
  $format = 'XML';
215
216
  # check for NMEA sentence
216
217
  # (must ONLY start with ones that have timestamps! eg. not GSA or PTNTHPR!)
217
218
  } elsif (/^.*\$([A-Z]{2}(RMC|GGA|GLL|ZDA)|PMGNTRK),/) {
218
219
  $format = 'NMEA';
219
- $nmeaStart = $2 || $1; # save type of first sentence
220
+ $nmeaStart = $2 || $1; # save type of first sentence
220
221
  } elsif (/^A(FLA|XSY|FIL)/) {
221
222
  # (don't set format yet because we want to read HFDTE first)
222
223
  $nmeaStart = 'B' ;
@@ -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.11';
15
+ $VERSION = '1.12';
16
16
 
17
17
  sub MDItemLocalTime($);
18
18
  sub ProcessATTR($$$);
@@ -381,7 +381,7 @@ sub SetMacOSTags($$$)
381
381
  $val = Image::ExifTool::ConvertUnixTime($time, 1) if $time;
382
382
  }
383
383
  $val =~ s{(\d{4}):(\d{2}):(\d{2})}{$2/$3/$1}; # reformat for setfile
384
- $cmd = "setfile -d '${val}' '${f}'";
384
+ $cmd = "/usr/bin/setfile -d '${val}' '${f}'";
385
385
  } elsif ($tag eq 'MDItemUserTags') {
386
386
  # (tested with "tag" version 0.9.0)
387
387
  ($f = $file) =~ s/'/'\\''/g;
@@ -391,7 +391,7 @@ sub SetMacOSTags($$$)
391
391
  my @dels = @{$$nvHash{DelValue}};
392
392
  s/'/'\\''/g foreach @dels;
393
393
  my $del = join ',', @dels;
394
- $err = system "tag -r '${del}' '${f}'>/dev/null 2>&1";
394
+ $err = system "/usr/local/bin/tag -r '${del}' '${f}'>/dev/null 2>&1";
395
395
  unless ($err) {
396
396
  $et->VerboseValue("- $tag", $del);
397
397
  $result = 1;
@@ -403,13 +403,13 @@ sub SetMacOSTags($$$)
403
403
  s/'/'\\''/g foreach @vals;
404
404
  my $opt = $overwrite > 0 ? '-s' : '-a';
405
405
  $val = @vals ? join(',', @vals) : '';
406
- $cmd = "tag $opt '${val}' '${f}'";
406
+ $cmd = "/usr/local/bin/tag $opt '${val}' '${f}'";
407
407
  $et->VPrint(1," - $tag = (all)\n") if $overwrite > 0;
408
408
  undef $val if $val eq '';
409
409
  }
410
410
  } elsif ($tag eq 'XAttrQuarantine') {
411
411
  ($f = $file) =~ s/'/'\\''/g;
412
- $cmd = "xattr -d com.apple.quarantine '${f}'";
412
+ $cmd = "/usr/bin/xattr -d com.apple.quarantine '${f}'";
413
413
  $silentErr = 256; # (will get this error if attribute doesn't exist)
414
414
  } else {
415
415
  ($f = $file) =~ s/(["\\])/\\$1/g; # escape necessary characters for script
@@ -426,7 +426,7 @@ sub SetMacOSTags($$$)
426
426
  $v = $val ? 8 - $val : 0; # convert from label to label index (0 for no label)
427
427
  $attr = 'label index';
428
428
  }
429
- $cmd = qq(osascript -e 'set fp to POSIX file "$f" as alias' -e \\
429
+ $cmd = qq(/usr/bin/osascript -e 'set fp to POSIX file "$f" as alias' -e \\
430
430
  'tell application "Finder" to set $attr of file fp to "$v"');
431
431
  }
432
432
  if (defined $cmd) {
@@ -455,7 +455,7 @@ sub ExtractMDItemTags($$)
455
455
 
456
456
  ($fn = $file) =~ s/([`"\$\\])/\\$1/g; # escape necessary characters
457
457
  $et->VPrint(0, '(running mdls)');
458
- my @mdls = `mdls "$fn" 2> /dev/null`; # get MacOS metadata
458
+ my @mdls = `/usr/bin/mdls "$fn" 2> /dev/null`; # get MacOS metadata
459
459
  if ($? or not @mdls) {
460
460
  $et->Warn('Error running "mdls" to extract MDItem tags');
461
461
  return;
@@ -565,7 +565,7 @@ sub ExtractXAttrTags($$)
565
565
 
566
566
  ($fn = $file) =~ s/([`"\$\\])/\\$1/g; # escape necessary characters
567
567
  $et->VPrint(0, '(running xattr)');
568
- my @xattr = `xattr -lx "$fn" 2> /dev/null`; # get MacOS extended attributes
568
+ my @xattr = `/usr/bin/xattr -lx "$fn" 2> /dev/null`; # get MacOS extended attributes
569
569
  if ($? or not @xattr) {
570
570
  $? and $et->Warn('Error running "xattr" to extract XAttr tags');
571
571
  return;
@@ -611,7 +611,7 @@ sub GetFileCreateDate($$)
611
611
 
612
612
  ($fn = $file) =~ s/([`"\$\\])/\\$1/g; # escape necessary characters
613
613
  $et->VPrint(0, '(running stat)');
614
- my $time = `stat -f '%SB' -t '%Y:%m:%d %H:%M:%S%z' "$fn" 2> /dev/null`;
614
+ my $time = `/usr/bin/stat -f '%SB' -t '%Y:%m:%d %H:%M:%S%z' "$fn" 2> /dev/null`;
615
615
  if ($? or not $time or $time !~ s/([-+]\d{2})(\d{2})\s*$/$1:$2/) {
616
616
  $et->Warn('Error running "stat" to extract FileCreateDate');
617
617
  return;
@@ -21,7 +21,7 @@ sub ProcessKodakPatch($$$);
21
21
  sub WriteUnknownOrPreview($$$);
22
22
  sub FixLeicaBase($$;$);
23
23
 
24
- $VERSION = '2.10';
24
+ $VERSION = '2.11';
25
25
 
26
26
  my $debug; # set to 1 to enable debugging code
27
27
 
@@ -570,6 +570,17 @@ my $debug; # set to 1 to enable debugging code
570
570
  ByteOrder => 'Unknown',
571
571
  },
572
572
  },
573
+ {
574
+ Name => 'MakerNoteOlympus3',
575
+ # new Olympus maker notes start with "OLYMPUS\0"
576
+ Condition => '$$valPt =~ /^OM SYSTEM\0/',
577
+ SubDirectory => {
578
+ TagTable => 'Image::ExifTool::Olympus::Main',
579
+ Start => '$valuePtr + 16',
580
+ Base => '$start - 16',
581
+ ByteOrder => 'Unknown',
582
+ },
583
+ },
573
584
  {
574
585
  Name => 'MakerNoteLeica',
575
586
  # (starts with "LEICA\0\0\0")
@@ -63,7 +63,7 @@ use Image::ExifTool::Exif;
63
63
  use Image::ExifTool::GPS;
64
64
  use Image::ExifTool::XMP;
65
65
 
66
- $VERSION = '4.04';
66
+ $VERSION = '4.05';
67
67
 
68
68
  sub LensIDConv($$$);
69
69
  sub ProcessNikonAVI($$$);
@@ -437,6 +437,7 @@ sub GetAFPointGrid($$;$);
437
437
  'A5 40 2D 88 2C 40 4B 0E' => 'Sigma 18-250mm F3.5-6.3 DC OS HSM',
438
438
  # LensFStops varies with FocalLength for this lens (ref 2):
439
439
  '92 2C 2D 88 2C 40 4B 0E' => 'Sigma 18-250mm F3.5-6.3 DC Macro OS HSM', #2
440
+ '87 2C 2D 8E 2C 40 4B 0E' => 'Sigma 18-300mm F3.5-6.3 DC Macro HSM', #30
440
441
  # '92 2C 2D 88 2C 40 4B 0E' (250mm)
441
442
  # '92 2B 2D 88 2C 40 4B 0E' (210mm)
442
443
  # '92 2C 2D 88 2C 40 4B 0E' (185mm)
@@ -495,6 +496,7 @@ sub GetAFPointGrid($$;$);
495
496
  '7A 48 5C 80 24 24 4B 06' => 'Sigma 70-200mm F2.8 EX APO DG Macro HSM II',
496
497
  'EE 48 5C 80 24 24 4B 06' => 'Sigma 70-200mm F2.8 EX APO DG Macro HSM II', #JD
497
498
  '9C 48 5C 80 24 24 4B 0E' => 'Sigma 70-200mm F2.8 EX DG OS HSM', #Rolando Ruzic
499
+ 'BB 48 5C 80 24 24 4B 4E' => 'Sigma 70-200mm F2.8 DG OS HSM | S', #forum13207
498
500
  '02 46 5C 82 25 25 02 00' => 'Sigma 70-210mm F2.8 APO', #JD
499
501
  '02 40 5C 82 2C 35 02 00' => 'Sigma APO 70-210mm F3.5-4.5',
500
502
  '26 3C 5C 82 30 3C 1C 02' => 'Sigma 70-210mm F4-5.6 UC-II',
@@ -1220,6 +1222,16 @@ my %binaryDataAttrs = (
1220
1222
  my %base64bin = ( ValueConv => 'Image::ExifTool::XMP::DecodeBase64($val)' );
1221
1223
  my %base64int32u = ( ValueConv => 'my $val=Image::ExifTool::XMP::DecodeBase64($val); unpack("V",$$val)' );
1222
1224
  my %base64bytes = ( ValueConv => 'my $val=Image::ExifTool::XMP::DecodeBase64($val); join(".",unpack("C*",$$val))' );
1225
+ my %base64double = (
1226
+ ValueConv => q{
1227
+ my $val=Image::ExifTool::XMP::DecodeBase64($val);
1228
+ my $saveOrder = GetByteOrder();
1229
+ SetByteOrder('II');
1230
+ $val = GetDouble($val,0);
1231
+ SetByteOrder($saveOrder);
1232
+ return $val;
1233
+ },
1234
+ );
1223
1235
  my %base64coord = (
1224
1236
  ValueConv => q{
1225
1237
  my $val=Image::ExifTool::XMP::DecodeBase64($val);
@@ -4180,7 +4192,7 @@ my %base64coord = (
4180
4192
  Format => 'int16u',
4181
4193
  },
4182
4194
  0x43 => {
4183
- Name => 'FocusPositionHoriontal',
4195
+ Name => 'FocusPositionHorizontal',
4184
4196
  PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ); }, #493 focus points for Z9 fall in a 30x18 grid (some coordinates are not accessible)
4185
4197
  },
4186
4198
  0x45 => {
@@ -8565,7 +8577,17 @@ my %nikonFocalConversions = (
8565
8577
  444 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1},
8566
8578
  456 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1},
8567
8579
  #526 FocusMode
8568
- #528 AFAreaMode
8580
+ 528 => {
8581
+ Name => 'AFAreaMode',
8582
+ PrintConv => {
8583
+ 1 => 'Single',
8584
+ 2 => 'Dynamic',
8585
+ 3 => 'Wide (S)',
8586
+ 4 => 'Wide (L)',
8587
+ 5 => '3D',
8588
+ 6 => 'Auto',
8589
+ },
8590
+ },
8569
8591
  530 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
8570
8592
  534 => {
8571
8593
  Name => 'BracketSet',
@@ -11055,17 +11077,22 @@ my %nikonFocalConversions = (
11055
11077
  },
11056
11078
  GPSAltitude => {
11057
11079
  Groups => { 2 => 'Location' },
11058
- ValueConv => q{
11059
- my $val=Image::ExifTool::XMP::DecodeBase64($val);
11060
- my $saveOrder = GetByteOrder();
11061
- SetByteOrder('II');
11062
- $val = GetDouble($val,0);
11063
- SetByteOrder($saveOrder);
11064
- return $val;
11065
- },
11080
+ %base64double,
11066
11081
  PrintConv => '"$val m"',
11067
11082
  },
11068
- GPSMapDatum => { },
11083
+ GPSMapDatum => { Groups => { 2 => 'Location' } },
11084
+ GPSImgDirection => {
11085
+ Groups => { 2 => 'Location' },
11086
+ %base64double,
11087
+ PrintConv => 'sprintf("%.2f", $val)',
11088
+ },
11089
+ GPSImgDirectionRef => {
11090
+ Groups => { 2 => 'Location' },
11091
+ PrintConv => {
11092
+ M => 'Magnetic North',
11093
+ T => 'True North',
11094
+ },
11095
+ },
11069
11096
  );
11070
11097
  %Image::ExifTool::Nikon::sdc = (
11071
11098
  GROUPS => { 0 => 'XMP', 1 => 'XMP-sdc', 2 => 'Image' },
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.75';
43
+ $VERSION = '2.77';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -432,6 +432,7 @@ my %olympusCameraTypes = (
432
432
  S0089 => 'E-M5MarkIII',
433
433
  S0092 => 'E-M1MarkIII', #IB
434
434
  S0093 => 'E-P7', #IB
435
+ S0095 => 'OM-1', #IB
435
436
  SR45 => 'D220',
436
437
  SR55 => 'D320L',
437
438
  SR83 => 'D340L',
@@ -3430,7 +3431,7 @@ my %indexInfo = (
3430
3431
  0x2a => {
3431
3432
  Name => 'FNumber',
3432
3433
  Format => 'rational64u',
3433
- PrintConv => 'sprintf("%.1f",$val)',
3434
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
3434
3435
  },
3435
3436
  0x32 => { #(NC)
3436
3437
  Name => 'ExposureCompensation',
@@ -3476,7 +3477,7 @@ my %indexInfo = (
3476
3477
  0x3a => {
3477
3478
  Name => 'FNumber',
3478
3479
  Format => 'rational64u',
3479
- PrintConv => 'sprintf("%.1f",$val)',
3480
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
3480
3481
  },
3481
3482
  0x42 => { #(NC)
3482
3483
  Name => 'ExposureCompensation',
@@ -3527,7 +3528,7 @@ my %indexInfo = (
3527
3528
  0x28 => {
3528
3529
  Name => 'FNumber',
3529
3530
  Format => 'rational64u',
3530
- PrintConv => 'sprintf("%.1f",$val)',
3531
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
3531
3532
  },
3532
3533
  0x30 => { #(NC)
3533
3534
  Name => 'ExposureCompensation',
@@ -3744,7 +3745,7 @@ my %indexInfo = (
3744
3745
  0x5a => {
3745
3746
  Name => 'FNumber',
3746
3747
  Format => 'rational64u',
3747
- PrintConv => 'sprintf("%.1f",$val)',
3748
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
3748
3749
  },
3749
3750
  0x7f => {
3750
3751
  Name => 'DateTimeOriginal', #(NC)
@@ -3789,7 +3790,7 @@ my %indexInfo = (
3789
3790
  0x5e => {
3790
3791
  Name => 'FNumber',
3791
3792
  Format => 'rational64u',
3792
- PrintConv => 'sprintf("%.1f",$val)',
3793
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
3793
3794
  },
3794
3795
  0x83 => {
3795
3796
  Name => 'DateTime1',
@@ -47,7 +47,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
47
47
  use Image::ExifTool::Exif;
48
48
  use Image::ExifTool::GPS;
49
49
 
50
- $VERSION = '2.73';
50
+ $VERSION = '2.74';
51
51
 
52
52
  sub ProcessMOV($$;$);
53
53
  sub ProcessKeys($$$);
@@ -2232,7 +2232,7 @@ my %eeBox2 = (
2232
2232
  # 4 ? - "1e 00"
2233
2233
  # 6 int16u - record length in bytes
2234
2234
  # 8 ? - "23 01 00 00 00 00 00 00"
2235
- # 16 - start of records (each record ends in an int64u timestamp in ns)
2235
+ # 16 - start of records (each record ends in an int64u timestamp "ts" in ns)
2236
2236
  # RDTA - float[4],ts: "-0.31289672 -0.2245330 11.303817 0 775.780"
2237
2237
  # RDTB - float[4],ts: "-0.04841613 -0.2166595 0.0724792 0 775.780"
2238
2238
  # RDTC - float[4],ts: "27.60925 -27.10037 -13.27285 0 775.829"
@@ -8795,16 +8795,20 @@ sub ProcessSampleDesc($$$)
8795
8795
 
8796
8796
  my $num = Get32u($dataPt, 4); # get number of sample entries in table
8797
8797
  $pos += 8;
8798
- my $i;
8798
+ my ($i, $err);
8799
8799
  for ($i=0; $i<$num; ++$i) { # loop through sample entries
8800
- last if $pos + 8 > $dirLen;
8800
+ $pos + 8 > $dirLen and $err = 1, last;
8801
8801
  my $size = Get32u($dataPt, $pos);
8802
- last if $pos + $size > $dirLen;
8802
+ $pos + $size > $dirLen and $err = 1, last;
8803
8803
  $$dirInfo{DirStart} = $pos;
8804
8804
  $$dirInfo{DirLen} = $size;
8805
8805
  ProcessHybrid($et, $dirInfo, $tagTablePtr);
8806
8806
  $pos += $size;
8807
8807
  }
8808
+ if ($err and $$et{HandlerType}) {
8809
+ my $grp = $$et{SET_GROUP1} || $$dirInfo{Parent} || 'unknown';
8810
+ $et->Warn("Truncated $$et{HandlerType} sample table for $grp");
8811
+ }
8808
8812
  return 1;
8809
8813
  }
8810
8814
 
@@ -1144,13 +1144,13 @@ sub ProcessSamples($)
1144
1144
  }
1145
1145
  @$size < @$start + $samplesPerChunk and $et->WarnOnce('Sample size error'), last;
1146
1146
  my $sampleStart = $chunkStart;
1147
- for ($i=0; ; ) {
1147
+ Sample: for ($i=0; ; ) {
1148
1148
  push @$start, $sampleStart;
1149
1149
  if (defined $time) {
1150
1150
  until ($timeCount) {
1151
1151
  if (@$stts < 2) {
1152
1152
  undef $time;
1153
- last;
1153
+ last Sample;
1154
1154
  }
1155
1155
  $timeCount = shift @$stts;
1156
1156
  $timeDelta = shift @$stts;
@@ -22,7 +22,7 @@ use vars qw($VERSION %samsungLensTypes);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
  use Image::ExifTool::Exif;
24
24
 
25
- $VERSION = '1.50';
25
+ $VERSION = '1.51';
26
26
 
27
27
  sub WriteSTMN($$$);
28
28
  sub ProcessINFO($$$);
@@ -454,6 +454,8 @@ my %formatMinMax = (
454
454
  0xa018 => { #1
455
455
  Name => 'ExposureTime',
456
456
  Writable => 'rational64u',
457
+ ValueConv => '$val=~s/ .*//; $val', # some models write 2 values here
458
+ ValueConvInv => '$val',
457
459
  PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
458
460
  PrintConvInv => '$val',
459
461
  },
@@ -461,6 +463,8 @@ my %formatMinMax = (
461
463
  Name => 'FNumber',
462
464
  Priority => 0,
463
465
  Writable => 'rational64u',
466
+ ValueConv => '$val=~s/ .*//; $val', # some models write 2 values here
467
+ ValueConvInv => '$val',
464
468
  PrintConv => 'sprintf("%.1f",$val)',
465
469
  PrintConvInv => '$val',
466
470
  },
@@ -19,7 +19,7 @@ package Image::ExifTool::Shortcuts;
19
19
  use strict;
20
20
  use vars qw($VERSION);
21
21
 
22
- $VERSION = '1.65';
22
+ $VERSION = '1.66';
23
23
 
24
24
  # this is a special table used to define command-line shortcuts
25
25
  # (documentation Notes may be added for these via %shortcutNotes in BuildTagLookup.pm)
@@ -158,6 +158,7 @@ $VERSION = '1.65';
158
158
  'MakerNoteNintendo',
159
159
  'MakerNoteOlympus',
160
160
  'MakerNoteOlympus2',
161
+ 'MakerNoteOlympus3',
161
162
  'MakerNoteLeica',
162
163
  'MakerNoteLeica2',
163
164
  'MakerNoteLeica3',
@@ -34,7 +34,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
34
34
  use Image::ExifTool::Exif;
35
35
  use Image::ExifTool::Minolta;
36
36
 
37
- $VERSION = '3.48';
37
+ $VERSION = '3.50';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -244,7 +244,8 @@ sub PrintInvLensSpec($;$$);
244
244
  50529 => 'Sigma 90mm F2.8 DG DN | C', #JR (021)
245
245
  50530 => 'Sigma 24mm F2 DG DN | C', #JR (021)
246
246
  50531 => 'Sigma 18-50mm F2.8 DC DN | C', #IB/JR (021)
247
-
247
+ 50532 => 'Sigma 20mm F2 DG DN | C', #JR (022)
248
+
248
249
  50992 => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR
249
250
  50993 => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB
250
251
  50994 => 'Voigtlander ULTRA WIDE-HELIAR 12mm F5.6 III', #IB
@@ -273,7 +274,12 @@ sub PrintInvLensSpec($;$$);
273
274
  51510 => 'Samyang AF 18mm F2.8 or Samyang AF 35mm F1.8', #JR
274
275
  51510.1 => 'Samyang AF 35mm F1.8', #JR
275
276
  51512 => 'Samyang AF 75mm F1.8', #IB/JR
277
+ 51513 => 'Samyang AF 35mm F1.8', #JR
276
278
  51514 => 'Samyang AF 24mm F1.8', #IB
279
+ 51515 => 'Samyang AF 12mm F2.0', #JR
280
+ 51516 => 'Samyang AF 24-70mm F2.8', #JR
281
+ 51517 => 'Samyang AF 50mm F1.4 II', #JR
282
+ 51518 => 'Samyang AF 135mm F1.8', #JR
277
283
  );
278
284
 
279
285
  # ExposureProgram values (ref PH, mainly decoded from A200)
@@ -1786,7 +1792,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1786
1792
  # 15 0 35 2 2 ILCA-68/77M2, ILCE-5000/5100/6000/7/7R/7S/7M2/QX1, DSC-HX60V/HX350/HX400V/QX30/RX10/RX100M3/WX220/WX350
1787
1793
  # 16 0 85 2 2 DSC-HX80/HX90V/WX500
1788
1794
  # 17 0 232 1 2 DSC-RX0/RX0M2/RX1RM2/RX10M2/RX10M3/RX10M4/RX100M4/RX100M5/RX100M5A/RX100M6/RX100M7/HX99, ILCE-6100/6300/6400/6500/6600/7C/7M3/7RM2/7RM3/7RM4/7SM2/9/9M2, ILCA-99M2, ZV-1
1789
- # 18 0 20 0 164 ILCE-7SM3
1795
+ # 18 0 20 0 164 ILCE-7SM3
1790
1796
  # other values for Panorama images and several other models
1791
1797
  0x9404 => [{
1792
1798
  Name => 'Tag9404a',
@@ -8382,7 +8388,7 @@ my %isoSetting2010 = (
8382
8388
  DATAMEMBER => [ 0x04 ],
8383
8389
  0x04 => {
8384
8390
  # seen values 0,2,3,18,19,32,49,50,83,130,132,148,213,229,255
8385
- # CameraTemperature is valid for all values above except ==0 and >=130
8391
+ # CameraTemperature is valid for all values above except ==0 and >=130
8386
8392
  Name => 'TempTest2',
8387
8393
  DataMember => 'TempTest2',
8388
8394
  Hidden => 1,