exiftool_vendored 12.55.0 → 12.57.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +38 -1
  3. data/bin/MANIFEST +5 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +19 -19
  7. data/bin/arg_files/xmp2exif.args +4 -1
  8. data/bin/exiftool +97 -53
  9. data/bin/fmt_files/kml.fmt +3 -0
  10. data/bin/fmt_files/kml_track.fmt +3 -0
  11. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +13 -6
  12. data/bin/lib/Image/ExifTool/Canon.pm +8 -2
  13. data/bin/lib/Image/ExifTool/Exif.pm +31 -2
  14. data/bin/lib/Image/ExifTool/FlashPix.pm +73 -8
  15. data/bin/lib/Image/ExifTool/FujiFilm.pm +2 -1
  16. data/bin/lib/Image/ExifTool/GPS.pm +7 -2
  17. data/bin/lib/Image/ExifTool/InfiRay.pm +227 -0
  18. data/bin/lib/Image/ExifTool/JPEG.pm +40 -6
  19. data/bin/lib/Image/ExifTool/Jpeg2000.pm +5 -5
  20. data/bin/lib/Image/ExifTool/MIE.pm +3 -3
  21. data/bin/lib/Image/ExifTool/Nikon.pm +862 -1264
  22. data/bin/lib/Image/ExifTool/NikonCustom.pm +2 -2
  23. data/bin/lib/Image/ExifTool/NikonSettings.pm +1 -1
  24. data/bin/lib/Image/ExifTool/Olympus.pm +3 -1
  25. data/bin/lib/Image/ExifTool/OpenEXR.pm +32 -15
  26. data/bin/lib/Image/ExifTool/PNG.pm +80 -2
  27. data/bin/lib/Image/ExifTool/Photoshop.pm +36 -5
  28. data/bin/lib/Image/ExifTool/QuickTime.pm +18 -2
  29. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +25 -14
  30. data/bin/lib/Image/ExifTool/README +11 -2
  31. data/bin/lib/Image/ExifTool/Real.pm +2 -2
  32. data/bin/lib/Image/ExifTool/Sigma.pm +2 -1
  33. data/bin/lib/Image/ExifTool/Sony.pm +5 -1
  34. data/bin/lib/Image/ExifTool/TagLookup.pm +4667 -4624
  35. data/bin/lib/Image/ExifTool/TagNames.pod +400 -90
  36. data/bin/lib/Image/ExifTool/VCard.pm +19 -5
  37. data/bin/lib/Image/ExifTool/Writer.pl +36 -16
  38. data/bin/lib/Image/ExifTool.pm +92 -35
  39. data/bin/lib/Image/ExifTool.pod +54 -53
  40. data/bin/perl-Image-ExifTool.spec +18 -18
  41. data/lib/exiftool_vendored/version.rb +1 -1
  42. metadata +3 -2
@@ -9938,8 +9938,8 @@ my %noYes = ( 0 => 'No', 1 => 'Yes' );
9938
9938
  },
9939
9939
  },
9940
9940
  217 => { Name => 'MovieMultiSelector', %buttonsZ9, Unknown => 1}, # CSg2-h
9941
- 221 => { Name => 'MovieAFSpeed', ValueConv => '$val - 5', ValueConvInv => '$val + 6' }, # CSg6-a
9942
- 223 => { Name => 'MovieAFSpeedApply', rintConv => {0 => 'Always', 1 => 'Only During Recording'},}, # CSg6-b
9941
+ 221 => { Name => 'MovieAFSpeed', ValueConv => '$val - 5', ValueConvInv => '$val + 5' }, # CSg6-a
9942
+ 223 => { Name => 'MovieAFSpeedApply', PrintConv => {0 => 'Always', 1 => 'Only During Recording'},}, # CSg6-b
9943
9943
  225 => { # CSg7
9944
9944
  Name => 'MovieAFTrackingSensitivity',
9945
9945
  PrintConv => {
@@ -1512,7 +1512,7 @@ my %infoZSeries = (
1512
1512
  6 => 'None',
1513
1513
  },
1514
1514
  }],
1515
- 0x0ee => { Name => 'MovieAFSpeed', ValueConv => '$val - 6', ValueConvInv => '$val + 6' }, # CSg4-a (Z7_2)
1515
+ 0x0ee => { Name => 'MovieAFSpeed', ValueConv => '$val - 6', ValueConvInv => '$val + 6' }, # CSg4-a (Z7_2)
1516
1516
  0x0ef => { # CSg4-b (Z7_2)
1517
1517
  Name => 'MovieAFSpeedApply',
1518
1518
  PrintConv => {
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.79';
43
+ $VERSION = '2.80';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -116,6 +116,7 @@ my %olympusLensTypes = (
116
116
  '0 35 10' => 'Olympus M.Zuiko 100-400mm F5.0-6.3', #IB
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
+ '0 39 10' => 'Olympus M.Zuiko Digital ED 90mm F3.5 Macro IS Pro', #forum3833
119
120
  # Sigma lenses
120
121
  '1 01 00' => 'Sigma 18-50mm F3.5-5.6 DC', #8
121
122
  '1 01 10' => 'Sigma 30mm F2.8 EX DN', #NJ
@@ -3191,6 +3192,7 @@ my %indexInfo = (
3191
3192
  }
3192
3193
  ],
3193
3194
  # 0x31a Continuous AF parameters?
3195
+ # 0x31b ContinuousFocusMode? (ref forum78245)
3194
3196
  0x328 => { #PH
3195
3197
  Name => 'AFInfo',
3196
3198
  SubDirectory => { TagTable => 'Image::ExifTool::Olympus::AFInfo' },
@@ -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,
@@ -28,7 +28,7 @@ use strict;
28
28
  use vars qw($VERSION $AUTOLOAD $iptcDigestInfo %printFlags);
29
29
  use Image::ExifTool qw(:DataAccess :Utils);
30
30
 
31
- $VERSION = '1.67';
31
+ $VERSION = '1.68';
32
32
 
33
33
  sub ProcessPhotoshop($$$);
34
34
  sub WritePhotoshop($$$);
@@ -571,6 +571,13 @@ my %unicodeString = (
571
571
  ValueConv => '100 * $val / 255',
572
572
  PrintConv => 'sprintf("%d%%",$val)',
573
573
  },
574
+ _xvis => {
575
+ Name => 'LayerVisible',
576
+ Format => 'int8u',
577
+ List => 1,
578
+ ValueConv => '$val & 0x02',
579
+ PrintConv => { 0x02 => 'No', 0x00 => 'Yes' },
580
+ },
574
581
  # tags extracted from additional layer information (tag ID's are real)
575
582
  # - must be able to accommodate a blank entry to preserve the list ordering
576
583
  luni => {
@@ -589,6 +596,16 @@ my %unicodeString = (
589
596
  List => 1,
590
597
  Unknown => 1,
591
598
  },
599
+ lclr => {
600
+ Name => 'LayerColors',
601
+ Format => 'int16u',
602
+ Count => 1,
603
+ List => 1,
604
+ PrintConv => {
605
+ 0=>'None', 1=>'Red', 2=>'Orange', 3=>'Yellow',
606
+ 4=>'Green', 5=>'Blue', 6=>'Violet', 7=>'Gray',
607
+ },
608
+ },
592
609
  shmd => { # layer metadata (undocumented structure)
593
610
  # (for now, only extract layerTime. May also contain "layerXMP" --
594
611
  # it would be nice to decode this but I need a sample)
@@ -603,6 +620,13 @@ my %unicodeString = (
603
620
  ValueConv => 'length $val ? ConvertUnixTime($val,1) : ""',
604
621
  PrintConv => 'length $val ? $self->ConvertDateTime($val) : ""',
605
622
  },
623
+ lsct => {
624
+ Name => 'LayerSections',
625
+ Format => 'int32u',
626
+ Count => 1,
627
+ List => 1,
628
+ PrintConv => { 0 => 'Layer', 1 => 'Folder (open)', 2 => 'Folder (closed)', 3 => 'Divider' },
629
+ },
606
630
  );
607
631
 
608
632
  # tags extracted from ImageSourceData found in TIFF images (ref PH)
@@ -748,17 +772,16 @@ sub ProcessLayers($$$)
748
772
  my $pos = 0;
749
773
  return 0 if $dirLen < 2;
750
774
  $raf->Read($buff, 2) == 2 or return 0;
751
- my $num = Get16s(\$buff, 0);
775
+ my $num = Get16s(\$buff, 0); # number of layers
752
776
  $num = -$num if $num < 0; # (first channel is transparency data if negative)
753
777
  $et->VerboseDir('Layers', $num, $dirLen);
754
778
  $et->HandleTag($tagTablePtr, '_xcnt', $num, Start => $pos, Size => 2, %dinfo); # LayerCount
755
779
  my $oldIndent = $$et{INDENT};
756
780
  $$et{INDENT} .= '| ';
757
-
758
781
  $pos += 2;
759
782
  my $psb = $$et{IsPSB}; # is PSB format?
760
783
  my $psiz = $psb ? 8 : 4;
761
- for ($i=0; $i<$num; ++$i) {
784
+ for ($i=0; $i<$num; ++$i) { # process each layer
762
785
  $et->VPrint(0, $oldIndent.'+ [Layer '.($i+1)." of $num]\n");
763
786
  last if $pos + 18 > $dirLen;
764
787
  $raf->Read($buff, 18) == 18 or last;
@@ -776,6 +799,7 @@ sub ProcessLayers($$$)
776
799
  $sig =~ /^(8BIM|MIB8)$/ or last; # verify signature
777
800
  $et->HandleTag($tagTablePtr, '_xbnd', undef, Start => 4, Size => 4, %dinfo);
778
801
  $et->HandleTag($tagTablePtr, '_xopc', undef, Start => 8, Size => 1, %dinfo);
802
+ $et->HandleTag($tagTablePtr, '_xvis', undef, Start =>10, Size => 1, %dinfo);
779
803
  my $nxt = $pos + 16 + Get32u(\$buff, 12);
780
804
  $n = Get32u(\$buff, 16); # get size of layer mask data
781
805
  $pos += 20 + $n; # skip layer mask data
@@ -823,7 +847,7 @@ sub ProcessLayers($$$)
823
847
  $raf->Read($buff, $n) == $n or last;
824
848
  $dinfo{DataPos} = $pos;
825
849
  while ($count{$tag} < $i) {
826
- $et->HandleTag($tagTablePtr, $tag, '');
850
+ $et->HandleTag($tagTablePtr, $tag, $tag eq 'lsct' ? 0 : '');
827
851
  ++$count{$tag};
828
852
  }
829
853
  $et->HandleTag($tagTablePtr, $tag, undef, Start => 0, Size => $n, %dinfo);
@@ -840,6 +864,13 @@ sub ProcessLayers($$$)
840
864
  }
841
865
  $pos = $nxt;
842
866
  }
867
+ # pad lists if necessary to have an entry for each layer
868
+ foreach (sort keys %count) {
869
+ while ($count{$_} < $num) {
870
+ $et->HandleTag($tagTablePtr, $_, $_ eq 'lsct' ? 0 : '');
871
+ ++$count{$_};
872
+ }
873
+ }
843
874
  $$et{INDENT} = $oldIndent;
844
875
  return 1;
845
876
  }
@@ -419,6 +419,18 @@ my %channelLabel = (
419
419
  0x1ffff => 'Discrete_65535',
420
420
  );
421
421
 
422
+ my %qtFlags = ( #12
423
+ 0 => 'undef', 22 => 'unsigned int', 71 => 'float[2] size',
424
+ 1 => 'UTF-8', 23 => 'float', 72 => 'float[4] rect',
425
+ 2 => 'UTF-16', 24 => 'double', 74 => 'int64s',
426
+ 3 => 'ShiftJIS', 27 => 'BMP', 75 => 'int8u',
427
+ 4 => 'UTF-8 sort', 28 => 'QT atom', 76 => 'int16u',
428
+ 5 => 'UTF-16 sort', 65 => 'int8s', 77 => 'int32u',
429
+ 13 => 'JPEG', 66 => 'int16s', 78 => 'int64u',
430
+ 14 => 'PNG', 67 => 'int32s', 79 => 'double[3][3]',
431
+ 21 => 'signed int', 70 => 'float[2] point',
432
+ );
433
+
422
434
  # properties which don't get inherited from the parent
423
435
  my %dontInherit = (
424
436
  ispe => 1, # size of parent may be different
@@ -1159,7 +1171,10 @@ my %eeBox2 = (
1159
1171
  },
1160
1172
  {
1161
1173
  Name => 'GarminGPS',
1162
- Condition => '$$valPt=~/^\x9b\x63\x0f\x8d\x63\x74\x40\xec\x82\x04\xbc\x5f\xf5\x09\x17\x28/ and $$self{OPTIONS}{ExtractEmbedded}',
1174
+ Condition => q{
1175
+ $$valPt=~/^\x9b\x63\x0f\x8d\x63\x74\x40\xec\x82\x04\xbc\x5f\xf5\x09\x17\x28/ and
1176
+ $$self{OPTIONS}{ExtractEmbedded}
1177
+ },
1163
1178
  SubDirectory => {
1164
1179
  TagTable => 'Image::ExifTool::QuickTime::Stream',
1165
1180
  ProcessProc => \&ProcessGarminGPS,
@@ -9656,6 +9671,7 @@ ItemID: foreach $id (keys %$items) {
9656
9671
  }
9657
9672
  }
9658
9673
  $langInfo or $langInfo = $tagInfo;
9674
+ my $str = $qtFlags{$flags} ? " ($qtFlags{$flags})" : '';
9659
9675
  $et->VerboseInfo($tag, $langInfo,
9660
9676
  Value => ref $value ? $$value : $value,
9661
9677
  DataPt => \$val,
@@ -9664,7 +9680,7 @@ ItemID: foreach $id (keys %$items) {
9664
9680
  Size => $len,
9665
9681
  Format => $format,
9666
9682
  Index => $index,
9667
- Extra => sprintf(", Type='${type}', Flags=0x%x, Lang=0x%.4x",$flags,$lang),
9683
+ Extra => sprintf(", Type='${type}', Flags=0x%x%s, Lang=0x%.4x",$flags,$str,$lang),
9668
9684
  ) if $verbose;
9669
9685
  # use "Keys" in path instead of ItemList if this was defined by a Keys tag
9670
9686
  my $isKey = $$tagInfo{Groups} && $$tagInfo{Groups}{1} && $$tagInfo{Groups}{1} eq 'Keys';
@@ -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};
@@ -2915,6 +2924,7 @@ sub ProcessGarminGPS($$$)
2915
2924
  my $epoch = (66 * 365 + 17) * 24 * 3600; # time is relative to Jan 1, 1904
2916
2925
  my $scl = 180 / (32768 * 65536); # scaling factor for lat/lon
2917
2926
  $et->VerboseDir('GarminGPS');
2927
+ $$et{SET_GROUP1} = 'Garmin';
2918
2928
  while ($pos + 20 <= $dataLen) {
2919
2929
  $$et{DOC_NUM} = ++$$et{DOC_COUNT};
2920
2930
  my $time = Image::ExifTool::ConvertUnixTime(Get32u($dataPt, $pos) - $epoch) . 'Z';
@@ -2929,6 +2939,7 @@ sub ProcessGarminGPS($$$)
2929
2939
  $pos += 20;
2930
2940
  }
2931
2941
  delete $$et{DOC_NUM};
2942
+ delete $$et{SET_GROUP1};
2932
2943
  return 1;
2933
2944
  }
2934
2945
 
@@ -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
@@ -713,7 +720,7 @@ numerical, and generated automatically otherwise.
713
720
  BitShift are applied before evaluating RawConv.
714
721
 
715
722
  BitShift : [Mask tags only] Bit shift for Mask-ed values. If not
716
- specified, set to the number of trailing bits in the Mask.
723
+ specified, set to the number of trailing zero bits in Mask.
717
724
  When reading, the value is shifted right by this number of
718
725
  bits after the Mask is applied.
719
726
 
@@ -1003,7 +1010,9 @@ numerical, and generated automatically otherwise.
1003
1010
  current Base. This is a Perl expression which may use
1004
1011
  $valuePtr to represent the location of the tag value in the
1005
1012
  file, or $val for the value itself. If not specified, a Start
1006
- of '$valuePtr' is assumed.
1013
+ of '$valuePtr' is assumed. Subdirectories in BinaryData may
1014
+ also use $dirStart to represent the offset of the current
1015
+ directory start relative to the start of the data block.
1007
1016
 
1008
1017
  OffsetPt : [EXIF directories only] If specified, this is a Perl
1009
1018
  expression that gives the position of a 32-bit word in the
@@ -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
  }
@@ -19,7 +19,7 @@ use strict;
19
19
  use vars qw($VERSION %sigmaLensTypes);
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.32';
22
+ $VERSION = '1.33';
23
23
 
24
24
  # sigma LensType lookup (ref IB)
25
25
  %sigmaLensTypes = (
@@ -255,6 +255,7 @@ $VERSION = '1.32';
255
255
  0x6023 => 'Sigma 20mm F2 DG DN | C', #IB
256
256
  0x6025 => 'Sigma 20mm F1.4 DG DN | A', #IB
257
257
  0x6026 => 'Sigma 24mm F1.4 DG DN | A', #IB
258
+ 0x602c => "Sigma 50mm F1.4 DG DN | A (2023)", #IB
258
259
  0x8005 => 'Sigma 35mm F1.4 DG HSM | A', #PH (012)
259
260
  0x8009 => 'Sigma 18-35mm F1.8 DC HSM | A', #PH
260
261
  0x8900 => 'Sigma 70-300mm F4-5.6 DG OS', #PH (SD15)
@@ -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