exiftool-vendored.pl 12.56.0 → 12.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/bin/Changes +80 -5
  2. package/bin/MANIFEST +4 -0
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +1 -1
  5. package/bin/README +2 -2
  6. package/bin/config_files/example.config +1 -0
  7. package/bin/config_files/rotate_regions.config +1 -1
  8. package/bin/exiftool +174 -99
  9. package/bin/lib/Image/ExifTool/AIFF.pm +2 -2
  10. package/bin/lib/Image/ExifTool/APE.pm +2 -2
  11. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +19 -15
  12. package/bin/lib/Image/ExifTool/Canon.pm +26 -6
  13. package/bin/lib/Image/ExifTool/CanonRaw.pm +5 -1
  14. package/bin/lib/Image/ExifTool/DJI.pm +28 -2
  15. package/bin/lib/Image/ExifTool/Exif.pm +77 -19
  16. package/bin/lib/Image/ExifTool/FlashPix.pm +32 -10
  17. package/bin/lib/Image/ExifTool/FujiFilm.pm +7 -3
  18. package/bin/lib/Image/ExifTool/GPS.pm +7 -2
  19. package/bin/lib/Image/ExifTool/Geotag.pm +30 -7
  20. package/bin/lib/Image/ExifTool/JPEG.pm +14 -2
  21. package/bin/lib/Image/ExifTool/Jpeg2000.pm +5 -5
  22. package/bin/lib/Image/ExifTool/LIF.pm +10 -2
  23. package/bin/lib/Image/ExifTool/LNK.pm +5 -4
  24. package/bin/lib/Image/ExifTool/MIE.pm +3 -3
  25. package/bin/lib/Image/ExifTool/MPEG.pm +2 -2
  26. package/bin/lib/Image/ExifTool/MakerNotes.pm +3 -2
  27. package/bin/lib/Image/ExifTool/Minolta.pm +6 -7
  28. package/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -1
  29. package/bin/lib/Image/ExifTool/Nikon.pm +1003 -907
  30. package/bin/lib/Image/ExifTool/NikonCustom.pm +2 -2
  31. package/bin/lib/Image/ExifTool/NikonSettings.pm +1 -1
  32. package/bin/lib/Image/ExifTool/Olympus.pm +88 -6
  33. package/bin/lib/Image/ExifTool/PNG.pm +10 -2
  34. package/bin/lib/Image/ExifTool/PanasonicRaw.pm +27 -1
  35. package/bin/lib/Image/ExifTool/Pentax.pm +8 -5
  36. package/bin/lib/Image/ExifTool/PhaseOne.pm +14 -1
  37. package/bin/lib/Image/ExifTool/Photoshop.pm +38 -7
  38. package/bin/lib/Image/ExifTool/QuickTime.pm +44 -13
  39. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +40 -6
  40. package/bin/lib/Image/ExifTool/README +19 -2
  41. package/bin/lib/Image/ExifTool/RIFF.pm +34 -13
  42. package/bin/lib/Image/ExifTool/Rawzor.pm +2 -2
  43. package/bin/lib/Image/ExifTool/Ricoh.pm +2 -1
  44. package/bin/lib/Image/ExifTool/Sigma.pm +5 -4
  45. package/bin/lib/Image/ExifTool/SigmaRaw.pm +9 -3
  46. package/bin/lib/Image/ExifTool/Sony.pm +24 -1
  47. package/bin/lib/Image/ExifTool/TagLookup.pm +4678 -4628
  48. package/bin/lib/Image/ExifTool/TagNames.pod +305 -113
  49. package/bin/lib/Image/ExifTool/Validate.pm +5 -5
  50. package/bin/lib/Image/ExifTool/WriteExif.pl +42 -0
  51. package/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
  52. package/bin/lib/Image/ExifTool/Writer.pl +150 -36
  53. package/bin/lib/Image/ExifTool/XMP.pm +19 -4
  54. package/bin/lib/Image/ExifTool/XMP2.pl +2 -1
  55. package/bin/lib/Image/ExifTool.pm +195 -42
  56. package/bin/lib/Image/ExifTool.pod +44 -9
  57. package/bin/perl-Image-ExifTool.spec +1 -1
  58. package/bin/pp_build_exe.args +4 -4
  59. package/package.json +3 -3
@@ -599,6 +599,8 @@ my %insvLimit = (
599
599
  0x1a => 'Firmware',
600
600
  0x2a => {
601
601
  Name => 'Parameters',
602
+ # (see https://exiftool.org/forum/index.php?msg=78942)
603
+ Notes => 'number of lenses, 6-axis orientation of each lens, raw resolution',
602
604
  ValueConv => '$val =~ tr/_/ /; $val',
603
605
  },
604
606
  );
@@ -1125,23 +1127,37 @@ sub Process_text($$$;$)
1125
1127
  # Inputs: 0) ExifTool ref
1126
1128
  # Notes: Also accesses ExifTool RAF*, SET_GROUP1, HandlerType, MetaFormat,
1127
1129
  # ee*, and avcC elements (* = must exist)
1130
+ # - may be called either due to ExtractEmbedded option, or ImageDataMD5 requested
1131
+ # - MD5 includes only video and audio data
1128
1132
  sub ProcessSamples($)
1129
1133
  {
1130
1134
  my $et = shift;
1131
1135
  my ($raf, $ee) = @$et{qw(RAF ee)};
1132
- my ($i, $buff, $pos, $hdrLen, $hdrFmt, @time, @dur, $oldIndent);
1136
+ my ($i, $buff, $pos, $hdrLen, $hdrFmt, @time, @dur, $oldIndent, $md5);
1133
1137
 
1134
1138
  return unless $ee;
1135
1139
  delete $$et{ee}; # use only once
1136
1140
 
1137
- # only process specific types of video streams
1141
+ my $eeOpt = $et->Options('ExtractEmbedded');
1138
1142
  my $type = $$et{HandlerType} || '';
1139
1143
  if ($type eq 'vide') {
1140
- if ($$ee{avcC}) { $type = 'avcC' }
1141
- elsif ($$ee{JPEG}) { $type = 'JPEG' }
1142
- else { return }
1144
+ # only process specific types of video streams
1145
+ $md5 = $$et{ImageDataMD5};
1146
+ # only process specific video types if ExtractEmbedded was used
1147
+ # (otherwise we are only here to calculate the audio/video MD5)
1148
+ if ($eeOpt) {
1149
+ if ($$ee{avcC}) { $type = 'avcC' }
1150
+ elsif ($$ee{JPEG}) { $type = 'JPEG' }
1151
+ else { return unless $md5 }
1152
+ }
1153
+ } elsif ($type eq 'soun') {
1154
+ $md5 = $$et{ImageDataMD5};
1155
+ return unless $md5;
1156
+ } else {
1157
+ return unless $eeOpt; # (don't do MD5 on other types)
1143
1158
  }
1144
1159
 
1160
+ my $md5size = 0;
1145
1161
  my ($start, $size) = @$ee{qw(start size)};
1146
1162
  #
1147
1163
  # determine sample start offsets from chunk offsets (stco) and sample-to-chunk table (stsc),
@@ -1160,13 +1176,16 @@ sub ProcessSamples($)
1160
1176
  $timeDelta = shift @$stts;
1161
1177
  }
1162
1178
  my $ts = $$et{MediaTS} || 1;
1179
+ my @chunkSize; # total size of each chunk
1163
1180
  foreach $chunkStart (@$stco) {
1164
1181
  if ($iChunk >= $nextChunk and @$stsc) {
1165
1182
  ($startChunk, $samplesPerChunk, $descIdx) = @{shift @$stsc};
1166
1183
  $nextChunk = $$stsc[0][0] if @$stsc;
1167
1184
  }
1168
1185
  @$size < @$start + $samplesPerChunk and $et->WarnOnce('Sample size error'), last;
1186
+ last unless defined $chunkStart and length $chunkStart;
1169
1187
  my $sampleStart = $chunkStart;
1188
+ my $chunkSize = 0;
1170
1189
  Sample: for ($i=0; ; ) {
1171
1190
  push @$start, $sampleStart;
1172
1191
  if (defined $time) {
@@ -1184,12 +1203,19 @@ Sample: for ($i=0; ; ) {
1184
1203
  --$timeCount;
1185
1204
  }
1186
1205
  # (eventually should use the description indices: $descIdx)
1206
+ $chunkSize += $$size[$#$start];
1187
1207
  last if ++$i >= $samplesPerChunk;
1188
1208
  $sampleStart += $$size[$#$start];
1189
1209
  }
1210
+ push @chunkSize, $chunkSize;
1190
1211
  ++$iChunk;
1191
1212
  }
1192
1213
  @$start == @$size or $et->WarnOnce('Incorrect sample start/size count'), return;
1214
+ # process as chunks if we are only interested in calculating MD5
1215
+ if ($type eq 'soun' or $type eq 'vide') {
1216
+ $start = $stco;
1217
+ $size = \@chunkSize;
1218
+ }
1193
1219
  }
1194
1220
  #
1195
1221
  # extract and parse the sample data
@@ -1221,6 +1247,10 @@ Sample: for ($i=0; ; ) {
1221
1247
  my $size = $$size[$i];
1222
1248
  next unless $raf->Seek($$start[$i], 0) and $raf->Read($buff, $size) == $size;
1223
1249
 
1250
+ if ($md5) {
1251
+ $md5->add($buff);
1252
+ $md5size += length $buff;
1253
+ }
1224
1254
  if ($type eq 'avcC') {
1225
1255
  next if length($buff) <= $hdrLen;
1226
1256
  # scan through all NAL units and send them to ParseH264Video()
@@ -1347,6 +1377,8 @@ Sample: for ($i=0; ; ) {
1347
1377
  SetGPSDateTime($et, $tagTbl, $time[$i]) if $$et{FoundGPSLatitude} and not $$et{FoundGPSDateTime};
1348
1378
  }
1349
1379
  if ($verbose) {
1380
+ my $str = $type eq 'soun' ? 'Audio' : 'Video';
1381
+ $et->VPrint(0, "$$et{INDENT}(ImageDataMD5: $md5size bytes of $str data)\n") if $md5size;
1350
1382
  $$et{INDENT} = $oldIndent;
1351
1383
  $et->VPrint(0, "--------------------------\n");
1352
1384
  }
@@ -1488,7 +1520,7 @@ sub ProcessFreeGPS($$$)
1488
1520
  # Kenwood dashcam sometimes stores absolute year and local time
1489
1521
  # (but sometimes year since 2000 and UTC time in same video!)
1490
1522
  require Time::Local;
1491
- my $time = Image::ExifTool::TimeLocal($sec,$min,$hr,$day,$mon-1,$yr-1900);
1523
+ my $time = Image::ExifTool::TimeLocal($sec,$min,$hr,$day,$mon-1,$yr);
1492
1524
  ($sec,$min,$hr,$day,$mon,$yr) = gmtime($time);
1493
1525
  $yr += 1900;
1494
1526
  ++$mon;
@@ -2924,6 +2956,7 @@ sub ProcessGarminGPS($$$)
2924
2956
  my $epoch = (66 * 365 + 17) * 24 * 3600; # time is relative to Jan 1, 1904
2925
2957
  my $scl = 180 / (32768 * 65536); # scaling factor for lat/lon
2926
2958
  $et->VerboseDir('GarminGPS');
2959
+ $$et{SET_GROUP1} = 'Garmin';
2927
2960
  while ($pos + 20 <= $dataLen) {
2928
2961
  $$et{DOC_NUM} = ++$$et{DOC_COUNT};
2929
2962
  my $time = Image::ExifTool::ConvertUnixTime(Get32u($dataPt, $pos) - $epoch) . 'Z';
@@ -2938,6 +2971,7 @@ sub ProcessGarminGPS($$$)
2938
2971
  $pos += 20;
2939
2972
  }
2940
2973
  delete $$et{DOC_NUM};
2974
+ delete $$et{SET_GROUP1};
2941
2975
  return 1;
2942
2976
  }
2943
2977
 
@@ -249,6 +249,13 @@ key:
249
249
  within this atom. Currently used only for Canon CNTH atom,
250
250
  which contains garbage after the first contained atom.
251
251
 
252
+ NIKON_OFFSETS [Nikon Encrypted tables only] Pointer to int32u NumberOffsets
253
+ for offset-type encrypted Nikon directories. When set,
254
+ directory and decryption lengths are calculated automatically.
255
+
256
+ ALLOW_REPROCESS Flag to allow reprocessing of another directory at this
257
+ same location in the file, bypassing recursion avoidance test.
258
+
252
259
  DATAMEMBER : BinaryData tables only. A reference to a list of sorted tag ID's
253
260
  which must be extracted as data members when writing. Must also list "var_"
254
261
  format tags and tags with Hook so offsets are properly calculated if the table
@@ -404,6 +411,10 @@ numerical, and generated automatically otherwise.
404
411
 
405
412
  'IsComposite' - flag set for Composite tags
406
413
 
414
+ 'IsImageData' - flag set if this is an image data offset to
415
+ be included in ImageDataMD5 calculation. Must have an
416
+ OffsetPair entry which is the ID of the corresponding size.
417
+
407
418
  'IsOffset' - flag set if the tag represents an offset to some
408
419
  data, and causes value will be adjusted to an absolute file
409
420
  offset. If set to 2, the offset base of the parent directory
@@ -465,6 +476,10 @@ numerical, and generated automatically otherwise.
465
476
  documentation, padded to the number of digits given by the
466
477
  PrintHex value.
467
478
 
479
+ 'PrintInt' - remove decimal part of tag ID in HTML tag name
480
+ documentation. (To avoid confusing ExifTool users because
481
+ the LensType decimal numbers are for internal use only.)
482
+
468
483
  'PrintSort' - causes PrintConv values to be sorted by value
469
484
  rather than key in the HTML tag name documentation.
470
485
 
@@ -713,7 +728,7 @@ numerical, and generated automatically otherwise.
713
728
  BitShift are applied before evaluating RawConv.
714
729
 
715
730
  BitShift : [Mask tags only] Bit shift for Mask-ed values. If not
716
- specified, set to the number of trailing bits in the Mask.
731
+ specified, set to the number of trailing zero bits in Mask.
717
732
  When reading, the value is shifted right by this number of
718
733
  bits after the Mask is applied.
719
734
 
@@ -1003,7 +1018,9 @@ numerical, and generated automatically otherwise.
1003
1018
  current Base. This is a Perl expression which may use
1004
1019
  $valuePtr to represent the location of the tag value in the
1005
1020
  file, or $val for the value itself. If not specified, a Start
1006
- of '$valuePtr' is assumed.
1021
+ of '$valuePtr' is assumed. Subdirectories in BinaryData may
1022
+ also use $dirStart to represent the offset of the current
1023
+ directory start relative to the start of the data block.
1007
1024
 
1008
1025
  OffsetPt : [EXIF directories only] If specified, this is a Perl
1009
1026
  expression that gives the position of a 32-bit word in the
@@ -30,7 +30,7 @@ use strict;
30
30
  use vars qw($VERSION $AUTOLOAD);
31
31
  use Image::ExifTool qw(:DataAccess :Utils);
32
32
 
33
- $VERSION = '1.61';
33
+ $VERSION = '1.64';
34
34
 
35
35
  sub ConvertTimecode($);
36
36
  sub ProcessSGLT($$$);
@@ -38,6 +38,13 @@ sub ProcessSLLT($$$);
38
38
  sub ProcessLucas($$$);
39
39
  sub WriteRIFF($$);
40
40
 
41
+ # RIFF chunks containing image data (to include in ImageDataMD5 digest)
42
+ my %isImageData = (
43
+ LIST_movi => 1, # (AVI: contains ##db, ##dc, ##wb)
44
+ data => 1, # (WAV)
45
+ 'VP8 '=>1, VP8L=>1, ANIM=>1, ANMF=>1, ALPH=>1, # (WebP)
46
+ );
47
+
41
48
  # recognized RIFF variants
42
49
  my %riffType = (
43
50
  'WAVE' => 'WAV', 'AVI ' => 'AVI', 'WEBP' => 'WEBP',
@@ -1522,7 +1529,7 @@ my %code2charset = (
1522
1529
  },
1523
1530
  # (can't calculate duration like this for compressed audio types)
1524
1531
  RawConv => q{
1525
- return undef if $$self{VALUE}{FileType} =~ /^(LA|OFR|PAC|WV)$/;
1532
+ return undef if $$self{FileType} =~ /^(LA|OFR|PAC|WV)$/;
1526
1533
  return(($val[0] and not ($val[2] or $val[3])) ? $val[1] / $val[0] : undef);
1527
1534
  },
1528
1535
  PrintConv => 'ConvertDuration($val)',
@@ -1980,6 +1987,7 @@ sub ProcessRIFF($$)
1980
1987
  my $unknown = $et->Options('Unknown');
1981
1988
  my $validate = $et->Options('Validate');
1982
1989
  my $ee = $et->Options('ExtractEmbedded');
1990
+ my $md5 = $$et{ImageDataMD5};
1983
1991
 
1984
1992
  # verify this is a valid RIFF file
1985
1993
  return 0 unless $raf->Read($buff, 12) == 12;
@@ -1996,7 +2004,7 @@ sub ProcessRIFF($$)
1996
2004
  $$raf{NoBuffer} = 1 if $et->Options('FastScan'); # disable buffering in FastScan mode
1997
2005
  $mime = $riffMimeType{$type} if $type;
1998
2006
  $et->SetFileType($type, $mime);
1999
- $$et{VALUE}{FileType} .= ' (RF64)' if $rf64;
2007
+ $$et{VALUE}{FileType} .= ' (RF64)' if $rf64 and $$et{VALUE}{FileType};
2000
2008
  $$et{RIFFStreamType} = ''; # initialize stream type
2001
2009
  $$et{RIFFStreamCodec} = []; # initialize codec array
2002
2010
  SetByteOrder('II');
@@ -2059,6 +2067,10 @@ sub ProcessRIFF($$)
2059
2067
  # (in LIST_movi chunk: ##db = uncompressed DIB, ##dc = compressed DIB, ##wb = audio data)
2060
2068
  if ($tagInfo or (($verbose or $unknown) and $tag !~ /^(data|idx1|LIST_movi|RIFF|\d{2}(db|dc|wb))$/)) {
2061
2069
  $raf->Read($buff, $len2) == $len2 or $err=1, last;
2070
+ if ($md5 and $isImageData{$tag}) {
2071
+ $md5->add($buff);
2072
+ $et->VPrint(0, "$$et{INDENT}(ImageDataMD5: '${tag}' chunk, $len2 bytes)\n");
2073
+ }
2062
2074
  my $setGroups;
2063
2075
  if ($tagInfo and ref $tagInfo eq 'HASH' and $$tagInfo{SetGroups}) {
2064
2076
  $setGroups = $$et{SET_GROUP0} = $$et{SET_GROUP1} = $$tagInfo{SetGroups};
@@ -2085,18 +2097,27 @@ sub ProcessRIFF($$)
2085
2097
  # extract information from remaining file as an embedded file
2086
2098
  $$et{DOC_NUM} = ++$$et{DOC_COUNT};
2087
2099
  next; # (must not increment $pos)
2088
- } elsif ($tag eq 'LIST_movi' and $ee) {
2089
- next; # parse into movi chunk
2090
2100
  } else {
2091
- if ($len > 0x7fffffff and not $et->Options('LargeFileSupport')) {
2092
- $et->Warn("Stopped parsing at large $tag chunk (LargeFileSupport not set)");
2093
- last;
2101
+ my $rewind;
2102
+ # do MD5 if required
2103
+ if ($md5 and $isImageData{$tag}) {
2104
+ $rewind = $raf->Tell();
2105
+ $et->ImageDataMD5($raf, $len2, "'${tag}' chunk");
2094
2106
  }
2095
- if ($validate and $len2) {
2096
- # (must actually try to read something after seeking to detect error)
2097
- $raf->Seek($len2-1, 1) and $raf->Read($buff, 1) == 1 or $err = 1, last;
2098
- } else {
2099
- $raf->Seek($len2, 1) or $err=1, last;
2107
+ if ($tag eq 'LIST_movi' and $ee) {
2108
+ $raf->Seek($rewind, 0) or $err = 1, last if $rewind;
2109
+ next; # parse into movi chunk
2110
+ } elsif (not $rewind) {
2111
+ if ($len > 0x7fffffff and not $et->Options('LargeFileSupport')) {
2112
+ $et->Warn("Stopped parsing at large $tag chunk (LargeFileSupport not set)");
2113
+ last;
2114
+ }
2115
+ if ($validate and $len2) {
2116
+ # (must actually try to read something after seeking to detect error)
2117
+ $raf->Seek($len2-1, 1) and $raf->Read($buff, 1) == 1 or $err = 1, last;
2118
+ } else {
2119
+ $raf->Seek($len2, 1) or $err=1, last;
2120
+ }
2100
2121
  }
2101
2122
  }
2102
2123
  $pos += $len2;
@@ -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.05';
17
+ $VERSION = '1.06';
18
18
 
19
19
  # currently support this version Rawzor images
20
20
  my $implementedRawzorVersion = 199; # (up to version 1.99)
@@ -138,7 +138,7 @@ sub ProcessRWZ($$)
138
138
  }
139
139
  # set OriginalFileType from FileType of original file
140
140
  # then change FileType and MIMEType to indicate a Rawzor image
141
- my $origFileType = $$et{VALUE}{FileType};
141
+ my $origFileType = $$et{FileType};
142
142
  if ($origFileType) {
143
143
  $et->HandleTag($tagTablePtr, OriginalFileType => $origFileType);
144
144
  $et->OverrideFileType('RWZ');
@@ -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.35';
22
+ $VERSION = '1.36';
23
23
 
24
24
  sub ProcessRicohText($$$);
25
25
  sub ProcessRicohRMETA($$$);
@@ -949,6 +949,7 @@ sub ProcessRicohText($$$)
949
949
 
950
950
  my $data = substr($$dataPt, $dirStart, $dirLen);
951
951
  return 1 if $data =~ /^\0/; # blank Ricoh maker notes
952
+ $et->VerboseDir('RicohText', undef, $dirLen);
952
953
  # validate text maker notes
953
954
  unless ($data =~ /^(Rev|Rv)/) {
954
955
  $et->Warn('Bad Ricoh maker notes');
@@ -19,15 +19,13 @@ use strict;
19
19
  use vars qw($VERSION %sigmaLensTypes);
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.32';
22
+ $VERSION = '1.34';
23
23
 
24
24
  # sigma LensType lookup (ref IB)
25
25
  %sigmaLensTypes = (
26
26
  Notes => q{
27
27
  Sigma LensType values are hexadecimal numbers stored as a string (without
28
- the leading "0x"). Decimal values have been added to differentiate lenses
29
- which would otherwise have the same LensType, and are used by the Composite
30
- LensID tag when attempting to identify the specific lens model.
28
+ the leading "0x").
31
29
  },
32
30
  # 0x0 => 'Sigma 50mm F2.8 EX Macro', (0x0 used for other lenses too)
33
31
  # 0x8 - 18-125mm LENSARANGE@18mm=22-4
@@ -255,6 +253,7 @@ $VERSION = '1.32';
255
253
  0x6023 => 'Sigma 20mm F2 DG DN | C', #IB
256
254
  0x6025 => 'Sigma 20mm F1.4 DG DN | A', #IB
257
255
  0x6026 => 'Sigma 24mm F1.4 DG DN | A', #IB
256
+ 0x602c => "Sigma 50mm F1.4 DG DN | A (2023)", #IB
258
257
  0x8005 => 'Sigma 35mm F1.4 DG HSM | A', #PH (012)
259
258
  0x8009 => 'Sigma 18-35mm F1.8 DC HSM | A', #PH
260
259
  0x8900 => 'Sigma 70-300mm F4-5.6 DG OS', #PH (SD15)
@@ -556,6 +555,7 @@ $VERSION = '1.32';
556
555
  SeparateTable => 'LensType',
557
556
  PrintHex => 1,
558
557
  PrintConv => \%sigmaLensTypes,
558
+ PrintInt => 1,
559
559
  },{ #PH
560
560
  Name => 'LensType',
561
561
  Condition => '$$self{MakerNoteSigmaVer} >= 3',
@@ -564,6 +564,7 @@ $VERSION = '1.32';
564
564
  SeparateTable => 'LensType',
565
565
  PrintHex => 1,
566
566
  PrintConv => \%sigmaLensTypes,
567
+ PrintInt => 1,
567
568
  }],
568
569
  0x002a => { #PH
569
570
  Name => 'LensFocalRange',
@@ -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.29';
19
+ $VERSION = '1.30';
20
20
 
21
21
  sub ProcessX3FHeader($$$);
22
22
  sub ProcessX3FDirectory($$$);
@@ -545,10 +545,16 @@ sub ProcessX3FDirectory($$$)
545
545
  if ($$tagInfo{Name} eq 'PreviewImage') {
546
546
  # check image header to see if this is a JPEG preview image
547
547
  $raf->Read($buff, 28) == 28 or return 'Error reading PreviewImage header';
548
- # ignore all image data but JPEG compressed (version 2.0, type 2, format 18)
549
- next unless $buff =~ /^SECi\0\0\x02\0\x02\0\0\0\x12\0\0\0/;
550
548
  $offset += 28;
551
549
  $len -= 28;
550
+ # ignore all image data but JPEG compressed (version 2.0, type 2, format 18)
551
+ unless ($buff =~ /^SECi\0\0\x02\0\x02\0\0\0\x12\0\0\0/) {
552
+ # do MD5 on non-preview data if requested
553
+ if ($$et{ImageDataMD5} and substr($buff,8,1) ne "\x02") {
554
+ $et->ImageDataMD5($raf, $len, 'SigmaRaw IMAG');
555
+ }
556
+ next;
557
+ }
552
558
  $raf->Read($buff, $len) == $len or return "Error reading PreviewImage data";
553
559
  # check fore EXIF segment, and extract this image as the JpgFromRaw
554
560
  if ($buff =~ /^\xff\xd8\xff\xe1/) {
@@ -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.57';
37
+ $VERSION = '3.59';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -1957,6 +1957,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1957
1957
  '3 3 3 0' => 'ARW 2.3.3', #JR (ILCE-9)
1958
1958
  '3 3 5 0' => 'ARW 2.3.5', #JR (DSC-HX99)
1959
1959
  '4 0 0 0' => 'ARW 4.0', # (ILCE-7SM3)
1960
+ '4 0 1 0' => 'ARW 4.0.1', #github#195 (ZV-E1)
1960
1961
  # what about cRAW images?
1961
1962
  },
1962
1963
  },
@@ -2045,6 +2046,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
2045
2046
  369 => 'DSC-RX100M5A', #JR
2046
2047
  371 => 'ILCE-6400', #IB
2047
2048
  372 => 'DSC-RX0M2', #JR
2049
+ 373 => 'DSC-HX95', #github191
2048
2050
  374 => 'DSC-RX100M7', #IB
2049
2051
  375 => 'ILCE-7RM4', #IB
2050
2052
  376 => 'ILCE-9M2', #JR
@@ -2161,6 +2163,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
2161
2163
  # set to 65535 for E-mount lenses (values 0x80xx)
2162
2164
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 65535 : int($val)',
2163
2165
  PrintConv => \%sonyLensTypes,
2166
+ PrintInt => 1,
2164
2167
  },
2165
2168
  0xb028 => { #2
2166
2169
  # (used by the DSLR-A100)
@@ -5570,6 +5573,7 @@ my %faceInfo = (
5570
5573
  Format => 'int16u',
5571
5574
  SeparateTable => 'LensType2',
5572
5575
  PrintConv => \%sonyLensTypes2,
5576
+ PrintInt => 1,
5573
5577
  },
5574
5578
  0x400 => { #JR
5575
5579
  Name => 'ImageNumber',
@@ -6603,6 +6607,7 @@ my %isoSetting2010 = (
6603
6607
  Format => 'int16u',
6604
6608
  SeparateTable => 'LensType2',
6605
6609
  PrintConv => \%sonyLensTypes2,
6610
+ PrintInt => 1,
6606
6611
  },
6607
6612
  0x1896 => {
6608
6613
  Name => 'LensType',
@@ -6612,6 +6617,7 @@ my %isoSetting2010 = (
6612
6617
  SeparateTable => 1,
6613
6618
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
6614
6619
  PrintConv => \%sonyLensTypes,
6620
+ PrintInt => 1,
6615
6621
  },
6616
6622
  0x1898 => {
6617
6623
  Name => 'DistortionCorrParamsPresent',
@@ -6809,6 +6815,7 @@ my %isoSetting2010 = (
6809
6815
  Format => 'int16u',
6810
6816
  SeparateTable => 'LensType2',
6811
6817
  PrintConv => \%sonyLensTypes2,
6818
+ PrintInt => 1,
6812
6819
  },
6813
6820
  0x18c2 => {
6814
6821
  Name => 'LensType',
@@ -6818,6 +6825,7 @@ my %isoSetting2010 = (
6818
6825
  SeparateTable => 1,
6819
6826
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
6820
6827
  PrintConv => \%sonyLensTypes,
6828
+ PrintInt => 1,
6821
6829
  },
6822
6830
  0x18c4 => {
6823
6831
  Name => 'DistortionCorrParamsPresent',
@@ -6946,6 +6954,7 @@ my %isoSetting2010 = (
6946
6954
  Format => 'int16u',
6947
6955
  SeparateTable => 'LensType2',
6948
6956
  PrintConv => \%sonyLensTypes2,
6957
+ PrintInt => 1,
6949
6958
  },
6950
6959
  0x18f2 => {
6951
6960
  Name => 'LensType',
@@ -6955,6 +6964,7 @@ my %isoSetting2010 = (
6955
6964
  SeparateTable => 1,
6956
6965
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
6957
6966
  PrintConv => \%sonyLensTypes,
6967
+ PrintInt => 1,
6958
6968
  },
6959
6969
  0x18f4 => {
6960
6970
  Name => 'DistortionCorrParamsPresent',
@@ -7075,6 +7085,7 @@ my %isoSetting2010 = (
7075
7085
  Format => 'int16u',
7076
7086
  SeparateTable => 'LensType2',
7077
7087
  PrintConv => \%sonyLensTypes2,
7088
+ PrintInt => 1,
7078
7089
  },
7079
7090
  0x17f6 => {
7080
7091
  Name => 'LensType',
@@ -7084,6 +7095,7 @@ my %isoSetting2010 = (
7084
7095
  SeparateTable => 1,
7085
7096
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
7086
7097
  PrintConv => \%sonyLensTypes,
7098
+ PrintInt => 1,
7087
7099
  },
7088
7100
  0x17f8 => {
7089
7101
  Name => 'DistortionCorrParamsPresent',
@@ -7439,6 +7451,7 @@ my %isoSetting2010 = (
7439
7451
  Format => 'int16u',
7440
7452
  SeparateTable => 'LensType2',
7441
7453
  PrintConv => \%sonyLensTypes2,
7454
+ PrintInt => 1,
7442
7455
  },
7443
7456
  0x0109 => {
7444
7457
  Name => 'LensType',
@@ -7450,6 +7463,7 @@ my %isoSetting2010 = (
7450
7463
  # has a value of 0 for E-mount lenses (values 0x80xx)
7451
7464
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
7452
7465
  PrintConv => \%sonyLensTypes,
7466
+ PrintInt => 1,
7453
7467
  },
7454
7468
  0x010b => {
7455
7469
  Name => 'DistortionCorrParamsPresent',
@@ -7726,6 +7740,7 @@ my %isoSetting2010 = (
7726
7740
  Format => 'int16u',
7727
7741
  SeparateTable => 'LensType2',
7728
7742
  PrintConv => \%sonyLensTypes2,
7743
+ PrintInt => 1,
7729
7744
  },
7730
7745
  0x0109 => {
7731
7746
  Name => 'LensType',
@@ -7737,6 +7752,7 @@ my %isoSetting2010 = (
7737
7752
  # has a value of 0 for E-mount lenses (values 0x80xx)
7738
7753
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
7739
7754
  PrintConv => \%sonyLensTypes,
7755
+ PrintInt => 1,
7740
7756
  },
7741
7757
  0x010b => {
7742
7758
  Name => 'DistortionCorrParamsPresent',
@@ -8535,6 +8551,7 @@ my %isoSetting2010 = (
8535
8551
  Notes => 'E-mount lenses',
8536
8552
  SeparateTable => 'LensType2',
8537
8553
  PrintConv => \%sonyLensTypes2,
8554
+ PrintInt => 1,
8538
8555
  },
8539
8556
  0x0608 => {
8540
8557
  Name => 'LensType',
@@ -8543,6 +8560,7 @@ my %isoSetting2010 = (
8543
8560
  Notes => 'A-mount lenses on SLT and NEX',
8544
8561
  SeparateTable => 1,
8545
8562
  PrintConv => \%sonyLensTypes,
8563
+ PrintInt => 1,
8546
8564
  },
8547
8565
  0x064a => {
8548
8566
  Name => 'VignettingCorrParams',
@@ -8713,6 +8731,7 @@ my %isoSetting2010 = (
8713
8731
  Notes => 'E-mount lenses',
8714
8732
  SeparateTable => 'LensType2',
8715
8733
  PrintConv => \%sonyLensTypes2,
8734
+ PrintInt => 1,
8716
8735
  },
8717
8736
  0x0062 => {
8718
8737
  Name => 'LensType',
@@ -8721,6 +8740,7 @@ my %isoSetting2010 = (
8721
8740
  Notes => 'A-mount lenses on SLT and NEX',
8722
8741
  SeparateTable => 1,
8723
8742
  PrintConv => \%sonyLensTypes,
8743
+ PrintInt => 1,
8724
8744
  },
8725
8745
  0x0064 => {
8726
8746
  Name => 'DistortionCorrParams',
@@ -8937,6 +8957,7 @@ my %isoSetting2010 = (
8937
8957
  Format => 'int16u',
8938
8958
  SeparateTable => 'LensType2',
8939
8959
  PrintConv => \%sonyLensTypes2,
8960
+ PrintInt => 1,
8940
8961
  },
8941
8962
  0x000b => {
8942
8963
  Name => 'CameraE-mountVersion',
@@ -9622,6 +9643,7 @@ my %isoSetting2010 = (
9622
9643
  Format => 'int16u',
9623
9644
  SeparateTable => 'LensType2',
9624
9645
  PrintConv => \%sonyLensTypes2,
9646
+ PrintInt => 1,
9625
9647
  },
9626
9648
  0x004d => {
9627
9649
  Name => 'LensType',
@@ -9631,6 +9653,7 @@ my %isoSetting2010 = (
9631
9653
  SeparateTable => 1,
9632
9654
  ValueConvInv => '($val & 0xff00) == 0x8000 ? 0 : int($val)',
9633
9655
  PrintConv => \%sonyLensTypes,
9656
+ PrintInt => 1,
9634
9657
  },
9635
9658
  0x004f => {
9636
9659
  Name => 'DistortionCorrParams',