exiftool_vendored 13.27.0 → 13.29.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb0a184eb27a7f2bd365b24473d079bf59c21bfb5d18e4322438164364218151
4
- data.tar.gz: 39f8672fe231f2d0588920382a7cc7b5d36199a03c7a86f43d0a0161ec5ba2f8
3
+ metadata.gz: 100fd830d0ad83694462874c851c5caa93a6b286d694450fba9a56286a99907d
4
+ data.tar.gz: 452ee823b075cfc924180bb9df5ec0cc959bbc6659e059866c9212c62df73e3e
5
5
  SHA512:
6
- metadata.gz: 4c618366df0c65fff73241fe27a143eacb46a64280866edc3ba23f1b7fc8a5765d605029afd58fce678e080bdbd951989ab460336623afebee96ed1e0c61d891
7
- data.tar.gz: 93d27263a8c922cea0bef3eec89779517dd040539cf9fae2e3712823fe5d48148ca86663ed469300b3677c1a99a3c9ccfc7564bbdd57150894682424db23621f
6
+ metadata.gz: c6682ad9ca29d84314dc4bdb142c4ce097a70b60a4b32b99e2768d57e3012c72ba7156092cc3e449e80dc80355101d43185b3f8583f16cd09e6bbb33e742b75e
7
+ data.tar.gz: 1d735972885fb37be03d9995f8c5fb146c786fc75b3314d7f70b004308d0a6ffd7086782e5a0ccf5cd58758ccc590354e6a7143bc1d84e761d4c96df4770aebc
data/bin/Changes CHANGED
@@ -7,6 +7,34 @@ RSS feed: https://exiftool.org/rss.xml
7
7
  Note: The most recent production release is Version 13.25. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Apr. 27, 2025 - Version 13.29
11
+
12
+ - Changed default -geotime argument to use SubSecDateTimeOriginal if available
13
+ instead of DateTimeOriginal, instead of applying both (as was done since
14
+ ExifTool 13.18). This is more efficient, and avoids an unnecessary warning
15
+ - Properly return warnings from inverse value conversions when copying a tag
16
+ using -tagsFromFile with a tag name string
17
+ - Fixed issue where RW2 images from the Panasonic DC-S1RM2 could be corrupted
18
+ when writing
19
+
20
+ Apr. 25, 2025 - Version 13.28
21
+
22
+ - Added print conversion for Pentax AFPointValues
23
+ - Added another Pentax PictureMode value
24
+ - Decode timed GPS from GKU D900 dashcam videos
25
+ - Decode timed telemetry data from newer ARCore videos
26
+ - Decode Panasonic AFAreaSize (thanks andrewj)
27
+ - Decode ShutterCount for Canon EOS R8 and R50 (github #325)
28
+ - Decode ThumbnailTIFF from some Insta360 videos
29
+ - Decode AROT:HDRGainCurveSize from APP10
30
+ - Updated to the 2025 MPF specification
31
+ - Renamed K-3III AFPoints to AFPointsSelected and changed decoding
32
+ - Fixed bug introduced in 13.23 that could cause an incorrect parsing of XMP
33
+ attributes containing an equals sign
34
+ - Fixed issue reading timed GPS from some Insta360 videos, and issue where
35
+ writing these videos would fail
36
+ - Fixed exif2xmp.args and xmp2exif.args to properly handle EXIF:ImageUniqueID
37
+
10
38
  Apr. 8, 2025 - Version 13.27
11
39
 
12
40
  - Decode AF points for the Pentax K-3III
data/bin/META.json CHANGED
@@ -50,5 +50,5 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "13.27"
53
+ "version" : "13.29"
54
54
  }
data/bin/META.yml CHANGED
@@ -31,4 +31,4 @@ recommends:
31
31
  Time::HiRes: '0'
32
32
  requires:
33
33
  perl: '5.004'
34
- version: '13.27'
34
+ version: '13.29'
data/bin/README CHANGED
@@ -109,8 +109,8 @@ your home directory, then you would type the following commands in a
109
109
  terminal window to extract and run ExifTool:
110
110
 
111
111
  cd ~/Desktop
112
- gzip -dc Image-ExifTool-13.27.tar.gz | tar -xf -
113
- cd Image-ExifTool-13.27
112
+ gzip -dc Image-ExifTool-13.29.tar.gz | tar -xf -
113
+ cd Image-ExifTool-13.29
114
114
  ./exiftool t/images/ExifTool.jpg
115
115
 
116
116
  Note: These commands extract meta information from one of the test images.
@@ -15,6 +15,7 @@
15
15
  # 2022/03/31 - PH IPTC Photometadata Mapping Guidelines 2202.1 update
16
16
  # 2024/10/24 - PH Additions for the 2024 EXIF for XMP spec
17
17
  # 2025/01/16 - PH Copy Composite SubSec tags to XMP-exif
18
+ # 2025-04-22 - PH Fixed DigitalImageGUID source tag
18
19
  #
19
20
  # References: http://www.metadataworkinggroup.org/specs/
20
21
  # https://iptc.org/std/photometadata/documentation/mappingguidelines/
@@ -43,7 +44,7 @@
43
44
  -XMP-xmp:CreatorTool < EXIF:Software
44
45
  -XMP-dc:Rights < EXIF:Copyright
45
46
  -XMP-dc:Creator < EXIF:Artist
46
- -XMP-iptcExt:DigitalImageGUID < EXIF:DigImageGUID
47
+ -XMP-iptcExt:DigitalImageGUID < EXIF:ImageUniqueID
47
48
  # XMP flash information is translated by the Composite Flash tag
48
49
  -Composite:Flash < EXIF:Flash
49
50
  # overwrite GPS tags which have different formats in XMP
@@ -19,6 +19,7 @@
19
19
  # XMP-exif:DateTimeOriginal
20
20
  # 2024/10/24 - PH Additions for the 2024 EXIF for XMP spec
21
21
  # 2025/01/16 - PH Write Composite:SubSecCreateDate from XMP-exif
22
+ # 2025-04-22 - PH Fixed DigitalImageGUID translation
22
23
  #
23
24
  # References: http://www.metadataworkinggroup.org/specs/
24
25
  # https://iptc.org/std/photometadata/documentation/mappingguidelines/
@@ -51,7 +52,7 @@
51
52
  -EXIF:Copyright < XMP-dc:Rights
52
53
  -EXIF:Artist < XMP-plus:ImageCreatorName
53
54
  -EXIF:Artist < XMP-dc:Creator
54
- -EXIF:DigImageGUID < XMP-iptcExt:DigitalImageGUID
55
+ -EXIF:ImageUniqueID < XMP-iptcExt:DigitalImageGUID
55
56
  # XMP flash information is translated by the Composite Flash tag
56
57
  -EXIF:Flash < Composite:Flash
57
58
  # generate GPS tags which have been combined into other XMP tags
data/bin/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '13.27';
14
+ my $version = '13.29';
15
15
 
16
16
  $^W = 1; # enable global warnings
17
17
 
@@ -1396,8 +1396,7 @@ for (;;) {
1396
1396
  # add geotag/geosync/geolocate commands first
1397
1397
  unshift @newValues, pop @newValues;
1398
1398
  if (lc $2 eq 'geotag' and (not defined $addGeotime or $addGeotime) and length $val) {
1399
- $addGeotime = [ ($1 || '') . 'Geotime<DateTimeOriginal#',
1400
- ($1 || '') . 'Geotime<SubSecDateTimeOriginal#' ];
1399
+ $addGeotime = ($1 || '') . q[Geotime<${DateTimeOriginal#;$_=$self->GetValue('SubSecDateTimeOriginal','ValueConv') || $_}];
1401
1400
  }
1402
1401
  }
1403
1402
  }
@@ -1696,9 +1695,8 @@ if (@newValues) {
1696
1695
  # assume -geotime value if -geotag specified without -geotime
1697
1696
  if ($addGeotime) {
1698
1697
  AddSetTagsFile($setTagsFile = '@') unless $setTagsFile and $setTagsFile eq '@';
1699
- push @{$setTags{$setTagsFile}}, @$addGeotime;
1700
- my @a = map qq("-$_"), @$addGeotime;
1701
- $verbose and print $vout 'Arguments ',join(' and ', @a)," are assumed\n";
1698
+ push @{$setTags{$setTagsFile}}, $addGeotime;
1699
+ $verbose and print $vout qq(Using default "-$addGeotime"\n);
1702
1700
  }
1703
1701
  my %setTagsIndex;
1704
1702
  # add/delete option lookup
@@ -6054,7 +6052,7 @@ with this command:
6054
6052
 
6055
6053
  produces output like this:
6056
6054
 
6057
- -- Generated by ExifTool 13.27 --
6055
+ -- Generated by ExifTool 13.29 --
6058
6056
  File: a.jpg - 2003:10:31 15:44:19
6059
6057
  (f/5.6, 1/60s, ISO 100)
6060
6058
  File: b.jpg - 2006:05:23 11:57:38
@@ -6937,12 +6935,14 @@ Geotag images from the specified GPS track log file. Using the B<-geotag>
6937
6935
  option is equivalent to writing a value to the C<Geotag> tag. The GPS
6938
6936
  position is interpolated from the track at a time specified by the value
6939
6937
  written to the C<Geotime> tag. If C<Geotime> is not specified, the value is
6940
- copied from C<DateTimeOriginal#> (the C<#> is added to copy the unformatted
6941
- value, avoiding potential conflicts with the B<-d> option). For example,
6942
- the following two commands are equivalent:
6938
+ copied from C<SubSecDateTimeOriginal#> if it exists, otherwise
6939
+ C<DateTimeOriginal#> (the C<#> is added to copy the unformatted value,
6940
+ avoiding potential conflicts with the B<-d> option). For example, the
6941
+ following two commands are equivalent if SubSecDateTimeOriginal exists in
6942
+ the file:
6943
6943
 
6944
6944
  exiftool -geotag trk.log image.jpg
6945
- exiftool -geotag trk.log "-Geotime<DateTimeOriginal#" image.jpg
6945
+ exiftool -geotag trk.log "-Geotime<SubSecDateTimeOriginal#" image.jpg
6946
6946
 
6947
6947
  If the C<Geotime> value does not contain a time zone then the local system
6948
6948
  timezone is assumed. Writing C<Geotime> causes the following tags to be
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.89';
91
+ $VERSION = '4.90';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -1410,7 +1410,7 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
1410
1410
  },
1411
1411
  {
1412
1412
  Name => 'CanonCameraInfoR6m2',
1413
- Condition => '$$self{Model} =~ /\bEOS R6m2$/',
1413
+ Condition => '$$self{Model} =~ /\bEOS (R6m2|R8|R50)$/',
1414
1414
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::CameraInfoR6m2' },
1415
1415
  },
1416
1416
  {
@@ -279,7 +279,7 @@ under the same terms as Perl itself.
279
279
 
280
280
  =over 4
281
281
 
282
- =item L<GIMP source code>
282
+ =item L<https://developer.gimp.org/core/setup/git/>
283
283
 
284
284
  =item L<http://svn.gnome.org/viewvc/gimp/trunk/devel-docs/xcf.txt?view=markup>
285
285
 
@@ -260,15 +260,9 @@ sub ProcessJPEG_HDR($$$);
260
260
  Condition => '$$valPt =~ /^UNICODE\0/',
261
261
  Notes => 'PhotoStudio Unicode comment',
262
262
  }, {
263
- Name => 'HDRGainCurve', #PH (NC)
263
+ Name => 'HDRGainInfo', #PH (NC)
264
264
  Condition => '$$valPt =~ /^AROT\0\0.{4}/s',
265
- Groups => { 1 => 'APP10', 2 => 'Image' },
266
- ValueConv => q{
267
- my $n = unpack('x6N', $val);
268
- return '<truncated AROT data>' if length($val)-6 < $n * 4;
269
- my $str = join ' ', unpack("x10V$n", $val);
270
- return \$str;
271
- },
265
+ SubDirectory => { TagTable => 'Image::ExifTool::JPEG::HDRGainInfo' },
272
266
  }],
273
267
  APP11 => [{
274
268
  Name => 'JPEG-HDR',
@@ -347,6 +341,9 @@ sub ProcessJPEG_HDR($$$);
347
341
  $$valPt =~ /~\0\x04\0zmie~\0\0\x0a.{8}[\x10\x18]\x08$/s
348
342
  },
349
343
  SubDirectory => { TagTable => 'Image::ExifTool::MIE::Main' },
344
+ }, {
345
+ Name => 'MPF',
346
+ SubDirectory => { TagTable => 'Image::ExifTool::MPF::Main' },
350
347
  }, {
351
348
  Name => 'Samsung',
352
349
  Condition => '$$valPt =~ /QDIOBS$/',
@@ -382,6 +379,21 @@ sub ProcessJPEG_HDR($$$);
382
379
  }],
383
380
  );
384
381
 
382
+ # HDR gain information (ref PH)
383
+ %Image::ExifTool::JPEG::HDRGainInfo = (
384
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
385
+ GROUPS => { 0 => 'APP10', 1 => 'AROT', 2 => 'Image' },
386
+ 6 => {
387
+ Name => 'HDRGainCurveSize',
388
+ Format => 'int32u',
389
+ },
390
+ 10 => {
391
+ Name => 'HDRGainCurve', # (NC)
392
+ Format => 'int32uRev[$val{6}]',
393
+ Binary => 1,
394
+ },
395
+ );
396
+
385
397
  # JPS APP3 segment (ref http://paulbourke.net/stereographics/stereoimage/)
386
398
  %Image::ExifTool::JPEG::JPS = (
387
399
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
@@ -11,7 +11,7 @@ use strict;
11
11
  use vars qw($VERSION);
12
12
  use Image::ExifTool;
13
13
 
14
- $VERSION = '1.02';
14
+ $VERSION = '1.04';
15
15
 
16
16
  sub ProcessLigoGPS($$$;$);
17
17
  sub ProcessLigoJSON($$$);
@@ -264,6 +264,20 @@ sub ParseLigoGPS($$$;$)
264
264
  delete $$et{SET_GROUP1};
265
265
  }
266
266
 
267
+ #------------------------------------------------------------------------------
268
+ # Process GKU dashcam trailer containing JSON-format LigoGPS
269
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
270
+ # Returns: 1 on success
271
+ sub ProcessGKU($$$;$)
272
+ {
273
+ my ($et, $dirInfo, $tagTbl) = @_;
274
+ my $dataPt = $$dirInfo{DataPt};
275
+ my $pos = unpack('V', $$dataPt);
276
+ return 0 if $pos + 13 > length $$dataPt or substr($$dataPt, $pos, 13) ne 'LIGOGPSINFO {';
277
+ pos($$dataPt) = $pos;
278
+ return ProcessLigoJSON($et, $dirInfo, $tagTbl);
279
+ }
280
+
267
281
  #------------------------------------------------------------------------------
268
282
  # Process LIGOGPSINFO data (non-JSON format)
269
283
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
@@ -315,7 +329,7 @@ sub ProcessLigoJSON($$$)
315
329
  my $dataPt = $$dirInfo{DataPt};
316
330
  my $dirLen = $$dirInfo{DirLen};
317
331
  require Image::ExifTool::Import;
318
- $et->VerboseDir('LIGO_JSON', undef, length($$dataPt));
332
+ $et->VerboseDir('LIGO_JSON', undef, length($$dataPt) - pos($$dataPt));
319
333
  $$et{SET_GROUP1} = 'LIGO';
320
334
  while ($$dataPt =~ /LIGOGPSINFO (\{.*?\})/g) {
321
335
  my $json = $1;
@@ -15,7 +15,7 @@ use vars qw($VERSION);
15
15
  use Image::ExifTool qw(:DataAccess :Utils);
16
16
  use Image::ExifTool::Exif;
17
17
 
18
- $VERSION = '1.15';
18
+ $VERSION = '1.16';
19
19
 
20
20
  sub ProcessMPImageList($$$);
21
21
 
@@ -127,11 +127,15 @@ sub ProcessMPImageList($$$);
127
127
  0x000000 => 'Undefined',
128
128
  0x010001 => 'Large Thumbnail (VGA equivalent)',
129
129
  0x010002 => 'Large Thumbnail (full HD equivalent)',
130
+ 0x010003 => 'Large Thumbnail (4K equivalent)',
131
+ 0x010004 => 'Large Thumbnail (8K equivalent)',
132
+ 0x010005 => 'Large Thumbnail (16K equivalent)',
130
133
  0x020001 => 'Multi-frame Panorama',
131
134
  0x020002 => 'Multi-frame Disparity',
132
135
  0x020003 => 'Multi-angle',
133
136
  0x030000 => 'Baseline MP Primary Image',
134
137
  0x040000 => 'Original Preservation Image', # (Exif 3.0)
138
+ 0x050000 => 'Gain Map Image',
135
139
  },
136
140
  },
137
141
  4 => {
@@ -113,7 +113,7 @@ my %olympusLensTypes = (
113
113
  '0 34 00' => 'Olympus Zuiko Digital ED 9-18mm F4.0-5.6', #7
114
114
  '0 34 10' => 'Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro', #IB
115
115
  '0 35 00' => 'Olympus Zuiko Digital 14-54mm F2.8-3.5 II', #PH
116
- '0 35 10' => 'Olympus M.Zuiko 100-400mm F5.0-6.3', #IB
116
+ '0 35 10' => 'Olympus M.Zuiko 100-400mm F5.0-6.3', #IB (also OM System M.Zuiko Digital ED 100-400mm F5.0-6.3 IS II", forum2833)
117
117
  '0 36 10' => 'Olympus M.Zuiko Digital ED 8-25mm F4 Pro', #IB
118
118
  '0 37 10' => 'Olympus M.Zuiko Digital ED 40-150mm F4.0 Pro', #forum3833
119
119
  '0 39 10' => 'Olympus M.Zuiko Digital ED 90mm F3.5 Macro IS Pro', #forum3833
@@ -37,7 +37,7 @@ use vars qw($VERSION %leicaLensTypes);
37
37
  use Image::ExifTool qw(:DataAccess :Utils);
38
38
  use Image::ExifTool::Exif;
39
39
 
40
- $VERSION = '2.24';
40
+ $VERSION = '2.25';
41
41
 
42
42
  sub ProcessLeicaLEIC($$$);
43
43
  sub WhiteBalanceConv($;$$);
@@ -1436,6 +1436,14 @@ my %shootingMode = (
1436
1436
  Name => 'NoiseReductionStrength',
1437
1437
  Writable => 'rational64s',
1438
1438
  },
1439
+ 0xde => { #forum17299
1440
+ Name => 'AFAreaSize',
1441
+ Writable => 'rational64u',
1442
+ Notes => 'relative to size of image',
1443
+ Count => 2,
1444
+ PrintConv => '$val =~ /^4194303.999/ ? "n/a" : $val',
1445
+ PrintConvInv => '$val eq "n/a" ? "4194303.999 4194303.999" : $val',
1446
+ },
1439
1447
  0xe4 => { #IB
1440
1448
  Name => 'LensTypeModel',
1441
1449
  Condition => '$format eq "int16u"',
@@ -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.02';
18
+ $VERSION = '1.03';
19
19
 
20
20
  sub Process_mett($$$);
21
21
 
@@ -61,10 +61,18 @@ sub Process_mett($$$);
61
61
  Name => 'ARCoreAccel',
62
62
  SubDirectory => { TagTable => 'Image::ExifTool::Parrot::ARCoreAccel', ByteOrder => 'II' },
63
63
  },
64
+ 'application/arcore-accel-0' => {
65
+ Name => 'ARCoreAccel0',
66
+ SubDirectory => { TagTable => 'Image::ExifTool::Parrot::ARCoreAccel0', ByteOrder => 'II' },
67
+ },
64
68
  'application/arcore-gyro' => {
65
69
  Name => 'ARCoreGyro',
66
70
  SubDirectory => { TagTable => 'Image::ExifTool::Parrot::ARCoreGyro', ByteOrder => 'II' },
67
71
  },
72
+ 'application/arcore-gyro-0' => {
73
+ Name => 'ARCoreGyro0',
74
+ SubDirectory => { TagTable => 'Image::ExifTool::Parrot::ARCoreGyro0', ByteOrder => 'II' },
75
+ },
68
76
  'application/arcore-video-0' => {
69
77
  Name => 'ARCoreVideo',
70
78
  SubDirectory => { TagTable => 'Image::ExifTool::Parrot::ARCoreVideo', ByteOrder => 'II' },
@@ -684,11 +692,24 @@ sub Process_mett($$$);
684
692
  # 33: increments slowly (about once every 56 samples or so)
685
693
  );
686
694
 
695
+ # ARCore Accel data (ref PH)
696
+ %Image::ExifTool::Parrot::ARCoreAccel0 = (
697
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
698
+ GROUPS => { 2 => 'Location' },
699
+ NOTES => 'ARCore accelerometer data.',
700
+ FIRST_ENTRY => 0,
701
+ 9 => { # (NC)
702
+ Name => 'Accelerometer',
703
+ Format => 'undef[14]',
704
+ RawConv => 'GetFloat(\$val,0) . " " . GetFloat(\$val,5) . " " . GetFloat(\$val,10)',
705
+ },
706
+ );
707
+
687
708
  # ARCore Gyro data (ref PH)
688
709
  %Image::ExifTool::Parrot::ARCoreGyro = (
689
710
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
690
711
  GROUPS => { 2 => 'Location' },
691
- NOTES => 'ARCore accelerometer data.',
712
+ NOTES => 'ARCore gyro data.',
692
713
  FIRST_ENTRY => 0,
693
714
  # 00-04: always 10 34 16 3 29
694
715
  4 => {
@@ -704,6 +725,19 @@ sub Process_mett($$$);
704
725
  },
705
726
  );
706
727
 
728
+ # ARCore Gyro data (ref PH)
729
+ %Image::ExifTool::Parrot::ARCoreGyro0 = (
730
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
731
+ GROUPS => { 2 => 'Location' },
732
+ NOTES => 'ARCore gyro data.',
733
+ FIRST_ENTRY => 0,
734
+ 9 => { # (NC)
735
+ Name => 'Gyroscope',
736
+ Format => 'undef[14]',
737
+ RawConv => 'GetFloat(\$val,0) . " " . GetFloat(\$val,5) . " " . GetFloat(\$val,10)',
738
+ },
739
+ );
740
+
707
741
  %Image::ExifTool::Parrot::ARCoreVideo = (
708
742
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
709
743
  FIRST_ENTRY => 0,
@@ -766,11 +800,24 @@ sub Process_mett($$$)
766
800
  $et->VerboseDir('Parrot mett', undef, $dirEnd);
767
801
 
768
802
  if ($$tagTbl{$metaType}) {
769
- $et->HandleTag($tagTbl, $metaType, undef,
770
- DataPt => $dataPt,
771
- DataPos => $dataPos,
772
- Base => $$dirInfo{Base},
773
- );
803
+ # loop through ARCore records
804
+ while ($pos < $dirEnd - 2) {
805
+ last unless substr($$dataPt,$pos,1) eq "\x0a";
806
+ my $len = ord(substr($$dataPt, $pos+1, 1));
807
+ if ($pos + $len + 2 > $dirEnd) {
808
+ $et->Warn("Unexpected length for $metaType record", 1);
809
+ last;
810
+ }
811
+ $len or $len = $dirEnd - $pos - 2; # use entire record if length is 0
812
+ $et->HandleTag($tagTbl, $metaType, undef,
813
+ DataPt => $dataPt,
814
+ DataPos => $dataPos,
815
+ DirStart => $pos,
816
+ DirLen => $len,
817
+ Base => $$dirInfo{Base},
818
+ );
819
+ $pos += $len + 2;
820
+ }
774
821
  return 1;
775
822
  }
776
823
  while ($pos + 4 < $dirEnd) {
@@ -58,7 +58,7 @@ use Image::ExifTool::Exif;
58
58
  use Image::ExifTool::GPS;
59
59
  use Image::ExifTool::HP;
60
60
 
61
- $VERSION = '3.49';
61
+ $VERSION = '3.50';
62
62
 
63
63
  sub CryptShutterCount($$);
64
64
  sub PrintFilter($$$);
@@ -737,18 +737,17 @@ my %filterSettings = (
737
737
  52 => ['Toning2', '%+d'], #31 Extract Color (-3-+3)
738
738
  );
739
739
 
740
- # order of K-3iii AF points
741
- my @k3iiiAF = qw(C3 C4 C5 C6 C7 D3 D4 D5 D6 D7 E3 E4 E5 E6 E7 F3 F4 F5 F6 F7
742
- G3 G4 G5 G6 G7 E1 E9 D2 D8 E2 E8 F2 F8 C2 C8 G2 G8 D1 D9 F1 F9);
743
-
744
- # print AF Point names
745
- sub AFPointsK3iii($;$)
746
- {
747
- my @a = split ' ', shift;
748
- my @pts;
749
- $a[$_] and push @pts, $k3iiiAF[$_] || "Unknown($_)" foreach 0..$#a;
750
- return @pts ? join '.', sort @pts : '(none)';
751
- }
740
+ # order of selectable K-3iii AF points. The array looks like this:
741
+ # B1 C1 E1 G1 I1 K1 L1
742
+ # A3 B3 C3 E3 G3 I3 K3 L3 M3
743
+ # A5 B5 C5 E5 G5 I5 K5 L5 M5
744
+ # A7 B7 C7 E7 G7 I7 K7 L7 M7
745
+ # B9 C9 E9 G9 I9 K9 L9
746
+ my @k3iiiAF = qw(
747
+ C1 E1 G1 I1 K1 C3 E3 G3 I3 K3 C5 E5 G5
748
+ I5 K5 C7 E7 G7 I7 K7 C9 E9 G9 I9 K9 A5 M5 B3
749
+ L3 B5 L5 B7 L7 B1 L1 B9 L9 A3 M3 A7 M7
750
+ );
752
751
 
753
752
  # decoding for Pentax Firmware ID tags - PH
754
753
  my %pentaxFirmwareID = (
@@ -1957,6 +1956,7 @@ my %binaryDataAttrs = (
1957
1956
  '18 3' => 'Auto Program (MTF)', #PH (NC)
1958
1957
  '18 22' => 'Auto Program (Shallow DOF)', #PH (NC)
1959
1958
  '20 22' => 'Blur Control', #PH (Q)
1959
+ '26 0' => 'Shutter and Aperture Priority (TAv)', #PH (K-3III)
1960
1960
  '249 0' => 'Movie (TAv)', #31
1961
1961
  '250 0' => 'Movie (TAv, Auto Aperture)', #31
1962
1962
  '251 0' => 'Movie (Manual)', #31
@@ -4931,6 +4931,7 @@ my %binaryDataAttrs = (
4931
4931
  # CalFlag, ContrastFlag, PrecalFlag, SelectSensor
4932
4932
  0x00 => { #PH
4933
4933
  Name => 'AFPointsUnknown1',
4934
+ Condition => '$$self{Model} !~ /K-3 Mark III/', # (and maybe others?)
4934
4935
  Unknown => 1,
4935
4936
  Format => 'int16u',
4936
4937
  ValueConv => '$self->Options("Unknown") ? $val : $val & 0x7ff',
@@ -4958,6 +4959,7 @@ my %binaryDataAttrs = (
4958
4959
  },
4959
4960
  0x02 => { #PH
4960
4961
  Name => 'AFPointsUnknown2',
4962
+ Condition => '$$self{Model} !~ /K-3 Mark III/', # (and maybe others?)
4961
4963
  Unknown => 1,
4962
4964
  Format => 'int16u',
4963
4965
  ValueConv => '$self->Options("Unknown") ? $val : $val & 0x7ff',
@@ -5032,22 +5034,32 @@ my %binaryDataAttrs = (
5032
5034
  },
5033
5035
  0x14 => {
5034
5036
  Name => 'AFPointValues',
5035
- Format => 'int16uRev[61]',
5037
+ Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5038
+ Format => 'int16uRev[69]',
5036
5039
  Unknown => 1,
5037
5040
  Notes => 'some unknown values related to each AFPoint',
5038
- # order is the same as AFPoints below, but there is an additional value for the
5039
- # following AFPoints in this order starting at index 28 in the array: C3 C4 C5 C6 C7
5040
- # D3 D4 D5 D6 D7 E3 E4 E5 E6 E7 F3 F4 F5 F6 F7 G3 G4 G5 G6 G7 E1 E9 D2 D8 E2 E8 F2 F8
5041
+ # order is the same as AFPoints below, but there is an additional value for
5042
+ # each AF point starting at offset 28 in the array (yes, the range overlaps
5043
+ # with the 1st values)
5041
5044
  # (values are int16s stored in reversed byte order)
5042
5045
  ValueConv => 'my @a=split " ",$val;$_>32767 and $_-=65536 foreach @a;join " ",@a',
5046
+ PrintConv => \&AFPointValues,
5043
5047
  },
5044
5048
  0x12a => { # byte has a value of 2 if corresponding AF point is selected
5045
- Name => 'AFPoints',
5049
+ Name => 'AFPointsSelected',
5046
5050
  Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5051
+ Notes => q{
5052
+ K-3III only. 41 selectable AF points from a total of 101 available in a 13x9
5053
+ grid. Columns are labelled A-M and rows are 1-9. The center point is G5
5054
+ },
5047
5055
  Format => 'int8u[41]',
5048
- PrintConv => \&AFPointsK3iii,
5056
+ PrintConv => 'Image::ExifTool::Pentax::AFPointsK3iii($val,$self,2)',
5049
5057
  },
5050
- 0x18f => { # byte has a value of 1 if corresponding AF point is in focus maybe?
5058
+ #
5059
+ # (maybe not coincidentally, there are 60 unknown bytes
5060
+ # here, and there are also 60 non-selectable AF points)
5061
+ #
5062
+ 0x18f => { # byte has a value of 1 if corresponding AF point is ... in focus maybe?
5051
5063
  # usually the same points as AFPoints above, but not always
5052
5064
  Name => 'AFPointsUnknown',
5053
5065
  Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
@@ -5787,7 +5799,7 @@ my %binaryDataAttrs = (
5787
5799
  },
5788
5800
  0x0e => {
5789
5801
  Name => 'SensorTemperature2', #forum6677 (was CameraTemperature3)
5790
- Condition => '$$self{Model} ne "K-3 Mark III"', # (and maybe others?)
5802
+ Condition => '$$self{Model} !~ /K-3 Mark III/', # (and maybe others?)
5791
5803
  Format => 'int16s',
5792
5804
  ValueConv => '$val / 10',
5793
5805
  ValueConvInv => '$val * 10',
@@ -6406,6 +6418,45 @@ sub DecodeAFPoints($$$$;$)
6406
6418
  return join(',', @bitList);
6407
6419
  }
6408
6420
 
6421
+ #------------------------------------------------------------------------------
6422
+ # Print AF Point names for K-3III (ref PH)
6423
+ # Inputs: 0) value, 1) ExifTool ref, 2) optional value to match
6424
+ sub AFPointsK3iii($$;$)
6425
+ {
6426
+ my @a = split ' ', $_[0];
6427
+ my $match = $_[2];
6428
+ my @pts;
6429
+ if ($match) {
6430
+ $a[$_] == $match and push @pts, $k3iiiAF[$_] || "Unknown($_)" foreach 0..$#a;
6431
+ } else {
6432
+ $a[$_] and push @pts, $k3iiiAF[$_] || "Unknown($_)" foreach 0..$#a;
6433
+ }
6434
+ return @pts ? join ',', sort @pts : '(none)';
6435
+ }
6436
+
6437
+ #------------------------------------------------------------------------------
6438
+ # Print AF point values for K-3III (ref PH)
6439
+ # Inputs: 0) value, 1) ExifTool ref
6440
+ # Notes: this is experimental and not well understood
6441
+ sub AFPointValues($$)
6442
+ {
6443
+ my @a = split ' ', shift;
6444
+ my @vals;
6445
+ # (I really don't understand why Pentax seemed to use 28 instead of 41 for
6446
+ # the first index of the 2nd value, because as it stands there is
6447
+ # overlap between the ranges of the 1st and 2nd values, and there is
6448
+ # no way to tell which is which for cases were multiple points have values)
6449
+ foreach (0 .. $#a) {
6450
+ next unless $a[$_];
6451
+ my $pt = $k3iiiAF[$_] ? $k3iiiAF[$_] . '=' : $k3iiiAF[$_-28] . '=/';
6452
+ push @vals, "$pt$a[$_]";
6453
+ next unless $a[$_ + 28];
6454
+ $vals[-1] .= '/' . $a[$_ + 28];
6455
+ $a[$_ + 28] = undef;
6456
+ }
6457
+ return @vals ? join ',', sort @vals : '(none)';
6458
+ }
6459
+
6409
6460
  #------------------------------------------------------------------------------
6410
6461
  # Convert Pentax hex-based EV (modulo 8) to real number
6411
6462
  # Inputs: 0) value to convert