exiftool_vendored 12.82.0 → 12.85.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +59 -0
  3. data/bin/MANIFEST +2 -18
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +47 -46
  7. data/bin/build_geolocation +945 -0
  8. data/bin/config_files/example.config +2 -2
  9. data/bin/exiftool +75 -51
  10. data/bin/fmt_files/gpx.fmt +2 -1
  11. data/bin/fmt_files/gpx_wpt.fmt +2 -1
  12. data/bin/lib/Image/ExifTool/Apple.pm +52 -7
  13. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +5 -2
  14. data/bin/lib/Image/ExifTool/Canon.pm +11 -2
  15. data/bin/lib/Image/ExifTool/CanonVRD.pm +18 -5
  16. data/bin/lib/Image/ExifTool/DJI.pm +29 -0
  17. data/bin/lib/Image/ExifTool/DPX.pm +3 -3
  18. data/bin/lib/Image/ExifTool/Exif.pm +19 -2
  19. data/bin/lib/Image/ExifTool/GM.pm +17 -8
  20. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  21. data/bin/lib/Image/ExifTool/Geolocation.pm +170 -104
  22. data/bin/lib/Image/ExifTool/Geotag.pm +18 -10
  23. data/bin/lib/Image/ExifTool/ID3.pm +28 -6
  24. data/bin/lib/Image/ExifTool/Nikon.pm +25 -6
  25. data/bin/lib/Image/ExifTool/Pentax.pm +64 -13
  26. data/bin/lib/Image/ExifTool/QuickTime.pm +26 -7
  27. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +5 -0
  28. data/bin/lib/Image/ExifTool/Sony.pm +15 -6
  29. data/bin/lib/Image/ExifTool/TagLookup.pm +3557 -3540
  30. data/bin/lib/Image/ExifTool/TagNames.pod +61 -13
  31. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +4 -2
  32. data/bin/lib/Image/ExifTool/Writer.pl +166 -134
  33. data/bin/lib/Image/ExifTool/XMP.pm +2 -0
  34. data/bin/lib/Image/ExifTool/XMP2.pl +3 -0
  35. data/bin/lib/Image/ExifTool.pm +59 -27
  36. data/bin/lib/Image/ExifTool.pod +88 -71
  37. data/bin/perl-Image-ExifTool.spec +45 -45
  38. data/lib/exiftool_vendored/version.rb +1 -1
  39. metadata +3 -20
  40. data/bin/lib/Image/ExifTool/GeoLang/cs.pm +0 -978
  41. data/bin/lib/Image/ExifTool/GeoLang/de.pm +0 -1975
  42. data/bin/lib/Image/ExifTool/GeoLang/en_ca.pm +0 -44
  43. data/bin/lib/Image/ExifTool/GeoLang/en_gb.pm +0 -124
  44. data/bin/lib/Image/ExifTool/GeoLang/es.pm +0 -2921
  45. data/bin/lib/Image/ExifTool/GeoLang/fi.pm +0 -1116
  46. data/bin/lib/Image/ExifTool/GeoLang/fr.pm +0 -3171
  47. data/bin/lib/Image/ExifTool/GeoLang/it.pm +0 -2750
  48. data/bin/lib/Image/ExifTool/GeoLang/ja.pm +0 -10256
  49. data/bin/lib/Image/ExifTool/GeoLang/ko.pm +0 -4499
  50. data/bin/lib/Image/ExifTool/GeoLang/nl.pm +0 -1270
  51. data/bin/lib/Image/ExifTool/GeoLang/pl.pm +0 -3019
  52. data/bin/lib/Image/ExifTool/GeoLang/ru.pm +0 -18220
  53. data/bin/lib/Image/ExifTool/GeoLang/sk.pm +0 -441
  54. data/bin/lib/Image/ExifTool/GeoLang/sv.pm +0 -714
  55. data/bin/lib/Image/ExifTool/GeoLang/tr.pm +0 -452
  56. data/bin/lib/Image/ExifTool/GeoLang/zh_cn.pm +0 -2225
  57. data/bin/lib/Image/ExifTool/GeoLang/zh_tw.pm +0 -72
@@ -15,6 +15,7 @@
15
15
  # 2019/11/10 - PH Also write pitch to CameraElevationAngle
16
16
  # 2020/12/01 - PH Added ability to read DJI CSV log files
17
17
  # 2022/06/21 - PH Added ability to read Google Takeout JSON files
18
+ # 2024/04/23 - PH Added ability to read more OpenTracks GPS tags
18
19
  #
19
20
  # References: 1) http://www.topografix.com/GPX/1/1/
20
21
  # 2) http://www.gpsinformation.org/dale/nmea.htm#GSA
@@ -29,7 +30,7 @@ use vars qw($VERSION);
29
30
  use Image::ExifTool qw(:Public);
30
31
  use Image::ExifTool::GPS;
31
32
 
32
- $VERSION = '1.75';
33
+ $VERSION = '1.76';
33
34
 
34
35
  sub JITTER() { return 2 } # maximum time jitter
35
36
 
@@ -66,6 +67,8 @@ my %xmlTag = (
66
67
  course => 'dir', # (written by Arduino)
67
68
  pitch => 'pitch', # (written by Arduino)
68
69
  roll => 'roll', # (written by Arduino)
70
+ speed => 'speed', # (OpenTrack gpx)
71
+ accuracy_horizontal => 'err',#(OpenTrack gpx)
69
72
  # XML containers (fix is reset at the opening tag of these properties)
70
73
  wpt => '', # GPX
71
74
  trkpt => '', # GPX
@@ -85,6 +88,7 @@ my %fixInfoKeys = (
85
88
  alt => [ 'alt' ],
86
89
  orient => [ 'dir', 'pitch', 'roll' ],
87
90
  atemp => [ 'atemp' ],
91
+ err => [ 'err' ],
88
92
  );
89
93
 
90
94
  my %isOrient = ( dir => 1, pitch => 1, roll => 1 ); # test for orientation key
@@ -346,8 +350,8 @@ sub LoadTrackLog($$;$)
346
350
  # validate altitude
347
351
  undef $$fix{alt} if defined $$fix{alt} and $$fix{alt} !~ /^[+-]?\d+\.?\d*/;
348
352
  $$has{alt} = 1 if $$fix{alt}; # set "has altitude" flag if appropriate
349
- } elsif ($tag eq 'atemp') {
350
- $$has{atemp} = 1;
353
+ } elsif ($tag eq 'atemp' or $tag eq 'speed' or $tag eq 'err') {
354
+ $$has{$tag} = 1;
351
355
  }
352
356
  }
353
357
  }
@@ -392,8 +396,8 @@ sub LoadTrackLog($$;$)
392
396
  # validate altitude
393
397
  undef $$fix{alt} if defined $$fix{alt} and $$fix{alt} !~ /^[+-]?\d+\.?\d*/;
394
398
  $$has{alt} = 1 if $$fix{alt}; # set "has altitude" flag if appropriate
395
- } elsif ($tag eq 'atemp') {
396
- $$has{atemp} = 1;
399
+ } elsif ($tag eq 'atemp' or $tag eq 'speed' or $tag eq 'err') {
400
+ $$has{$tag} = 1;
397
401
  }
398
402
  }
399
403
  }
@@ -1126,7 +1130,7 @@ sub SetGeoValues($$;$)
1126
1130
  # loop through available fix information categories
1127
1131
  # (pos, track, alt, orient)
1128
1132
  my ($category, $key);
1129
- Category: foreach $category (qw{pos track alt orient atemp}) {
1133
+ Category: foreach $category (qw{pos track alt orient atemp err}) {
1130
1134
  next unless $$has{$category};
1131
1135
  my ($f, $p0b, $p1b, $f0b);
1132
1136
  # loop through specific fix information keys
@@ -1236,10 +1240,11 @@ Category: foreach $category (qw{pos track alt orient atemp}) {
1236
1240
  @r = $et->SetNewValue(GPSLongitude => $$fix{lon}, %opts);
1237
1241
  @r = $et->SetNewValue(GPSAltitude => $gpsAlt, %opts);
1238
1242
  @r = $et->SetNewValue(GPSAltitudeRef => $gpsAltRef, %opts);
1239
- if ($$has{track}) {
1243
+ if ($$has{track} or $$has{speed}) {
1244
+ my $type = $$has{track} ? 'track' : 'speed';
1240
1245
  my $tFix = $fix;
1241
- if (not defined $$fix{track} and defined $iExt) {
1242
- my $p = FindFix($et,'track',$times,$points,$iExt,$iDir,$geoMaxExtSecs);
1246
+ if (not defined $$fix{$type} and defined $iExt) {
1247
+ my $p = FindFix($et,$type,$times,$points,$iExt,$iDir,$geoMaxExtSecs);
1243
1248
  $tFix = $p if $p;
1244
1249
  }
1245
1250
  @r = $et->SetNewValue(GPSTrack => $$tFix{track}, %opts);
@@ -1280,6 +1285,9 @@ Category: foreach $category (qw{pos track alt orient atemp}) {
1280
1285
  }
1281
1286
  @r = $et->SetNewValue(AmbientTemperature => $$tFix{atemp}, %opts);
1282
1287
  }
1288
+ if ($$has{err}) {
1289
+ @r = $et->SetNewValue(GPSHPositioningError => $$fix{err}, %opts);
1290
+ }
1283
1291
  unless ($xmp) {
1284
1292
  my ($latRef, $lonRef);
1285
1293
  $latRef = ($$fix{lat} > 0 ? 'N' : 'S') if defined $$fix{lat};
@@ -1305,7 +1313,7 @@ Category: foreach $category (qw{pos track alt orient atemp}) {
1305
1313
  GPSAltitude GPSAltitudeRef GPSDateStamp GPSTimeStamp GPSDateTime
1306
1314
  GPSTrack GPSTrackRef GPSSpeed GPSSpeedRef GPSImgDirection
1307
1315
  GPSImgDirectionRef GPSPitch GPSRoll CameraElevationAngle
1308
- AmbientTemperature GPSCoordinates))
1316
+ AmbientTemperature GPSHPositioningError GPSCoordinates))
1309
1317
  {
1310
1318
  my @r = $et->SetNewValue($_, undef, %opts);
1311
1319
  }
@@ -103,6 +103,14 @@ my %dateTimeConv = (
103
103
  },
104
104
  );
105
105
 
106
+ %Image::ExifTool::ID3::UserDefined = (
107
+ GROUPS => { 1 => 'UserDefined', 2 => 'Other' },
108
+ NOTES => q{
109
+ ID3 user-defined text and URL tags will be dynamically added to this table
110
+ by name when found.
111
+ },
112
+ );
113
+
106
114
  # Lyrics3 tags (ref 4)
107
115
  %Image::ExifTool::ID3::Lyrics3 = (
108
116
  GROUPS => { 1 => 'Lyrics3', 2 => 'Audio' },
@@ -493,7 +501,7 @@ my %genre = (
493
501
  TT2 => 'Title',
494
502
  TT3 => 'Subtitle',
495
503
  TXT => 'Lyricist',
496
- TXX => 'UserDefinedText',
504
+ TXX => { SubDirectory => { TagTable => 'Image::ExifTool::ID3::UserDefined' } },
497
505
  TYE => { Name => 'Year', Groups => { 2 => 'Time' } },
498
506
  ULT => 'Lyrics',
499
507
  WAF => 'FileURL',
@@ -502,7 +510,7 @@ my %genre = (
502
510
  WCM => 'CommercialURL',
503
511
  WCP => { Name => 'CopyrightURL', Groups => { 2 => 'Author' } },
504
512
  WPB => 'PublisherURL',
505
- WXX => 'UserDefinedURL',
513
+ WXX => { SubDirectory => { TagTable => 'Image::ExifTool::ID3::UserDefined' } },
506
514
  # the following written by iTunes 10.5 (ref PH)
507
515
  RVA => 'RelativeVolumeAdjustment',
508
516
  TST => 'TitleSortOrder',
@@ -605,7 +613,7 @@ my %id3v2_common = (
605
613
  TRSO => 'InternetRadioStationOwner',
606
614
  TSRC => 'ISRC', # (international standard recording code)
607
615
  TSSE => 'EncoderSettings',
608
- TXXX => 'UserDefinedText',
616
+ TXXX => { SubDirectory => { TagTable => 'Image::ExifTool::ID3::UserDefined' } },
609
617
  # UFID => 'UniqueFileID', (not extracted because it is long and nasty and not very useful)
610
618
  USER => 'TermsOfUse',
611
619
  USLT => 'Lyrics',
@@ -617,7 +625,7 @@ my %id3v2_common = (
617
625
  WORS => 'InternetRadioStationURL',
618
626
  WPAY => 'PaymentURL',
619
627
  WPUB => 'PublisherURL',
620
- WXXX => 'UserDefinedURL',
628
+ WXXX => { SubDirectory => { TagTable => 'Image::ExifTool::ID3::UserDefined' } },
621
629
  #
622
630
  # non-standard frames
623
631
  #
@@ -1247,7 +1255,14 @@ sub ProcessID3v2($$$)
1247
1255
  # two encoded strings separated by a null
1248
1256
  my @vals = DecodeString($et, $val);
1249
1257
  foreach (0..1) { $vals[$_] = '' unless defined $vals[$_]; }
1250
- ($val = "($vals[0]) $vals[1]") =~ s/^\(\) //;
1258
+ $vals[0] .= ' ' if $Image::ExifTool::specialTags{$vals[0]};
1259
+ my $tbl = GetTagTable('Image::ExifTool::ID3::UserDefined');
1260
+ unless (defined $$tbl{$vals[0]}) {
1261
+ my $name = Image::ExifTool::MakeTagName($vals[0]);
1262
+ AddTagToTable($tbl, $vals[0], $name, 1);
1263
+ }
1264
+ $et->HandleTag($tbl, $vals[0], $vals[1]);
1265
+ next;
1251
1266
  } elsif ($id =~ /^T/ or $id =~ /^(IPL|IPLS|GP1|MVI|MVN)$/) {
1252
1267
  $val = DecodeString($et, $val);
1253
1268
  } elsif ($id =~ /^(WXX|WXXX)$/) {
@@ -1265,7 +1280,14 @@ sub ProcessID3v2($$$)
1265
1280
  }
1266
1281
  $val = DecodeString($et, $val);
1267
1282
  $url =~ s/\0.*//s;
1268
- $val = length($val) ? "($val) $url" : $url;
1283
+ $val .= '_URL';
1284
+ my $tbl = GetTagTable('Image::ExifTool::ID3::UserDefined');
1285
+ unless (defined $$tbl{$val}) {
1286
+ my $name = Image::ExifTool::MakeTagName($val);
1287
+ AddTagToTable($tbl, $val, $name, 1);
1288
+ }
1289
+ $et->HandleTag($tbl, $val, $url);
1290
+ next;
1269
1291
  } elsif ($id =~ /^W/) {
1270
1292
  $val =~ s/\0.*//s; # truncate at null
1271
1293
  } elsif ($id =~ /^(COM|COMM|ULT|USLT)$/) {
@@ -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.32';
68
+ $VERSION = '4.34';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -5506,13 +5506,14 @@ my %nikonFocalConversions = (
5506
5506
  37 => 'Nikkor Z 600mm f/4 TC VR S', #28
5507
5507
  38 => 'Nikkor Z 85mm f/1.2 S', #28
5508
5508
  39 => 'Nikkor Z 17-28mm f/2.8', #IB
5509
- 40 => 'NIKKOR Z 26mm f/2.8', #28
5510
- 41 => 'NIKKOR Z DX 12-28mm f/3.5-5.6 PZ VR', #28
5509
+ 40 => 'Nikkor Z 26mm f/2.8', #28
5510
+ 41 => 'Nikkor Z DX 12-28mm f/3.5-5.6 PZ VR', #28
5511
5511
  42 => 'Nikkor Z 180-600mm f/5.6-6.3 VR', #30
5512
- 43 => 'NIKKOR Z DX 24mm f/1.7', #28
5513
- 44 => 'NIKKOR Z 70-180mm f/2.8', #28
5514
- 45 => 'NIKKOR Z 600mm f/6.3 VR S', #28
5512
+ 43 => 'Nikkor Z DX 24mm f/1.7', #28
5513
+ 44 => 'Nikkor Z 70-180mm f/2.8', #28
5514
+ 45 => 'Nikkor Z 600mm f/6.3 VR S', #28
5515
5515
  46 => 'Nikkor Z 135mm f/1.8 S Plena', #28
5516
+ 48 => 'Nikkor Z 28-400mm f/4-8 VR', #30
5516
5517
  32768 => 'Nikkor Z 400mm f/2.8 TC VR S TC-1.4x', #28
5517
5518
  32769 => 'Nikkor Z 600mm f/4 TC VR S TC-1.4x', #28
5518
5519
  },
@@ -13687,6 +13688,24 @@ sub ProcessNikonCaptureOffsets($$$)
13687
13688
  return $success;
13688
13689
  }
13689
13690
 
13691
+ #------------------------------------------------------------------------------
13692
+ # Read Nikon NKA file
13693
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref
13694
+ # Returns: 1 on success
13695
+ sub ProcessNKA($$)
13696
+ {
13697
+ my ($et, $dirInfo) = @_;
13698
+ my $raf = $$et{RAF};
13699
+ my $buff;
13700
+ $raf->Read($buff, 0x35) == 0x35 or return 0;
13701
+ my $len = unpack('x49V', $buff);
13702
+ $raf->Read($buff, $len) == $len or return 0;
13703
+ $et->SetFileType('NKA', 'application/x-nikon-nxstudio');
13704
+ my %dirInfo = ( DataPt => \$buff, DataPos => 0x35 );
13705
+ my $tagTablePtr = GetTagTable('Image::ExifTool::XMP::XML');
13706
+ return $et->ProcessDirectory(\%dirInfo, $tagTablePtr);
13707
+ }
13708
+
13690
13709
  #------------------------------------------------------------------------------
13691
13710
  # Read/write Nikon MakerNotes directory
13692
13711
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
@@ -58,7 +58,7 @@ use Image::ExifTool::Exif;
58
58
  use Image::ExifTool::GPS;
59
59
  use Image::ExifTool::HP;
60
60
 
61
- $VERSION = '3.46';
61
+ $VERSION = '3.47';
62
62
 
63
63
  sub CryptShutterCount($$);
64
64
  sub PrintFilter($$$);
@@ -2741,8 +2741,8 @@ my %binaryDataAttrs = (
2741
2741
  SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AEInfo2' },
2742
2742
  },{
2743
2743
  Name => 'AEInfo3',
2744
- # size: K-30=48
2745
- Condition => '$count == 48',
2744
+ # size: K-30=48, K-1mkII,K-70,KP=64
2745
+ Condition => '$count == 48 or $count == 64',
2746
2746
  SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AEInfo3' },
2747
2747
  },{
2748
2748
  Name => 'AEInfoUnknown',
@@ -2972,10 +2972,14 @@ my %binaryDataAttrs = (
2972
2972
  ByteOrder => 'BigEndian',
2973
2973
  },
2974
2974
  }],
2975
- 0x022b => { #PH (K-5)
2975
+ 0x022b => [{
2976
+ Name => 'LevelInfoK3III',
2977
+ Condition => '$$self{Model} eq "PENTAX K-3 Mark III"',
2978
+ SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LevelInfoK3III' },
2979
+ },{ #PH (K-5)
2976
2980
  Name => 'LevelInfo',
2977
2981
  SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LevelInfo' },
2978
- },
2982
+ }],
2979
2983
  # 0x022c - undef[46] (K-5)
2980
2984
  0x022d => { #28
2981
2985
  Name => 'WBLevels',
@@ -4034,7 +4038,10 @@ my %binaryDataAttrs = (
4034
4038
  %Image::ExifTool::Pentax::AEInfo3 = (
4035
4039
  %binaryDataAttrs,
4036
4040
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4037
- NOTES => 'Auto-exposure information for the K-3, K-30, K-50 and K-500.',
4041
+ NOTES => q{
4042
+ Auto-exposure information for the K-1mkII, K-3, K-30, K-50, K-70, K-500 and
4043
+ KP.
4044
+ },
4038
4045
  # instead of /8, should these be PentaxEv(), as in CameraSettings? - PH
4039
4046
  16 => {
4040
4047
  Name => 'AEExposureTime',
@@ -4060,6 +4067,7 @@ my %binaryDataAttrs = (
4060
4067
  PrintConv => 'int($val + 0.5)',
4061
4068
  PrintConvInv => '$val',
4062
4069
  },
4070
+ # 23 - bit 0 is related to LiveView, but it isn't reliable
4063
4071
  28 => {
4064
4072
  Name => 'AEMaxAperture',
4065
4073
  Notes => 'val = 2**((raw-68)/16)',
@@ -4676,8 +4684,9 @@ my %binaryDataAttrs = (
4676
4684
  # battery grips available for:
4677
4685
  # BG1 (*istD), BG2 (K10D/K20D), BG3 (K200D), BG4 (K-7,K-5)
4678
4686
  # no grip available: K-x
4679
- 0.1 => { #19
4687
+ 0.1 => [{ #19
4680
4688
  Name => 'PowerSource',
4689
+ Condition => '$$self{Model} !~ /K-3 Mark III/',
4681
4690
  Mask => 0x0f,
4682
4691
  # have seen the upper bit set (value of 0x82) for the
4683
4692
  # *istDS and K100D, but I'm not sure what this means - PH
@@ -4688,7 +4697,20 @@ my %binaryDataAttrs = (
4688
4697
  3 => 'Grip Battery',
4689
4698
  4 => 'External Power Supply', #PH
4690
4699
  },
4691
- },
4700
+ },{ #PH
4701
+ Name => 'PowerSource',
4702
+ Mask => 0x0f,
4703
+ Notes => 'K-3III',
4704
+ # have seen the upper bit set (value of 0x82) for the
4705
+ # *istDS and K100D, but I'm not sure what this means - PH
4706
+ # I've also seen: 0x42 (K2000), 0xf2 (K-7,K-r,K-5), 0x12,0x22 (K-x) - PH
4707
+ PrintConv => {
4708
+ 1 => 'Body Battery',
4709
+ 2 => 'Grip Battery',
4710
+ 4 => 'External Power Supply',
4711
+ },
4712
+ },{
4713
+ }],
4692
4714
  1.1 => [
4693
4715
  {
4694
4716
  Name => 'BodyBatteryState',
@@ -4703,8 +4725,8 @@ my %binaryDataAttrs = (
4703
4725
  },
4704
4726
  },{
4705
4727
  Name => 'BodyBatteryState',
4706
- Condition => '$$self{Model} !~ /(K110D|K2000|K-m)\b/',
4707
- Notes => 'other models except the K110D, K2000 and K-m',
4728
+ Condition => '$$self{Model} !~ /(K110D|K2000|K-m|K-3 Mark III)\b/',
4729
+ Notes => 'most other models except the K110D, K2000, K-m and K-3III',
4708
4730
  Mask => 0xf0,
4709
4731
  PrintConv => {
4710
4732
  1 => 'Empty or Missing',
@@ -4715,7 +4737,8 @@ my %binaryDataAttrs = (
4715
4737
  },
4716
4738
  },{
4717
4739
  Name => 'BodyBatteryState',
4718
- Notes => 'decoding unknown for other models',
4740
+ Notes => 'decoding unknown for some models',
4741
+ Unknown => 1, # (doesn't appear to be valid for the K-3 III)
4719
4742
  Mask => 0xf0,
4720
4743
  },
4721
4744
  ],
@@ -4758,7 +4781,7 @@ my %binaryDataAttrs = (
4758
4781
  },
4759
4782
  {
4760
4783
  Name => 'BodyBatteryVoltage1', # (static?)
4761
- Condition => '$$self{Model} !~ /(K100D|K110D|K2000|K-m|Q\d*)\b/',
4784
+ Condition => '$$self{Model} =~ /(645D|645Z|K-(1|01|3|5|7|30|50|70|500|r|x|S[12])|KP)\b/ and $$self{Model} !~ /III/',
4762
4785
  Format => 'int16u',
4763
4786
  ValueConv => '$val / 100',
4764
4787
  ValueConvInv => '$val * 100',
@@ -4797,7 +4820,7 @@ my %binaryDataAttrs = (
4797
4820
  },
4798
4821
  {
4799
4822
  Name => 'BodyBatteryVoltage2', # (less than BodyBatteryVoltage1 -- under load?)
4800
- Condition => '$$self{Model} !~ /(K100D|K110D|K2000|K-m|Q\d*)\b/',
4823
+ Condition => '$$self{Model} =~ /(645D|645Z|K-(1|01|3|5|7|30|50|70|500|r|x|S[12])|KP)\b/ and $$self{Model} !~ /III/',
4801
4824
  Format => 'int16u',
4802
4825
  ValueConv => '$val / 100',
4803
4826
  ValueConvInv => '$val * 100',
@@ -4940,6 +4963,12 @@ my %binaryDataAttrs = (
4940
4963
  20 => 'Mid-right',
4941
4964
  },
4942
4965
  },
4966
+ 0x1fa => {
4967
+ Name => 'LiveView',
4968
+ Notes => 'decoded only for the K-3 III',
4969
+ Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # and other models?
4970
+ PrintConv => { 0 => 'Off', 1 => 'On' },
4971
+ },
4943
4972
  0x1fd => {
4944
4973
  Name => 'AFHold',
4945
4974
  Notes => 'decoded only for the K-3 II',
@@ -5006,6 +5035,10 @@ my %binaryDataAttrs = (
5006
5035
  1 => 'As EV Steps',
5007
5036
  },
5008
5037
  },
5038
+ 3 => { #PH
5039
+ Name => 'LiveView',
5040
+ PrintConv => { 0 => 'Off', 1 => 'On' },
5041
+ },
5009
5042
  );
5010
5043
 
5011
5044
  # shot information? - ref PH (K-5)
@@ -5483,6 +5516,24 @@ my %binaryDataAttrs = (
5483
5516
  },
5484
5517
  );
5485
5518
 
5519
+ %Image::ExifTool::Pentax::LevelInfoK3III = (
5520
+ %binaryDataAttrs,
5521
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
5522
+ FORMAT => 'int8s',
5523
+ NOTES => 'Tags decoded from the electronic level information for the K-3 III.',
5524
+ 3 => {
5525
+ Name => 'RollAngle',
5526
+ Format => 'int16s',
5527
+ ValueConv => '-$val / 2',
5528
+ ValueConvInv => '-$val * 2',
5529
+ },
5530
+ 5 => {
5531
+ Name => 'PitchAngle',
5532
+ Format => 'int16s',
5533
+ ValueConv => '-$val / 2',
5534
+ ValueConvInv => '-$val * 2',
5535
+ },
5536
+ );
5486
5537
  # white balance RGGB levels (ref 28)
5487
5538
  %Image::ExifTool::Pentax::WBLevels = (
5488
5539
  %binaryDataAttrs,
@@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
48
48
  use Image::ExifTool::Exif;
49
49
  use Image::ExifTool::GPS;
50
50
 
51
- $VERSION = '2.95';
51
+ $VERSION = '2.97';
52
52
 
53
53
  sub ProcessMOV($$;$);
54
54
  sub ProcessKeys($$$);
@@ -1415,6 +1415,8 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
1415
1415
  %durationInfo,
1416
1416
  # this is int64u if MovieHeaderVersion == 1 (ref 13)
1417
1417
  Hook => '$$self{MovieHeaderVersion} and $format = "int64u", $varSize += 4',
1418
+ # (Note: this Duration seems to be the time of the key frame in
1419
+ # the NRT Metadata track of iPhone live-photo MOV videos)
1418
1420
  },
1419
1421
  5 => {
1420
1422
  Name => 'PreferredRate',
@@ -2330,6 +2332,16 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
2330
2332
  Binary => 1,
2331
2333
  }],
2332
2334
  # ---- Ricoh ----
2335
+ RICO => { #PH (G900SE)
2336
+ Name => 'RicohInfo',
2337
+ Condition => '$$valPt =~ /^\xff\xe1..Exif\0\0/s',
2338
+ SubDirectory => {
2339
+ TagTable => 'Image::ExifTool::Exif::Main',
2340
+ ProcessProc => \&Image::ExifTool::ProcessTIFF,
2341
+ Start => 10,
2342
+ Base => '$start',
2343
+ }
2344
+ },
2333
2345
  RTHU => { #PH (GR)
2334
2346
  Name => 'PreviewImage',
2335
2347
  Groups => { 2 => 'Preview' },
@@ -2927,8 +2939,12 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
2927
2939
  Format => 'int8u',
2928
2940
  Writable => 'int8u',
2929
2941
  Protected => 1,
2930
- ValueConv => '$val * 90',
2931
- ValueConvInv => 'int($val / 90 + 0.5)',
2942
+ PrintConv => {
2943
+ 0 => 'Horizontal (Normal)',
2944
+ 1 => 'Rotate 270 CW',
2945
+ 2 => 'Rotate 180',
2946
+ 3 => 'Rotate 90 CW',
2947
+ },
2932
2948
  },
2933
2949
  ispe => {
2934
2950
  Name => 'ImageSpatialExtent',
@@ -3423,7 +3439,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
3423
3439
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::iTunesInfo' },
3424
3440
  },
3425
3441
  aART => { Name => 'AlbumArtist', Groups => { 2 => 'Author' } },
3426
- covr => { Name => 'CoverArt', Groups => { 2 => 'Preview' } },
3442
+ covr => { Name => 'CoverArt', Groups => { 2 => 'Preview' }, Binary => 1 },
3427
3443
  cpil => { #10
3428
3444
  Name => 'Compilation',
3429
3445
  Format => 'int8u', #27 (ref 23 contradicts what AtomicParsley actually writes, which is int8s)
@@ -6494,6 +6510,9 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6494
6510
  },
6495
6511
  ownr => 'Owner', #PH (obscure) (ref ChrisAdan private communication)
6496
6512
  'xid ' => 'ISRC', #PH
6513
+ # found in DJI Osmo Action4 video
6514
+ tnal => { Name => 'ThumbnailImage', Binary => 1, Groups => { 2 => 'Preview' } },
6515
+ snal => { Name => 'PreviewImage', Binary => 1, Groups => { 2 => 'Preview' } },
6497
6516
  );
6498
6517
 
6499
6518
  # tag decoded from timed face records
@@ -8250,8 +8269,8 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
8250
8269
  GROUPS => { 2 => 'Video' },
8251
8270
  Rotation => {
8252
8271
  Notes => q{
8253
- writing this tag updates QuickTime MatrixStructure for all tracks with a
8254
- non-zero image size
8272
+ degrees of clockwise camera rotation. Writing this tag updates QuickTime
8273
+ MatrixStructure for all tracks with a non-zero image size
8255
8274
  },
8256
8275
  Require => {
8257
8276
  0 => 'QuickTime:MatrixStructure',
@@ -9753,7 +9772,7 @@ ItemID: foreach $id (reverse sort { $a <=> $b } keys %$items) {
9753
9772
  }
9754
9773
  # use value to get tag info if necessary
9755
9774
  $tagInfo or $tagInfo = $et->GetTagInfo($tagTablePtr, $tag, \$val);
9756
- my $hasData = ($$dirInfo{HasData} and $val =~ /\0...data\0/s);
9775
+ my $hasData = ($$dirInfo{HasData} and $val =~ /^....data\0/s);
9757
9776
  if ($verbose and not $hasData) {
9758
9777
  my $tval;
9759
9778
  if ($tagInfo and $$tagInfo{Format}) {
@@ -338,6 +338,9 @@ my %insvLimit = (
338
338
  Groups => { 2 => 'Preview' },
339
339
  RawConv => '$self->ValidateImage(\$val,$tag)',
340
340
  },
341
+ # djmd - DJI AC003 Osmo Action 4 cam
342
+ #TODO djmd => { SubDirectory => { TagTable => 'Image::ExifTool::DJI::djmd', ByteOrder => 'Little-Endian' } },
343
+ # dbgi - DJI AC003 Osmo Action 4 cam -- lots more unknown stuff
341
344
  Unknown00 => { Unknown => 1 },
342
345
  Unknown01 => { Unknown => 1 },
343
346
  Unknown02 => { Unknown => 1 },
@@ -2428,7 +2431,9 @@ sub Process_nbmt($$$)
2428
2431
  $$et{DOC_NUM} = $$et{DOC_COUNT} + 1;
2429
2432
  delete $$et{UnknownTextCount};
2430
2433
  delete $$et{NoMoreTextDecoding};
2434
+ $$et{SET_GROUP1} = 'Nextbase';
2431
2435
  Process_text($et, $dataPt, $tagTbl, 1);
2436
+ delete $$et{SET_GROUP1};
2432
2437
  delete $$et{UnknownTextCount};
2433
2438
  delete $$et{NoMoreTextDecoding};
2434
2439
  delete $$et{DOC_NUM};
@@ -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.67';
37
+ $VERSION = '3.68';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -164,9 +164,11 @@ sub PrintInvLensSpec($;$$);
164
164
  32877 => 'Sony E 15mm F1.4 G', #JR
165
165
  32878 => 'Sony FE 20-70mm F4 G', #JR
166
166
  32879 => 'Sony FE 50mm F1.4 GM', #JR
167
+ 32881 => 'Sony FE 24-50mm F2.8 G', #JR
168
+ 32882 => 'Sony FE 16-25mm F2.8 G', #JR
167
169
  32884 => 'Sony FE 70-200mm F4 Macro G OSS II', #JR
168
170
  32885 => 'Sony FE 16-35mm F2.8 GM II', #JR
169
- 32886 => 'Sony FE 300mm F2.8 OSS', #JR
171
+ 32886 => 'Sony FE 300mm F2.8 GM OSS', #JR
170
172
 
171
173
  # (comment this out so LensID will report the LensModel, which is more useful)
172
174
  # 32952 => 'Metabones Canon EF Speed Booster Ultra', #JR (corresponds to 184, but 'Advanced' mode, LensMount reported as E-mount)
@@ -187,6 +189,8 @@ sub PrintInvLensSpec($;$$);
187
189
  33086 => 'Sony FE 70-200mm F2.8 GM OSS II + 2X Teleconverter', #JR
188
190
  33087 => 'Sony FE 70-200mm F4 Macro G OSS II + 1.4X Teleconverter', #JR
189
191
  33088 => 'Sony FE 70-200mm F4 Macro G OSS II + 2X Teleconverter', #JR
192
+ 33089 => 'Sony FE 300mm F2.8 GM OSS + 1.4X Teleconverter', #JR (NC)
193
+ 33090 => 'Sony FE 300mm F2.8 GM OSS + 2X Teleconverter', #JR
190
194
 
191
195
  49201 => 'Zeiss Touit 12mm F2.8', #JR (lens firmware Ver.02)
192
196
  49202 => 'Zeiss Touit 32mm F1.8', #JR (lens firmware Ver.02)
@@ -234,6 +238,7 @@ sub PrintInvLensSpec($;$$);
234
238
  49474.7 => 'Viltrox 35mm F1.8 FE', #JR
235
239
  49474.8 => 'Viltrox 50mm F1.8 FE', #JR
236
240
  49474.9 => 'Viltrox 75mm F1.2 E', #JR
241
+ '49474.10' => 'Viltrox 20mm F2.8 FE', #JR
237
242
 
238
243
  49712 => 'Tokina FiRIN 20mm F2 FE AF', # (firmware Ver.01)
239
244
  49713 => 'Tokina FiRIN 100mm F2.8 FE MACRO', # (firmware Ver.01)
@@ -287,7 +292,9 @@ sub PrintInvLensSpec($;$$);
287
292
  50540 => 'Sigma 14mm F1.4 DG DN | A', #JR (023)
288
293
  50543 => 'Sigma 70-200mm F2.8 DG DN OS | S', #JR (023)
289
294
  50544 => 'Sigma 23mm F1.4 DC DN | C', #JR (023)
295
+ 50546 => 'Sigma 500mm F5.6 DG DN OS | S', #JR (024)
290
296
  50547 => 'Sigma 10-18mm F2.8 DC DN | C', #JR (023)
297
+ 50548 => 'Sigma 15mm F1.4 DG DN DIAGONAL FISHEYE | A', #JR (024)
291
298
 
292
299
  50992 => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR
293
300
  50993 => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB
@@ -2031,6 +2038,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
2031
2038
  '4 0 0 0' => 'ARW 4.0', # (ILCE-7SM3)
2032
2039
  '4 0 1 0' => 'ARW 4.0.1', #github#195 (ZV-E1)
2033
2040
  '5 0 0 0' => 'ARW 5.0', # (ILCE-9M3)
2041
+ '5 0 1 0' => 'ARW 5.0.1', # (ILCE-1 with FirmWare 2.0)
2034
2042
  # what about cRAW images?
2035
2043
  },
2036
2044
  },
@@ -8515,16 +8523,17 @@ my %isoSetting2010 = (
8515
8523
  FIRST_ENTRY => 0,
8516
8524
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
8517
8525
  DATAMEMBER => [ 0 ],
8518
- IS_SUBDIR => [ 0x03e2, 0x03f4, 0x044e, 0x0498, 0x049d, 0x04a1, 0x04a2, 0x04ba, 0x059d, 0x0634, 0x0636, 0x064c, 0x0653, 0x0678, 0x06b8, 0x06de, 0x06e7 ],
8526
+ IS_SUBDIR => [ 0x03e2, 0x03f4, 0x044e, 0x0498, 0x049d, 0x049e, 0x04a1, 0x04a2, 0x04ba, 0x059d, 0x0634, 0x0636, 0x064c, 0x0653, 0x0678, 0x06b8, 0x06de, 0x06e7 ],
8519
8527
  0x0000 => { Name => 'Ver9401', Hidden => 1, RawConv => '$$self{Ver9401} = $val; $$self{OPTIONS}{Unknown}<2 ? undef : $val' },
8520
8528
 
8521
8529
  0x03e2 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 181', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8522
8530
  0x03f4 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 185', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8523
8531
  0x044e => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 178', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8524
8532
  0x0498 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 148', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8525
- 0x049d => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 167', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8526
- 0x04a1 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(160|164)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8527
- 0x04a2 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(152|154|155)/ and $$self{Model} !~ /^ZV-1M2/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8533
+ 0x049d => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 167 and $$self{Software} !~ /^ILCE-7M4 (v2|v3)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8534
+ 0x049e => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 167 and $$self{Software} =~ /^ILCE-7M4 (v2|v3)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8535
+ 0x04a1 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(160|164)/ and $$self{Software} !~ /^ILCE-1 v2/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8536
+ 0x04a2 => { Name => 'ISOInfo', Condition => '($$self{Ver9401} =~ /^(152|154|155)/ and $$self{Model} !~ /^ZV-1M2/) or ($$self{Ver9401} == 164 and $$self{Software} =~ /^ILCE-1 v2/)', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8528
8537
  0x04ba => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 155 and $$self{Model} =~ /^ZV-1M2/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8529
8538
  0x059d => { Name => 'ISOInfo', Condition => '$$self{Ver9401} =~ /^(144|146)/', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },
8530
8539
  0x0634 => { Name => 'ISOInfo', Condition => '$$self{Ver9401} == 68', Format => 'int8u[5]', SubDirectory => { TagTable => 'Image::ExifTool::Sony::ISOInfo' } },