exiftool_vendored 11.65.0 → 11.67.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of exiftool_vendored might be problematic. Click here for more details.

@@ -56,7 +56,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
56
56
  use Image::ExifTool qw(:DataAccess :Utils);
57
57
  use Image::ExifTool::MakerNotes;
58
58
 
59
- $VERSION = '4.22';
59
+ $VERSION = '4.23';
60
60
 
61
61
  sub ProcessExif($$$);
62
62
  sub WriteExif($$$);
@@ -2779,6 +2779,7 @@ my %sampleFormat = (
2779
2779
  0xafc3 => 'ExpandFilterLens', #JD (Opanda)
2780
2780
  0xafc4 => 'ExpandScanner', #JD (Opanda)
2781
2781
  0xafc5 => 'ExpandFlashLamp', #JD (Opanda)
2782
+ 0xb4c3 => { Name => 'HasselbladRawImage', Format => 'undef', Binary => 1 }, #IB
2782
2783
  #
2783
2784
  # Windows Media Photo / HD Photo (WDP/HDP) tags
2784
2785
  #
@@ -2941,6 +2942,16 @@ my %sampleFormat = (
2941
2942
  },
2942
2943
  PrintConvInv => '$val =~ /^PrintIM/ ? $val : undef', # quick validation
2943
2944
  },
2945
+ 0xc51b => { # (Hasselblad H3D)
2946
+ Name => 'HasselbladExif',
2947
+ Format => 'undef',
2948
+ RawConv => q{
2949
+ $$self{DOC_NUM} = ++$$self{DOC_COUNT};
2950
+ $self->ExtractInfo(\$val, { ReEntry => 1 });
2951
+ $$self{DOC_NUM} = 0;
2952
+ return undef;
2953
+ },
2954
+ },
2944
2955
  0xc573 => { #PH
2945
2956
  Name => 'OriginalFileName',
2946
2957
  Notes => 'used by some obscure software', # (possibly Swizzy Photosmacker?)
@@ -21,7 +21,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
21
21
  use Image::ExifTool::Exif;
22
22
  use Image::ExifTool::ASF; # for GetGUID()
23
23
 
24
- $VERSION = '1.37';
24
+ $VERSION = '1.38';
25
25
 
26
26
  sub ProcessFPX($$);
27
27
  sub ProcessFPXR($$$);
@@ -313,7 +313,8 @@ my %fpxFileType = (
313
313
  from DOC, PPT, XLS (Microsoft Word, PowerPoint and Excel) documents, VSD
314
314
  (Microsoft Visio) drawings, and FLA (Macromedia/Adobe Flash project) files
315
315
  since these are based on the same file format as FlashPix (the Windows
316
- Compound Binary File format). See
316
+ Compound Binary File format). Note that ExifTool identifies any
317
+ unrecognized Windows Compound Binary file as a FlashPix (FPX) file. See
317
318
  L<http://graphcomp.com/info/specs/livepicture/fpx.pdf> for the FlashPix
318
319
  specification.
319
320
  },
@@ -49,7 +49,7 @@ use vars qw($VERSION %minoltaLensTypes %minoltaTeleconverters %minoltaColorMode
49
49
  use Image::ExifTool qw(:DataAccess :Utils);
50
50
  use Image::ExifTool::Exif;
51
51
 
52
- $VERSION = '2.82';
52
+ $VERSION = '2.83';
53
53
 
54
54
  # Full list of product codes for Sony-compatible Minolta lenses
55
55
  # (ref http://www.kb.sony.com/selfservice/documentLink.do?externalId=C1000570)
@@ -236,7 +236,7 @@ $VERSION = '2.82';
236
236
  24 => 'Minolta/Sony AF 24-105mm F3.5-4.5 (D) or Sigma or Tamron Lens',
237
237
  # 24 => 'Sony 24-105mm F3.5-4.5 (SAL24105)', (ref JR)
238
238
  24.1 => 'Sigma 18-50mm F2.8',
239
- 24.2 => 'Sigma 17-70mm F2.8-4.5 (D)',
239
+ 24.2 => 'Sigma 17-70mm F2.8-4.5 DC Macro', # (changed "(D)" to "DC Macro", ref JR)
240
240
  24.3 => 'Sigma 20-40mm F2.8 EX DG Aspherical IF', #JD/22
241
241
  24.4 => 'Sigma 18-200mm F3.5-6.3 DC', #22
242
242
  24.5 => 'Sigma DC 18-125mm F4-5,6 D', #exiv2 0.23
@@ -342,7 +342,7 @@ $VERSION = '2.82';
342
342
  '128.11' => 'Sigma 24-70mm F2.8 IF EX DG HSM', #27
343
343
  '128.12' => 'Sigma 18-250mm F3.5-6.3 DC OS HSM', #27
344
344
  '128.13' => 'Sigma 17-50mm F2.8 EX DC HSM', #Exiv2
345
- '128.14' => 'Sigma 17-70mm F2.8-4 DC Macro HSM', #JR (OS Model C013, ref IB)
345
+ '128.14' => 'Sigma 17-70mm F2.8-4 DC Macro HSM', #JR (OS Model C013, ref IB) (but C013 doesn't have OS, ref JR)
346
346
  '128.15' => 'Sigma 150mm F2.8 EX DG OS HSM APO Macro', #Marcus Holland-Moritz
347
347
  '128.16' => 'Sigma 150-500mm F5-6.3 APO DG OS HSM', #IB
348
348
  '128.17' => 'Tamron AF 28-105mm F4-5.6 [IF]', #IB (Model 179D)
@@ -47,6 +47,7 @@
47
47
  # 34) Stewart Bennett private communication (D4S, D810)
48
48
  # 35) David Puschel private communication
49
49
  # 36) Hayo Baann (forum10207)
50
+ # 37) Tom Lachecki, private communication
50
51
  # IB) Iliah Borg private communication (LibRaw)
51
52
  # JD) Jens Duttke private communication
52
53
  # NJ) Niels Kristian Bech Jensen private communication
@@ -60,7 +61,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
60
61
  use Image::ExifTool::Exif;
61
62
  use Image::ExifTool::GPS;
62
63
 
63
- $VERSION = '3.70';
64
+ $VERSION = '3.71';
64
65
 
65
66
  sub LensIDConv($$$);
66
67
  sub ProcessNikonAVI($$$);
@@ -514,6 +515,7 @@ sub GetAFPointGrid($$;$);
514
515
  '48 3C 8E B0 3C 3C 4B 02' => 'Sigma APO 300-800mm F5.6 EX DG HSM',
515
516
  #
516
517
  '00 47 25 25 24 24 00 02' => 'Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)',
518
+ 'C8 54 44 44 0D 0D DF 46' => 'Tamron SP 35mm f/1.4 Di USD (F045)', #IB
517
519
  'E8 4C 44 44 14 14 DF 0E' => 'Tamron SP 35mm f/1.8 Di VC USD (F012)', #35
518
520
  'E7 4C 4C 4C 14 14 DF 0E' => 'Tamron SP 45mm f/1.8 Di VC USD (F013)',
519
521
  'F4 54 56 56 18 18 84 06' => 'Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)', #24
@@ -535,7 +537,7 @@ sub GetAFPointGrid($$;$);
535
537
  '00 36 1C 2D 34 3C 00 06' => 'Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF) (A13)',
536
538
  'E9 48 27 3E 24 24 DF 0E' => 'Tamron SP 15-30mm f/2.8 Di VC USD (A012)', #IB
537
539
  'CA 48 27 3E 24 24 DF 4E' => 'Tamron SP 15-30mm f/2.8 Di VC USD G2 (A041)', #IB
538
- 'EA 40 29 8E 2C 40 DF 0E' => 'Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)',
540
+ 'EA 40 29 8E 2C 40 DF 0E' => 'Tamron 16-300mm f/3.5-6.3 Di II VC PZD (B016)', # (removed AF designation, ref 37)
539
541
  '07 46 2B 44 24 30 03 02' => 'Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)',
540
542
  'CB 3C 2B 44 24 31 DF 46' => 'Tamron 17-35mm f/2.8-4 Di OSD (A037)', #IB
541
543
  '00 53 2B 50 24 24 00 06' => 'Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16)', #PH
@@ -546,12 +548,12 @@ sub GetAFPointGrid($$;$);
546
548
  '00 3F 2D 80 2C 40 00 06' => 'Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14)',
547
549
  '00 40 2D 80 2C 40 00 06' => 'Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)', #NJ
548
550
  'FC 40 2D 80 2C 40 DF 06' => 'Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)', #PH (NC)
549
- 'E6 40 2D 80 2C 40 DF 0E' => 'Tamron AF 18-200mm f/3.5-6.3 Di II VC (B018)', #Tanel
551
+ 'E6 40 2D 80 2C 40 DF 0E' => 'Tamron 18-200mm f/3.5-6.3 Di II VC (B018)', #Tanel (removed AF designation, ref 37)
550
552
  '00 40 2D 88 2C 40 62 06' => 'Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)',
551
553
  '00 40 2D 88 2C 40 00 06' => 'Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)', #JD
552
554
  'F5 40 2C 8A 2C 40 40 0E' => 'Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)',
553
555
  'F0 3F 2D 8A 2C 40 DF 0E' => 'Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)',
554
- 'E0 40 2D 98 2C 41 DF 4E' => 'Tamron AF 18-400mm f/3.5-6.3 Di II VC HLD (B028)',
556
+ 'E0 40 2D 98 2C 41 DF 4E' => 'Tamron 18-400mm f/3.5-6.3 Di II VC HLD (B028)', # (removed AF designation, ref 37)
555
557
  '07 40 2F 44 2C 34 03 02' => 'Tamron AF 19-35mm f/3.5-4.5 (A10)',
556
558
  '07 40 30 45 2D 35 03 02' => 'Tamron AF 19-35mm f/3.5-4.5 (A10)',
557
559
  '00 49 30 48 22 2B 00 02' => 'Tamron SP AF 20-40mm f/2.7-3.5 (166D)',
@@ -1589,14 +1589,14 @@ my %indexInfo = (
1589
1589
  Writable => 'int8u',
1590
1590
  Count => 6,
1591
1591
  Notes => q{
1592
- 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown. Only
1592
+ 6 numbers: 1. Make, 2. Unknown, 3. Model, 4. Sub-model, 5-6. Unknown. Only
1593
1593
  the Make, Model and Sub-model are used to identify the lens type
1594
1594
  },
1595
1595
  SeparateTable => 'LensType',
1596
1596
  # Have seen these values for the unknown numbers:
1597
- # 1: 0
1598
- # 4: 0, 2(Olympus lenses for which I have also seen 0 for this number)
1599
- # 5: 0, 16(new Lumix lenses)
1597
+ # 2: 0
1598
+ # 5: 0, 2(Olympus lenses for which I have also seen 0 for this number)
1599
+ # 6: 0, 16(new Lumix lenses)
1600
1600
  ValueConv => 'my @a=split(" ",$val); sprintf("%x %.2x %.2x",@a[0,2,3])',
1601
1601
  # set unknown values to zero when writing
1602
1602
  ValueConvInv => 'my @a=split(" ",$val); hex($a[0])." 0 ".hex($a[1])." ".hex($a[2])." 0 0"',
@@ -1661,7 +1661,7 @@ my %indexInfo = (
1661
1661
  Writable => 'int8u',
1662
1662
  Count => 6,
1663
1663
  Notes => q{
1664
- 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown. Only
1664
+ 6 numbers: 1. Make, 2. Unknown, 3. Model, 4. Sub-model, 5-6. Unknown. Only
1665
1665
  the Make and Model are used to identify the extender
1666
1666
  },
1667
1667
  ValueConv => 'my @a=split(" ",$val); sprintf("%x %.2x",@a[0,2])',
@@ -21,7 +21,7 @@ use vars qw($VERSION $AUTOLOAD $lastFetched);
21
21
  use Image::ExifTool qw(:DataAccess :Utils);
22
22
  require Exporter;
23
23
 
24
- $VERSION = '1.48';
24
+ $VERSION = '1.49';
25
25
 
26
26
  sub FetchObject($$$$);
27
27
  sub ExtractObject($$;$$);
@@ -271,6 +271,13 @@ my %supportedFilter = (
271
271
  %Image::ExifTool::PDF::ColorSpace = (
272
272
  DefaultRGB => {
273
273
  SubDirectory => { TagTable => 'Image::ExifTool::PDF::DefaultRGB' },
274
+ ConvertToDict => 1, # (not seen yet, but just in case)
275
+ },
276
+ DefaultCMYK => {
277
+ SubDirectory => { TagTable => 'Image::ExifTool::PDF::DefaultRGB' },
278
+ # hack: this is stored as an array instead of a dictionary in my
279
+ # sample, so convert to a dictionary to extract the ICCBased element
280
+ ConvertToDict => 1,
274
281
  },
275
282
  Cs1 => {
276
283
  SubDirectory => { TagTable => 'Image::ExifTool::PDF::Cs1' },
@@ -1883,7 +1890,15 @@ sub ProcessDict($$$$;$$)
1883
1890
  # process the subdirectory
1884
1891
  my @subDicts;
1885
1892
  if (ref $val eq 'ARRAY') {
1886
- @subDicts = @{$val};
1893
+ # hack to convert array to dictionary if necessary
1894
+ if ($$tagInfo{ConvertToDict} and @$val == 2 and not ref $$val[0]) {
1895
+ my $tg = $$val[0];
1896
+ $tg =~ s(^/)(); # remove name
1897
+ my %dict = ( _tags => [ $tg ], $tg => $$val[1] );
1898
+ @subDicts = ( \%dict );
1899
+ } else {
1900
+ @subDicts = @{$val};
1901
+ }
1887
1902
  } else {
1888
1903
  @subDicts = ( $val );
1889
1904
  }
@@ -28,7 +28,7 @@ use strict;
28
28
  use vars qw($VERSION $AUTOLOAD $iptcDigestInfo);
29
29
  use Image::ExifTool qw(:DataAccess :Utils);
30
30
 
31
- $VERSION = '1.63';
31
+ $VERSION = '1.64';
32
32
 
33
33
  sub ProcessPhotoshop($$$);
34
34
  sub WritePhotoshop($$$);
@@ -675,9 +675,18 @@ sub ProcessLayersAndMask($$$)
675
675
  # check for Lr16 block if layers length is 0 (ref https://forums.adobe.com/thread/1540914)
676
676
  if ($len == 0 and $num == 0) {
677
677
  $raf->Read($data,10) == 10 or return 0;
678
- if ($data =~/^..8BIMLr16/s) {
678
+ if ($data =~ /^..8BIMLr16/s) {
679
679
  $raf->Read($data, $psiz+2) == $psiz+2 or return 0;
680
680
  $len = $psb ? Get64u(\$data, 0) : Get32u(\$data, 0);
681
+ } elsif ($data =~ /^..8BIMMt16/s) { # (have seen Mt16 before Lr16, ref PH)
682
+ $raf->Read($data, $psiz) == $psiz or return 0;
683
+ $raf->Read($data, 8) == 8 or return 0;
684
+ if ($data eq '8BIMLr16') {
685
+ $raf->Read($data, $psiz+2) == $psiz+2 or return 0;
686
+ $len = $psb ? Get64u(\$data, 0) : Get32u(\$data, 0);
687
+ } else {
688
+ $raf->Seek(-18-$psiz, 1) or return 0;
689
+ }
681
690
  } else {
682
691
  $raf->Seek(-10, 1) or return 0;
683
692
  }
@@ -1692,8 +1692,8 @@ sub ProcessINSVTrailer($)
1692
1692
  ($a[7] eq 'E' or $a[7] eq 'W');
1693
1693
  $$et{DOC_NUM} = ++$$et{DOC_COUNT};
1694
1694
  $a[$_] = GetDouble(\$a[$_], 0) foreach 4,6,8,9,10;
1695
- $a[4] *= -abs($a[4]) if $a[5] eq 'S'; # (abs just in case it was already signed)
1696
- $a[6] *= -abs($a[6]) if $a[7] eq 'W';
1695
+ $a[4] = -abs($a[4]) if $a[5] eq 'S'; # (abs just in case it was already signed)
1696
+ $a[6] = -abs($a[6]) if $a[7] eq 'W';
1697
1697
  $et->HandleTag($tagTbl, GPSDateTime => Image::ExifTool::ConvertUnixTime($a[0]) . 'Z');
1698
1698
  $et->HandleTag($tagTbl, GPSLatitude => $a[4]);
1699
1699
  $et->HandleTag($tagTbl, GPSLongitude => $a[6]);
@@ -29,7 +29,7 @@ use strict;
29
29
  use vars qw($VERSION);
30
30
  use Image::ExifTool qw(:DataAccess :Utils);
31
31
 
32
- $VERSION = '1.53';
32
+ $VERSION = '1.54';
33
33
 
34
34
  sub ConvertTimecode($);
35
35
  sub ProcessSGLT($$$);
@@ -534,6 +534,12 @@ my %code2charset = (
534
534
  ProcessProc => \&ProcessSLLT,
535
535
  },
536
536
  },
537
+ iXML => { #PH
538
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::XML' },
539
+ },
540
+ aXML => { #PH
541
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::XML' },
542
+ },
537
543
  #
538
544
  # tags found in an AlphaImagingTech AVI video - PH
539
545
  #
@@ -631,7 +637,11 @@ my %code2charset = (
631
637
  Name => 'BWFVersion',
632
638
  Format => 'int16u',
633
639
  },
634
- # 348 - int8u[64] - SMPTE 330M UMID (Unique Material Identifier)
640
+ 348 => {
641
+ Name => 'BWF_UMID',
642
+ Format => 'undef[64]',
643
+ ValueConv => '$_=unpack("H*",$val); s/0{64}$//; uc $_',
644
+ },
635
645
  # 412 - int8u[190] - reserved
636
646
  602 => {
637
647
  Name => 'CodingHistory',
@@ -19,7 +19,7 @@ use vars qw($VERSION);
19
19
  use Image::ExifTool qw(:DataAccess :Utils);
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.33';
22
+ $VERSION = '1.34';
23
23
 
24
24
  sub ProcessRicohText($$$);
25
25
  sub ProcessRicohRMETA($$$);
@@ -330,9 +330,13 @@ my %ricohLensIDs = (
330
330
  },
331
331
  },
332
332
  0x1018 => { #3
333
- Name => 'CropMode35mm',
333
+ Name => 'CropMode',
334
334
  Writable => 'int16u',
335
- PrintConv => { 0 => 'Off', 1 => 'On' },
335
+ PrintConv => {
336
+ 0 => 'Off',
337
+ 1 => 'On (35mm)',
338
+ 2 => 'On (47mm)', #IB
339
+ },
336
340
  },
337
341
  0x1019 => { #3
338
342
  Name => 'NDFilter',
@@ -22,10 +22,11 @@ use vars qw($VERSION %samsungLensTypes);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
  use Image::ExifTool::Exif;
24
24
 
25
- $VERSION = '1.46';
25
+ $VERSION = '1.47';
26
26
 
27
27
  sub WriteSTMN($$$);
28
28
  sub ProcessINFO($$$);
29
+ sub ProcessSamsungMeta($$$);
29
30
  sub ProcessSamsungIFD($$$);
30
31
 
31
32
  # Samsung LensType lookup
@@ -979,43 +980,91 @@ my %formatMinMax = (
979
980
  '0x0ab1' => { Name => 'DepthMapData', Binary => 1 },
980
981
  # 0x0ab3-name - seen 'DualShot_Extra_Info' (SM-N950U)
981
982
  '0x0ab3' => { # (SM-N950U)
982
- Name => 'DualShotInfo',
983
- SubDirectory => { TagTable => 'Image::ExifTool::Samsung::DualShotInfo' },
983
+ Name => 'DualShotExtra',
984
+ SubDirectory => { TagTable => 'Image::ExifTool::Samsung::DualShotExtra' },
984
985
  },
985
986
  # 0x0ac0-name - seen 'ZoomInOut_Info' (SM-N950U)
986
987
  # 0x0ac0 - 2048 bytes of interesting stuff including firmware version? (SM-N950U)
988
+ '0x0b40' => { # (SM-N975X front camera)
989
+ Name => 'SingleShotMeta',
990
+ SubDirectory => { TagTable => 'Image::ExifTool::Samsung::SingleShotMeta' },
991
+ },
992
+ # 0x0b41-name - seen 'SingeShot_DepthMap_1' (Yes, "Singe") (SM-N975X front camera)
993
+ '0x0b41' => { Name => 'SingleShotDepthMap', Binary => 1 },
987
994
  # 0xa050-name - seen 'Jpeg360_2D_Info' (Samsung Gear 360)
988
995
  # 0xa050 - seen 'Jpeg3602D' (Samsung Gear 360)
989
996
  );
990
997
 
991
998
  # DualShot Extra Info (ref PH)
992
- %Image::ExifTool::Samsung::DualShotInfo = (
999
+ %Image::ExifTool::Samsung::DualShotExtra = (
993
1000
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
994
1001
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
995
1002
  FIRST_ENTRY => 0,
996
1003
  FORMAT => 'int32u',
1004
+ NOTES => 'These tags tested only for DualShotVersion numbers 1, 4 and 5.',
997
1005
  0 => {
998
- Name => 'DualShotInfoVersion', # (NC)
1006
+ Name => 'DualShotVersion',
999
1007
  Format => 'int16u',
1000
- RawConv => '$$self{DualShotInfoVersion} = $val; undef',
1001
- Hidden => 1,
1008
+ RawConv => '$$self{DualShotVersion} = $val',
1002
1009
  },
1003
1010
  9 => {
1004
1011
  Name => 'DepthMapWidth',
1005
- Condition => '$$self{DualShotInfoVersion} < 4', # (tested only with versions: 1,4)
1012
+ Condition => '$$self{DualShotVersion} < 4',
1006
1013
  },
1007
1014
  10 => {
1008
1015
  Name => 'DepthMapHeight',
1009
- Condition => '$$self{DualShotInfoVersion} < 4', # (tested only with versions: 1,4)
1016
+ Condition => '$$self{DualShotVersion} < 4',
1010
1017
  },
1011
1018
  16 => {
1012
1019
  Name => 'DepthMapWidth',
1013
- Condition => '$$self{DualShotInfoVersion} >= 4', # (tested only with versions: 1,4)
1020
+ Condition => '$$self{DualShotVersion} == 4',
1014
1021
  },
1015
1022
  17 => {
1016
1023
  Name => 'DepthMapHeight',
1017
- Condition => '$$self{DualShotInfoVersion} >= 4', # (tested only with versions: 1,4)
1024
+ Condition => '$$self{DualShotVersion} == 4',
1018
1025
  },
1026
+ 18 => {
1027
+ Name => 'DepthMapWidth',
1028
+ Condition => '$$self{DualShotVersion} > 4',
1029
+ },
1030
+ 19 => {
1031
+ Name => 'DepthMapHeight',
1032
+ Condition => '$$self{DualShotVersion} > 4',
1033
+ },
1034
+ );
1035
+
1036
+ # SingleShot Meta Info (ref PH) (SM-N975X front camera)
1037
+ %Image::ExifTool::Samsung::SingleShotMeta = (
1038
+ PROCESS_PROC => \&ProcessSamsungMeta,
1039
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
1040
+ inputWidth => { },
1041
+ inputHeight => { },
1042
+ outputWidth => { },
1043
+ outputHeight => { },
1044
+ segWidth => { },
1045
+ segHeight => { },
1046
+ depthSWWidth => { },
1047
+ depthSWHeight => { },
1048
+ depthHWWidth => { },
1049
+ depthHWHeight => { },
1050
+ flipStatus => { },
1051
+ lensFacing => { },
1052
+ deviceOrientation => { },
1053
+ objectOrientation => { },
1054
+ isArtBokeh => { },
1055
+ beautyRetouchLevel => { },
1056
+ beautyColorLevel => { },
1057
+ effectType => { },
1058
+ effectStrength => { },
1059
+ blurStrength => { },
1060
+ spinStrength => { },
1061
+ zoomStrength => { },
1062
+ colorpopStrength => { },
1063
+ monoStrength => { },
1064
+ sidelightStrength => { },
1065
+ vintageStrength => { },
1066
+ bokehShape => { },
1067
+ perfMode => { },
1019
1068
  );
1020
1069
 
1021
1070
  # Samsung composite tags
@@ -1044,7 +1093,19 @@ my %formatMinMax = (
1044
1093
  my $tiff = MakeTiffHeader($val[1],$val[2],1,8) . ${$val[0]};
1045
1094
  return \$tiff;
1046
1095
  },
1047
- }
1096
+ },
1097
+ SingleShotDepthMapTiff => {
1098
+ Require => {
1099
+ 0 => 'SingleShotDepthMap',
1100
+ 1 => 'SegWidth',
1101
+ 2 => 'SegHeight',
1102
+ },
1103
+ ValueConv => q{
1104
+ return undef unless length ${$val[0]} == $val[1] * $val[2];
1105
+ my $tiff = MakeTiffHeader($val[1],$val[2],1,8) . ${$val[0]};
1106
+ return \$tiff;
1107
+ },
1108
+ },
1048
1109
  );
1049
1110
 
1050
1111
  # add our composite tags
@@ -1113,6 +1174,54 @@ sub ProcessINFO($$$)
1113
1174
  return 1;
1114
1175
  }
1115
1176
 
1177
+ #------------------------------------------------------------------------------
1178
+ # Read Samsung Meta Info from trailer
1179
+ # Inputs: 0) ExifTool object ref, 1) source dirInfo ref, 2) tag table ref
1180
+ # Returns: true on success
1181
+ sub ProcessSamsungMeta($$$)
1182
+ {
1183
+ my ($et, $dirInfo, $tagTablePtr) = @_;
1184
+ my $dirName = $$dirInfo{DirName};
1185
+ my $dataPt = $$dirInfo{DataPt};
1186
+ my $pos = $$dirInfo{DirStart};
1187
+ my $end = $$dirInfo{DirLen} + $pos;
1188
+ unless ($pos + 8 <= $end and substr($$dataPt, $pos, 4) eq 'DOFS') {
1189
+ $et->Warn("Unrecognized $dirName data");
1190
+ return 0;
1191
+ }
1192
+ my $ver = Get32u($dataPt, $pos + 4);
1193
+ if ($ver == 3) {
1194
+ unless ($pos + 18 <= $end and Get32u($dataPt, $pos + 12) == $$dirInfo{DirLen}) {
1195
+ $et->Warn("Unrecognized $dirName version $ver data");
1196
+ return 0;
1197
+ }
1198
+ my $num = Get16u($dataPt, $pos + 16);
1199
+ $et->VerboseDir("$dirName version $ver", $num);
1200
+ $pos += 18;
1201
+ my ($i, $val);
1202
+ for ($i=0; $i<$num; ++$i) {
1203
+ last if $pos + 2 > $end;
1204
+ my ($x, $n) = unpack("x${pos}CC", $$dataPt);
1205
+ $pos += 2;
1206
+ last if $pos + $n + 2 > $end;
1207
+ my $tag = substr($$dataPt, $pos, $n);
1208
+ my $len = Get16u($dataPt, $pos + $n);
1209
+ $pos += $n + 2;
1210
+ last if $pos + $len > $end;
1211
+ if ($len == 4) {
1212
+ $val = Get32u($dataPt, $pos);
1213
+ } else {
1214
+ my $tmp = substr($$dataPt, $pos, $len);
1215
+ $val = \$pos;
1216
+ }
1217
+ $et->HandleTag($tagTablePtr, $tag, $val);
1218
+ $pos += $len;
1219
+ }
1220
+ $et->Warn("Unexpected end of $dirName version $ver $i $num data") if $i < $num;
1221
+ }
1222
+ return 1;
1223
+ }
1224
+
1116
1225
  #------------------------------------------------------------------------------
1117
1226
  # Inputs: 0) ExifTool object ref, 1) source dirInfo ref, 2) tag table ref
1118
1227
  # Returns: true on success