exiftool_vendored 12.55.0 → 12.56.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.
@@ -4,6 +4,7 @@
4
4
  # Description: Read OpenEXR meta information
5
5
  #
6
6
  # Revisions: 2011/12/10 - P. Harvey Created
7
+ # 2023/01/31 - PH Added support for multipart images
7
8
  #
8
9
  # References: 1) http://www.openexr.com/
9
10
  #------------------------------------------------------------------------------
@@ -15,7 +16,7 @@ use vars qw($VERSION);
15
16
  use Image::ExifTool qw(:DataAccess :Utils);
16
17
  use Image::ExifTool::GPS;
17
18
 
18
- $VERSION = '1.03';
19
+ $VERSION = '1.04';
19
20
 
20
21
  # supported EXR value format types (other types are extracted as undef binary data)
21
22
  my %formatType = (
@@ -47,14 +48,18 @@ my %formatType = (
47
48
  %Image::ExifTool::OpenEXR::Main = (
48
49
  GROUPS => { 2 => 'Image' },
49
50
  NOTES => q{
50
- Information extracted from EXR images. See L<http://www.openexr.com/> for
51
- the official specification.
51
+ Information extracted from EXR images. Use the ExtractEmbedded option to
52
+ extract information from all frames of a multipart image. See
53
+ L<http://www.openexr.com/> for the official specification.
52
54
  },
53
- _ver => { Name => 'EXRVersion' },
54
- _lay => {
55
- Name => 'Layout',
56
- PrintHex => 1,
57
- PrintConv => { 0 => 'Scan Lines', 0x200 => 'Tiles' },
55
+ _ver => { Name => 'EXRVersion', Notes => 'low byte of Flags word' },
56
+ _flags => { Name => 'Flags',
57
+ PrintConv => { BITMASK => {
58
+ 9 => 'Tiled',
59
+ 10 => 'Long names',
60
+ 11 => 'Deep data',
61
+ 12 => 'Multipart',
62
+ }},
58
63
  },
59
64
  adoptedNeutral => { },
60
65
  altitude => {
@@ -145,6 +150,10 @@ my %formatType = (
145
150
  worldToNDC => { },
146
151
  wrapmodes => { Name => 'WrapModes' },
147
152
  xDensity => { Name => 'XResolution' },
153
+ name => { },
154
+ type => { },
155
+ version => { },
156
+ chunkCount => { },
148
157
  # also observed:
149
158
  # ilut
150
159
  );
@@ -169,15 +178,22 @@ sub ProcessEXR($$)
169
178
  my $tagTablePtr = GetTagTable('Image::ExifTool::OpenEXR::Main');
170
179
 
171
180
  # extract information from header
172
- my $ver = unpack('x4V', $buff);
173
- $et->HandleTag($tagTablePtr, '_ver', $ver & 0xff);
174
- $et->HandleTag($tagTablePtr, '_lay', $ver & 0x200);
175
- my $maxLen = ($ver & 0x400) ? 255 : 31;
181
+ my $flags = unpack('x4V', $buff);
182
+ $et->HandleTag($tagTablePtr, '_ver', $flags & 0xff);
183
+ $et->HandleTag($tagTablePtr, '_flags', $flags & 0xffffff00);
184
+ my $maxLen = ($flags & 0x400) ? 255 : 31;
185
+ my $multi = $flags & 0x1000;
176
186
 
177
187
  # extract attributes
178
188
  for (;;) {
179
- $raf->Read($buff, 68) or last;
180
- last if $buff =~ /^\0/;
189
+ $raf->Read($buff, ($maxLen + 1) * 2 + 5) or last;
190
+ if ($buff =~ /^\0/) {
191
+ last unless $multi and $et->Options('ExtractEmbedded');
192
+ # remove null and process the next frame header as a sub-document
193
+ # (second null is end of all headers)
194
+ last if $buff =~ s/^(\0+)// and length($1) > 1;
195
+ $$et{DOC_NUM} = ++$$et{DOC_COUNT};
196
+ }
181
197
  unless ($buff =~ /^([^\0]{1,$maxLen})\0([^\0]{1,$maxLen})\0(.{4})/sg) {
182
198
  $et->Warn('EXR format error');
183
199
  last;
@@ -261,7 +277,7 @@ sub ProcessEXR($$)
261
277
 
262
278
  # take image dimensions from dataWindow (with displayWindow as backup)
263
279
  if (($tag eq 'dataWindow' or (not $dim and $tag eq 'displayWindow')) and
264
- $val =~ /^(-?\d+) (-?\d+) (-?\d+) (-?\d+)$/)
280
+ $val =~ /^(-?\d+) (-?\d+) (-?\d+) (-?\d+)$/ and not $$et{DOC_NUM})
265
281
  {
266
282
  $dim = [$3 - $1 + 1, $4 - $2 + 1];
267
283
  }
@@ -278,6 +294,7 @@ sub ProcessEXR($$)
278
294
  }
279
295
  $et->FoundTag($tagInfo, $val);
280
296
  }
297
+ delete $$et{DOC_NUM};
281
298
  if ($dim) {
282
299
  $et->FoundTag('ImageWidth', $$dim[0]);
283
300
  $et->FoundTag('ImageHeight', $$dim[1]);
@@ -36,7 +36,7 @@ use strict;
36
36
  use vars qw($VERSION $AUTOLOAD %stdCase);
37
37
  use Image::ExifTool qw(:DataAccess :Utils);
38
38
 
39
- $VERSION = '1.61';
39
+ $VERSION = '1.62';
40
40
 
41
41
  sub ProcessPNG_tEXt($$$);
42
42
  sub ProcessPNG_iTXt($$$);
@@ -343,7 +343,12 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
343
343
  Name => 'JUMBF',
344
344
  SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main' },
345
345
  },
346
- # cICP - Coding-independent code points (added in 2022 specification)
346
+ cICP => {
347
+ Name => 'CICodePoints',
348
+ SubDirectory => {
349
+ TagTable => 'Image::ExifTool::PNG::CICodePoints',
350
+ },
351
+ },
347
352
  );
348
353
 
349
354
  # PNG IHDR chunk
@@ -428,6 +433,79 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
428
433
  },
429
434
  );
430
435
 
436
+ # PNG cICP chunk
437
+ %Image::ExifTool::PNG::CICodePoints = (
438
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
439
+ GROUPS => { 1 => 'PNG-cICP', 2 => 'Image' },
440
+ NOTES => q{
441
+ These tags are found in the PNG cICP chunk and belong to the PNG-cICP family
442
+ 1 group.
443
+ },
444
+ # (same as tags in QuickTime::ColorRep)
445
+ 0 => {
446
+ Name => 'ColorPrimaries',
447
+ PrintConv => {
448
+ 1 => 'BT.709',
449
+ 2 => 'Unspecified',
450
+ 4 => 'BT.470 System M (historical)',
451
+ 5 => 'BT.470 System B, G (historical)',
452
+ 6 => 'BT.601',
453
+ 7 => 'SMPTE 240',
454
+ 8 => 'Generic film (color filters using illuminant C)',
455
+ 9 => 'BT.2020, BT.2100',
456
+ 10 => 'SMPTE 428 (CIE 1921 XYZ)',
457
+ 11 => 'SMPTE RP 431-2',
458
+ 12 => 'SMPTE EG 432-1',
459
+ 22 => 'EBU Tech. 3213-E',
460
+ },
461
+ },
462
+ 1 => {
463
+ Name => 'TransferCharacteristics',
464
+ PrintConv => {
465
+ 0 => 'For future use (0)',
466
+ 1 => 'BT.709',
467
+ 2 => 'Unspecified',
468
+ 3 => 'For future use (3)',
469
+ 4 => 'BT.470 System M (historical)',
470
+ 5 => 'BT.470 System B, G (historical)',
471
+ 6 => 'BT.601',
472
+ 7 => 'SMPTE 240 M',
473
+ 8 => 'Linear',
474
+ 9 => 'Logarithmic (100 : 1 range)',
475
+ 10 => 'Logarithmic (100 * Sqrt(10) : 1 range)',
476
+ 11 => 'IEC 61966-2-4',
477
+ 12 => 'BT.1361',
478
+ 13 => 'sRGB or sYCC',
479
+ 14 => 'BT.2020 10-bit systems',
480
+ 15 => 'BT.2020 12-bit systems',
481
+ 16 => 'SMPTE ST 2084, ITU BT.2100 PQ',
482
+ 17 => 'SMPTE ST 428',
483
+ 18 => 'BT.2100 HLG, ARIB STD-B67',
484
+ },
485
+ },
486
+ 2 => {
487
+ Name => 'MatrixCoefficients',
488
+ PrintConv => {
489
+ 0 => 'Identity matrix',
490
+ 1 => 'BT.709',
491
+ 2 => 'Unspecified',
492
+ 3 => 'For future use (3)',
493
+ 4 => 'US FCC 73.628',
494
+ 5 => 'BT.470 System B, G (historical)',
495
+ 6 => 'BT.601',
496
+ 7 => 'SMPTE 240 M',
497
+ 8 => 'YCgCo',
498
+ 9 => 'BT.2020 non-constant luminance, BT.2100 YCbCr',
499
+ 10 => 'BT.2020 constant luminance',
500
+ 11 => 'SMPTE ST 2085 YDzDx',
501
+ 12 => 'Chromaticity-derived non-constant luminance',
502
+ 13 => 'Chromaticity-derived constant luminance',
503
+ 14 => 'BT.2100 ICtCp',
504
+ },
505
+ },
506
+ 3 => 'VideoFullRangeFlag',
507
+ );
508
+
431
509
  # PNG sCAL chunk
432
510
  %Image::ExifTool::PNG::SubjectScale = (
433
511
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
@@ -81,12 +81,15 @@ my %processByMetaFormat = (
81
81
  ctbx => 1, # ('marl' in GM videos)
82
82
  );
83
83
 
84
- # data lengths for each INSV record type
84
+ # data lengths for each INSV/INSP record type
85
85
  my %insvDataLen = (
86
+ 0x200 => 0, # PreivewImage (any size) (a duplicate of PreviewImage in APP2 of INSP files)
86
87
  0x300 => 0, # accelerometer (could be either 20 or 56 bytes)
87
88
  0x400 => 16, # exposure (ref 6)
88
89
  0x600 => 8, # timestamps (ref 6)
89
90
  0x700 => 53, # GPS
91
+ # 0x900 => 48, # ? (Insta360 X3)
92
+ # 0xb00 => 10, # ? (Insta360 X3)
90
93
  );
91
94
 
92
95
  # limit the default amount of data we read for some record types
@@ -2758,7 +2761,6 @@ sub ProcessInsta360($;$)
2758
2761
  my ($id, $len) = unpack('vV', $buff);
2759
2762
  ($epos -= $len) + $trailerLen < 0 and last;
2760
2763
  $raf->Seek($epos, 2) or last;
2761
- my $dlen = $insvDataLen{$id};
2762
2764
  if ($verbose) {
2763
2765
  $et->VPrint(0, sprintf("Insta360 Record 0x%x (offset 0x%x, %d bytes):\n", $id, $fileEnd + $epos, $len));
2764
2766
  }
@@ -2771,20 +2773,25 @@ sub ProcessInsta360($;$)
2771
2773
  # 2. 20 byte records
2772
2774
  # 0000: c1 d8 d9 0b 00 00 00 00 f5 83 14 80 df 7f fe 7f [................]
2773
2775
  # 0010: fe 7f 01 80
2774
- if ($id == 0x300) {
2775
- if ($len % 20 and not $len % 56) {
2776
- $dlen = 56;
2777
- } elsif ($len % 56 and not $len % 20) {
2778
- $dlen = 20;
2779
- } else {
2780
- if ($raf->Read($buff, 20) == 20) {
2781
- if (substr($buff, 16, 3) eq "\0\0\0") {
2782
- $dlen = 56;
2783
- } else {
2784
- $dlen = 20;
2776
+ my $dlen = $insvDataLen{$id};
2777
+ if (defined $dlen and not $dlen) {
2778
+ if ($id == 0x300) {
2779
+ if ($len % 20 and not $len % 56) {
2780
+ $dlen = 56;
2781
+ } elsif ($len % 56 and not $len % 20) {
2782
+ $dlen = 20;
2783
+ } else {
2784
+ if ($raf->Read($buff, 20) == 20) {
2785
+ if (substr($buff, 16, 3) eq "\0\0\0") {
2786
+ $dlen = 56;
2787
+ } else {
2788
+ $dlen = 20;
2789
+ }
2785
2790
  }
2791
+ $raf->Seek($epos, 2) or last;
2786
2792
  }
2787
- $raf->Seek($epos, 2) or last;
2793
+ } elsif ($id == 0x200) {
2794
+ $dlen = $len;
2788
2795
  }
2789
2796
  }
2790
2797
  # limit the number of records we read if necessary
@@ -2798,6 +2805,8 @@ sub ProcessInsta360($;$)
2798
2805
  if ($dlen) {
2799
2806
  if ($len % $dlen) {
2800
2807
  $et->Warn(sprintf('Unexpected Insta360 record 0x%x length',$id));
2808
+ } elsif ($id == 0x200) {
2809
+ $et->FoundTag(PreviewImage => $buff);
2801
2810
  } elsif ($id == 0x300) {
2802
2811
  for ($p=0; $p<$len; $p+=$dlen) {
2803
2812
  $$et{DOC_NUM} = ++$$et{DOC_COUNT};
@@ -16,7 +16,7 @@ use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
  use Image::ExifTool::Canon;
18
18
 
19
- $VERSION = '1.06';
19
+ $VERSION = '1.07';
20
20
 
21
21
  sub ProcessRealMeta($$$);
22
22
  sub ProcessRealProperties($$$);
@@ -608,7 +608,7 @@ sub ProcessReal($$)
608
608
  } else {
609
609
  last if $tag eq 'DATA'; # stop normal parsing at DATA tag
610
610
  }
611
- if ($size & 0x80000000) {
611
+ if ($size & 0x80000000 or $size < 10) {
612
612
  $et->Warn('Bad chunk header');
613
613
  last;
614
614
  }
@@ -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.56';
37
+ $VERSION = '3.57';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -160,6 +160,7 @@ sub PrintInvLensSpec($;$$);
160
160
  32875 => 'Sony FE 24-70mm F2.8 GM II', #JR
161
161
  32876 => 'Sony E 11mm F1.8', #JR
162
162
  32877 => 'Sony E 15mm F1.4 G', #JR
163
+ 32878 => 'Sony FE 20-70mm F4 G', #JR
163
164
 
164
165
  # (comment this out so LensID will report the LensModel, which is more useful)
165
166
  # 32952 => 'Metabones Canon EF Speed Booster Ultra', #JR (corresponds to 184, but 'Advanced' mode, LensMount reported as E-mount)
@@ -191,6 +192,7 @@ sub PrintInvLensSpec($;$$);
191
192
  49235 => 'Zeiss Loxia 85mm F2.4', #JR
192
193
  49236 => 'Zeiss Loxia 25mm F2.4', #JR
193
194
 
195
+ 49456 => 'Tamron E 18-200mm F3.5-6.3 Di III VC', #FrancoisPiette
194
196
  49457 => 'Tamron 28-75mm F2.8 Di III RXD', #JR (Model A036)
195
197
  49458 => 'Tamron 17-28mm F2.8 Di III RXD', #JR (Model A046)
196
198
  49459 => 'Tamron 35mm F2.8 Di III OSD M1:2', #IB (Model F053)
@@ -256,6 +258,8 @@ sub PrintInvLensSpec($;$$);
256
258
  50533 => 'Sigma 16-28mm F2.8 DG DN | C', #JR (022)
257
259
  50534 => 'Sigma 20mm F1.4 DG DN | A', #JR (022)
258
260
  50535 => 'Sigma 24mm F1.4 DG DN | A', #JR (022)
261
+ 50536 => 'Sigma 60-600mm F4.5-6.3 DG DN OS | S', #JR (023)
262
+ 50539 => 'Sigma 50mm F1.4 DG DN | A', #JR (023)
259
263
 
260
264
  50992 => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR
261
265
  50993 => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB