exiftool_vendored 11.99.0 → 12.06.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.

Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +119 -2
  3. data/bin/MANIFEST +5 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +32 -32
  7. data/bin/exiftool +55 -50
  8. data/bin/lib/Image/ExifTool.pm +155 -109
  9. data/bin/lib/Image/ExifTool.pod +103 -77
  10. data/bin/lib/Image/ExifTool/AIFF.pm +2 -2
  11. data/bin/lib/Image/ExifTool/APE.pm +2 -2
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +11 -6
  13. data/bin/lib/Image/ExifTool/Canon.pm +2 -1
  14. data/bin/lib/Image/ExifTool/CanonCustom.pm +82 -16
  15. data/bin/lib/Image/ExifTool/DPX.pm +56 -2
  16. data/bin/lib/Image/ExifTool/DarwinCore.pm +16 -3
  17. data/bin/lib/Image/ExifTool/Exif.pm +15 -6
  18. data/bin/lib/Image/ExifTool/Font.pm +9 -2
  19. data/bin/lib/Image/ExifTool/GIF.pm +5 -0
  20. data/bin/lib/Image/ExifTool/GeoTiff.pm +2 -0
  21. data/bin/lib/Image/ExifTool/GoPro.pm +10 -1
  22. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  23. data/bin/lib/Image/ExifTool/ID3.pm +86 -12
  24. data/bin/lib/Image/ExifTool/Lang/de.pm +3 -1
  25. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  26. data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
  27. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  28. data/bin/lib/Image/ExifTool/Minolta.pm +3 -2
  29. data/bin/lib/Image/ExifTool/Nikon.pm +134 -15
  30. data/bin/lib/Image/ExifTool/Olympus.pm +34 -17
  31. data/bin/lib/Image/ExifTool/PNG.pm +14 -3
  32. data/bin/lib/Image/ExifTool/PPM.pm +5 -5
  33. data/bin/lib/Image/ExifTool/Panasonic.pm +147 -13
  34. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +33 -0
  35. data/bin/lib/Image/ExifTool/Parrot.pm +2 -1
  36. data/bin/lib/Image/ExifTool/Pentax.pm +2 -1
  37. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  38. data/bin/lib/Image/ExifTool/QuickTime.pm +204 -27
  39. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +355 -19
  40. data/bin/lib/Image/ExifTool/README +20 -19
  41. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  42. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  43. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  44. data/bin/lib/Image/ExifTool/Sony.pm +376 -11
  45. data/bin/lib/Image/ExifTool/TagLookup.pm +1949 -1872
  46. data/bin/lib/Image/ExifTool/TagNames.pod +329 -53
  47. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  48. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -0
  49. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +23 -15
  50. data/bin/lib/Image/ExifTool/Writer.pl +44 -21
  51. data/bin/lib/Image/ExifTool/XMP.pm +41 -4
  52. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  53. data/bin/lib/Image/ExifTool/ZISRAW.pm +123 -0
  54. data/bin/perl-Image-ExifTool.spec +31 -31
  55. data/lib/exiftool_vendored/version.rb +1 -1
  56. metadata +4 -3
@@ -18,7 +18,7 @@ use vars qw($VERSION);
18
18
  use Image::ExifTool qw(:DataAccess :Utils);
19
19
  use Image::ExifTool::ID3;
20
20
 
21
- $VERSION = '1.10';
21
+ $VERSION = '1.11';
22
22
 
23
23
  # information for time/date-based tags (time zero is Jan 1, 1904)
24
24
  my %timeInfo = (
@@ -73,12 +73,12 @@ my %timeInfo = (
73
73
  ProcessProc => \&Image::ExifTool::ID3::ProcessID3,
74
74
  },
75
75
  },
76
+ APPL => 'ApplicationData', # (first 4 bytes are the application signature)
76
77
  # SSND => 'SoundData',
77
78
  # MARK => 'Marker',
78
79
  # INST => 'Instrument',
79
80
  # MIDI => 'MidiData',
80
81
  # AESD => 'AudioRecording',
81
- # APPL => 'ApplicationSpecific',
82
82
  );
83
83
 
84
84
  %Image::ExifTool::AIFF::Common = (
@@ -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.05';
18
+ $VERSION = '1.06';
19
19
 
20
20
  # APE metadata blocks
21
21
  %Image::ExifTool::APE::Main = (
@@ -166,7 +166,7 @@ sub ProcessAPE($$)
166
166
  # look for the APE trailer footer...
167
167
  my $footPos = -32;
168
168
  # (...but before the ID3v1 trailer if it exists)
169
- $footPos -= 128 if $$et{DoneID3} == 2;
169
+ $footPos -= $$et{DoneID3} if $$et{DoneID3} > 1;
170
170
  $raf->Seek($footPos, 2) or return 1;
171
171
  $raf->Read($buff, 32) == 32 or return 1;
172
172
  $buff =~ /^APETAGEX/ or return 1;
@@ -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.35';
38
+ $VERSION = '3.37';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -415,7 +415,7 @@ IPTC group only in the standard location.
415
415
  },
416
416
  QuickTime => q{
417
417
  The QuickTime format is used for many different types of audio, video and
418
- image files (most notably, MOV/MP4 videos and HEIC/CR3 images). Exiftool
418
+ image files (most notably, MOV/MP4 videos and HEIC/CR3 images). ExifTool
419
419
  extracts standard meta information and a variety of audio, video and image
420
420
  parameters, as well as proprietary information written by many camera
421
421
  models. Tags with a question mark after their name are not extracted unless
@@ -444,10 +444,10 @@ country code to the tag name (eg. "ItemList:Artist-deu" or
444
444
  "ItemList::Artist-deu-DE"). Most
445
445
  L<UserData|Image::ExifTool::TagNames/QuickTime UserData Tags> tags support a
446
446
  language code, but without a country code. If no language code is specified
447
- when writing, alternate languages for the tag are deleted. Use the "und"
448
- language code to write the default language without deleting alternate
449
- languages. Note that "eng" is treated as a default language when reading,
450
- but not when writing.
447
+ when writing, the default language is written and alternate languages for
448
+ the tag are deleted. Use the "und" language code to write the default
449
+ language without deleting alternate languages. Note that "eng" is treated
450
+ as a default language when reading, but not when writing.
451
451
 
452
452
  According to the specification, integer-format QuickTime date/time tags
453
453
  should be stored as UTC. Unfortunately, digital cameras often store local
@@ -877,6 +877,11 @@ TagID: foreach $tagID (@keys) {
877
877
  $case{$lc} = $name;
878
878
  }
879
879
  my $format = $$tagInfo{Format};
880
+ # check TagID's to make sure they don't start with 'ID-'
881
+ my @grps = $et->GetGroup($tagInfo);
882
+ foreach (@grps) {
883
+ warn "Group name starts with 'ID-' for $short $name\n" if /^ID-/i;
884
+ }
880
885
  # validate Name (must not start with a digit or else XML output will not be valid;
881
886
  # must not start with a dash or exiftool command line may get confused)
882
887
  if ($name !~ /^[_A-Za-z][-\w]+$/ and
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.38';
91
+ $VERSION = '4.39';
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)
@@ -924,6 +924,7 @@ $VERSION = '4.38';
924
924
  0x80000428 => 'EOS-1D X Mark III', #IB
925
925
  0x80000432 => 'EOS Rebel T7 / 2000D / 1500D / Kiss X90', #IB
926
926
  0x80000433 => 'EOS RP',
927
+ 0x80000435 => 'EOS Rebel T8i / 850D / X10i', #JR/PH
927
928
  0x80000436 => 'EOS SL3 / 250D / Kiss X10', #25
928
929
  0x80000437 => 'EOS 90D', #IB
929
930
  0x80000520 => 'EOS D2000C', #IB
@@ -19,7 +19,7 @@ use Image::ExifTool qw(:DataAccess);
19
19
  use Image::ExifTool::Canon;
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.56';
22
+ $VERSION = '1.57';
23
23
 
24
24
  sub ProcessCanonCustom($$$);
25
25
  sub ProcessCanonCustom2($$$);
@@ -1326,9 +1326,15 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
1326
1326
  2 => 'Enable (ISO speed)',
1327
1327
  },
1328
1328
  },
1329
- 0x0109 => {
1329
+ 0x0109 => [{ # (1DXmkIII)
1330
1330
  Name => 'UsableShootingModes',
1331
- Count => 2, # (Count is 1 for 1DXmkIII -- need to decode this)
1331
+ Condition => '$count == 1',
1332
+ Count => 1,
1333
+ PrintConv => 'sprintf("Flags 0x%x",$val)',
1334
+ PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1335
+ },{
1336
+ Name => 'UsableShootingModes',
1337
+ Count => 2,
1332
1338
  PrintConv => [
1333
1339
  \%disableEnable,
1334
1340
  'sprintf("Flags 0x%x",$val)', # (M, Tv, Av, P, Bulb)
@@ -1337,10 +1343,16 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
1337
1343
  undef,
1338
1344
  '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1339
1345
  ],
1340
- },
1341
- 0x010a => {
1346
+ }],
1347
+ 0x010a => [{ # (1DXmkIII)
1342
1348
  Name => 'UsableMeteringModes',
1343
- Count => 2, # (Count is 1 for 1DXmkIII -- need to decode this)
1349
+ Condition => '$count == 1',
1350
+ Count => 1,
1351
+ PrintConv => 'sprintf("Flags 0x%x",$val)',
1352
+ PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1353
+ },{
1354
+ Name => 'UsableMeteringModes',
1355
+ Count => 2,
1344
1356
  PrintConv => [
1345
1357
  \%disableEnable,
1346
1358
  'sprintf("Flags 0x%x",$val)', # (evaluative,partial,spot,center-weighted average)
@@ -1349,7 +1361,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
1349
1361
  undef,
1350
1362
  '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1351
1363
  ],
1352
- },
1364
+ }],
1353
1365
  0x010b => {
1354
1366
  Name => 'ExposureModeInManual',
1355
1367
  PrintConv => {
@@ -2066,7 +2078,27 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2066
2078
  2 => 'Enable: Down with Set',
2067
2079
  },
2068
2080
  },
2069
- 0x0610 => {
2081
+ 0x0610 => [{ # (1DXmkIII)
2082
+ Name => 'ContinuousShootingSpeed',
2083
+ Condition => '$count == 6',
2084
+ Count => 6,
2085
+ PrintConv => [
2086
+ \%disableEnable,
2087
+ '"Hi $val"',
2088
+ '"Cont $val"',
2089
+ '"Lo $val"',
2090
+ '"Soft $val"',
2091
+ '"Soft LS $val"',
2092
+ ],
2093
+ PrintConvInv => [
2094
+ undef,
2095
+ '$val=~/(\d+)/ ? $1 : 0',
2096
+ '$val=~/(\d+)/ ? $1 : 0',
2097
+ '$val=~/(\d+)/ ? $1 : 0',
2098
+ '$val=~/(\d+)/ ? $1 : 0',
2099
+ '$val=~/(\d+)/ ? $1 : 0',
2100
+ ],
2101
+ },{ # others
2070
2102
  Name => 'ContinuousShootingSpeed',
2071
2103
  Count => 3,
2072
2104
  PrintConv => [
@@ -2079,7 +2111,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2079
2111
  '$val=~/(\d+)/ ? $1 : 0',
2080
2112
  '$val=~/(\d+)/ ? $1 : 0',
2081
2113
  ],
2082
- },
2114
+ }],
2083
2115
  0x0611 => {
2084
2116
  Name => 'ContinuousShotLimit',
2085
2117
  Count => 2,
@@ -2092,9 +2124,15 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2092
2124
  '$val=~/(\d+)/ ? $1 : 0',
2093
2125
  ],
2094
2126
  },
2095
- 0x0612 => { # (1DX)
2127
+ 0x0612 => [{ # (1DXmkIII)
2128
+ Name => 'RestrictDriveModes',
2129
+ Condition => '$count == 1',
2130
+ Count => 1,
2131
+ PrintConv => 'sprintf("Flags 0x%x",$val)',
2132
+ PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
2133
+ },{ # (1DX)
2096
2134
  Name => 'RestrictDriveModes',
2097
- Count => 2, # (Count is 1 for 1DXmkIII -- need to decode this)
2135
+ Count => 2,
2098
2136
  PrintConv => [
2099
2137
  \%disableEnable,
2100
2138
  'sprintf("Flags 0x%x",$val)', # (Single,Cont Hi,Cont Lo,Timer 10,Timer 2,Silent,Super Hi)
@@ -2103,7 +2141,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2103
2141
  undef,
2104
2142
  '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
2105
2143
  ],
2106
- },
2144
+ }],
2107
2145
  #### 4a) Operation
2108
2146
  0x0701 => [
2109
2147
  {
@@ -2458,7 +2496,21 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2458
2496
  },
2459
2497
  },
2460
2498
  ],
2461
- 0x080c => {
2499
+ 0x080c => [{ # (1DXmkIII)
2500
+ Name => 'TimerLength',
2501
+ Condition => '$count == 3',
2502
+ Count => 3,
2503
+ PrintConv => [
2504
+ '"6 s: $val"',
2505
+ '"16 s: $val"',
2506
+ '"After release: $val"',
2507
+ ],
2508
+ PrintConvInv => [
2509
+ '$val=~/(\d+)$/ ? $1 : 0',
2510
+ '$val=~/(\d+)$/ ? $1 : 0',
2511
+ '$val=~/(\d+)$/ ? $1 : 0',
2512
+ ],
2513
+ },{
2462
2514
  Name => 'TimerLength',
2463
2515
  Count => 4,
2464
2516
  PrintConv => [
@@ -2473,7 +2525,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2473
2525
  '$val=~/(\d+)$/ ? $1 : 0',
2474
2526
  '$val=~/(\d+)$/ ? $1 : 0',
2475
2527
  ],
2476
- },
2528
+ }],
2477
2529
  0x080d => {
2478
2530
  Name => 'ShortReleaseTimeLag',
2479
2531
  PrintConv => \%disableEnable,
@@ -2520,6 +2572,8 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2520
2572
  PrintConv => {
2521
2573
  0 => 'Cancel selected',
2522
2574
  1 => 'Erase selected',
2575
+ 2 => 'Erase RAW selected', # (1DXmkIII)
2576
+ 3 => 'Erase non-RAW selected', # (1DXmkIII)
2523
2577
  },
2524
2578
  },
2525
2579
  0x0814 => { # (5DS)
@@ -2595,7 +2649,7 @@ sub ProcessCanonCustom2($$$)
2595
2649
  my $recPos = $pos;
2596
2650
  my $recEnd = $pos + $recLen - 8;
2597
2651
  if ($recEnd > $end) {
2598
- $et->Warn('Corrupted CanonCustom2 group');
2652
+ $et->Warn("Corrupted CanonCustom2 group $recNum");
2599
2653
  return 0;
2600
2654
  }
2601
2655
  if ($verbose and not $write) {
@@ -2605,8 +2659,17 @@ sub ProcessCanonCustom2($$$)
2605
2659
  for ($i=0; $recPos + 8 < $recEnd; ++$i, $recPos+=4*$num) {
2606
2660
  $tag = Get32u($dataPt, $recPos);
2607
2661
  $num = Get32u($dataPt, $recPos + 4);
2662
+ my $nextRec = $recPos + 8 + $num * 4;
2663
+ last if $nextRec > $recEnd;
2664
+ # patch for EOS-1DXmkIII firmware 1.0.0 bug:
2665
+ if ($tag == 0x70c and $num == 0x66 and $nextRec + 8 < $recEnd) {
2666
+ my $tmp = Get32u($dataPt, $nextRec + 4);
2667
+ if ($tmp == 0x70f) {
2668
+ $et->Warn('Fixed incorrect CanonCustom tag 0x70c size', 1);
2669
+ ++$num; # (count should be one greater)
2670
+ }
2671
+ }
2608
2672
  $recPos += 8;
2609
- last if $recPos + $num * 4 > $recEnd;
2610
2673
  my $val = ReadValue($dataPt, $recPos, 'int32s', $num, $num * 4);
2611
2674
  if ($write) {
2612
2675
  # write new value
@@ -2638,6 +2701,9 @@ sub ProcessCanonCustom2($$$)
2638
2701
  }
2639
2702
  }
2640
2703
  }
2704
+ if ($i != $recCount) {
2705
+ $et->Warn('Missing '.($recCount-$i)." entries in CanonCustom2 group $recNum directory", 1);
2706
+ }
2641
2707
  $pos = $recEnd;
2642
2708
  }
2643
2709
  if ($pos != $end) {
@@ -6,6 +6,7 @@
6
6
  # Revisions: 2013-09-19 - P. Harvey created
7
7
  #
8
8
  # References: 1) http://www.cineon.com/ff_draft.php
9
+ # 2) Harry Mallon private communication
9
10
  #------------------------------------------------------------------------------
10
11
 
11
12
  package Image::ExifTool::DPX;
@@ -14,7 +15,7 @@ use strict;
14
15
  use vars qw($VERSION);
15
16
  use Image::ExifTool qw(:DataAccess :Utils);
16
17
 
17
- $VERSION = '1.03';
18
+ $VERSION = '1.04';
18
19
 
19
20
  # DPX tags
20
21
  %Image::ExifTool::DPX::Main = (
@@ -86,6 +87,56 @@ $VERSION = '1.03';
86
87
  156 => 'User-defined 8 component element',
87
88
  },
88
89
  },
90
+ 801 => { #2
91
+ Name => 'TransferCharacteristic',
92
+ Format => 'int8u',
93
+ PrintConv => {
94
+ 0 => 'User-defined',
95
+ 1 => 'Printing density',
96
+ 2 => 'Linear',
97
+ 3 => 'Logarithmic',
98
+ 4 => 'Unspecified video',
99
+ 5 => 'SMPTE 274M',
100
+ 6 => 'ITU-R 704-4',
101
+ 7 => 'ITU-R 601-5 system B or G (625)',
102
+ 8 => 'ITU-R 601-5 system M (525)',
103
+ 9 => 'Composite video (NTSC)',
104
+ 10 => 'Composite video (PAL)',
105
+ 11 => 'Z (depth) - linear',
106
+ 12 => 'Z (depth) - homogeneous',
107
+ 13 => 'SMPTE ADX',
108
+ 14 => 'ITU-R 2020 NCL',
109
+ 15 => 'ITU-R 2020 CL',
110
+ 16 => 'IEC 61966-2-4 xvYCC',
111
+ 17 => 'ITU-R 2100 NCL/PQ',
112
+ 18 => 'ITU-R 2100 ICtCp/PQ',
113
+ 19 => 'ITU-R 2100 NCL/HLG',
114
+ 20 => 'ITU-R 2100 ICtCp/HLG',
115
+ 21 => 'RP 431-2:2011 Gama 2.6',
116
+ 22 => 'IEC 61966-2-1 sRGB',
117
+ },
118
+ },
119
+ 802 => { #2
120
+ Name => 'ColorimetricSpecification',
121
+ Format => 'int8u',
122
+ PrintConv => {
123
+ 0 => 'User-defined',
124
+ 1 => 'Printing density',
125
+ 4 => 'Unspecified video',
126
+ 5 => 'SMPTE 274M',
127
+ 6 => 'ITU-R 704-4',
128
+ 7 => 'ITU-R 601-5 system B or G (625)',
129
+ 8 => 'ITU-R 601-5 system M (525)',
130
+ 9 => 'Composite video (NTSC)',
131
+ 10 => 'Composite video (PAL)',
132
+ 13 => 'SMPTE ADX',
133
+ 14 => 'ITU-R 2020',
134
+ 15 => 'P3D65',
135
+ 16 => 'P3DCI',
136
+ 17 => 'P3D60',
137
+ 18 => 'ACES',
138
+ },
139
+ },
89
140
  803 => { Name => 'BitDepth', Format => 'int8u' },
90
141
  820 => { Name => 'ImageDescription', Format => 'string[32]' },
91
142
  892 => { Name => 'Image2Description', Format => 'string[32]', RawConv => '$val=~/[^\xff]/ ? $val : undef' },
@@ -106,9 +157,12 @@ $VERSION = '1.03';
106
157
  1556=> { Name => 'InputDeviceName', Format => 'string[32]' },
107
158
  1588=> { Name => 'InputDeviceSerialNumber', Format => 'string[32]' },
108
159
  # 1620=> { Name => 'AspectRatio', Format => 'int32u' },
109
- 1724 => { Name => 'FrameRate', Format => 'float' },
160
+ 1724 => { Name => 'OriginalFrameRate',Format => 'float' },
161
+ 1728 => { Name => 'ShutterAngle', Format => 'float', RawConv => '$val =~ /\d/ ? $val : undef' }, #2
110
162
  1732 => { Name => 'FrameID', Format => 'string[32]' },
111
163
  1764 => { Name => 'SlateInformation', Format => 'string[100]' },
164
+ 1920 => { Name => 'TimeCode', Format => 'int32u' }, #2
165
+ 1940 => { Name => 'FrameRate', Format => 'float', RawConv => '$val =~ /\d/ ? $val : undef' }, #2
112
166
  1972 => { Name => 'Reserved5', Format => 'string[76]', Unknown => 1 },
113
167
  2048 => { Name => 'UserID', Format => 'string[32]' },
114
168
  );
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool::XMP;
17
17
 
18
- $VERSION = '1.02';
18
+ $VERSION = '1.04';
19
19
 
20
20
  my %dateTimeInfo = (
21
21
  # NOTE: Do NOT put "Groups" here because Groups hash must not be common!
@@ -28,7 +28,7 @@ my %dateTimeInfo = (
28
28
  my %materialSample = (
29
29
  STRUCT_NAME => 'DarwinCore MaterialSample',
30
30
  NAMESPACE => 'dwc',
31
- materialSampleID => { },
31
+ materialSampleID => { },
32
32
  );
33
33
 
34
34
  my %event = (
@@ -40,7 +40,20 @@ my %event = (
40
40
  eventDate => { %dateTimeInfo, Groups => { 2 => 'Time' } },
41
41
  eventID => { },
42
42
  eventRemarks => { Writable => 'lang-alt' },
43
- eventTime => { %dateTimeInfo, Groups => { 2 => 'Time' } },
43
+ eventTime => {
44
+ Groups => { 2 => 'Time' },
45
+ Writable => 'string', # (so we can format this ourself)
46
+ Shift => 'Time',
47
+ # (pass straight through if this isn't a full date/time value)
48
+ ValueConv => 'Image::ExifTool::XMP::ConvertXMPDate($val)',
49
+ PrintConv => '$self->ConvertDateTime($val)',
50
+ ValueConvInv => 'Image::ExifTool::XMP::FormatXMPDate($val) or $val',
51
+ PrintConvInv => q{
52
+ my $v = $self->InverseDateTime($val,undef,1);
53
+ undef $Image::ExifTool::evalWarning;
54
+ return $v || $val;
55
+ },
56
+ },
44
57
  fieldNotes => { },
45
58
  fieldNumber => { },
46
59
  habitat => { },
@@ -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.30';
59
+ $VERSION = '4.31';
60
60
 
61
61
  sub ProcessExif($$$);
62
62
  sub WriteExif($$$);
@@ -4715,8 +4715,8 @@ my %subSecConv = (
4715
4715
  },
4716
4716
  LensID => {
4717
4717
  Groups => { 2 => 'Camera' },
4718
- Require => 'LensType',
4719
4718
  Desire => {
4719
+ 0 => 'LensType',
4720
4720
  1 => 'FocalLength',
4721
4721
  2 => 'MaxAperture',
4722
4722
  3 => 'MaxApertureValue',
@@ -4735,16 +4735,25 @@ my %subSecConv = (
4735
4735
  Applies only to LensType values with a lookup table. May be configured
4736
4736
  by adding user-defined lenses
4737
4737
  },
4738
- # this LensID is only valid if the LensType has a PrintConv or is a model name
4738
+ # this LensID is only valid if the LensType has a PrintConv,
4739
+ # or LensType or LensModel are the model name
4739
4740
  RawConv => q{
4740
4741
  my $printConv = $$self{TAG_INFO}{LensType}{PrintConv};
4741
- return $val if ref $printConv eq 'HASH' or (ref $printConv eq 'ARRAY' and
4742
- ref $$printConv[0] eq 'HASH') or $val[0] =~ /(mm|\d\/F)/;
4742
+ return $val if ref $printConv eq 'HASH' or
4743
+ (ref $printConv eq 'ARRAY' and ref $$printConv[0] eq 'HASH') or
4744
+ (defined $val[0] and $val[0] =~ /(mm|\d\/F)/) or
4745
+ (defined $val[6] and $val[6] =~ /(mm|\d\/F)/);
4743
4746
  return undef;
4744
4747
  },
4745
- ValueConv => '$val',
4748
+ ValueConv => '$val[0] || $val[6]',
4746
4749
  PrintConv => q{
4747
4750
  my $pcv;
4751
+ # use LensModel ([6]) if LensType ([0]) is not populated
4752
+ # (iPhone populates LensModel but not LensType)
4753
+ if (not defined $val[0] and defined $val[6]) {
4754
+ $val[0] = $val[6];
4755
+ $prt[0] = $prt[6];
4756
+ }
4748
4757
  # use LensType2 instead of LensType if available and valid (Sony E-mount lenses)
4749
4758
  # (0x8000 or greater; 0 for several older/3rd-party E-mount lenses)
4750
4759
  if (defined $val[9] and ($val[9] & 0x8000 or $val[9] == 0)) {