exiftool_vendored 11.98.0 → 12.10.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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +198 -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 +102 -75
  8. data/bin/lib/Image/ExifTool.pm +163 -111
  9. data/bin/lib/Image/ExifTool.pod +127 -93
  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 +202 -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/ID3.pm +91 -12
  26. data/bin/lib/Image/ExifTool/IPTC.pm +1 -0
  27. data/bin/lib/Image/ExifTool/JSON.pm +27 -4
  28. data/bin/lib/Image/ExifTool/Lang/de.pm +3 -1
  29. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  30. data/bin/lib/Image/ExifTool/M2TS.pm +19 -19
  31. data/bin/lib/Image/ExifTool/MacOS.pm +154 -38
  32. data/bin/lib/Image/ExifTool/Matroska.pm +3 -1
  33. data/bin/lib/Image/ExifTool/Minolta.pm +7 -2
  34. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +11 -10
  35. data/bin/lib/Image/ExifTool/Nikon.pm +164 -20
  36. data/bin/lib/Image/ExifTool/Olympus.pm +39 -17
  37. data/bin/lib/Image/ExifTool/PNG.pm +14 -3
  38. data/bin/lib/Image/ExifTool/PPM.pm +5 -5
  39. data/bin/lib/Image/ExifTool/Panasonic.pm +148 -14
  40. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +34 -0
  41. data/bin/lib/Image/ExifTool/Parrot.pm +2 -1
  42. data/bin/lib/Image/ExifTool/Pentax.pm +3 -1
  43. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  44. data/bin/lib/Image/ExifTool/QuickTime.pm +289 -37
  45. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +419 -60
  46. data/bin/lib/Image/ExifTool/README +26 -22
  47. data/bin/lib/Image/ExifTool/RSRC.pm +17 -11
  48. data/bin/lib/Image/ExifTool/RTF.pm +12 -7
  49. data/bin/lib/Image/ExifTool/Radiance.pm +7 -2
  50. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  51. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  52. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  53. data/bin/lib/Image/ExifTool/Sony.pm +426 -40
  54. data/bin/lib/Image/ExifTool/TagLookup.pm +5799 -5671
  55. data/bin/lib/Image/ExifTool/TagNames.pod +584 -97
  56. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  57. data/bin/lib/Image/ExifTool/WriteExif.pl +3 -2
  58. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +26 -18
  59. data/bin/lib/Image/ExifTool/Writer.pl +47 -24
  60. data/bin/lib/Image/ExifTool/XMP.pm +99 -17
  61. data/bin/lib/Image/ExifTool/XMP2.pl +1 -0
  62. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  63. data/bin/lib/Image/ExifTool/ZISRAW.pm +123 -0
  64. data/bin/perl-Image-ExifTool.spec +42 -41
  65. data/lib/exiftool_vendored/version.rb +1 -1
  66. metadata +8 -7
@@ -387,8 +387,11 @@ numerical, and generated automatically otherwise.
387
387
  'Flattened' - [reserved] used internally to mark Struct tags
388
388
  which have been processed to generate flattened equivalents.
389
389
 
390
- 'GotGroups' - [reserved] flag used internally to indicate that
391
- the Groups hash has been initialized for this tag.
390
+ 'NotFlat' - [XMP tags only] Flag indicates that this tag ID
391
+ does not represent a flattened tag. Used to avoid a conflict
392
+ if the tag ID would be the same as a generated ID for a
393
+ flattened tag. The result is that the flattened tag will not
394
+ be accessible.
392
395
 
393
396
  'Hidden' - set to hide tag from the TagName documentation.
394
397
  Also suppresses verbose output of a BinaryData tag.
@@ -763,25 +766,26 @@ numerical, and generated automatically otherwise.
763
766
  conditionally deleted.
764
767
 
765
768
  Writable : Indicates this tag can be written (or not written if Writable
766
- is set to zero), and for EXIF-type tables gives format for
767
- writing. Writable may be set to 1 for MakerNotes information
768
- because the existing format is always used, however providing
769
- a format is desirable because it is used in validating the
770
- value. Set to 2 for tag to show "yes" in the Writable column
771
- of the tag name documentation even when there is no WRITE_PROC
772
- defined (eg. if it is written via an Extra tag). For EXIF
773
- tables, the Writable flag may be different than the Format
774
- flag, in which case Format is used for converting the binary
775
- value and Writable specifies the format code written to the
776
- EXIF IFD. For SubDirectories in EXIF information, this flag
777
- is only defined if the SubDirectory is writable as a block, or
778
- if the SubDirectory can not be edited (in which case Writable
779
- is set to 0). If non-zero, the SubDirectory is also extracted
780
- as a block, so the Binary and Protected flags should usually
781
- set as well. There is currently no way to specify a write
782
- format for a SubDirectory that is not writable as a block (the
783
- default is 'int32u' for IFD-type SubDirectories, and 'undef'
784
- for all others).
769
+ is set to zero), and for EXIF and QuickTime tables gives
770
+ format for writing. Writable may be set to 1 for MakerNotes
771
+ information because the existing format is always used,
772
+ however providing a format is desirable because it is used in
773
+ validating the value. Set to 2 for tag to show "yes" in the
774
+ Writable column of the tag name documentation even when there
775
+ is no WRITE_PROC defined (eg. if it is written via an Extra
776
+ tag). For EXIF and QuickTime tables, the Writable flag may be
777
+ different than the Format flag, in which case Format is used
778
+ for converting the binary value and Writable specifies the
779
+ format code written to the EXIF IFD. For SubDirectories in
780
+ EXIF information, this flag is only defined if the
781
+ SubDirectory is writable as a block, or if the SubDirectory
782
+ can not be edited (in which case Writable is set to 0). If
783
+ non-zero, the SubDirectory is also extracted as a block, so
784
+ the Binary and Protected flags should usually set as well.
785
+ There is currently no way to specify a write format for a
786
+ SubDirectory that is not writable as a block (the default is
787
+ 'int32u' for IFD-type SubDirectories, and 'undef' for all
788
+ others).
785
789
 
786
790
  WriteAlso : Used for writable tag to specify other tags to write when this
787
791
  tag is written. The value is a hash reference. The hash keys
@@ -1083,7 +1087,7 @@ The contained structure field information hashes are similar to tag information
1083
1087
  hashes, except that only the following elements are used:
1084
1088
 
1085
1089
  Raw/Value/PrintConv (and their inverses), TagID (optional), Groups, List,
1086
- Writable, Struct, Namespace, LangCode, PropertyPath, Notes.
1090
+ Writable, Struct, Namespace, FlatName, LangCode, PropertyPath, Notes.
1087
1091
 
1088
1092
  But note that for PropertyPath, only the element of the path corresponding to
1089
1093
  the specific field is stored (including any necessary list properties). The
@@ -14,19 +14,22 @@ use strict;
14
14
  use vars qw($VERSION);
15
15
  use Image::ExifTool qw(:DataAccess :Utils);
16
16
 
17
- $VERSION = '1.08';
17
+ $VERSION = '1.09';
18
+
19
+ sub ProcessRSRC($$);
18
20
 
19
21
  # Information decoded from Mac OS resources
20
22
  %Image::ExifTool::RSRC::Main = (
21
23
  GROUPS => { 2 => 'Document' },
24
+ PROCESS_PROC => \&ProcessRSRC,
22
25
  NOTES => q{
23
- Tags extracted from Mac OS resource files and DFONT files. These tags may
24
- also be extracted from the resource fork of any file in OS X, either by
25
- adding "/..namedfork/rsrc" to the filename to process the resource fork
26
- alone, or by using the L<ExtractEmbedded|../ExifTool.html#ExtractEmbedded> (-ee) option to process the resource
27
- fork as a sub-document of the main file. When writing, ExifTool preserves
28
- the Mac OS resource fork by default, but it may deleted with C<-rsrc:all=>
29
- on the command line.
26
+ Tags extracted from Mac OS resource files, DFONT files and "._" sidecar
27
+ files. These tags may also be extracted from the resource fork of any file
28
+ in OS X, either by adding "/..namedfork/rsrc" to the filename to process the
29
+ resource fork alone, or by using the L<ExtractEmbedded|../ExifTool.html#ExtractEmbedded> (-ee) option to process
30
+ the resource fork as a sub-document of the main file. When writing,
31
+ ExifTool preserves the Mac OS resource fork by default, but it may deleted
32
+ with C<-rsrc:all=> on the command line.
30
33
  },
31
34
  '8BIM' => {
32
35
  Name => 'PhotoshopInfo',
@@ -66,6 +69,9 @@ sub ProcessRSRC($$)
66
69
  my $raf = $$dirInfo{RAF};
67
70
  my ($hdr, $map, $buff, $i, $j);
68
71
 
72
+ # allow access with data reference
73
+ $raf or $raf = new File::RandomAccess($$dirInfo{DataPt});
74
+
69
75
  # attempt to validate the format as thoroughly as practical
70
76
  return 0 unless $raf->Read($hdr, 30) == 30;
71
77
  my ($datOff, $mapOff, $datLen, $mapLen) = unpack('N*', $hdr);
@@ -81,7 +87,7 @@ sub ProcessRSRC($$)
81
87
  SetByteOrder('MM');
82
88
  my $typeOff = Get16u(\$map, 24);
83
89
  my $nameOff = Get16u(\$map, 26);
84
- my $numTypes = Get16u(\$map, 28);
90
+ my $numTypes = (Get16u(\$map, 28) + 1) & 0xffff;
85
91
 
86
92
  # validate offsets in the resource map
87
93
  return 0 if $typeOff < 28 or $nameOff < 30;
@@ -89,10 +95,10 @@ sub ProcessRSRC($$)
89
95
  $et->SetFileType('RSRC') unless $$et{IN_RESOURCE};
90
96
  my $verbose = $et->Options('Verbose');
91
97
  my $tagTablePtr = GetTagTable('Image::ExifTool::RSRC::Main');
92
- $et->VerboseDir('RSRC', $numTypes+1);
98
+ $et->VerboseDir('RSRC', $numTypes);
93
99
 
94
100
  # parse resource type list
95
- for ($i=0; $i<=$numTypes; ++$i) {
101
+ for ($i=0; $i<$numTypes; ++$i) {
96
102
  my $off = $typeOff + 2 + 8 * $i; # offset of entry in type list
97
103
  last if $off + 8 > $mapLen;
98
104
  my $resType = substr($map,$off,4); # resource type
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
 
18
- $VERSION = '1.03';
18
+ $VERSION = '1.04';
19
19
 
20
20
  sub ProcessUserProps($$$);
21
21
 
@@ -181,12 +181,17 @@ sub UnescapeRTF($$$)
181
181
  if ($1 eq 'uc') { # \ucN
182
182
  $skip = $2;
183
183
  } elsif ($1 eq 'u') { # \uN
184
- require Image::ExifTool::Charset;
185
- $rtnVal .= Image::ExifTool::Charset::Recompose($et, [$2]);
186
- if ($skip) {
187
- # must skip the specified number of characters
188
- # (not simple because RTF control words count as a single character)
189
- last unless $val =~ /\G([^\\]|\\([a-zA-Z]+)(-?\d+)? ?|\\'.{2}|\\.){$skip}/g;
184
+ if ($2 < 0) {
185
+ $et->WarnOnce('Invalid Unicode character(s) in text');
186
+ $rtnVal .= '?';
187
+ } else {
188
+ require Image::ExifTool::Charset;
189
+ $rtnVal .= Image::ExifTool::Charset::Recompose($et, [$2]);
190
+ if ($skip) {
191
+ # must skip the specified number of characters
192
+ # (not simple because RTF control words count as a single character)
193
+ last unless $val =~ /\G([^\\]|\\([a-zA-Z]+)(-?\d+)? ?|\\'.{2}|\\.){$skip}/g;
194
+ }
190
195
  }
191
196
  } elsif ($rtfEntity{$1}) {
192
197
  require Image::ExifTool::Charset;
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
 
18
- $VERSION = '1.01';
18
+ $VERSION = '1.02';
19
19
 
20
20
  # Radiance tags
21
21
  %Image::ExifTool::Radiance::Main = (
@@ -42,6 +42,7 @@ $VERSION = '1.01';
42
42
  },
43
43
  },
44
44
  _command => 'Command',
45
+ _comment => 'Comment',
45
46
  software => 'Software',
46
47
  view => 'View',
47
48
  'format' => 'Format', # <-- this is the one that caused the conflict when uppercase
@@ -74,8 +75,12 @@ sub ProcessHDR($$)
74
75
  while ($raf->ReadLine($buff)) {
75
76
  chomp $buff;
76
77
  last unless length($buff) > 0 and length($buff) < 4096;
78
+ if ($buff =~ s/^#\s*//) {
79
+ $et->HandleTag($tagTablePtr, '_comment', $buff) if length $buff;
80
+ next;
81
+ }
77
82
  unless ($buff =~ /^(.*)?\s*=\s*(.*)/) {
78
- $et->HandleTag($tagTablePtr, '_command', $buff);
83
+ $et->HandleTag($tagTablePtr, '_command', $buff) if length $buff;
79
84
  next;
80
85
  }
81
86
  # use lower-case tag names to avoid conflicts with reserved tag table entries
@@ -19,7 +19,7 @@ use vars qw($VERSION);
19
19
  use Image::ExifTool qw(:DataAccess :Utils);
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.34';
22
+ $VERSION = '1.35';
23
23
 
24
24
  sub ProcessRicohText($$$);
25
25
  sub ProcessRicohRMETA($$$);
@@ -875,6 +875,7 @@ my %ricohLensIDs = (
875
875
  Name => 'SoundFile',
876
876
  Notes => 'audio data recorded in JPEG images by the G700SE',
877
877
  },
878
+ _barcode => { Name => 'Barcodes', List => 1 },
878
879
  );
879
880
 
880
881
  # information stored in Ricoh AVI images (ref PH)
@@ -1004,6 +1005,23 @@ sub ProcessRicohRMETA($$$)
1004
1005
  # (but it looks like the int16u at $dirStart+6 is the next block number
1005
1006
  # if the data is continued, or 0 for the last block)
1006
1007
  $dirLen < 14 and $et->Warn('Short Ricoh RMETA block', 1), return 0;
1008
+ if ($$dataPt =~ /^.{20}BARCODE/s) {
1009
+ my $val = substr($$dataPt, 20);
1010
+ $val =~ s/\0.*//s;
1011
+ $val =~ s/^BARCODE\w+,\d{2},//;
1012
+ my @codes;
1013
+ for (;;) {
1014
+ $val =~ s/(\d+),// and length $val >= $1 or last;
1015
+ push @codes, substr($val, 0, $1);
1016
+ last unless length $val > $1;
1017
+ $val = substr($val, $1+1);
1018
+ }
1019
+ $et->HandleTag($tagTablePtr, '_barcode', \@codes) if @codes;
1020
+ return 1;
1021
+ } elsif ($$dataPt =~ /^.{18}ASCII/s) {
1022
+ # (ignore barcode tag names for now)
1023
+ return 1;
1024
+ }
1007
1025
  my $audioLen = Get16u($dataPt, $dirStart+12);
1008
1026
  $audioLen + 14 > $dirLen and $et->Warn('Truncated Ricoh RMETA audio data', 1), return 0;
1009
1027
  my $buff = substr($$dataPt, $dirStart + 14, $audioLen);
@@ -300,6 +300,7 @@ sub ShiftTime($;$$$)
300
300
  #
301
301
  SplitTime($val, \@time) or return "Invalid time string ($val)";
302
302
  if (defined $time[0]) {
303
+ return "Can't shift from year 0000" if $time[0] eq '0000';
303
304
  $mode = defined $time[3] ? 'DateTime' : 'Date';
304
305
  } elsif (defined $time[3]) {
305
306
  $mode = 'Time';
@@ -16,7 +16,7 @@ use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
  use Image::ExifTool::Sigma;
18
18
 
19
- $VERSION = '1.26';
19
+ $VERSION = '1.27';
20
20
 
21
21
  sub ProcessX3FHeader($$$);
22
22
  sub ProcessX3FDirectory($$$);
@@ -427,36 +427,43 @@ sub WriteX3F($$)
427
427
  $len -= 28;
428
428
 
429
429
  # only rewrite full-sized JpgFromRaw (version 2.0, type 2, format 18)
430
- if ($buff =~ /^SECi\0\0\x02\0\x02\0\0\0\x12\0\0\0/ and
431
- $$et{ImageWidth} == unpack('x16V', $buff))
432
- {
430
+ if ($buff =~ /^SECi\0\0\x02\0\x02\0\0\0\x12\0\0\0/) {
433
431
  $raf->Read($buff, $len) == $len or return 'Error reading JpgFromRaw';
434
- # use same write directories as JPEG
435
- $et->InitWriteDirs('JPEG');
436
- # rewrite the embedded JPEG in memory
437
- my $newData;
438
- my %jpegInfo = (
439
- Parent => 'X3F',
440
- RAF => new File::RandomAccess(\$buff),
441
- OutFile => \$newData,
442
- );
443
- $$et{FILE_TYPE} = 'JPEG';
444
- my $success = $et->WriteJPEG(\%jpegInfo);
445
- $$et{FILE_TYPE} = 'X3F';
446
- SetByteOrder('II');
447
- return 'Error writing X3F JpgFromRaw' unless $success and $newData;
448
- return -1 if $success < 0;
449
- # write new data if anything changed, otherwise copy old image
450
- my $outPt = $$et{CHANGED} ? \$newData : \$buff;
451
- Write($outfile, $$outPt) or return -1;
452
- # set $len to the total subsection data length
453
- $len = length($$outPt) + 28;
454
- $didContain = 1;
432
+ if ($buff =~ /^\xff\xd8\xff\xe1/) { # does this preview contain EXIF?
433
+ # use same write directories as JPEG
434
+ $et->InitWriteDirs('JPEG');
435
+ # make sure we don't add APP0 JFIF because it would mess up our preview identification
436
+ delete $$et{ADD_DIRS}{APP0};
437
+ delete $$et{ADD_DIRS}{JFIF};
438
+ # rewrite the embedded JPEG in memory
439
+ my $newData;
440
+ my %jpegInfo = (
441
+ Parent => 'X3F',
442
+ RAF => new File::RandomAccess(\$buff),
443
+ OutFile => \$newData,
444
+ );
445
+ $$et{FILE_TYPE} = 'JPEG';
446
+ my $success = $et->WriteJPEG(\%jpegInfo);
447
+ $$et{FILE_TYPE} = 'X3F';
448
+ SetByteOrder('II');
449
+ return 'Error writing X3F JpgFromRaw' unless $success and $newData;
450
+ return -1 if $success < 0;
451
+ # (this shouldn't happen unless someone tries to delete the EXIF...)
452
+ return 'EXIF segment must come first in X3F JpgFromRaw' unless $newData =~ /^\xff\xd8\xff\xe1/;
453
+ # write new data if anything changed, otherwise copy old image
454
+ my $outPt = $$et{CHANGED} ? \$newData : \$buff;
455
+ Write($outfile, $$outPt) or return -1;
456
+ # set $len to the total subsection data length
457
+ $len = length($$outPt);
458
+ $didContain = 1;
459
+ } else {
460
+ Write($outfile, $buff) or return -1;
461
+ }
455
462
  } else {
456
463
  # copy original image data
457
464
  Image::ExifTool::CopyBlock($raf, $outfile, $len) or return 'Corrupted X3F image';
458
- $len += 28;
459
465
  }
466
+ $len += 28; # add back header length
460
467
  } else {
461
468
  # copy data for this subsection
462
469
  Image::ExifTool::CopyBlock($raf, $outfile, $len) or return 'Corrupted X3F directory';
@@ -516,16 +523,18 @@ sub ProcessX3FDirectory($$$)
516
523
  $raf->Read($buff, 28) == 28 or return 'Error reading PreviewImage header';
517
524
  # ignore all image data but JPEG compressed (version 2.0, type 2, format 18)
518
525
  next unless $buff =~ /^SECi\0\0\x02\0\x02\0\0\0\x12\0\0\0/;
519
- # check preview image size and extract full-sized preview as JpgFromRaw
520
- if ($$et{ImageWidth} == unpack('x16V', $buff)) {
526
+ $offset += 28;
527
+ $len -= 28;
528
+ $raf->Read($buff, $len) == $len or return "Error reading PreviewImage data";
529
+ # check fore EXIF segment, and extract this image as the JpgFromRaw
530
+ if ($buff =~ /^\xff\xd8\xff\xe1/) {
521
531
  $$et{IsJpgFromRaw} = 1;
522
532
  $tagInfo = $et->GetTagInfo($tagTablePtr, $tag);
523
533
  delete $$et{IsJpgFromRaw};
524
534
  }
525
- $offset += 28;
526
- $len -= 28;
535
+ } else {
536
+ $raf->Read($buff, $len) == $len or return "Error reading $$tagInfo{Name} data";
527
537
  }
528
- $raf->Read($buff, $len) == $len or return "Error reading $$tagInfo{Name} data";
529
538
  my $subdir = $$tagInfo{SubDirectory};
530
539
  if ($subdir) {
531
540
  my %dirInfo = ( DataPt => \$buff );
@@ -591,8 +600,6 @@ sub ProcessX3F($$)
591
600
  $buff .= $buf2;
592
601
  }
593
602
  my ($widPos, $hdrType) = $ver < 4 ? (28, 'Header') : (40, 'Header4');
594
- # extract ImageWidth for later
595
- $$et{ImageWidth} = Get32u(\$buff, $widPos);
596
603
  # process header information
597
604
  my $tagTablePtr = GetTagTable('Image::ExifTool::SigmaRaw::Main');
598
605
  unless ($outfile) {
@@ -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.24';
37
+ $VERSION = '3.32';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -73,6 +73,7 @@ sub PrintInvLensSpec($;$$);
73
73
  2 => 'Sony LA-EA2 Adapter',
74
74
  3 => 'Sony LA-EA3 Adapter', #(NC) ILCE-7 image with A-mount lens, but also has 0x940e 2nd byte=2
75
75
  6 => 'Sony LA-EA4 Adapter', #(NC) ILCE-7R image with A-mount lens and having phase-detect info blocks in 0x940e AFInfo
76
+ 7 => 'Sony LA-EA5 Adapter', #JR
76
77
  # 27 => Venus Optics Laowa 12mm f2.8 Zero-D or 105mm f2 (T3.2) Smooth Trans Focus (ref IB)
77
78
  44 => 'Metabones Canon EF Smart Adapter', #JR
78
79
  78 => 'Metabones Canon EF Smart Adapter Mark III or Other Adapter', #PH/JR (also Mark IV, Fotodiox and Viltrox)
@@ -143,6 +144,8 @@ sub PrintInvLensSpec($;$$);
143
144
  32854 => 'Sony E 70-350mm F4.5-6.3 G OSS', #IB/JR
144
145
  32858 => 'Sony FE 35mm F1.8', #JR/IB
145
146
  32859 => 'Sony FE 20mm F1.8 G', #IB/JR
147
+ 32860 => 'Sony FE 12-24mm F2.8 GM', #JR/IB
148
+ 32864 => 'Sony FE 28-60mm F4-5.6', #JR
146
149
 
147
150
  # (comment this out so LensID will report the LensModel, which is more useful)
148
151
  # 32952 => 'Metabones Canon EF Speed Booster Ultra', #JR (corresponds to 184, but 'Advanced' mode, LensMount reported as E-mount)
@@ -180,7 +183,9 @@ sub PrintInvLensSpec($;$$);
180
183
  49460 => 'Tamron 24mm F2.8 Di III OSD M1:2', #JR (Model F051)
181
184
  49461 => 'Tamron 20mm F2.8 Di III OSD M1:2', #JR (Model F050)
182
185
  49462 => 'Tamron 70-180mm F2.8 Di III VXD', #JR (Model A056)
183
-
186
+ 49463 => 'Tamron 28-200mm F2.8-5.6 Di III RXD', #JR (Model A071)
187
+ 49464 => 'Tamron 70-300mm F4.5-6.3 Di III RXD', #JR (Model A047)
188
+ 49473 => 'Tokina atx-m 85mm F1.8 FE', #JR
184
189
  49712 => 'Tokina FiRIN 20mm F2 FE AF', # (firmware Ver.01)
185
190
  49713 => 'Tokina FiRIN 100mm F2.8 FE MACRO', # (firmware Ver.01)
186
191
 
@@ -209,6 +214,9 @@ sub PrintInvLensSpec($;$$);
209
214
  50515 => 'Sigma 35mm F1.2 DG DN | A', #IB/JR (019)
210
215
  50516 => 'Sigma 14-24mm F2.8 DG DN | A', #IB/JR (019)
211
216
  50517 => 'Sigma 24-70mm F2.8 DG DN | A', #JR (019)
217
+ 50518 => 'Sigma 100-400mm F5-6.3 DG DN OS | C', #JR (020)
218
+ 50521 => 'Sigma 85mm F1.4 DG DN | A', #JR (020)
219
+ 50522 => 'Sigma 105mm F2.8 DG DN MACRO | A', #JR (020)
212
220
 
213
221
  50992 => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR
214
222
  50993 => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB
@@ -221,18 +229,22 @@ sub PrintInvLensSpec($;$$);
221
229
  51000 => 'Voigtlander NOKTON 50mm F1.2 Aspherical', #JR
222
230
  51001 => 'Voigtlander NOKTON 21mm F1.4 Aspherical', #JR
223
231
  51002 => 'Voigtlander APO-LANTHAR 50mm F2 Aspherical', #JR
232
+ 51003 => 'Voigtlander NOKTON 35mm F1.2 Aspherical SE', #JR
224
233
 
225
234
  # lenses listed in the Sigma MC-11 list, but not yet seen:
226
235
  # 504xx => 'Sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | C + MC-11', # (014)
227
236
  # 504xx => 'Sigma 30mm F1.4 DC HSM | A + MC-11', # (013)
228
237
 
238
+ # Note: For Samyang lenses, the "FE" designation isn't written to
239
+ # EXIF:LensModel, so it isn't included in these strings either - JR/PH
229
240
  51504 => 'Samyang AF 50mm F1.4', #IB
230
241
  51505 => 'Samyang AF 14mm F2.8 or Samyang AF 35mm F2.8', #forum3833
231
242
  51505.1 => 'Samyang AF 35mm F2.8', #PH (also 32794)
232
243
  51507 => 'Samyang AF 35mm F1.4', #IB
233
244
  51508 => 'Samyang AF 45mm F1.8',
234
- 51510 => 'Samyang AF 18mm F2.8', #JR
235
- 51512 => 'Samyang AF 75mm F1.8 FE', #IB
245
+ 51510 => 'Samyang AF 18mm F2.8 or Samyang AF 35mm F1.8', #JR
246
+ 51510.1 => 'Samyang AF 35mm F1.8', #JR
247
+ 51512 => 'Samyang AF 75mm F1.8', #IB/JR
236
248
  );
237
249
 
238
250
  # ExposureProgram values (ref PH, mainly decoded from A200)
@@ -952,7 +964,8 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
952
964
  # unknown offsets or values for DSC-HX60V/HX350/HX400V/QX10/QX30/QX100/RX10/RX100M2/RX100M3/WX220/WX350,
953
965
  # ILCA-68/77M2, ILCE-5000/5100/6000/7/7M2/7R/7S/QX1, Stellar2, Lusso
954
966
  # unknown offsets or values for DSC-HX80/HX90V/RX0/RX1RM2/RX10M2/RX10M3/RX100M4/RX100M5/WX500, ILCE-6300/6500/7RM2/7SM2, ILCA-99M2
955
- # unknown offsets or values for ILCE-6100/6400/6600/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M6/RX100M5A/RX100M7/HX99
967
+ # unknown offsets or values for ILCE-6100/6400/6600/7C/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M6/RX100M5A/RX100M7/HX99
968
+ # July 2020: ILCE-7SM3 doesn't write this tag anymore
956
969
  {
957
970
  Name => 'Tag2010a', # ad
958
971
  Condition => '$$self{Model} =~ /^NEX-5N$/',
@@ -993,7 +1006,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
993
1006
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010h' },
994
1007
  },{
995
1008
  Name => 'Tag2010i', # ?
996
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9|9M2)|DSC-(RX10M4|RX100M6|RX100M5A|RX100M7|HX99|RX0M2))\b/',
1009
+ Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9|9M2)|DSC-(RX10M4|RX100M6|RX100M5A|RX100M7|HX99|RX0M2)|ZV-1)\b/',
997
1010
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag2010i' },
998
1011
  },{
999
1012
  Name => 'Tag_0x2010',
@@ -1378,6 +1391,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1378
1391
  '1 0' => 'Off',
1379
1392
  '1 1' => 'Standard',
1380
1393
  '1 2' => 'High',
1394
+ '65535 65535' => 'n/a', # ILCE-7SM3
1381
1395
  },
1382
1396
  },
1383
1397
  0x2029 => { # uncompressed 14-bit RAW file type setting introduced 2015
@@ -1386,6 +1400,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1386
1400
  PrintConv => {
1387
1401
  0 => 'Compressed RAW',
1388
1402
  1 => 'Uncompressed RAW',
1403
+ 65535 => 'n/a', # seen for ILCE-7SM3 JPEG-only
1389
1404
  },
1390
1405
  },
1391
1406
  # 0x202a - first seen for ILCE-6300: 66 bytes
@@ -1421,7 +1436,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1421
1436
  },
1422
1437
  },
1423
1438
  0x202d => { #JR first seen for ILCA-99M2, ILCE-6500, DSC-RX100M5
1424
- Name => 'ExposureStandardAdjustment', # (NC)
1439
+ Name => 'ExposureStandardAdjustment',
1425
1440
  Writable => 'rational64s',
1426
1441
  PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1427
1442
  PrintConvInv => '$val',
@@ -1484,6 +1499,13 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1484
1499
  PrintConv => 'sprintf("%.8d",$val)',
1485
1500
  PrintConvInv => '$val',
1486
1501
  },
1502
+ # 0x2032 - first seen for ILCE-7SM3, July 2020
1503
+ # 0x2033 - first seen for ILCE-7SM3, July 2020
1504
+ # 0x2034 - first seen for ILCE-7SM3, July 2020
1505
+ # 0x2035 - first seen for ILCE-7SM3, July 2020
1506
+ # 0x2036 - first seen for ILCE-7SM3, July 2020
1507
+ # 0x2037 - first seen for ILCE-7SM3, July 2020
1508
+ # 0x2039 - first seen for ILCE-7SM3, July 2020
1487
1509
  0x3000 => {
1488
1510
  Name => 'ShotInfo',
1489
1511
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::ShotInfo' },
@@ -1512,18 +1534,25 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1512
1534
  # from mid-2015: ILCE-7RM2/7SM2/6300 and newer models use different offsets
1513
1535
  {
1514
1536
  Name => 'Tag9050a',
1515
- Condition => '$$self{Model} !~ /^(DSC-|Stellar|ILCE-(6100|6300|6400|6500|6600|7M3|7RM2|7RM3|7RM4|7SM2|9|9M2)|ILCA-99M2)/',
1537
+ Condition => '$$self{Model} !~ /^(DSC-|Stellar|ILCE-(6100|6300|6400|6500|6600|7C|7M3|7RM2|7RM3|7RM4|7SM2|7SM3|9|9M2)|ILCA-99M2|ZV-)/',
1516
1538
  SubDirectory => {
1517
1539
  TagTable => 'Image::ExifTool::Sony::Tag9050a',
1518
1540
  ByteOrder => 'LittleEndian',
1519
1541
  },
1520
1542
  },{
1521
1543
  Name => 'Tag9050b',
1522
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6300|6400|6500|6600|7M3|7RM2|7RM3|7RM4|7SM2|9|9M2)|ILCA-99M2)/',
1544
+ Condition => '$$self{Model} =~ /^(ILCE-(6100|6300|6400|6500|6600|7C|7M3|7RM2|7RM3|7RM4|7SM2|9|9M2)|ILCA-99M2)/',
1523
1545
  SubDirectory => {
1524
1546
  TagTable => 'Image::ExifTool::Sony::Tag9050b',
1525
1547
  ByteOrder => 'LittleEndian',
1526
1548
  },
1549
+ },{
1550
+ Name => 'Tag9050c',
1551
+ Condition => '$$self{Model} =~ /^(ILCE-7SM3)/',
1552
+ SubDirectory => {
1553
+ TagTable => 'Image::ExifTool::Sony::Tag9050c',
1554
+ ByteOrder => 'LittleEndian',
1555
+ },
1527
1556
  },{
1528
1557
  Name => 'Sony_0x9050',
1529
1558
  %unknownCipherData,
@@ -1538,7 +1567,8 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1538
1567
  # 0x23 (e) for DSC-RX10/HX60V/HX350/HX400V/WX220/WX350, ILCE-7/7R/5000/6000, ILCA-68/77M2
1539
1568
  # 0x24 (e) for ILCA-99M2,ILCE-5100/6300/6500/7M2/7RM2/7S/7SM2/QX1, DSC-HX80/HX90V/QX30/RX0/RX100M3/RX100M4/RX100M5/RX10M2/RX10M3/RX1RM2/WX500
1540
1569
  # 0x26 (e) for ILCE-6100/6400/6600/7M3/7RM3/9, DSC-RX0M2/RX10M4/RX100M5A/RX100M6/HX99
1541
- # 0x28 (e) for ILCE-7RM4/9M2, DSC-RX100M7
1570
+ # 0x28 (e) for ILCE-7RM4/9M2, DSC-RX100M7, ZV-1
1571
+ # 0x31 (e) for ILCE-7SM3
1542
1572
  # first byte decoded: 40, 204, 202, 27, 58, 62, 48, 215, 28 respectively
1543
1573
  {
1544
1574
  Name => 'Tag9400a',
@@ -1553,7 +1583,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1553
1583
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9400b' },
1554
1584
  },{
1555
1585
  Name => 'Tag9400c',
1556
- Condition => '$$valPt =~ /^[\x23\x24\x26\x28]/',
1586
+ Condition => '$$valPt =~ /^[\x23\x24\x26\x28\x31]/',
1557
1587
  SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9400c' },
1558
1588
  },{
1559
1589
  Name => 'Sony_0x9400',
@@ -1677,7 +1707,8 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1677
1707
  # 13 0 9 2 2 DSC-QX10/QX100/RX100M2
1678
1708
  # 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
1679
1709
  # 16 0 85 2 2 DSC-HX80/HX90V/WX500
1680
- # 17 0 232 1 2 DSC-RX0/RX0M2/RX1RM2/RX10M2/RX10M3/RX10M4/RX100M4/RX100M5/RX100M5A/RX100M6/RX100M7/HX99, ILCE-6100/6300/6400/6500/6600/7M3/7RM2/7RM3/7RM4/7SM2/9/9M2, ILCA-99M2
1710
+ # 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
1711
+ # 18 0 20 0 164 ILCE-7SM3
1681
1712
  # other values for Panorama images and several other models
1682
1713
  0x9404 => [{
1683
1714
  Name => 'Tag9404a',
@@ -1711,7 +1742,8 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1711
1742
  # 142 var (0x25 = 37 var enc.) DSC-HX80/HX90V/RX1RM2/RX10M2/RX10M3/RX100M4/WX500, ILCE-6300/7RM2/7SM2
1712
1743
  # 144 var (0xe1 = 225 var enc.) DSC-RX100M5
1713
1744
  # 145 var (0x76 = 118 var enc.) ILCA-99M2, ILCE-6500, DSC-RX0
1714
- # 163 var (0x8b = 139 var enc.) ILCE-6100/6400/6600/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M5A/RX100M6/RX100M7/HX99
1745
+ # 163 var (0x8b = 139 var enc.) ILCE-6100/6400/6600/7C/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M5A/RX100M6/RX100M7/HX99, ZV-1
1746
+ # July 2020: ILCE-7SM3 doesn't write this tag anymore, but writes 0x9416
1715
1747
  0x9405 => [{
1716
1748
  Name => 'Tag9405a',
1717
1749
  # first byte must be 0x1b or 0x40 or 0x7d
@@ -1798,6 +1830,10 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1798
1830
  %unknownCipherData,
1799
1831
  # 0x02 - int32u?: 1,3,5,7,9 (A77)
1800
1832
  },
1833
+ 0x9416 => { # replaces 0x9405 for the Sony ILCE-7SM3, from July 2020
1834
+ Name => 'Sony_0x9416',
1835
+ SubDirectory => { TagTable => 'Image::ExifTool::Sony::Tag9416' },
1836
+ },
1801
1837
  0xb000 => { #8
1802
1838
  Name => 'FileFormat',
1803
1839
  Writable => 'int8u',
@@ -1820,6 +1856,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1820
1856
  '3 3 2 0' => 'ARW 2.3.2', #JR (DSC-RX1RM2,ILCE-7SM2 - support for uncompressed 14-bit RAW)
1821
1857
  '3 3 3 0' => 'ARW 2.3.3', #JR (ILCE-9)
1822
1858
  '3 3 5 0' => 'ARW 2.3.5', #JR (DSC-HX99)
1859
+ '4 0 0 0' => 'ARW 4.0', # (ILCE-7SM3)
1823
1860
  # what about cRAW images?
1824
1861
  },
1825
1862
  },
@@ -1913,10 +1950,13 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1913
1950
  376 => 'ILCE-9M2', #JR
1914
1951
  378 => 'ILCE-6600', #IB/JR
1915
1952
  379 => 'ILCE-6100', #IB/JR
1953
+ 380 => 'ZV-1', #JR
1954
+ 381 => 'ILCE-7C', #JR
1955
+ 383 => 'ILCE-7SM3',
1916
1956
  },
1917
1957
  },
1918
1958
  0xb020 => { #2
1919
- Name => 'CreativeStyle',
1959
+ Name => 'CreativeStyle', # (called CreativeLook by the 7SM3, ref JR)
1920
1960
  Writable => 'string',
1921
1961
  # (all of these values have been observed, ref JR and PH)
1922
1962
  # - this PrintConv is included to make these strings consistent with
@@ -1940,6 +1980,12 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1940
1980
  Light => 'Light',
1941
1981
  Autumnleaves=> 'Autumn Leaves',
1942
1982
  Sepia => 'Sepia',
1983
+ # new for the ILCE-7SM3 (ref JR)
1984
+ VV2 => 'Vivid 2', # (NC)
1985
+ FL => 'FL', # "moody finish with sharp contrast and calm coloring as well as the impressive sky and colors of the greens"
1986
+ IN => 'IN', # "matte textures by suppressing the contrast and saturation"
1987
+ SH => 'SH', # "bright, transparent, soft, and vivid mood"
1988
+ # (...also Custom Look 1-6, but don't konw the values)
1943
1989
  },
1944
1990
  },
1945
1991
  0xb021 => { #2
@@ -6021,6 +6067,7 @@ my %pictureProfile2010 = (
6021
6067
  my %isoSetting2010 = (
6022
6068
  0 => 'Auto',
6023
6069
  5 => 25,
6070
+ 7 => 40,
6024
6071
  8 => 50,
6025
6072
  9 => 64,
6026
6073
  10 => 80,
@@ -6049,12 +6096,17 @@ my %isoSetting2010 = (
6049
6096
  33 => 16000,
6050
6097
  34 => 20000,
6051
6098
  35 => 25600,
6099
+ 36 => 32000,
6100
+ 37 => 40000,
6052
6101
  38 => 51200,
6053
6102
  39 => 64000,
6103
+ 40 => 80000,
6054
6104
  41 => 102400,
6055
6105
  42 => 128000,
6056
6106
  43 => 160000,
6057
6107
  44 => 204800,
6108
+ 45 => 256000,
6109
+ 46 => 320000,
6058
6110
  47 => 409600,
6059
6111
  );
6060
6112
 
@@ -6812,7 +6864,7 @@ my %isoSetting2010 = (
6812
6864
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6813
6865
  FORMAT => 'int8u',
6814
6866
  NOTES => q{
6815
- Valid for ILCE-6100/6400/6600/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M6/
6867
+ Valid for ILCE-6100/6400/6600/7C/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M6/
6816
6868
  RX100M5A/RX100M7/HX99.
6817
6869
  },
6818
6870
  WRITABLE => 1,
@@ -7393,7 +7445,7 @@ my %isoSetting2010 = (
7393
7445
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7394
7446
  FORMAT => 'int8u',
7395
7447
  NOTES => q{
7396
- Valid from July 2015 for ILCE-6100/6300/6400/6500/6600/7M3/7RM2/7RM3/7RM4/
7448
+ Valid from July 2015 for ILCE-6100/6300/6400/6500/6600/7C/7M3/7RM2/7RM3/7RM4/
7397
7449
  7SM2/9/9M2, ILCA-99M2.
7398
7450
  },
7399
7451
  WRITABLE => 1,
@@ -7482,7 +7534,7 @@ my %isoSetting2010 = (
7482
7534
  # March 2019: ILCE-9 with v5.0x firmware follows ILCE-6400 in many tags ...
7483
7535
  0x0050 => {
7484
7536
  Name => 'ShutterCount2',
7485
- Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} =~ /^(ILCE-(6100|6400|6600|7RM4|9M2))/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/)',
7537
+ Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7RM4|9M2))/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/)',
7486
7538
  Format => 'int32u',
7487
7539
  RawConv => '$val & 0x00ffffff',
7488
7540
  },
@@ -7499,13 +7551,13 @@ my %isoSetting2010 = (
7499
7551
  # 0x0058, 0x0061: E-Mount: ShutterCount and dateTime
7500
7552
  0x0058 => { # appears not valid when flash is used ... not for ILCA-99M2
7501
7553
  Name => 'ShutterCount2',
7502
- Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} !~ /^(ILCA-99M2|ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9M2))/) and $$self{Software} !~ /^ILCE-9 (v5.0|v6.0)/',
7554
+ Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} !~ /^(ILCA-99M2|ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9M2))/) and $$self{Software} !~ /^ILCE-9 (v5.0|v6.0)/',
7503
7555
  Format => 'int32u',
7504
7556
  RawConv => '$val & 0x00ffffff',
7505
7557
  },
7506
7558
  0x0061 => { # only minutes-seconds, not for ILCA-99M2, ILCE-9
7507
7559
  Name => 'SonyTimeMinSec',
7508
- Condition => '$$self{Model} !~ /^(ILCA-99M2|ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9|9M2))/',
7560
+ Condition => '$$self{Model} !~ /^(ILCA-99M2|ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9|9M2))/',
7509
7561
  Format => 'undef[2]',
7510
7562
  ValueConv => q{
7511
7563
  my @v = unpack('C*', $val);
@@ -7514,7 +7566,7 @@ my %isoSetting2010 = (
7514
7566
  },
7515
7567
  0x006b => {
7516
7568
  Name => 'ReleaseMode2',
7517
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7RM4|9M2))/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/',
7569
+ Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7RM4|9M2))/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/',
7518
7570
  %releaseMode2,
7519
7571
  },
7520
7572
  0x006d => {
@@ -7524,7 +7576,7 @@ my %isoSetting2010 = (
7524
7576
  },
7525
7577
  0x0073 => {
7526
7578
  Name => 'ReleaseMode2',
7527
- Condition => '$$self{Model} !~ /^(ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9M2))/ and $$self{Software} !~ /^ILCE-9 (v5.0|v6.0)/',
7579
+ Condition => '$$self{Model} !~ /^(ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9M2))/ and $$self{Software} !~ /^ILCE-9 (v5.0|v6.0)/',
7528
7580
  %releaseMode2,
7529
7581
  },
7530
7582
  0x0088 => {
@@ -7603,7 +7655,7 @@ my %isoSetting2010 = (
7603
7655
  #
7604
7656
  0x019f => {
7605
7657
  Name => 'ShutterCount3',
7606
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9|9M2))\b/',
7658
+ Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9|9M2))\b/',
7607
7659
  Format => 'int32u',
7608
7660
  RawConv => '$val == 0 ? undef : $val',
7609
7661
  },
@@ -7621,7 +7673,7 @@ my %isoSetting2010 = (
7621
7673
  },
7622
7674
  0x01eb => {
7623
7675
  Name => 'APS-CSizeCapture',
7624
- Condition => '$$self{Model} =~ /^ILCE-(7RM4|9M2)/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/',
7676
+ Condition => '$$self{Model} =~ /^ILCE-(7RM4|7C|9M2)/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/',
7625
7677
  PrintConv => {
7626
7678
  0 => 'Off',
7627
7679
  1 => 'On',
@@ -7629,7 +7681,7 @@ my %isoSetting2010 = (
7629
7681
  },
7630
7682
  0x01ed => {
7631
7683
  Name => 'LensSpecFeatures',
7632
- Condition => '$$self{Model} =~ /^ILCE-(7RM4|9M2)/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/',
7684
+ Condition => '$$self{Model} =~ /^ILCE-(7RM4|7C|9M2)/ or $$self{Software} =~ /^ILCE-9 (v5.0|v6.0)/',
7633
7685
  Priority => 0,
7634
7686
  Format => 'undef[2]',
7635
7687
  ValueConv => 'join " ", unpack "H2H2", $val',
@@ -7725,6 +7777,107 @@ my %isoSetting2010 = (
7725
7777
  },
7726
7778
  );
7727
7779
 
7780
+ %Image::ExifTool::Sony::Tag9050c = ( #JR
7781
+ PROCESS_PROC => \&ProcessEnciphered,
7782
+ WRITE_PROC => \&WriteEnciphered,
7783
+ CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7784
+ FORMAT => 'int8u',
7785
+ NOTES => q{
7786
+ Valid from July 2020 for ILCE-7SM3.
7787
+ },
7788
+ WRITABLE => 1,
7789
+ FIRST_ENTRY => 0,
7790
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
7791
+ DATAMEMBER => [ 0x0039 ],
7792
+ 0x0026 => {
7793
+ Name => 'Shutter',
7794
+ Format => 'int16u[3]',
7795
+ PrintConv => {
7796
+ '0 0 0' => 'Silent / Electronic (0 0 0)',
7797
+ OTHER => sub {
7798
+ my ($val, $inv) = @_;
7799
+ return $inv ? ($val=~/\((.*?)\)/ ? $1 : undef) : "Mechanical ($val)";
7800
+ },
7801
+ },
7802
+ },
7803
+ 0x0039 => {
7804
+ Name => 'FlashStatus',
7805
+ RawConv => '$$self{FlashFired} = $val',
7806
+ PrintConv => {
7807
+ 0 => 'No Flash present',
7808
+ 2 => 'Flash Inhibited', # seen for ILCE-7/7R continuous, panorama, HDR mode
7809
+ 64 => 'Built-in Flash present',
7810
+ 65 => 'Built-in Flash Fired',
7811
+ 66 => 'Built-in Flash Inhibited', # seen for panorama, HDR, burst mode
7812
+ 128 => 'External Flash present', # seen for NEX-5N/5T
7813
+ 129 => 'External Flash Fired', # seen for SLT-A99V, ILCE-7R, NEX-5N/5R
7814
+ },
7815
+ },
7816
+ 0x003a => {
7817
+ Name => 'ShutterCount',
7818
+ # or "ShutterCount"? : number of shutter actuations, does not increase during Silent Shooting,
7819
+ # at least for ILCE-7RM2
7820
+ Format => 'int32u',
7821
+ Notes => 'total number of image exposures made by the camera',
7822
+ RawConv => '$val & 0x00ffffff',
7823
+ PrintConv => 'sprintf("%6d",$val)',
7824
+ },
7825
+ 0x0046 => { # appr. same value as Exif ExposureTime, but longer in HDR-modes
7826
+ Name => 'SonyExposureTime',
7827
+ Format => 'int16u',
7828
+ ValueConv => '$val ? 2 ** (16 - $val/256) : 0',
7829
+ ValueConvInv => '$val ? int((16 - log($val) / log(2)) * 256 + 0.5) : 0',
7830
+ PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
7831
+ PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
7832
+ },
7833
+ 0x0048 => {
7834
+ Name => 'SonyFNumber',
7835
+ Format => 'int16u',
7836
+ ValueConv => '2 ** (($val/256 - 16) / 2)',
7837
+ ValueConvInv => '(log($val)*2/log(2)+16)*256',
7838
+ PrintConv => 'sprintf("%.1f",$val)',
7839
+ PrintConvInv => '$val',
7840
+ },
7841
+ 0x004b => {
7842
+ Name => 'ReleaseMode2',
7843
+ %releaseMode2,
7844
+ },
7845
+ 0x0050 => {
7846
+ Name => 'ShutterCount2',
7847
+ Condition => '(($$self{FlashFired} & 0x01) != 1) and ($$self{Model} =~ /^(ILCE-7SM3)/)',
7848
+ Format => 'int32u',
7849
+ RawConv => '$val & 0x00ffffff',
7850
+ },
7851
+ 0x0066 => { # appr. same value as Exif ExposureTime, but not valid in HDR-modes
7852
+ Name => 'SonyExposureTime',
7853
+ Condition => '$$self{Model} =~ /^(ILCE-7SM3)/',
7854
+ Format => 'int16u',
7855
+ ValueConv => '$val ? 2 ** (16 - $val/256) : 0',
7856
+ ValueConvInv => '$val ? int((16 - log($val) / log(2)) * 256 + 0.5) : 0',
7857
+ PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
7858
+ PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
7859
+ },
7860
+ 0x0068 => { # appr. same value as Exif ExposureTime, but not valid in HDR-modes
7861
+ Name => 'SonyFNumber',
7862
+ Condition => '$$self{Model} =~ /^(ILCE-7SM3)/',
7863
+ Format => 'int16u',
7864
+ ValueConv => '2 ** (($val/256 - 16) / 2)',
7865
+ ValueConvInv => '(log($val)*2/log(2)+16)*256',
7866
+ PrintConv => 'sprintf("%.1f",$val)',
7867
+ PrintConvInv => '$val',
7868
+ },
7869
+ 0x006b => {
7870
+ Name => 'ReleaseMode2',
7871
+ Condition => '$$self{Model} =~ /^(ILCE-7SM3)/',
7872
+ %releaseMode2,
7873
+ },
7874
+ 0x0088 => {
7875
+ Name => 'InternalSerialNumber', #(NC)
7876
+ Format => 'int8u[6]',
7877
+ PrintConv => 'unpack "H*", pack "C*", split " ", $val',
7878
+ },
7879
+ );
7880
+
7728
7881
  %Image::ExifTool::Sony::Tag9400a = ( #JR
7729
7882
  PROCESS_PROC => \&ProcessEnciphered,
7730
7883
  WRITE_PROC => \&WriteEnciphered,
@@ -7894,20 +8047,18 @@ my %isoSetting2010 = (
7894
8047
  NOTES => q{
7895
8048
  Valid for DSC-HX60V/HX80/HX90V/HX99/HX350/HX400V/QX30/RX0/RX1RM2/RX10/
7896
8049
  RX10M2/RX10M3/RX10M4/RX100M3/RX100M4/RX100M5/RX100M5A/RX100M6/RX100M7/WX220/
7897
- WX350/WX500, ILCE-7/7R/7S/7M2/7M3/7RM2/7RM3/7RM4/7SM2/9/9M2/5000/5100/6000/
7898
- 6100/6300/6400/6500/6600/QX1, ILCA-68/77M2/99M2.
8050
+ WX350/WX500, ILCE-7/7C/7R/7S/7M2/7M3/7RM2/7RM3/7RM4/7SM2/7SM3/9/9M2/5000/
8051
+ 5100/6000/6100/6300/6400/6500/6600/QX1, ILCA-68/77M2/99M2.
7899
8052
  },
7900
8053
  FIRST_ENTRY => 0,
7901
8054
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
7902
8055
  0x0009 => { %releaseMode2 },
7903
- 0x000a => [{
7904
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9|9M2)|DSC-(RX10M4|RX100M6|RX100M7|RX100M5A|HX99|RX0M2))\b/',
7905
- Name => 'ShotNumberSincePowerUp',
7906
- Format => 'int8u',
7907
- },{
8056
+ 0x000a => {
7908
8057
  Name => 'ShotNumberSincePowerUp',
8058
+ Condition => '$$self{Model} =~ /^(ILCA-(68|77M2|99M2)|ILCE-(5000|5100|6000|6300|6500|7|7M2|7R|7RM2|7S|7SM2|QX1)|DSC-(HX350|HX400V|HX60V|HX80|HX90|HX90V|QX30|RX0|RX1RM2|RX10|RX10M2|RX10M3|RX100M3|RX100M4|RX100M5|WX220|WX350|WX500))\b/',
8059
+ Notes => 'valid only for some models',
7909
8060
  Format => 'int32u',
7910
- }],
8061
+ },
7911
8062
  0x0012 => { %sequenceImageNumber },
7912
8063
  0x0016 => {
7913
8064
  Name => 'SequenceLength',
@@ -7953,6 +8104,7 @@ my %isoSetting2010 = (
7953
8104
  },
7954
8105
  0x002a => {
7955
8106
  Name => 'Quality2',
8107
+ Condition => '$$self{Model} !~ /^(ILCE-7SM3)\b/',
7956
8108
  PrintConv => {
7957
8109
  0 => 'JPEG',
7958
8110
  1 => 'RAW',
@@ -7962,11 +8114,13 @@ my %isoSetting2010 = (
7962
8114
  },
7963
8115
  0x0047 => {
7964
8116
  Name => 'SonyImageHeight',
8117
+ Condition => '$$self{Model} !~ /^(ILCE-7SM3)\b/',
7965
8118
  Format => 'int16u',
7966
8119
  PrintConv => '$val > 0 ? 8*$val : "n.a."',
7967
8120
  },
7968
8121
  0x0053 => {
7969
8122
  Name => 'ModelReleaseYear',
8123
+ Condition => '$$self{Model} !~ /^(ILCE-7SM3)\b/',
7970
8124
  Format => 'int8u',
7971
8125
  PrintConv => 'sprintf("20%.2d", $val)',
7972
8126
  },
@@ -7981,11 +8135,12 @@ my %isoSetting2010 = (
7981
8135
  FIRST_ENTRY => 0,
7982
8136
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
7983
8137
  DATAMEMBER => [ 0 ],
7984
- IS_SUBDIR => [ 0x0498, 0x04a2, 0x059d, 0x0634, 0x0636, 0x064c, 0x0653, 0x0678, 0x06b8, 0x06de, 0x06e7 ],
8138
+ IS_SUBDIR => [ 0x0498, 0x04a1, 0x04a2, 0x059d, 0x0634, 0x0636, 0x064c, 0x0653, 0x0678, 0x06b8, 0x06de, 0x06e7 ],
7985
8139
  0x0000 => { Name => 'Ver9401', Hidden => 1, RawConv => '$$self{Ver9401} = $val; $$self{OPTIONS}{Unknown}<2 ? undef : $val' },
7986
8140
 
7987
8141
  0x0498 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 148', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
7988
- 0x04a2 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(152|154)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8142
+ 0x04a1 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 160', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8143
+ 0x04a2 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(152|154|155)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
7989
8144
  0x059d => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(144|146)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
7990
8145
  0x0634 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 68', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
7991
8146
  0x0636 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(73|74)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
@@ -8056,6 +8211,7 @@ my %isoSetting2010 = (
8056
8211
  14 => 'Tracking',
8057
8212
  15 => 'Face Tracking',
8058
8213
  20 => 'Animal Eye Tracking',
8214
+ # 21 => '???', # (ILCE-7SM3)
8059
8215
  255 => 'Manual',
8060
8216
  },
8061
8217
  },
@@ -8327,7 +8483,7 @@ my %isoSetting2010 = (
8327
8483
  # also often deviating results for Sony FE 90mm F2.8 Macro G OSS ...
8328
8484
  Name => 'SonyFNumber',
8329
8485
  Format => 'int16u',
8330
- Condition => '$$self{Model} !~ /^DSC-/',
8486
+ Condition => '$$self{Model} !~ /^(DSC-|ZV-)/',
8331
8487
  ValueConv => '2 ** (($val/256 - 16) / 2)',
8332
8488
  ValueConvInv => '(log($val)*2/log(2)+16)*256',
8333
8489
  PrintConv => 'sprintf("%.1f",$val)',
@@ -8443,7 +8599,7 @@ my %isoSetting2010 = (
8443
8599
  },
8444
8600
  0x0342 => {
8445
8601
  Name => 'LensZoomPosition',
8446
- Condition => '$$self{Model} !~ /^(ILCA-|ILCE-(7RM2|7M3|7RM3|7RM4|7SM2|6100|6300|6400|6500|6600|9|9M2)|DSC-(HX80|HX90V|HX99|RX0|RX10M2|RX10M3|RX10M4|RX100M4|RX100M5|RX100M5A|RX100M6|RX100M7|WX500))/',
8602
+ Condition => '$$self{Model} !~ /^(ILCA-|ILCE-(7RM2|7M3|7RM3|7RM4|7SM2|6100|6300|6400|6500|6600|7C|9|9M2)|DSC-(HX80|HX90V|HX99|RX0|RX10M2|RX10M3|RX10M4|RX100M4|RX100M5|RX100M5A|RX100M6|RX100M7|WX500)|ZV-)/',
8447
8603
  Format => 'int16u',
8448
8604
  PrintConv => 'sprintf("%.0f%%",$val/10.24)',
8449
8605
  PrintConvInv => '$val=~s/ ?%$//; $val * 10.24',
@@ -8455,7 +8611,7 @@ my %isoSetting2010 = (
8455
8611
  },
8456
8612
  0x034e => {
8457
8613
  Name => 'LensZoomPosition',
8458
- Condition => '$$self{Model} =~ /^(DSC-(RX100M5|RX100M5A|RX100M6|RX100M7|RX10M4|HX99)|ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9M2))/',
8614
+ Condition => '$$self{Model} =~ /^(DSC-(RX100M5|RX100M5A|RX100M6|RX100M7|RX10M4|HX99)|ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9M2))/',
8459
8615
  Format => 'int16u',
8460
8616
  PrintConv => 'sprintf("%.0f%%",$val/10.24)',
8461
8617
  PrintConvInv => '$val=~s/ ?%$//; $val * 10.24',
@@ -8467,7 +8623,7 @@ my %isoSetting2010 = (
8467
8623
  },
8468
8624
  0x035c => {
8469
8625
  Name => 'VignettingCorrParams',
8470
- Condition => '$$self{Model} =~ /^(ILCA-99M2|ILCE-(6100|6400|6500|6600|7M3|7RM3|7RM4|9|9M2))/',
8626
+ Condition => '$$self{Model} =~ /^(ILCA-99M2|ILCE-(6100|6400|6500|6600|7C|7M3|7RM3|7RM4|9|9M2))/',
8471
8627
  Format => 'int16s[16]',
8472
8628
  },
8473
8629
  0x035a => {
@@ -8504,7 +8660,7 @@ my %isoSetting2010 = (
8504
8660
  },
8505
8661
  0x03b8 => {
8506
8662
  Name => 'ChromaticAberrationCorrParams',
8507
- Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7M3|7RM3|7RM4|9|9M2))/',
8663
+ Condition => '$$self{Model} =~ /^(ILCE-(6100|6400|6600|7C|7M3|7RM3|7RM4|9|9M2))/',
8508
8664
  Format => 'int16s[32]',
8509
8665
  },
8510
8666
  );
@@ -8739,7 +8895,8 @@ my %isoSetting2010 = (
8739
8895
  # 1 1 3 0 for ILCA-68/77M2/99M2
8740
8896
  # 0 0 0 0 for NEX and ILCE-3000/3500, also seen for SLT/ILCA with non-AF lens
8741
8897
  # 1 0 0 0 for ILCE-5000/5100/6000/7/7M2/7R/7S/QX1
8742
- # 6 0 0 0 for ILCE-6100/6300/6400/6500/6600/7M3/7RM2/7RM3/7RM4/7SM2/9/9M2
8898
+ # 6 0 0 0 for ILCE-6100/6300/6400/6500/6600/7C/7M3/7RM2/7RM3/7RM4/7SM2/9/9M2
8899
+ # 9 . . . for ILCE-7SM3
8743
8900
  # 0 2 0 0 for NEX/ILCE with LA-EA2/EA4 Phase-AF adapter
8744
8901
  # 2 0 0 0 seen for a few NEX-5N images
8745
8902
  # 2 2 0 0 seen for a few NEX-5N/7 images with LA-EA2 adapter
@@ -9243,6 +9400,146 @@ my %isoSetting2010 = (
9243
9400
  0xbc => { Name => 'AFStatus_94_E6_Center_F2-8', %Image::ExifTool::Minolta::afStatusInfo },
9244
9401
  );
9245
9402
 
9403
+ # tag 0x9416 decoding (ref JR)
9404
+ %Image::ExifTool::Sony::Tag9416 = (
9405
+ PROCESS_PROC => \&ProcessEnciphered,
9406
+ WRITE_PROC => \&WriteEnciphered,
9407
+ CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
9408
+ FORMAT => 'int8u',
9409
+ NOTES => 'Valid for the ILCE-7SM3.',
9410
+ FIRST_ENTRY => 0,
9411
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
9412
+ 0x0000 => { Name => 'Tag9416_0000', PrintConv => 'sprintf("%3d",$val)', RawConv => '$$self{TagVersion} = $val' },
9413
+ 0x0004 => {
9414
+ Name => 'SonyISO',
9415
+ Format => 'int16u',
9416
+ ValueConv => '100 * 2**(16 - $val/256)',
9417
+ ValueConvInv => '256 * (16 - log($val/100)/log(2))',
9418
+ PrintConv => 'sprintf("%.0f",$val)',
9419
+ PrintConvInv => '$val',
9420
+ },
9421
+ 0x0006 => { %gain2010 },
9422
+ 0x000a => { # appr. same value as Exif ExposureTime, but shorter in HDR-modes
9423
+ Name => 'SonyExposureTime2',
9424
+ Format => 'int16u',
9425
+ ValueConv => '$val ? 2 ** (16 - $val/256) : 0',
9426
+ ValueConvInv => '$val ? int((16 - log($val) / log(2)) * 256 + 0.5) : 0',
9427
+ PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
9428
+ PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
9429
+ },
9430
+ 0x000c => {
9431
+ Name => 'ExposureTime',
9432
+ Format => 'rational32u',
9433
+ PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"', # (Bulb NC)
9434
+ PrintConvInv => 'lc($val) eq "bulb" ? 0 : $val',
9435
+ },
9436
+ 0x0010 => { # but sometimes deviating results
9437
+ Name => 'SonyFNumber2',
9438
+ Format => 'int16u',
9439
+ ValueConv => '2 ** (($val/256 - 16) / 2)',
9440
+ ValueConvInv => '(log($val)*2/log(2)+16)*256',
9441
+ PrintConv => 'sprintf("%.1f",$val)',
9442
+ PrintConvInv => '$val',
9443
+ },
9444
+ 0x0012 => {
9445
+ Name => 'SonyMaxApertureValue', # (at current focal length)
9446
+ Format => 'int16u',
9447
+ ValueConv => '2 ** (($val/256 - 16) / 2)',
9448
+ ValueConvInv => '(log($val)*2/log(2)+16)*256',
9449
+ PrintConv => 'sprintf("%.1f",$val)',
9450
+ PrintConvInv => '$val',
9451
+ },
9452
+ 0x001d => { %sequenceImageNumber },
9453
+ 0x0035 => {
9454
+ Name => 'ExposureProgram',
9455
+ Priority => 0,
9456
+ SeparateTable => 'ExposureProgram3',
9457
+ PrintConv => \%sonyExposureProgram3,
9458
+ },
9459
+ 0x0048 => {
9460
+ Name => 'LensMount',
9461
+ Condition => '$$self{Model} !~ /^(DSC-)/',
9462
+ PrintConv => {
9463
+ 0 => 'Unknown',
9464
+ 1 => 'A-mount',
9465
+ 2 => 'E-mount',
9466
+ 3 => 'A-mount (3)',
9467
+ },
9468
+ },
9469
+ 0x0049 => {
9470
+ Name => 'LensFormat',
9471
+ Condition => '$$self{Model} !~ /^(DSC-)/',
9472
+ PrintConv => {
9473
+ 0 => 'Unknown',
9474
+ 1 => 'APS-C',
9475
+ 2 => 'Full-frame',
9476
+ },
9477
+ },
9478
+ 0x004a => {
9479
+ Name => 'LensMount',
9480
+ DataMember => 'LensMount',
9481
+ RawConv => '$$self{LensMount} = $val; $$self{Model} =~ /^(DSC-)/ ? undef : $val',
9482
+ PrintConv => {
9483
+ 0 => 'Unknown',
9484
+ 1 => 'A-mount',
9485
+ 2 => 'E-mount',
9486
+ },
9487
+ },
9488
+ 0x004b => {
9489
+ Name => 'LensType2',
9490
+ Condition => '$$self{LensMount} == 2',
9491
+ Format => 'int16u',
9492
+ SeparateTable => 'LensType2',
9493
+ PrintConv => \%sonyLensTypes2,
9494
+ },
9495
+ 0x004d => {
9496
+ Name => 'LensType',
9497
+ Condition => '$$self{LensMount} == 1',
9498
+ Priority => 0, #PH (just to be safe)
9499
+ Format => 'int16u', #PH
9500
+ SeparateTable => 1,
9501
+ ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
9502
+ PrintConv => \%sonyLensTypes,
9503
+ },
9504
+ 0x004f => {
9505
+ Name => 'DistortionCorrParams',
9506
+ Format => 'int16s[16]',
9507
+ },
9508
+ 0x0071 => {
9509
+ Name => 'FocalLength',
9510
+ Format => 'int16u',
9511
+ ValueConv => '$val / 10',
9512
+ ValueConvInv => '$val * 10',
9513
+ PrintConv => 'sprintf("%.1f mm",$val)',
9514
+ PrintConvInv => '$val =~ s/ ?mm//; $val',
9515
+ },
9516
+ 0x0073 => {
9517
+ Name => 'MinFocalLength',
9518
+ Format => 'int16u',
9519
+ ValueConv => '$val / 10',
9520
+ ValueConvInv => '$val * 10',
9521
+ PrintConv => 'sprintf("%.1f mm",$val)',
9522
+ PrintConvInv => '$val =~ s/ ?mm//; $val',
9523
+ },
9524
+ 0x0075 => { # may give 0 for fixed focal length lenses
9525
+ Name => 'MaxFocalLength',
9526
+ Format => 'int16u',
9527
+ RawConv => '$val || undef',
9528
+ ValueConv => '$val / 10',
9529
+ ValueConvInv => '$val * 10',
9530
+ PrintConv => 'sprintf("%.1f mm",$val)',
9531
+ PrintConvInv => '$val =~ s/ ?mm//; $val',
9532
+ },
9533
+ 0x088f => {
9534
+ Name => 'VignettingCorrParams',
9535
+ Format => 'int16s[16]',
9536
+ },
9537
+ 0x0914 => {
9538
+ Name => 'ChromaticAberrationCorrParams',
9539
+ Format => 'int16s[32]',
9540
+ },
9541
+ );
9542
+
9246
9543
  %Image::ExifTool::Sony::FaceInfo1 = (
9247
9544
  %binaryDataAttrs,
9248
9545
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
@@ -9740,12 +10037,88 @@ my %isoSetting2010 = (
9740
10037
  # 0x8100 - 16 bytes starting with 0x060e2b340401
9741
10038
  0x8100 => { Name => 'Sony_rtmd_0x8100', Format => 'int8u', %hidUnk },
9742
10039
  0x8101 => { Name => 'Sony_rtmd_0x8101', Format => 'int8u', %hidUnk }, # seen: 0,1
10040
+ 0x8106 => { Name => 'Sony_rtmd_0x8106', Format => 'int32u', %hidUnk }, # seen: "25 1"
9743
10041
  0x8109 => { Name => 'Sony_rtmd_0x8109', Format => 'int32u', %hidUnk }, # seen: "1 50"
9744
10042
  0x810a => { Name => 'Sony_rtmd_0x810a', Format => 'int16u', %hidUnk }, # seen: 0
9745
10043
  0x810b => { Name => 'Sony_rtmd_0x810b', Format => 'int16u', %hidUnk }, # seen: 100
9746
10044
  0x810c => { Name => 'Sony_rtmd_0x810c', Format => 'int16u', %hidUnk }, # seen: 100
9747
10045
  0x810d => { Name => 'Sony_rtmd_0x810d', Format => 'int8u', %hidUnk }, # seen: 1
10046
+ 0x8115 => { Name => 'Sony_rtmd_0x8115', Format => 'int16u', %hidUnk }, # seen: 100
9748
10047
  # 0x8300 - container for other tags in this format
10048
+ 0x8500 => {
10049
+ Name => 'GPSVersionID',
10050
+ Groups => { 2 => 'Location' },
10051
+ Format => 'int8u',
10052
+ PrintConv => '$val =~ tr/ /./; $val',
10053
+ },
10054
+ 0x8501 => {
10055
+ Name => 'GPSLatitudeRef',
10056
+ Groups => { 2 => 'Location' },
10057
+ Format => 'string',
10058
+ PrintConv => {
10059
+ N => 'North',
10060
+ S => 'South',
10061
+ },
10062
+ },
10063
+ 0x8502 => {
10064
+ Name => 'GPSLatitude',
10065
+ Groups => { 2 => 'Location' },
10066
+ Format => 'rational64u',
10067
+ ValueConv => 'require Image::ExifTool::GPS;Image::ExifTool::GPS::ToDegrees($val)',
10068
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)',
10069
+ },
10070
+ 0x8503 => {
10071
+ Name => 'GPSLongitudeRef',
10072
+ Groups => { 2 => 'Location' },
10073
+ Format => 'string',
10074
+ PrintConv => {
10075
+ E => 'East',
10076
+ W => 'West',
10077
+ },
10078
+ },
10079
+ 0x8504 => {
10080
+ Name => 'GPSLongitude',
10081
+ Groups => { 2 => 'Location' },
10082
+ Format => 'rational64u',
10083
+ ValueConv => 'require Image::ExifTool::GPS;Image::ExifTool::GPS::ToDegrees($val)',
10084
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)',
10085
+ },
10086
+ 0x8507 => {
10087
+ Name => 'GPSTimeStamp',
10088
+ Groups => { 2 => 'Time' },
10089
+ Format => 'rational64u',
10090
+ ValueConv => 'require Image::ExifTool::GPS;Image::ExifTool::GPS::ConvertTimeStamp($val)',
10091
+ PrintConv => 'Image::ExifTool::GPS::PrintTimeStamp($val)',
10092
+ },
10093
+ 0x8509 => {
10094
+ Name => 'GPSStatus',
10095
+ Groups => { 2 => 'Location' },
10096
+ Format => 'string',
10097
+ PrintConv => {
10098
+ A => 'Measurement Active',
10099
+ V => 'Measurement Void',
10100
+ },
10101
+ },
10102
+ 0x850a => {
10103
+ Name => 'GPSMeasureMode',
10104
+ Groups => { 2 => 'Location' },
10105
+ Format => 'string',
10106
+ PrintConv => {
10107
+ 2 => '2-Dimensional Measurement',
10108
+ 3 => '3-Dimensional Measurement',
10109
+ },
10110
+ },
10111
+ 0x8512 => {
10112
+ Name => 'GPSMapDatum',
10113
+ Groups => { 2 => 'Location' },
10114
+ Format => 'string',
10115
+ },
10116
+ 0x851d => {
10117
+ Name => 'GPSDateStamp',
10118
+ Groups => { 2 => 'Time' },
10119
+ Format => 'string',
10120
+ ValueConv => 'Image::ExifTool::Exif::ExifDate($val)',
10121
+ },
9749
10122
  0xe000 => { Name => 'Sony_rtmd_0xe000', Format => 'int8u', %hidUnk }, # (16 bytes)
9750
10123
  0xe300 => { Name => 'Sony_rtmd_0xe300', Format => 'int8u', %hidUnk }, # seen: 0,1
9751
10124
  0xe301 => { Name => 'Sony_rtmd_0xe301', Format => 'int32u', %hidUnk }, # seen: 100
@@ -9758,6 +10131,8 @@ my %isoSetting2010 = (
9758
10131
  ValueConv => 'my @a=unpack("x1H4H2H2H2H2H2",$val); "$a[0]:$a[1]:$a[2] $a[3]:$a[4]:$a[5]"',
9759
10132
  PrintConv => '$self->ConvertDateTime($val)',
9760
10133
  },
10134
+ # f010 - 2048 bytes
10135
+ # f020 - 543 bytes
9761
10136
  );
9762
10137
 
9763
10138
  # Composite Sony tags
@@ -9792,6 +10167,17 @@ my %isoSetting2010 = (
9792
10167
  },
9793
10168
  PrintConv => '$val eq "inf" ? $val : sprintf("%.2f m",$val)',
9794
10169
  },
10170
+ GPSDateTime => {
10171
+ Description => 'GPS Date/Time',
10172
+ Groups => { 2 => 'Time' },
10173
+ SubDoc => 1, # generate for all sub-documents
10174
+ Require => {
10175
+ 0 => 'Sony:GPSDateStamp',
10176
+ 1 => 'Sony:GPSTimeStamp',
10177
+ },
10178
+ ValueConv => '"$val[0] $val[1]Z"',
10179
+ PrintConv => '$self->ConvertDateTime($val)',
10180
+ },
9795
10181
  );
9796
10182
 
9797
10183
  # add our composite tags