exiftool_vendored 12.81.0 → 12.83.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +39 -1
  3. data/bin/MANIFEST +4 -18
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +3 -2
  7. data/bin/build_geolocation +867 -0
  8. data/bin/exiftool +37 -9
  9. data/bin/fmt_files/gpx.fmt +2 -1
  10. data/bin/fmt_files/gpx_wpt.fmt +2 -1
  11. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +47 -31
  12. data/bin/lib/Image/ExifTool/CanonVRD.pm +6 -5
  13. data/bin/lib/Image/ExifTool/DJI.pm +29 -0
  14. data/bin/lib/Image/ExifTool/Exif.pm +19 -2
  15. data/bin/lib/Image/ExifTool/FujiFilm.pm +9 -2
  16. data/bin/lib/Image/ExifTool/GM.pm +552 -0
  17. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  18. data/bin/lib/Image/ExifTool/Geolocation.pm +90 -54
  19. data/bin/lib/Image/ExifTool/Nikon.pm +9 -7
  20. data/bin/lib/Image/ExifTool/QuickTime.pm +31 -23
  21. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +66 -30
  22. data/bin/lib/Image/ExifTool/README +2 -0
  23. data/bin/lib/Image/ExifTool/Sony.pm +15 -6
  24. data/bin/lib/Image/ExifTool/TagLookup.pm +37 -6
  25. data/bin/lib/Image/ExifTool/TagNames.pod +407 -239
  26. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +5 -2
  27. data/bin/lib/Image/ExifTool/Writer.pl +165 -133
  28. data/bin/lib/Image/ExifTool/XMP.pm +3 -2
  29. data/bin/lib/Image/ExifTool/XMP2.pl +3 -0
  30. data/bin/lib/Image/ExifTool.pm +38 -9
  31. data/bin/lib/Image/ExifTool.pod +31 -18
  32. data/bin/perl-Image-ExifTool.spec +1 -1
  33. data/lib/exiftool_vendored/version.rb +1 -1
  34. metadata +4 -20
  35. data/bin/lib/Image/ExifTool/GeoLang/cs.pm +0 -978
  36. data/bin/lib/Image/ExifTool/GeoLang/de.pm +0 -1975
  37. data/bin/lib/Image/ExifTool/GeoLang/en_ca.pm +0 -44
  38. data/bin/lib/Image/ExifTool/GeoLang/en_gb.pm +0 -124
  39. data/bin/lib/Image/ExifTool/GeoLang/es.pm +0 -2921
  40. data/bin/lib/Image/ExifTool/GeoLang/fi.pm +0 -1116
  41. data/bin/lib/Image/ExifTool/GeoLang/fr.pm +0 -3171
  42. data/bin/lib/Image/ExifTool/GeoLang/it.pm +0 -2750
  43. data/bin/lib/Image/ExifTool/GeoLang/ja.pm +0 -10256
  44. data/bin/lib/Image/ExifTool/GeoLang/ko.pm +0 -4499
  45. data/bin/lib/Image/ExifTool/GeoLang/nl.pm +0 -1270
  46. data/bin/lib/Image/ExifTool/GeoLang/pl.pm +0 -3019
  47. data/bin/lib/Image/ExifTool/GeoLang/ru.pm +0 -18220
  48. data/bin/lib/Image/ExifTool/GeoLang/sk.pm +0 -441
  49. data/bin/lib/Image/ExifTool/GeoLang/sv.pm +0 -714
  50. data/bin/lib/Image/ExifTool/GeoLang/tr.pm +0 -452
  51. data/bin/lib/Image/ExifTool/GeoLang/zh_cn.pm +0 -2225
  52. data/bin/lib/Image/ExifTool/GeoLang/zh_tw.pm +0 -72
data/bin/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.81';
14
+ my $version = '12.83';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -217,7 +217,7 @@ my $tmpFile; # temporary file to delete on exit
217
217
  my $tmpText; # temporary text file
218
218
  my $validFile; # flag indicating we processed a valid file
219
219
  my $verbose; # verbose setting
220
- my $vout; # verbose output file reference (\*STDOUT or \*STDERR)
220
+ my $vout; # verbose output file reference (\*STDOUT or \*STDERR by default)
221
221
  my $windowTitle; # title for console window
222
222
  my %wroteHEAD; # list of output txt files to which we wrote HEAD
223
223
  my $xml; # flag for XML-formatted output
@@ -735,10 +735,11 @@ for (;;) {
735
735
  push @isUTF8, 10 if $isAlt;
736
736
  for ($i=0; ; ++$i) {
737
737
  my @entry = Image::ExifTool::Geolocation::GetEntry($i,$langOpt,1) or last;
738
- push @entry, Image::ExifTool::Geolocation::GetAltNames($i,1) if $isAlt;
739
738
  next if $minPop and $entry[7] < $minPop;
740
739
  next if %fcodes and $neg ? $fcodes{lc $entry[6]} : not $fcodes{lc $entry[6]};
740
+ push @entry, Image::ExifTool::Geolocation::GetAltNames($i,1) if $isAlt;
741
741
  $_ = defined $_ ? $mt->Decode($_, 'UTF8') : '' foreach @entry[@isUTF8];
742
+ pop @entry if $isAlt and not $entry[10];
742
743
  print join(',', @entry), "\n";
743
744
  }
744
745
  } else { # 'g(\d*)'
@@ -1165,7 +1166,7 @@ for (;;) {
1165
1166
  if (/^p(-?)$/ or /^printformat(-?)$/i) {
1166
1167
  my $fmt = shift;
1167
1168
  if ($pass) {
1168
- LoadPrintFormat($fmt, $1);
1169
+ LoadPrintFormat($fmt, $1 || $binaryOutput);
1169
1170
  # load MWG module now if necessary
1170
1171
  if (not $useMWG and grep /^mwg:/i, @requestTags) {
1171
1172
  $useMWG = 1;
@@ -2180,7 +2181,7 @@ sub GetImageInfo($$)
2180
2181
 
2181
2182
  my $lineCount = 0;
2182
2183
  my ($fp, $outfile, $append);
2183
- if ($textOut and $verbose and not $tagOut) {
2184
+ if ($textOut and ($verbose or $et->Options('PrintCSV')) and not $tagOut) {
2184
2185
  ($fp, $outfile, $append) = OpenOutputFile($orig);
2185
2186
  $fp or EFile($file), ++$countBad, return;
2186
2187
  # delete file if we exit prematurely (unless appending)
@@ -2243,6 +2244,14 @@ sub GetImageInfo($$)
2243
2244
  if (%printFmt) {
2244
2245
  $et->Options(Duplicates => 1);
2245
2246
  $et->Options(RequestTags => \@requestTags);
2247
+ if ($printFmt{SetTags}) {
2248
+ # initialize options so we can set any tags we want
2249
+ $$et{TAGS_FROM_FILE} = 1;
2250
+ $et->Options(MakerNotes => 1);
2251
+ $et->Options(Struct => 2);
2252
+ $et->Options(List => 1);
2253
+ $et->Options(CoordFormat => '%d %d %.8f') unless $et->Options('CoordFormat');
2254
+ }
2246
2255
  } else {
2247
2256
  @foundTags = @tags;
2248
2257
  }
@@ -2303,7 +2312,7 @@ sub GetImageInfo($$)
2303
2312
  $lastDoc = 0;
2304
2313
  }
2305
2314
  for ($doc=0; $doc<=$lastDoc; ++$doc) {
2306
- my $skipBody;
2315
+ my ($skipBody, $opt);
2307
2316
  foreach $type (qw(HEAD SECT IF BODY ENDS TAIL)) {
2308
2317
  my $prf = $printFmt{$type} or next;
2309
2318
  if ($type eq 'HEAD' and defined $outfile) {
@@ -2311,6 +2320,12 @@ sub GetImageInfo($$)
2311
2320
  $wroteHEAD{$outfile} = 1;
2312
2321
  }
2313
2322
  next if $type eq 'BODY' and $skipBody;
2323
+ # silence "IF" warnings and warnings for subdocuments > 1
2324
+ if ($type eq 'IF' or ($doc > 1 and not $$et{OPTIONS}{IgnoreMinorErrors})) {
2325
+ $opt = 'Silent';
2326
+ } else {
2327
+ $opt = 'Warn';
2328
+ }
2314
2329
  if ($lastDoc) {
2315
2330
  if ($doc) {
2316
2331
  next if $type eq 'HEAD' or $type eq 'TAIL'; # only repeat SECT/IF/BODY/ENDS
@@ -2320,7 +2335,6 @@ sub GetImageInfo($$)
2320
2335
  }
2321
2336
  }
2322
2337
  my @lines;
2323
- my $opt = $type eq 'IF' ? 'Silent' : 'Warn'; # silence "IF" warnings
2324
2338
  foreach (@$prf) {
2325
2339
  my $line = $et->InsertTagValues($_, \@foundTags, $opt, $grp, $cache);
2326
2340
  if ($type eq 'IF') {
@@ -4115,6 +4129,7 @@ sub AddPrintFormat($)
4115
4129
  push @{$printFmt{$type}}, $expr;
4116
4130
  # add to list of requested tags
4117
4131
  push @requestTags, $expr =~ /\$\{?((?:[-\w]+:)*[-\w?*]+)/g;
4132
+ $printFmt{SetTags} = 1 if $expr =~ /\bSetTags\b/;
4118
4133
  }
4119
4134
 
4120
4135
  #------------------------------------------------------------------------------
@@ -5636,7 +5651,7 @@ it from subsequent text (and must be used if subsequent text begins with an
5636
5651
  alphanumeric character, hyphen, underline, colon or number sign). Use C<$$>
5637
5652
  to represent a C<$> symbol, and C<$/> for a newline. When the string
5638
5653
  argument is used (ie. I<STR>), a newline is added to the end of the string
5639
- unless B<-p-> is specified.
5654
+ unless B<-p-> is specified or the B<-b> option is used.
5640
5655
 
5641
5656
  Multiple B<-p> options may be used. Lines beginning with C<#[HEAD]> and
5642
5657
  C<#[TAIL]> are output before the first processed file and after the last
@@ -5662,7 +5677,7 @@ with this command:
5662
5677
 
5663
5678
  produces output like this:
5664
5679
 
5665
- -- Generated by ExifTool 12.81 --
5680
+ -- Generated by ExifTool 12.83 --
5666
5681
  File: a.jpg - 2003:10:31 15:44:19
5667
5682
  (f/5.6, 1/60s, ISO 100)
5668
5683
  File: b.jpg - 2006:05:23 11:57:38
@@ -6896,6 +6911,19 @@ sources. An equivalent to the above commands using this feature would be:
6896
6911
 
6897
6912
  exiftool -tagsfromfile @ -keywords -api nodups a.jpg
6898
6913
 
6914
+ C<SetTags>
6915
+
6916
+ Used to set tags in extracted images. With no arguments, copies all tags
6917
+ from the source file to the embedded image:
6918
+
6919
+ exiftool -p '${previewimage;SetTags}' -b a.arw > preview.jpg
6920
+
6921
+ Arguments may be added to copy or set specific tags. Arguments take exactly
6922
+ the same form as those on the command line when copying or writing tags,
6923
+ but without the leading dash. For example:
6924
+
6925
+ exiftool -p '${previewimage;SetTags("comment=test","title<filename"}' ...
6926
+
6899
6927
  =head1 WINDOWS UNICODE FILE NAMES
6900
6928
 
6901
6929
  In Windows, command-line arguments are specified using the current code page
@@ -11,6 +11,7 @@
11
11
  # 2018/01/04 - PH Added IF to be sure position exists
12
12
  # 2018/01/06 - PH Use DateFmt function instead of -d option
13
13
  # 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
14
+ # 2024/04/11 - PH Use %f feature in GPSDateTime formatting
14
15
  #
15
16
  # Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
16
17
  # 2) The -ee3 option is to extract the full track from video files.
@@ -32,7 +33,7 @@
32
33
  #[IF] $gpslatitude $gpslongitude
33
34
  #[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
34
35
  #[BODY] <ele>$gpsaltitude#</ele>
35
- #[BODY] <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
36
+ #[BODY] <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%S%fZ")}</time>
36
37
  #[BODY]</trkpt>
37
38
  #[TAIL]</trkseg>
38
39
  #[TAIL]</trk>
@@ -12,6 +12,7 @@
12
12
  # 2018/01/04 - PH Added IF to be sure position exists
13
13
  # 2018/01/06 - PH Use DateFmt function instead of -d option
14
14
  # 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
15
+ # 2024/04/11 - PH Use %f feature in GPSDateTime formatting
15
16
  #
16
17
  # Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
17
18
  # 2) The -ee3 option is to extract the full track from video files.
@@ -30,7 +31,7 @@
30
31
  #[IF] $gpslatitude $gpslongitude
31
32
  #[BODY]<wpt lat="$gpslatitude#" lon="$gpslongitude#">
32
33
  #[BODY] <ele>$gpsaltitude#</ele>
33
- #[BODY] <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
34
+ #[BODY] <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%S%fZ")}</time>
34
35
  #[BODY] <name>$filename</name>
35
36
  #[BODY] <link href="$directory/$filename"/>
36
37
  #[BODY] <sym>Scenic Area</sym>
@@ -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.54';
38
+ $VERSION = '3.56';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -95,16 +95,9 @@ my %tweakOrder = (
95
95
  Lytro => 'SigmaRaw',
96
96
  PhotoMechanic => 'FotoStation',
97
97
  Microsoft => 'PhotoMechanic',
98
- 'Microsoft::MP'=> 'Microsoft::MP1',
99
98
  GIMP => 'Microsoft',
100
- 'Nikon::CameraSettingsD300' => 'Nikon::ShotInfoD300b',
101
- 'Pentax::LensData' => 'Pentax::LensInfo2',
102
- 'Sony::SRF2' => 'Sony::SRF',
103
99
  DarwinCore => 'AFCP',
104
- 'MWG::Regions' => 'MWG::Composite',
105
- 'MWG::Keywords' => 'MWG::Regions',
106
- 'MWG::Collections' => 'MWG::Keywords',
107
- 'GoPro::fdsc' => 'GoPro::KBAT',
100
+ MWG => 'Shortcuts',
108
101
  );
109
102
 
110
103
  # list of all recognized Format strings
@@ -671,6 +664,18 @@ will extract all available information even for tags not listed.
671
664
  Tags in these tables are referred to as "pseudo" tags because their
672
665
  information is not stored in the file itself. As such, B<Writable> tags in
673
666
  these tables may be changed without having to rewrite the file.
667
+ },
668
+ GM => q{
669
+ These tags are extracted from GM/Cosworth PDR (Performance Data Recorder)
670
+ information found in videos from General Motors cars such as Corvette and
671
+ Camero.
672
+
673
+ Use the API L<PrintCSV|../ExifTool.html#PrintCSV> option to output all timed
674
+ PDR data in CSV format at greatly increased speed and with much lower memory
675
+ usage. This option prints the numerical values for each channel in CSV
676
+ format, suitable for import into RaceRender. In this output, the gear
677
+ numbers for Neutral and Reverse are changed to -1 and -100 respectively for
678
+ compatibility with RaceRender.
674
679
  },
675
680
  PodTrailer => q{
676
681
  ~head1 NOTES
@@ -708,7 +713,7 @@ my %shortcutNotes = (
708
713
  color space when deleting all other metadata
709
714
  },
710
715
  CommonIFD0 => q{
711
- common metadata tags found in IFD0 of TIFF-format images. Used to simpify
716
+ common metadata tags found in IFD0 of TIFF-format images. Used to simplify
712
717
  deletion of all metadata from these images. See
713
718
  L<FAQ number 7|../faq.html#Q7> for details
714
719
  },
@@ -852,7 +857,7 @@ sub new
852
857
  my ($tagID, $binaryTable, $noID, $hexID, $isIPTC, $isXMP);
853
858
  $isIPTC = 1 if $writeProc and $writeProc eq \&Image::ExifTool::IPTC::WriteIPTC;
854
859
  # generate flattened tag names for structure fields if this is an XMP table
855
- if ($$table{GROUPS} and $$table{GROUPS}{0} eq 'XMP') {
860
+ if ($$table{GROUPS} and $$table{GROUPS}{0} eq 'XMP' or $$vars{ADD_FLATTENED}) {
856
861
  Image::ExifTool::XMP::AddFlattenedTags($table);
857
862
  $isXMP = 1;
858
863
  }
@@ -1526,7 +1531,8 @@ TagID: foreach $tagID (@keys) {
1526
1531
  my $fullName = ($strName =~ / / ? '' : 'XMP ') . "$strName Struct";
1527
1532
  my $info = $tagNameInfo{$fullName} = [ ];
1528
1533
  my $tag;
1529
- foreach $tag (sort keys %$struct) {
1534
+ my $order = $$struct{SORT_ORDER} || [ sort keys %$struct ];
1535
+ foreach $tag (@$order) {
1530
1536
  my $tagInfo = $$struct{$tag};
1531
1537
  next unless ref $tagInfo eq 'HASH' and $tag ne 'NAMESPACE' and $tag ne 'GROUPS';
1532
1538
  warn "WARNING: $strName Struct containes $tag\n" if $Image::ExifTool::specialTags{$tag};
@@ -1539,6 +1545,8 @@ TagID: foreach $tagID (@keys) {
1539
1545
  push @vals, $writable;
1540
1546
  $structs{$writable} = 1;
1541
1547
  $writable = "=$writable";
1548
+ } elsif (defined $$tagInfo{Writable}) {
1549
+ $writable = 'no';
1542
1550
  } else {
1543
1551
  $writable = 'string';
1544
1552
  }
@@ -1548,7 +1556,7 @@ TagID: foreach $tagID (@keys) {
1548
1556
  # handle PrintConv lookups in Structure elements
1549
1557
  my $printConv = $$tagInfo{PrintConv};
1550
1558
  if (ref $printConv eq 'HASH') {
1551
- foreach (sort keys %$printConv) {
1559
+ foreach (sort { NumbersFirst($a,$b) } keys %$printConv) {
1552
1560
  next if /^(OTHER|BITMASK)$/;
1553
1561
  push @vals, "$_ = $$printConv{$_}";
1554
1562
  }
@@ -1822,24 +1830,7 @@ sub TweakOrder($$)
1822
1830
  local $_;
1823
1831
  my ($sortedTables, $tweakOrder) = @_;
1824
1832
  my @tweak = sort keys %$tweakOrder;
1825
- my (%addedMain, @sorted);
1826
- # flag files which have a "Main" table
1827
- foreach (@$sortedTables) {
1828
- $addedMain{$1} = 0 if /^Image::ExifTool::(\w+)::(\w+)/ and $2 eq 'Main';
1829
- }
1830
- # make sure that the main table always comes first in each file
1831
- foreach (@$sortedTables) {
1832
- if (/^Image::ExifTool::(\w+)::(\w+)/) {
1833
- if ($addedMain{$1}) {
1834
- next if $2 eq 'Main'; # don't add again
1835
- } elsif (defined $addedMain{$1}) {
1836
- push @sorted, "Image::ExifTool::${1}::Main" if $2 ne 'Main';
1837
- $addedMain{$1} = 1;
1838
- }
1839
- }
1840
- push @sorted, $_;
1841
- }
1842
- @$sortedTables = @sorted;
1833
+ my (@sorted, %hasMain, %module, $entry);
1843
1834
  # apply manual tweaks
1844
1835
  while (@tweak) {
1845
1836
  my $table = shift @tweak;
@@ -1858,6 +1849,31 @@ sub TweakOrder($$)
1858
1849
  }
1859
1850
  @$sortedTables = (@notMoving, @moving, @after);
1860
1851
  }
1852
+ # flag modules which have a "Main" table, and organize tables by module name
1853
+ foreach (@$sortedTables) {
1854
+ if (not /^Image::ExifTool::(\w+)::(\w+)/) {
1855
+ push @sorted, $_;
1856
+ } else {
1857
+ $hasMain{$1} = 1 if $2 eq 'Main';
1858
+ push @sorted, $module{$1} = [ ] unless $module{$1};
1859
+ push @{$module{$1}}, $_;
1860
+ }
1861
+ }
1862
+ # force MWG::Composite table first
1863
+ my @mwg = ( 'Image::ExifTool::MWG::Composite' );
1864
+ /Composite/ or push @mwg, $_ foreach @{$module{MWG}};
1865
+ @{$module{MWG}} = @mwg;
1866
+ # make sure that the main table always comes first in each file
1867
+ # and that all other tables from this group follow
1868
+ @$sortedTables = ( );
1869
+ foreach $entry (@sorted) {
1870
+ ref $entry or push(@$sortedTables, $entry), next;
1871
+ $$entry[0] =~ /^Image::ExifTool::(\w+)::(\w+)/ or die 'Internal error';
1872
+ my $main = "Image::ExifTool::$1::Main";
1873
+ # main table must come first (even if it doesn't exist)
1874
+ push @$sortedTables, $main if $hasMain{$1};
1875
+ $_ eq $main or push(@$sortedTables, $_) foreach @$entry;
1876
+ }
1861
1877
  }
1862
1878
 
1863
1879
  #------------------------------------------------------------------------------
@@ -23,7 +23,7 @@ use vars qw($VERSION);
23
23
  use Image::ExifTool qw(:DataAccess :Utils);
24
24
  use Image::ExifTool::Canon;
25
25
 
26
- $VERSION = '1.39';
26
+ $VERSION = '1.40';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -1427,15 +1427,16 @@ my $blankFooter = "CANON OPTIONAL DATA\0" . ("\0" x 42) . "\xff\xd9";
1427
1427
  4 => 'CropY',
1428
1428
  5 => 'CropWidth',
1429
1429
  6 => 'CropHeight',
1430
+ 7 => 'CropRotation',
1430
1431
  8 => {
1431
- Name => 'CropRotation',
1432
+ Name => 'CropAngle',
1432
1433
  Format => 'double',
1433
1434
  PrintConv => 'sprintf("%.7g",$val)',
1434
1435
  PrintConvInv => '$val',
1435
1436
  },
1436
- 0x0a => 'CropOriginalWidth',
1437
- 0x0b => 'CropOriginalHeight',
1438
- # 0x0c double - value: 100
1437
+ 10 => 'CropOriginalWidth',
1438
+ 11 => 'CropOriginalHeight',
1439
+ # 12 double - value: 100
1439
1440
  );
1440
1441
 
1441
1442
  # DR4 Stamp Tool tags (ref PH)
@@ -19,6 +19,7 @@ use Image::ExifTool::GPS;
19
19
  $VERSION = '1.09';
20
20
 
21
21
  sub ProcessDJIInfo($$$);
22
+ sub Process_djmd($$$);
22
23
 
23
24
  my %convFloat2 = (
24
25
  PrintConv => 'sprintf("%+.2f", $val)',
@@ -186,6 +187,34 @@ my %convFloat2 = (
186
187
  },
187
188
  );
188
189
 
190
+ # TODO - eventually add ability to decode this?
191
+ %Image::ExifTool::DJI::djmd = (
192
+ PROCESS_PROC => \&Process_djmd,
193
+ );
194
+
195
+ #------------------------------------------------------------------------------
196
+ # Process DJI djmd timed data from Action4 videos (ref PH)
197
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
198
+ # Returns: 1 on success
199
+ # TODO: work in progress
200
+ sub Process_djmd($$$)
201
+ {
202
+ my ($et, $dirInfo, $tagTbl) = @_;
203
+ my $dataPt = $$dirInfo{DataPt};
204
+ my ($pos, $bit, $val) = (6, 0, 0);
205
+ for (;;) {
206
+ my $v = Get8u($dataPt, $pos);
207
+ $val += ($v & 0x7f) << $bit;
208
+ last unless $v & 0x80;
209
+ ++$pos;
210
+ $bit += 7;
211
+ }
212
+ $pos += 49;
213
+ my @a = unpack("x${pos}fxfxfxfx3fxfxf", $$dataPt);
214
+ print "$val @a\n";
215
+ return 1;
216
+ }
217
+
189
218
  #------------------------------------------------------------------------------
190
219
  # Process DJI info (ref PH)
191
220
  # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.51';
60
+ $VERSION = '4.52';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -4342,7 +4342,7 @@ my %opcodeInfo = (
4342
4342
  Count => -1,
4343
4343
  Protected => 1,
4344
4344
  },
4345
- 0xcd3b => { # DNG 1.6
4345
+ 0xcd3f => { # DNG 1.6
4346
4346
  Name => 'RGBTables',
4347
4347
  Writable => 'undef',
4348
4348
  WriteGroup => 'IFD0',
@@ -4404,6 +4404,23 @@ my %opcodeInfo = (
4404
4404
  WriteGroup => 'IFD0',
4405
4405
  Protected => 1,
4406
4406
  },
4407
+ 0xcd49 => { # DNG 1.7.1
4408
+ Name => 'JXLDistance',
4409
+ Writable => 'float',
4410
+ WriteGroup => 'IFD0',
4411
+ },
4412
+ 0xcd4a => { # DNG 1.7.1
4413
+ Name => 'JXLEffort',
4414
+ Notes => 'values range from 1=low to 9=high',
4415
+ Writable => 'int32u',
4416
+ WriteGroup => 'IFD0',
4417
+ },
4418
+ 0xcd4b => { # DNG 1.7.1
4419
+ Name => 'JXLDecodeSpeed',
4420
+ Notes => 'values range from 1=slow to 4=fast',
4421
+ Writable => 'int32u',
4422
+ WriteGroup => 'IFD0',
4423
+ },
4407
4424
  0xea1c => { #13
4408
4425
  Name => 'Padding',
4409
4426
  Binary => 1,
@@ -31,7 +31,7 @@ use vars qw($VERSION);
31
31
  use Image::ExifTool qw(:DataAccess :Utils);
32
32
  use Image::ExifTool::Exif;
33
33
 
34
- $VERSION = '1.93';
34
+ $VERSION = '1.94';
35
35
 
36
36
  sub ProcessFujiDir($$$);
37
37
  sub ProcessFaceRec($$$);
@@ -550,7 +550,14 @@ my %faceCategories = (
550
550
  3 => 'Electronic Front Curtain', #10
551
551
  },
552
552
  },
553
- 0x1051 => { Name => 'Cropped', Writable => 'int8u', PrintConv => { 0 => 'No', 1 => 'Yes' } }, #forum15784
553
+ 0x1051 => { #forum15784
554
+ Name => 'CropFlag',
555
+ Writable => 'int8u',
556
+ Notes => q(
557
+ this tag exists only if the image was cropped, and is 0 for cropped JPG
558
+ image or 1 for a cropped RAF
559
+ ),
560
+ },
554
561
  0x1052 => { Name => 'CropTopLeft', Writable => 'int32u' }, #forum15784
555
562
  0x1053 => { Name => 'CropSize', Writable => 'int32u' }, #forum15784
556
563
  # 0x1100 - This may not work well for newer cameras (ref forum12682)