exiftool_vendored 13.44.0 → 13.45.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: fb2a0154a02210ed5be6f51530e8def85c78f27b7502a4b0816c4096fdaa113d
4
- data.tar.gz: 47f90d853b810216a1524ef5558a594753a3d812a6ead844fc398e5cb5d110a4
3
+ metadata.gz: afe0b5c9723e0cb054a72d6482febe2474734b1386b4d3aed677da56cad8a206
4
+ data.tar.gz: a3967d74c3e3567a3ae39b19ce1c4fb556522c4050bb0c51e3fff4fccb8e73dc
5
5
  SHA512:
6
- metadata.gz: d027d7d5415bbfb942c312406ce8e8bf5dd6acd4217f59495e35bf32ca27f93d809e2b7f666f15e413287b9bbf12ddefdd2635a99f83fa8d4e2e55a0114c42dd
7
- data.tar.gz: eea916b76ba6c527981536482f148b347f88410b9d56365d942e1cd8f3e3f1abe434f5d68792c2f1e992121466cf9764c25adcf668bb5ee1178123cd1d97f6fc
6
+ metadata.gz: fe134a1cedace0c69a146cb87af11c9089b5f1bae57b50d730945a8ac5950cbe58fe89268f2c3c68485213a201f26a804af62a69e6b4cbaf6da9dd54d3a81a78
7
+ data.tar.gz: 589710ba09384a20e9cde53eebbc7e3647a26f99327ca52bbdd32f363b5d260edffc9107a3b958818c06d66d4971fd7016c62afa5739a519d140255168188188
data/bin/Changes CHANGED
@@ -7,6 +7,20 @@ RSS feed: https://exiftool.org/rss.xml
7
7
  Note: The most recent production release is Version 13.44. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Dec. 26, 2025 - Version 13.45
11
+
12
+ - Added a number of new values for some Sony tags (thanks Milos Komarcevic)
13
+ - Added a few new button functions for the Nikon Z9 (thanks Warren Hatch)
14
+ - Added some Nikon subject detection values (thanks Warren Hatch)
15
+ - Added a new Canon SubjectSwitching value
16
+ - Decode Ricoh APP7 maker notes
17
+ - Patched to allow a specific PreviewImage to be written to a DNG file
18
+ containing multiple previews
19
+ - Fixed minor error when writing some DJI DNG files
20
+ - Fixed bug reading large Protobuf integers on 32-bit systems (github #373)
21
+ - API Changes:
22
+ - Added SystemTimeRes option
23
+
10
24
  Dec. 15, 2025 - Version 13.44 (production release)
11
25
 
12
26
  - Added read support for Kandao KVAR files
@@ -15,7 +29,7 @@ Dec. 15, 2025 - Version 13.44 (production release)
15
29
  - Added a few new Matroska tags
16
30
  - Added a few values related to the new RAW file types for the Sony ILCE-7M5
17
31
  (thanks Milos Komarcevic)
18
- - Decode a few new PhaseOne tags ( (github #372)
32
+ - Decode a few new PhaseOne tags (github #372)
19
33
  - Decode timed GPS and other metadata from Kandao MP4 videos
20
34
  - Improvements to family 1 and 5 groups for tags in Matroska videos, and
21
35
  prioritize top-level tags when duplicates exist
data/bin/META.json CHANGED
@@ -50,6 +50,6 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "13.44",
53
+ "version" : "13.45",
54
54
  "x_serialization_backend" : "JSON::PP version 4.06"
55
55
  }
data/bin/META.yml CHANGED
@@ -31,5 +31,5 @@ recommends:
31
31
  Time::HiRes: '0'
32
32
  requires:
33
33
  perl: '5.004'
34
- version: '13.44'
34
+ version: '13.45'
35
35
  x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
data/bin/README CHANGED
@@ -111,8 +111,8 @@ your home directory, then you would type the following commands in a
111
111
  terminal window to extract and run ExifTool:
112
112
 
113
113
  cd ~/Desktop
114
- gzip -dc Image-ExifTool-13.44.tar.gz | tar -xf -
115
- cd Image-ExifTool-13.44
114
+ gzip -dc Image-ExifTool-13.45.tar.gz | tar -xf -
115
+ cd Image-ExifTool-13.45
116
116
  ./exiftool t/images/ExifTool.jpg
117
117
 
118
118
  Note: These commands extract meta information from one of the test images.
@@ -71,8 +71,11 @@
71
71
  # The %Image::ExifTool::UserDefined hash defines new tags to be added
72
72
  # to existing tables.
73
73
  %Image::ExifTool::UserDefined = (
74
- # All EXIF tags are added to the Main table, and WriteGroup is used to
75
- # specify where the tag is written (default is ExifIFD if not specified):
74
+ # All EXIF tags but GPS are added to the Main table, and WriteGroup is
75
+ # used to specify where the tag is written (defaulting to ExifIFD). Note
76
+ # that when reading custom EXIF tags, the same config file must be used
77
+ # to be able to see them with the given names. Without the config file
78
+ # they may only be seen as unknown tags with the -u option.
76
79
  'Image::ExifTool::Exif::Main' => {
77
80
  # Example 1. EXIF:NewEXIFTag
78
81
  0xd000 => {
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.44';
14
+ my $version = '13.45';
15
15
 
16
16
  $^W = 1; # enable global warnings
17
17
 
@@ -5368,7 +5368,7 @@ values (or decrement if I<VALUE> is negative), and C<-=> may be used to
5368
5368
  conditionally delete or replace a tag (see L</WRITING EXAMPLES> for
5369
5369
  examples). C<^=> is used to write an empty string instead of deleting the
5370
5370
  tag when no I<VALUE> is given, but otherwise it is equivalent to C<=>.
5371
- (Note that the caret must be quoted on the Windows command line.)
5371
+ (Note that the caret must be quoted in the Windows CMD shell.)
5372
5372
 
5373
5373
  I<TAG> may contain one or more leading family 0, 1, 2 or 7 group names,
5374
5374
  prefixed by optional family numbers, and separated colons. If no group name
@@ -5570,12 +5570,19 @@ list items when copying groups of tags from a file containing redundant
5570
5570
  information, it also prevents values of different tags from being copied
5571
5571
  into the same list when this is the intent. To accumulate values
5572
5572
  from different operations into the same list, add a C<+> after the initial
5573
- C<-> of the argument. For example:
5573
+ C<-> of the argument or use the B<-addTagsFromFile> option. For example:
5574
5574
 
5575
5575
  exiftool -tagsfromfile @ '-subject<make' '-+subject<model' ...
5576
5576
 
5577
- Similarly, C<-+DSTTAG> must be used when conditionally replacing a tag to
5578
- prevent overriding earlier conditions.
5577
+ or
5578
+
5579
+ exiftool -addtagsfromfile @ '-subject<make' '-subject<model' ...
5580
+
5581
+ Similarly, C<-+DSTTAG> or B<-addTagsFromFile> must be used when
5582
+ conditionally replacing a tag to prevent overriding earlier conditions.
5583
+
5584
+ Other than these differences, the B<-tagsFromFile> and B<-addTagsFromFile>
5585
+ options are equivalent.
5579
5586
 
5580
5587
  6) The B<-a> option (allow duplicate tags) is always in effect when copying
5581
5588
  tags from I<SRCFILE>, but the highest priority tag is always copied last so
@@ -6128,7 +6135,7 @@ with this command:
6128
6135
 
6129
6136
  produces output like this:
6130
6137
 
6131
- -- Generated by ExifTool 13.44 --
6138
+ -- Generated by ExifTool 13.45 --
6132
6139
  File: a.jpg - 2003:10:31 15:44:19
6133
6140
  (f/5.6, 1/60s, ISO 100)
6134
6141
  File: b.jpg - 2006:05:23 11:57:38
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
35
35
  use Image::ExifTool::Validate;
36
36
  use Image::ExifTool::MacOS;
37
37
 
38
- $VERSION = '3.63';
38
+ $VERSION = '3.64';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -555,7 +555,7 @@ Pentax, Ricoh, Samsung, Sanyo, SeaLife, Sony, Supra and Vivitar.
555
555
  These tags are used in Panasonic/Leica cameras.
556
556
  },
557
557
  Pentax => q{
558
- These tags are used in Pentax/Asahi cameras.
558
+ These tags are used in Pentax/Asahi/Ricoh cameras.
559
559
  },
560
560
  CanonRaw => q{
561
561
  These tags apply to CRW-format Canon RAW files and information in the APP0
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '5.00';
91
+ $VERSION = '5.01';
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)
@@ -9397,6 +9397,7 @@ my %filterConv = (
9397
9397
  0 => 'Initial Priority',
9398
9398
  1 => 'On Subject',
9399
9399
  2 => 'Switch Subject',
9400
+ 0x7fffffff => 'n/a',
9400
9401
  },
9401
9402
  },
9402
9403
  24 => { #forum16068 #KG extensions for 'left' and 'right'
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.61';
60
+ $VERSION = '4.63';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -213,7 +213,7 @@ $formatName[129] = 'utf8'; # (Exif 3.0)
213
213
  10 => 'JBIG Color', #3
214
214
  99 => 'JPEG', #16
215
215
  262 => 'Kodak 262', #16
216
- 32766 => 'Next', #3
216
+ 32766 => 'Next or Sony ARW Compressed 2', #3/Milos
217
217
  32767 => 'Sony ARW Compressed', #16
218
218
  32769 => 'Packed RAW', #PH (used by Epson, Nikon, Samsung)
219
219
  32770 => 'Samsung SRW Compressed', #PH
@@ -1598,7 +1598,7 @@ my %opcodeInfo = (
1598
1598
  2 => 'Sony Compressed RAW', # (lossy, ref IB)
1599
1599
  3 => 'Sony Lossless Compressed RAW', #IB
1600
1600
  4 => 'Sony Lossless Compressed RAW 2', #JR (ILCE-1)
1601
- 6 => 'Sony Compressed RAW HQ', # ILCE-7M5
1601
+ 6 => 'Sony Compressed RAW 2', # ILCE-7M5
1602
1602
  },
1603
1603
  },
1604
1604
  # 0x7001 - int16u[1] (in SubIFD of Sony ARW images) - values: 0,1
@@ -3591,6 +3591,7 @@ my %opcodeInfo = (
3591
3591
  Condition => '$$valPt =~ /^\[ae_dbg_info:/',
3592
3592
  MakerNotes => 1,
3593
3593
  Binary => 1,
3594
+ NotIFD => 1,
3594
3595
  WriteGroup => 'IFD0', # (for Validate)
3595
3596
  SubDirectory => { TagTable => 'Image::ExifTool::DJI::Info' },
3596
3597
  Format => 'undef',
@@ -35,7 +35,7 @@ use vars qw($VERSION);
35
35
  use Image::ExifTool qw(:Public);
36
36
  use Image::ExifTool::GPS;
37
37
 
38
- $VERSION = '1.83';
38
+ $VERSION = '1.84';
39
39
 
40
40
  sub JITTER() { return 2 } # maximum time jitter
41
41
 
@@ -1530,7 +1530,7 @@ sub PrintFixTime($)
1530
1530
  {
1531
1531
  my $time = $_[0] + 0.0005; # round off to nearest ms
1532
1532
  my $fsec = int(($time - int($time)) * 1000);
1533
- return sprintf('%s.%.3d UTC', Image::ExifTool::ConvertUnixTime($time), $fsec);
1533
+ return Image::ExifTool::ConvertUnixTime($time, undef, 3) . ' UTC';
1534
1534
  }
1535
1535
 
1536
1536
  #------------------------------------------------------------------------------
@@ -11,7 +11,7 @@ use strict;
11
11
  use vars qw($VERSION);
12
12
  use Image::ExifTool qw(:DataAccess :Utils);
13
13
 
14
- $VERSION = '1.39';
14
+ $VERSION = '1.40';
15
15
 
16
16
  sub ProcessOcad($$$);
17
17
  sub ProcessJPEG_HDR($$$);
@@ -212,6 +212,10 @@ sub ProcessJPEG_HDR($$$);
212
212
  Name => 'Pentax',
213
213
  Condition => '$$valPt =~ /^PENTAX \0/',
214
214
  SubDirectory => { TagTable => 'Image::ExifTool::Pentax::Main' },
215
+ }, {
216
+ Name => 'Ricoh',
217
+ Condition => '$$valPt =~ /^RICOH\0/',
218
+ SubDirectory => { TagTable => 'Image::ExifTool::Pentax::Main' },
215
219
  }, {
216
220
  Name => 'Huawei',
217
221
  Condition => '$$valPt =~ /^HUAWEI\0\0/',
@@ -41,8 +41,8 @@ my %format = (
41
41
  VARS => { NO_LOOKUP => 1 },
42
42
  NOTES => q{
43
43
  Tags extracted from Kandao KVAR files and the 'kvar', 'kfix' and 'kstb'
44
- atoms in Kandao MP4 videos, and have a family 1 group name of KVAR, KFIX or
45
- KSTB depending on their location.
44
+ atoms in Kandao MP4 videos, with a family 1 group name of KVAR, KFIX or KSTB
45
+ depending on their location.
46
46
  },
47
47
  PROCESS_PROC => \&ProcessKandao,
48
48
  #
@@ -65,7 +65,7 @@ use Image::ExifTool::Exif;
65
65
  use Image::ExifTool::GPS;
66
66
  use Image::ExifTool::XMP;
67
67
 
68
- $VERSION = '4.51';
68
+ $VERSION = '4.52';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -1352,6 +1352,7 @@ my %subjectDetectionZ9 = (
1352
1352
  4 => 'Vehicles',
1353
1353
  5 => 'Birds',
1354
1354
  6 => 'Airplanes',
1355
+ 7 => 'Faces', #introduced with Z9 firmware 5.30 as an Auto Capture option
1355
1356
  );
1356
1357
 
1357
1358
  my %timeZoneZ9 = (
@@ -4848,17 +4849,17 @@ my %base64coord = (
4848
4849
  },
4849
4850
  0x31 => [
4850
4851
  {
4851
- Name => 'FocusPositionVertical', # 209/233 focus point cameras
4852
+ Name => 'FocusPositionVertical', # 209/233 focus point cameras
4852
4853
  Condition => '$$self{Model} =~ /^NIKON (Z 30|Z 50|Z fc)\b/i and $$self{AFAreaYPosition}', #models Z30, Z50, Zfc
4853
4854
  ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4854
4855
  PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 11 ) },
4855
4856
  },{
4856
- Name => 'FocusPositionVertical', #273/299 focus point cameras
4857
+ Name => 'FocusPositionVertical', # 273/299 focus point cameras
4857
4858
  Condition => '$$self{Model} =~ /^NIKON (Z 5|Z 6|Z 6_2|D780)\b/i and $$self{AFAreaYPosition}', #models Z5, Z6, Z6ii, D780
4858
4859
  ValueConv => 'int($$self{AFAreaYPosition} / 286 )', #divisor is an estimate (chosen to cause center point to report 'C')
4859
4860
  PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 13 ) },
4860
4861
  },{
4861
- Name => 'FocusPositionVertical', #405/493 focus point cameras
4862
+ Name => 'FocusPositionVertical', # 405/493 focus point cameras
4862
4863
  Condition => '$$self{Model} =~ /^NIKON (Z 7|Z 7_2)\b/i and $$self{AFAreaYPosition}', #models Z7/Z7ii
4863
4864
  ValueConv => 'int($$self{AFAreaYPosition} / 292 )', #divisor is the measured vertical pixel separation between adjacent points
4864
4865
  PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ) },
@@ -9346,12 +9347,9 @@ my %nikonFocalConversions = (
9346
9347
  106 => {
9347
9348
  Name => 'AutoCaptureCriteriaSubjectType',
9348
9349
  Condition => '$$self{AutoCapturedFrame} and $$self{AutoCapturedFrame} ne 0',
9349
- PrintConv => {
9350
- 0 => 'Auto (all)',
9351
- 1 => 'People',
9352
- 2 => 'Animals',
9353
- 3 => 'Vehicle'
9354
- },
9350
+ ValueConv => '$val + 1', # change value range to align with %subjectDetectionZ9
9351
+ ValueConvInv => '$val - 1',
9352
+ PrintConv => \%subjectDetectionZ9,
9355
9353
  },
9356
9354
  );
9357
9355
 
@@ -15,7 +15,7 @@ package Image::ExifTool::NikonCustom;
15
15
  use strict;
16
16
  use vars qw($VERSION @ISA @EXPORT_OK %buttonsZ8 %buttonsZ9);
17
17
 
18
- $VERSION = '1.27';
18
+ $VERSION = '1.28';
19
19
 
20
20
  @ISA = qw(Exporter);
21
21
  @EXPORT_OK = qw(%buttonsZ8 %buttonsZ9);
@@ -142,7 +142,7 @@ my %buttonsCommonZ8Z9 = ( #button roles shared by the Z8 & Z9. Assigments bega
142
142
  %buttonsCommonZ8Z9,
143
143
  116 => 'Save and Load Power Zoom Position',
144
144
  117 => 'Cycle AF-area Mode',
145
- 118 => 'Raw Processing (Current)', #118-131 are Playback Retouch options
145
+ 118 => 'Raw Processing (Current)', #118-131 and 135 are Playback Retouch options
146
146
  119 => 'Raw Processing (Multiple)',
147
147
  120 => 'Trim',
148
148
  121 => 'Resize (Current)',
@@ -156,6 +156,9 @@ my %buttonsCommonZ8Z9 = ( #button roles shared by the Z8 & Z9. Assigments bega
156
156
  129 => 'Lighten',
157
157
  130 => 'Darken',
158
158
  131 => 'Motion Blend',
159
+ 133 => 'Focus Limiter',
160
+ 134 => 'Cycle Subject Detection Options',
161
+ 135 => 'Jump To Source Image',
159
162
  },
160
163
  );
161
164
  my %buttonsZ6III= (
@@ -909,10 +909,18 @@ my %binaryDataAttrs = (
909
909
  # 11.3.0.0 - K-S1
910
910
  # 11.5.0.0 - K-S2
911
911
  # 11.6.1.0 - K-3 II
912
- # 11.7.5.0 - WG-M2
912
+ # 11.7.5.0 - Ricoh WG-M2
913
913
  # 12.0.0.0 - K-1
914
914
  # 12.1.3.0 - K-70
915
915
  # 12.1.5.0 - KP
916
+ # 12.3.2.0 - K-1 Mark II
917
+ # 12.7.5.0 - Ricoh WG-M2
918
+ # 13.0.0.0 - Ricoh GR III / G900SE
919
+ # 13.1.1.0 - Ricoh WG-70
920
+ # 14.0.0.0 - K-3 Mark III
921
+ # 14.0.1.0 - Ricoh GR IIIx
922
+ # 14.2.0.0 - KF
923
+ # 15.2.3.0 - Ricoh GR IV
916
924
  },
917
925
  0x0001 => { #PH
918
926
  Name => 'PentaxModelType',
@@ -21,10 +21,16 @@ use strict;
21
21
  use vars qw($VERSION);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
 
24
- $VERSION = '1.05';
24
+ $VERSION = '1.06';
25
25
 
26
26
  sub ProcessProtobuf($$$;$);
27
27
 
28
+ # largest unsigned integer on this system (2^32 or 2^64 - 1)
29
+ my $intMax = ~0;
30
+
31
+ # smallest unsigned integer that we interpret as int64s (0xffffffff00000000)
32
+ my $int64sMin = 18446744069414584320;
33
+
28
34
  #------------------------------------------------------------------------------
29
35
  # Read bytes from dirInfo object
30
36
  # Inputs: 0) dirInfo ref (with DataPt and Pos set), 1) number of bytes
@@ -43,17 +49,23 @@ sub GetBytes($$)
43
49
  # Read variable-length integer
44
50
  # Inputs: 0) dirInfo ref
45
51
  # Returns: integer value
52
+ # - sets $$dirInfo{Bit0} according to bit 0 of returned value
53
+ # (necessary for cases where a signed integer exceeds $intMax)
46
54
  sub VarInt($)
47
55
  {
48
56
  my $dirInfo = shift;
49
- my $val = 0;
50
- my $shift = 0;
57
+ my $buff = GetBytes($dirInfo, 1);
58
+ return undef unless defined $buff;
59
+ my $val = ord($buff) & 0x7f;
60
+ $$dirInfo{Bit0} = $val & 0x01;
61
+ my $mult = 128;
51
62
  for (;;) {
52
- my $buff = GetBytes($dirInfo, 1);
53
- defined $buff or return undef;
54
- $val += (ord($buff) & 0x7f) << $shift;
55
63
  last unless ord($buff) & 0x80;
56
- $shift += 7;
64
+ $buff = GetBytes($dirInfo, 1);
65
+ return undef unless defined $buff;
66
+ $val += (ord($buff) & 0x7f) * $mult;
67
+ last unless ord($buff) & 0x80;
68
+ $mult *= 128; # (Note: don't use integer bit shift to avoid integer overflow)
57
69
  }
58
70
  return $val;
59
71
  }
@@ -62,7 +74,8 @@ sub VarInt($)
62
74
  # Read protobuf record
63
75
  # Inputs: 0) dirInfo ref
64
76
  # Returns: 0) record payload (plus tag id and format type in list context)
65
- # Notes: Updates dirInfo Pos to start of next record
77
+ # Notes: Updates $$dirInfo{Pos} to start of next record, and sets $$dirInfo{Bit0}
78
+ # according to the least significant bit of type 0 (varInt) records
66
79
  sub ReadRecord($)
67
80
  {
68
81
  my $dirInfo = shift;
@@ -170,11 +183,19 @@ sub ProcessProtobuf($$$;$)
170
183
  if ($type == 0) {
171
184
  $val = $buff;
172
185
  if ($$tagInfo{Format} eq 'signed') {
173
- $val = ($val & 1) ? -($val >> 1)-1 : ($val >> 1);
174
- } elsif ($$tagInfo{Format} eq 'int64s' and $val > 0xffffffff) {
186
+ if ($val > $intMax) {
187
+ # use double math (15 decimal digits precision)
188
+ $val = $$dirInfo{Bit0} ? -int($val / 2) - 1 : $val / 2;
189
+ } else {
190
+ # use integer math
191
+ $val = ($val & 1) ? -($val >> 1)-1 : ($val >> 1);
192
+ }
193
+ } elsif ($$tagInfo{Format} eq 'int64s' and $val >= $int64sMin) {
175
194
  # hack for DJI drones which store 64-bit signed integers improperly
176
195
  # (just toss upper 32 bits which should be all 1's anyway)
177
- $val = ($val & 0xffffffff) - 4294967296;
196
+ # Note: do the two subtractions because $int64sMin + 4294967296
197
+ # is too large for a 64-bit integer
198
+ $val = $val - $int64sMin - 4294967296;
178
199
  }
179
200
  } elsif ($type == 2 and $$tagInfo{Format} eq 'rational') {
180
201
  my $dir = { DataPt => \$buff, Pos => 0 };
@@ -187,11 +208,16 @@ sub ProcessProtobuf($$$;$)
187
208
  } elsif ($type == 0) { # varInt
188
209
  $val = $buff;
189
210
  my $hex = sprintf('%x', $val);
190
- if (length($hex) == 16 and $hex =~ /^ffffffff/) {
191
- my $s64 = hex(substr($hex, 8)) - 4294967296;
211
+ if ($val >= $int64sMin) {
212
+ my $s64 = $val - $int64sMin - 4294967296;
192
213
  $val .= " (0x$hex, int64s $s64)";
193
214
  } else {
194
- my $signed = ($val & 1) ? -($val >> 1)-1 : ($val >> 1);
215
+ my $signed;
216
+ if ($val > $intMax) {
217
+ $signed = $$dirInfo{Bit0} ? -int($val / 2) - 1 : $val / 2;
218
+ } else {
219
+ $signed = ($val & 1) ? -($val >> 1)-1 : ($val >> 1);
220
+ }
195
221
  $val .= " (0x$hex, signed $signed)";
196
222
  }
197
223
  } elsif ($type == 1) { # 64-bit number
@@ -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.82';
37
+ $VERSION = '3.83';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -1534,7 +1534,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1534
1534
  0 => 'Compressed RAW',
1535
1535
  1 => 'Uncompressed RAW',
1536
1536
  2 => 'Lossless Compressed RAW', #JR (NC) seen for ILCE-1
1537
- 3 => 'Compressed RAW (HQ)', # ILCE-7M5
1537
+ 3 => 'Compressed RAW 2', # ILCE-7M5
1538
1538
  65535 => 'n/a', # seen for ILCE-7SM3 JPEG-only
1539
1539
  },
1540
1540
  },
@@ -1592,9 +1592,25 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
1592
1592
  '1 3' => 'RAW + Extra Fine',
1593
1593
  '1 4' => 'RAW + Light', #JR
1594
1594
  '2 0' => 'S-size RAW',
1595
+ '2 1' => 'S-size RAW + Standard', # (NC)
1596
+ '2 2' => 'S-size RAW + Fine', # (NC)
1597
+ '2 3' => 'S-size RAW + Extra Fine', # (NC)
1598
+ '2 4' => 'S-size RAW + Light', # (NC)
1595
1599
  '3 0' => 'M-size RAW', # ILCE-1/7RM5, APS-C mode
1600
+ '3 1' => 'M-size RAW + Standard', # (NC)
1596
1601
  '3 2' => 'M-size RAW + Fine',
1597
1602
  '3 3' => 'M-size RAW + Extra Fine',
1603
+ '3 4' => 'M-size RAW + Light', # (NC)
1604
+ '4 0' => 'Compressed RAW', # (NC)
1605
+ '4 1' => 'Compressed RAW + Standard', # (NC)
1606
+ '4 2' => 'Compressed RAW + Fine',
1607
+ '4 3' => 'Compressed RAW + Extra Fine', # (NC)
1608
+ '4 4' => 'Compressed RAW + Light', # (NC)
1609
+ '5 0' => 'Compressed HQ RAW', # (NC)
1610
+ '5 1' => 'Compressed HQ RAW + Standard', # (NC)
1611
+ '5 2' => 'Compressed HQ RAW + Fine',
1612
+ '5 3' => 'Compressed HQ RAW + Extra Fine', # (NC)
1613
+ '5 4' => 'Compressed HQ RAW + Light', # (NC)
1598
1614
  },
1599
1615
  },
1600
1616
  0x202f => { #JR (ILCE-7RM3)
@@ -143,6 +143,7 @@ L<https://www.w3.org/Graphics/JPEG/jfif3.pdf> for the JPEG specification.
143
143
  InfiRayMixMode InfiRay MixMode
144
144
  DJI_DTAT no
145
145
  'APP7' Pentax Pentax
146
+ Ricoh Pentax
146
147
  Huawei Unknown
147
148
  Qualcomm Qualcomm
148
149
  InfiRayOpMode InfiRay OpMode
@@ -20416,7 +20417,7 @@ various Panasonic and Leica models.
20416
20417
 
20417
20418
  =head2 Pentax Tags
20418
20419
 
20419
- These tags are used in Pentax/Asahi cameras.
20420
+ These tags are used in Pentax/Asahi/Ricoh cameras.
20420
20421
 
20421
20422
  Tag ID Tag Name Writable
20422
20423
  ------ -------- --------
@@ -34166,8 +34167,8 @@ Other tags are extracted with the Unknown option.
34166
34167
  =head2 Kandao Tags
34167
34168
 
34168
34169
  Tags extracted from Kandao KVAR files and the 'kvar', 'kfix' and 'kstb'
34169
- atoms in Kandao MP4 videos, and have a family 1 group name of KVAR, KFIX or
34170
- KSTB depending on their location.
34170
+ atoms in Kandao MP4 videos, with a family 1 group name of KVAR, KFIX or KSTB
34171
+ depending on their location.
34171
34172
 
34172
34173
  Tag ID Tag Name Writable
34173
34174
  ------ -------- --------
@@ -1304,8 +1304,9 @@ sub SetNewValuesFromFile($$;@)
1304
1304
  IgnoreTags ImageHashType KeepUTCTime Lang LargeFileSupport
1305
1305
  LigoGPSScale ListItem ListSep MDItemTags MissingTagValue NoPDFList
1306
1306
  NoWarning Password PrintConv QuickTimeUTC RequestTags SaveFormat
1307
- SavePath ScanForXMP StructFormat SystemTags TimeZone Unknown UserParam
1308
- Validate WindowsLongPath WindowsWideFile XAttrTags XMPAutoConv))
1307
+ SavePath ScanForXMP StructFormat SystemTags SystemTimeRes TimeZone
1308
+ Unknown UserParam Validate WindowsLongPath WindowsWideFile XAttrTags
1309
+ XMPAutoConv))
1309
1310
  {
1310
1311
  $srcExifTool->Options($_ => $$options{$_});
1311
1312
  }
@@ -3846,7 +3847,9 @@ sub GetNewValueHash($$;$$$$)
3846
3847
  # QuickTime and All are special cases because all group1 tags may be updated at once
3847
3848
  last if $$nvHash{WriteGroup} =~ /^(QuickTime|All)$/;
3848
3849
  # replace existing entry if WriteGroup is 'All' (avoids confusion of forum10349)
3849
- last if $$tagInfo{WriteGroup} and $$tagInfo{WriteGroup} eq 'All';
3850
+ #last if $$tagInfo{WriteGroup} and $$tagInfo{WriteGroup} eq 'All'; # (didn't work for forum17770)
3851
+ # forum17770 patch (also handles case where "EXIF" is specified as a write group)
3852
+ last if $writeGroup eq 'All' or $$nvHash{WriteGroup} eq 'EXIF' and $writeGroup =~ /IFD/;
3850
3853
  $nvHash = $$nvHash{Next};
3851
3854
  }
3852
3855
  }
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
29
29
  %jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
30
30
  %static_vars $advFmtSelf $configFile @configFiles $noConfig);
31
31
 
32
- $VERSION = '13.44';
32
+ $VERSION = '13.45';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -1193,6 +1193,7 @@ my @availableOptions = (
1193
1193
  [ 'Struct', undef, 'return structures as hash references' ],
1194
1194
  [ 'StructFormat', undef, 'format for structure serialization when reading/writing' ],
1195
1195
  [ 'SystemTags', undef, 'extract additional File System tags' ],
1196
+ [ 'SystemTimeRes', 0, 'number of sub-second digits in system and epoch times' ],
1196
1197
  [ 'TextOut', \*STDOUT, 'file for Verbose/HtmlDump output' ],
1197
1198
  [ 'TimeZone', undef, 'local time zone' ],
1198
1199
  [ 'UndefTags', undef, 'leave undef tags in -if conditions when -m or -f are used' ],
@@ -2624,7 +2625,7 @@ sub Options($$;@)
2624
2625
  # add to existing plot settings
2625
2626
  $newVal = "$oldVal,$newVal" if defined $oldVal and defined $newVal;
2626
2627
  $$options{$param} = $newVal;
2627
- } elsif ($param eq 'KeepUTCTime') {
2628
+ } elsif ($param eq 'KeepUTCTime' or $param eq 'SystemTimeRes') {
2628
2629
  $$options{$param} = $static_vars{$param} = $newVal;
2629
2630
  } elsif (lc $param eq 'geodir') {
2630
2631
  $Image::ExifTool::Geolocation::geoDir = $newVal;
@@ -4286,7 +4287,11 @@ sub Init($)
4286
4287
  my $self = shift;
4287
4288
  # delete all DataMember variables (lower-case names)
4288
4289
  delete $$self{$_} foreach grep /[a-z]/, keys %$self;
4289
- %static_vars = ( KeepUTCTime => $$self{OPTIONS}{KeepUTCTime} ); # reset static variables
4290
+ # reset static variables
4291
+ %static_vars = (
4292
+ KeepUTCTime => $$self{OPTIONS}{KeepUTCTime},
4293
+ SystemTimeRes => $$self{OPTIONS}{SystemTimeRes},
4294
+ );
4290
4295
  delete $$self{FOUND_TAGS}; # list of found tags
4291
4296
  delete $$self{EXIF_DATA}; # the EXIF data block
4292
4297
  delete $$self{EXIF_POS}; # EXIF position in file
@@ -6713,34 +6718,33 @@ sub TimeZoneString($;$)
6713
6718
 
6714
6719
  #------------------------------------------------------------------------------
6715
6720
  # Convert Unix time to EXIF date/time string
6716
- # Inputs: 0) Unix time value, 1) non-zero to convert to local time,
6717
- # 2) number of digits after the decimal for fractional seconds
6721
+ # Inputs: 0) Unix time value, 1) non-zero to convert to local time, 2) number of
6722
+ # digits after the decimal for fractional seconds, negative to trim
6723
+ # trailing zeros, or undef to use SystemTimeRes
6718
6724
  # Returns: EXIF date/time string (with timezone for local times)
6719
6725
  sub ConvertUnixTime($;$$)
6720
6726
  {
6721
6727
  my ($time, $toLocal, $dec) = @_;
6722
6728
  return '0000:00:00 00:00:00' if $time == 0;
6723
- my (@tm, $tz);
6724
- if ($dec) {
6725
- my $frac = $time - int($time);
6726
- $time = int($time);
6727
- $frac < 0 and $frac += 1, $time -= 1;
6728
- $dec = sprintf('%.*f', $dec, $frac);
6729
- # remove number before decimal and increment integer time if it was rounded up
6730
- $dec =~ s/^(\d)// and $1 eq '1' and $time += 1;
6731
- } else {
6732
- $time = int($time + 1e-6) if $time != int($time); # avoid round-off errors
6733
- $dec = '';
6734
- }
6729
+ my (@tm, $tz, $trim);
6730
+ $dec = $static_vars{SystemTimeRes} || 0 unless defined $dec;
6731
+ $dec < 0 and $dec = -$dec, $trim = 1;
6732
+ my $itime = int($time);
6733
+ my $frac = $time - $itime;
6734
+ $frac < 0 and $frac += 1, $itime -= 1;
6735
+ $dec = sprintf('%.*f', $dec, $frac);
6736
+ # remove number before decimal and increment integer time if necessary
6737
+ $dec =~ s/^(\d)// and $1 eq '1' and $itime += 1;
6738
+ $dec =~ s/\.?0+$// if $trim; # trim trailing zeros if specified
6735
6739
  if (not $toLocal) {
6736
- @tm = gmtime($time);
6740
+ @tm = gmtime($itime);
6737
6741
  $tz = '';
6738
6742
  } elsif ($static_vars{KeepUTCTime}) {
6739
- @tm = gmtime($time);
6743
+ @tm = gmtime($itime);
6740
6744
  $tz = 'Z';
6741
6745
  } else {
6742
- @tm = localtime($time);
6743
- $tz = TimeZoneString(\@tm, $time);
6746
+ @tm = localtime($itime);
6747
+ $tz = TimeZoneString(\@tm, $itime);
6744
6748
  }
6745
6749
  my $str = sprintf("%4d:%.2d:%.2d %.2d:%.2d:%.2d$dec%s",
6746
6750
  $tm[5]+1900, $tm[4]+1, $tm[3], $tm[2], $tm[1], $tm[0], $tz);
@@ -8127,11 +8131,11 @@ sub ProcessJPEG($$;$)
8127
8131
  $self->ProcessDirectory(\%dirInfo, $tagTablePtr);
8128
8132
  }
8129
8133
  } elsif ($marker == 0xe7) { # APP7 (InfiRay, Pentax, Huawei, Qualcomm)
8130
- if ($$segDataPt =~ /^PENTAX \0(II|MM)/) {
8131
- # found in K-3 images (is this multi-segment??)
8132
- SetByteOrder($1);
8134
+ if ($$segDataPt =~ /^(PENTAX |RICOH)\0(II|MM)/) {
8135
+ # found in K-3 and Ricoh GR_IV images (is this multi-segment??)
8136
+ SetByteOrder($2);
8133
8137
  undef $dumpType; # (dump this ourself)
8134
- my $hdrLen = 10;
8138
+ my $hdrLen = length($1) + 3;
8135
8139
  my $tagTablePtr = GetTagTable('Image::ExifTool::Pentax::Main');
8136
8140
  DirStart(\%dirInfo, $hdrLen, 0);
8137
8141
  $dirInfo{DirName} = 'Pentax APP7';
@@ -1193,6 +1193,15 @@ Flag to extract the following additional File System tags: FileAttributes,
1193
1193
  FileDeviceNumber, FileInodeNumber, FileHardLinks, FileUserID, FileGroupID,
1194
1194
  FileDeviceID, FileBlockSize and FileBlockCount.
1195
1195
 
1196
+ =item SystemTimeRes
1197
+
1198
+ Number of digits in sub-seconds for system times and some other epoch times.
1199
+ A value of 0 rounds to the nearest second. Negative values cause trailing
1200
+ zeros to be removed. eg) A value of C<-6> returns system times to 6 decimal
1201
+ places with trailing zeros removed. Default is 0, which rounds to the
1202
+ nearest second. Note that round-off errors may appear starting at the 6th
1203
+ decimal place for some time formats.
1204
+
1196
1205
  =item TextOut
1197
1206
 
1198
1207
  Output file reference for Verbose and HtmlDump options. Default is
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 13.44
3
+ Version: 13.45
4
4
  Release: 1
5
5
  License: Artistic/GPL
6
6
  Group: Development/Libraries/Perl
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExiftoolVendored
4
- VERSION = Gem::Version.new('13.44.0')
4
+ VERSION = Gem::Version.new('13.45.0')
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exiftool_vendored
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.44.0
4
+ version: 13.45.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew McEachen