Skip to content

Commit f592e36

Browse files
authored
Merge pull request #13 from woss/v12.92
v12.92
2 parents 167ba80 + 05fce7d commit f592e36

File tree

13 files changed

+224
-50
lines changed

13 files changed

+224
-50
lines changed

.github/workflows/update.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update Version
2+
on: workflow_dispatch
3+
jobs:
4+
test-typescript:
5+
runs-on: ubuntu-latest
6+
7+
steps:
8+
- name: Checkout
9+
id: checkout
10+
uses: actions/checkout@v4
11+
12+
- name: Clone exiftool/master
13+
run: ./script/update-exiftool
14+
15+
- name: Exiftool version
16+
run: ./exiftool/exiftool -ver

exiftool/exiftool

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/env perl
22
#------------------------------------------------------------------------------
33
# File: exiftool
44
#
@@ -11,7 +11,7 @@ use strict;
1111
use warnings;
1212
require 5.004;
1313

14-
my $version = '12.89';
14+
my $version = '12.92';
1515

1616
# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
1717
my $exePath;
@@ -2310,8 +2310,8 @@ sub GetImageInfo($$)
23102310
# output using print format file (-p) option
23112311
my ($type, $doc, $grp, $lastDoc, $cache);
23122312
$fileTrailer = '';
2313-
# repeat for each sub-document if necessary
2314-
if ($$et{DOC_COUNT}) {
2313+
# repeat for each embedded document if necessary (only if -ee used)
2314+
if ($et->Options('ExtractEmbedded')) {
23152315
# (cache tag keys if there are sub-documents)
23162316
$lastDoc = $$et{DOC_COUNT} and $cache = { };
23172317
} else {
@@ -5684,7 +5684,7 @@ with this command:
56845684
56855685
produces output like this:
56865686
5687-
-- Generated by ExifTool 12.89 --
5687+
-- Generated by ExifTool 12.92 --
56885688
File: a.jpg - 2003:10:31 15:44:19
56895689
(f/5.6, 1/60s, ISO 100)
56905690
File: b.jpg - 2006:05:23 11:57:38

exiftool/lib/Image/ExifTool.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
2929
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
3030
%static_vars $advFmtSelf);
3131

32-
$VERSION = '12.89';
32+
$VERSION = '12.92';
3333
$RELEASE = '';
3434
@ISA = qw(Exporter);
3535
%EXPORT_TAGS = (

exiftool/lib/Image/ExifTool/Canon.pm

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
8888
sub ProcessExifInfo($$$);
8989
sub SwapWords($);
9090

91-
$VERSION = '4.78';
91+
$VERSION = '4.79';
9292

9393
# Note: Removed 'USM' from 'L' lenses since it is redundant - PH
9494
# (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -6403,6 +6403,8 @@ my %ciMaxFocal = (
64036403
12 => 'Flexizone Multi (9 point)', #PH (750D, 9 points)
64046404
13 => 'Flexizone Single', #PH (EOS M default, live view) (R7 calls this '1-point AF', ref github268)
64056405
14 => 'Large Zone AF', #PH/forum6237 (7DmkII)
6406+
16 => 'Large Zone AF (vertical)', #forum16223
6407+
17 => 'Large Zone AF (horizontal)', #forum16223
64066408
19 => 'Flexible Zone AF 1', #github268 (R7)
64076409
20 => 'Flexible Zone AF 2', #github268 (R7)
64086410
21 => 'Flexible Zone AF 3', #github268 (R7)
@@ -6921,6 +6923,10 @@ my %ciMaxFocal = (
69216923
Name => 'FlashExposureLock',
69226924
PrintConv => \%offOn,
69236925
},
6926+
32 => { #forum16257
6927+
Name => 'AntiFlicker',
6928+
PrintConv => \%offOn,
6929+
},
69246930
0x3d => { #IB
69256931
Name => 'RFLensType',
69266932
Format => 'int16u',
@@ -9123,19 +9129,19 @@ my %filterConv = (
91239129
2 => 'Disable',
91249130
},
91259131
},
9126-
18 => { #52
9132+
18 => { #52/forum16223
91279133
Name => 'AFStatusViewfinder',
9128-
Condition => '$$self{Model} =~ /1D X/',
9129-
Notes => '1D X only',
9134+
Condition => '$$self{Model} =~ /EOS-1D X|EOS R/',
9135+
Notes => '1D X and R models',
91309136
PrintConv => {
91319137
0 => 'Show in Field of View',
91329138
1 => 'Show Outside View',
91339139
},
91349140
},
9135-
19 => { #52
9141+
19 => { #52/forum16223
91369142
Name => 'InitialAFPointInServo',
9137-
Condition => '$$self{Model} =~ /1D X/',
9138-
Notes => '1D X only',
9143+
Condition => '$$self{Model} =~ /EOS-1D X|EOS R/',
9144+
Notes => '1D X and R models',
91399145
PrintConv => {
91409146
0 => 'Initial AF Point Selected',
91419147
1 => 'Manual AF Point',

exiftool/lib/Image/ExifTool/Nikon.pm

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ use Image::ExifTool::Exif;
6565
use Image::ExifTool::GPS;
6666
use Image::ExifTool::XMP;
6767

68-
$VERSION = '4.35';
68+
$VERSION = '4.36';
6969

7070
sub LensIDConv($$$);
7171
sub ProcessNikonAVI($$$);
@@ -2495,6 +2495,7 @@ my %base64coord = (
24952495
{ # D7100=0227
24962496
Condition => '$$valPt =~ /^0[28]/',
24972497
Name => 'ShotInfo02xx',
2498+
Drop => 50000, # drop if too large (>64k for Z6iii)
24982499
SubDirectory => {
24992500
TagTable => 'Image::ExifTool::Nikon::ShotInfo',
25002501
ProcessProc => \&ProcessNikonEncrypted,
@@ -5635,6 +5636,38 @@ my %nikonFocalConversions = (
56355636
Notes => 'P6000',
56365637
PrintConv => \%offOn,
56375638
},
5639+
# for Nikon Z6iii JPG and RAW images (version 0809),
5640+
# the offset table starts at 0x24 and is as follows
5641+
# JPG Offset Size NEF Offset Size
5642+
# 0) 0x0000 0 0) 0x009c 21604
5643+
# 1) 0x0000 0 1) 0x5500 6008
5644+
# 2) 0x009c 2528 2) 0x6c78 2528
5645+
# 3) 0x0a7c 200 3) 0x7658 200
5646+
# 4) 0x0b44 2488 4) 0x7720 2488
5647+
# 5) 0x14fc 1468 5) 0x80d8 1468
5648+
# 6) 0x1ab8 1032 6) 0x8694 1032
5649+
# 7) 0x1ec0 256 7) 0x8a9c 256
5650+
# 8) 0x1fc0 800 8) 0x8b9c 800
5651+
# 9) 0x22e0 144 9) 0x8ebc 144
5652+
# 10) 0x2370 64 10) 0x8f4c 64
5653+
# 11) 0x0000 0 11) 0x0000 0
5654+
# 12) 0x23b0 5009 12) 0x8f8c 5009
5655+
# 13) 0x3741 1536 13) 0xa31d 1536
5656+
# 14) 0x3d41 11928 14) 0xa91d 11928
5657+
# 15) 0x6bd9 5937 15) 0xd7b5 5937
5658+
# 16) 0x830a 500 16) 0xeee6 500
5659+
# 17) 0x84fe 160 17) 0xf0da 160
5660+
# 18) 0x859e 464 18) 0xf17a 464
5661+
# 19) 0x876e 8 19) 0xf34a 8
5662+
# 20) 0x8776 64 20) 0xf352 64
5663+
# 21) 0x87b6 6 21) 0xf392 6
5664+
# 22) 0x87bc 48 22) 0xf398 48
5665+
# 23) 0x87ec 20 23) 0xf3c8 20
5666+
# 24) 0x8800 108 24) 0xf3dc 108
5667+
# 25) 0x886c 8 25) 0xf448 8
5668+
# 26) 0x8874 2420 26) 0xf450 2420
5669+
# 27) 0x0000 0 27) 0x0000 0
5670+
# 28) 0x0000 0 28) 0x0000 0
56385671
0x66 => {
56395672
Name => 'VR_0x66',
56405673
Condition => '$$self{ShotInfoVersion} eq "0204"',

exiftool/lib/Image/ExifTool/PNG.pm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use strict;
3636
use vars qw($VERSION $AUTOLOAD %stdCase);
3737
use Image::ExifTool qw(:DataAccess :Utils);
3838

39-
$VERSION = '1.67';
39+
$VERSION = '1.68';
4040

4141
sub ProcessPNG_tEXt($$$);
4242
sub ProcessPNG_iTXt($$$);
@@ -1400,7 +1400,7 @@ sub ProcessPNG($$)
14001400
my $fastScan = $et->Options('FastScan');
14011401
my $hash = $$et{ImageDataHash};
14021402
my ($n, $sig, $err, $hbuf, $dbuf, $cbuf);
1403-
my ($wasHdr, $wasEnd, $wasDat, $doTxt, @txtOffset);
1403+
my ($wasHdr, $wasEnd, $wasDat, $doTxt, @txtOffset, $wasTrailer);
14041404

14051405
# check to be sure this is a valid PNG/MNG/JNG image
14061406
return 0 unless $raf->Read($sig,8) == 8 and $pngLookup{$sig};
@@ -1461,6 +1461,7 @@ sub ProcessPNG($$)
14611461
if ($wasEnd) {
14621462
last unless $n; # stop now if normal end of PNG
14631463
$et->WarnOnce("Trailer data after $fileType $endChunk chunk", 1);
1464+
$wasTrailer = 1;
14641465
last if $n < 8;
14651466
$$et{SET_GROUP1} = 'Trailer';
14661467
} elsif ($n != 8) {
@@ -1654,6 +1655,13 @@ sub ProcessPNG($$)
16541655
}
16551656
}
16561657
delete $$et{SET_GROUP1};
1658+
# read Samsung trailer if it exists
1659+
if ($wasTrailer and not $outfile and $raf->Seek(-8, 2) and
1660+
$raf->Read($dbuf,8) and $dbuf =~ /\0\0(QDIOBS|SEFT)$/) # (have only seen SEFT type)
1661+
{
1662+
require Image::ExifTool::Samsung;
1663+
Image::ExifTool::Samsung::ProcessSamsung($et, { DirName => 'Samsung', RAF => $raf });
1664+
}
16571665
return -1 if $outfile and ($err or not $wasEnd);
16581666
return 1; # this was a valid PNG/MNG/JNG image
16591667
}

exiftool/lib/Image/ExifTool/QuickTime.pm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
4848
use Image::ExifTool::Exif;
4949
use Image::ExifTool::GPS;
5050

51-
$VERSION = '2.98';
51+
$VERSION = '2.99';
5252

5353
sub ProcessMOV($$;$);
5454
sub ProcessKeys($$$);
@@ -9737,7 +9737,7 @@ sub ProcessMOV($$;$)
97379737
if ($size > 0x2000000) { # start to get worried above 32 MiB
97389738
# check for RIFF trailer (written by Auto-Vox dashcam)
97399739
if ($buff =~ /^(gpsa|gps0|gsen|gsea)...\0/s) { # (yet seen only gpsa as first record)
9740-
$et->VPrint(0, "Found RIFF trailer");
9740+
$et->VPrint(0, sprintf("Found RIFF trailer at offset 0x%x",$lastPos));
97419741
if ($et->Options('ExtractEmbedded')) {
97429742
$raf->Seek(-8, 1) or last; # seek back to start of trailer
97439743
my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
@@ -9746,6 +9746,11 @@ sub ProcessMOV($$;$)
97469746
EEWarn($et);
97479747
}
97489748
last;
9749+
} elsif ($buff eq 'CCCCCCCC') {
9750+
$et->VPrint(0, sprintf("Found Kenwood trailer at offset 0x%x",$lastPos));
9751+
my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
9752+
ProcessKenwoodTrailer($et, { RAF => $raf }, $tbl);
9753+
last;
97499754
}
97509755
$ignore = 1;
97519756
if ($tagInfo and not $$tagInfo{Unknown} and not $eeTag) {

exiftool/lib/Image/ExifTool/QuickTimeStream.pl

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ package Image::ExifTool::QuickTime;
109109
The tags below are extracted from timed metadata in QuickTime and other
110110
formats of video files when the ExtractEmbedded option is used. Although
111111
most of these tags are combined into the single table below, ExifTool
112-
currently reads 74 different formats of timed GPS metadata from video files.
112+
currently reads 76 different formats of timed GPS metadata from video files.
113113
},
114114
VARS => { NO_ID => 1 },
115115
GPSLatitude => { PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")', RawConv => '$$self{FoundGPSLatitude} = 1; $val' },
@@ -1420,9 +1420,10 @@ ($)
14201420
} elsif ($type eq 'gps ') { # (ie. GPSDataList tag)
14211421

14221422
if ($buff =~ /^....freeGPS /s) {
1423-
# process by brute scan instead if ExtractEmbedded >= 3
1424-
# (some videos don't reference all freeGPS info from 'gps ' table, eg. INNOV)
1425-
last if $eeOpt >= 3;
1423+
# parse freeGPS data unless done already in brute-force scan
1424+
# (some videos don't reference all freeGPS info from 'gps ' table, eg. INNOV,
1425+
# and some videos don't put 'gps ' data in mdat, eg XGODY 12" 4K Dashcam)
1426+
last if $$et{FoundGPSByScan};
14261427
# decode "freeGPS " data (Novatek and others)
14271428
ProcessFreeGPS($et, {
14281429
DataPt => \$buff,
@@ -2049,9 +2050,41 @@ ($$$)
20492050
}
20502051
}
20512052

2052-
} else {
2053+
} elsif ($$dataPt =~ m<^.{23}(\d{4})/(\d{2})/(\d{2}) (\d{2}):(\d{2}):(\d{2}) [N|S]>s) {
20532054

20542055
$debug and $et->FoundTag(GPSType => 16);
2056+
# XGODY 12" 4K Dashcam
2057+
# 0000: 00 00 00 a8 66 72 65 65 47 50 53 20 98 00 00 00 [....freeGPS ....]
2058+
# 0010: 6e 6f 72 6d 61 6c 3a 32 30 32 34 2f 30 35 2f 32 [normal:2024/05/2]
2059+
# 0020: 32 20 30 32 3a 35 34 3a 32 39 20 4e 3a 34 32 2e [2 02:54:29 N:42.]
2060+
# 0030: 33 38 32 34 37 30 20 57 3a 38 33 2e 33 38 39 35 [382470 W:83.3895]
2061+
# 0040: 37 30 20 35 33 2e 36 20 6b 6d 2f 68 20 78 3a 2d [70 53.6 km/h x:-]
2062+
# 0050: 30 2e 30 32 20 79 3a 30 2e 39 39 20 7a 3a 30 2e [0.02 y:0.99 z:0.]
2063+
# 0060: 31 30 20 41 3a 32 36 39 2e 32 20 48 3a 32 34 35 [10 A:269.2 H:245]
2064+
# 0070: 2e 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [.5..............]
2065+
($yr,$mon,$day,$hr,$min,$sec) = ($1,$2,$3,$4,$5,$6);
2066+
$$dataPt =~ s/\0+$//; # remove trailing nulls
2067+
my @a = split ' ', substr($$dataPt,43);
2068+
$ddd = 1;
2069+
foreach (@a) {
2070+
unless (/^([A-Z]):([-+]?\d+(\.\d+)?)$/i) {
2071+
# (the "km/h" after spd is display units? because the value is stored in knots)
2072+
defined $lon and not defined $spd and /^\d+\.\d+$/ and $spd = $_ * $knotsToKph;
2073+
next;
2074+
}
2075+
($1 eq 'N' or $1 eq 'S') and $lat = $2, $latRef = $1, next;
2076+
($1 eq 'E' or $1 eq 'W') and $lon = $2, $lonRef = $1, next;
2077+
($1 eq 'x' or $1 eq 'y' or $1 eq 'z') and push(@acc,$2), next;
2078+
$1 eq 'A' and $trk = $2, next; # (verified, but why 'A'?)
2079+
# seen 'H' - one might expect altitude ('H'eight), but it doesn't fit
2080+
# the sample data, so save all other information as an "Unknown_X" tag
2081+
$$tagTbl{$1} or AddTagToTable($tagTbl, $1, { Name => "Unknown_$1", Unknown => 1 });
2082+
push(@xtra, $1 => $2), next;
2083+
}
2084+
2085+
} else {
2086+
2087+
$debug and $et->FoundTag(GPSType => 17);
20552088
# (look for binary GPS as stored by Nextbase 512G, ref PH)
20562089
# 0000: 00 00 80 00 66 72 65 65 47 50 53 20 78 01 00 00 [....freeGPS x...]
20572090
# 0010: 78 2e 78 78 00 00 00 00 00 00 00 00 00 00 00 00 [x.xx............]
@@ -2115,7 +2148,7 @@ ($$$)
21152148
my $time = sprintf('%.2d:%.2d:%sZ',$hr,$min,$sec);
21162149
$et->HandleTag($tagTbl, GPSTimeStamp => $time);
21172150
}
2118-
if (defined $lat) {
2151+
if (defined $lat and defined $lon) {
21192152
# lat/long are in DDDMM.MMMM format unless $ddd is set
21202153
ConvertLatLon($lat, $lon) unless $ddd;
21212154
$et->HandleTag($tagTbl, GPSLatitude => $lat * ($latRef eq 'S' ? -1 : 1));
@@ -2680,6 +2713,53 @@ ($$$)
26802713
return 1;
26812714
}
26822715

2716+
#------------------------------------------------------------------------------
2717+
# Process Kenwood Dashcam trailer (forum16229)
2718+
# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
2719+
# Returns: 1 on success
2720+
# Sample data (chained 512-byte records starting like this):
2721+
# 0000: 43 43 43 43 43 43 43 43 43 43 43 43 43 43 47 50 [CCCCCCCCCCCCCCGP]
2722+
# 0010: 53 44 41 54 41 2d 2d 32 30 32 34 30 37 31 31 31 [SDATA--202407111]
2723+
# 0020: 32 30 34 31 32 4e 35 30 2e 36 31 32 33 38 36 30 [20412N50.6123860]
2724+
# 0030: 36 37 37 45 38 2e 37 30 32 37 31 38 30 39 38 39 [677E8.7027180989]
2725+
# 0040: 35 33 33 2e 30 30 30 30 30 30 30 30 30 30 30 30 [533.000000000000]
2726+
# 0050: 2e 30 30 30 30 30 30 30 30 30 30 30 30 30 2e 30 [.0000000000000.0]
2727+
# 0060: 31 39 39 39 39 39 39 39 35 35 33 2d 30 2e 30 39 [19999999553-0.09]
2728+
# 0070: 30 30 30 30 30 30 33 35 37 2d 30 2e 31 34 30 30 [000000357-0.1400]
2729+
# 0080: 30 30 30 30 30 35 39 47 50 53 44 41 54 41 2d 2d [0000059GPSDATA--]
2730+
sub ProcessKenwoodTrailer($$$)
2731+
{
2732+
my ($et, $dirInfo, $tagTbl) = @_;
2733+
my $raf = $$dirInfo{RAF};
2734+
my $buff;
2735+
# current file position is 8 bytes into the 14 C's, so test the next 6:
2736+
$raf->Read($buff, 14) and $buff eq 'CCCCCCCCCCCCCC' or return 0;
2737+
$et->VerboseDir('Kenwood trailer', undef, undef);
2738+
unless ($$et{OPTIONS}{ExtractEmbedded}) {
2739+
$et->WarnOnce('Use the ExtractEmbedded option to extract timed GPSData from Kenwood trailer',3);
2740+
return 1;
2741+
}
2742+
while ($raf->Read($buff, 121) and $buff =~ /^GPSDATA--(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/) {
2743+
FoundSomething($et, $tagTbl);
2744+
$et->HandleTag($tagTbl, GPSDateTime => "$1:$2:$3 $4:$5:$6");
2745+
my $i = 9 + 14;
2746+
my ($val, @acc, $tag);
2747+
foreach $tag (qw(GPSLatitude GPSLongitude GPSSpeed unk acc acc acc)) {
2748+
$val = substr($buff, $i, 14); $i += 14;
2749+
next if $tag eq 'unk';
2750+
my $hemi;
2751+
$hemi = $1 if $val =~ s/^([NSEW])//;
2752+
$val =~ /^[-+]?\d+\.\d+$/ or next;
2753+
$tag eq 'acc' and push(@acc,$val), next;
2754+
$val = -$val if $hemi and ($hemi eq 'S' or $hemi eq 'W');
2755+
$et->HandleTag($tagTbl, $tag => $val);
2756+
}
2757+
$et->HandleTag($tagTbl, Accelerometer => "@acc") if @acc == 3;
2758+
}
2759+
delete $$et{DOC_NUM};
2760+
return 1;
2761+
}
2762+
26832763
#------------------------------------------------------------------------------
26842764
# Process 'gps ' atom containing NMEA from Pittasoft Blackvue dashcam (ref PH)
26852765
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
@@ -3353,6 +3433,7 @@ ($)
33533433
}
33543434
my $dirInfo = { DataPt => \$buff, DataPos => $pos + $dataPos, DirLen => $len };
33553435
ProcessFreeGPS($et, $dirInfo, $tagTbl);
3436+
$$et{FoundGPSByScan} = 1;
33563437
}
33573438
$pos += $len;
33583439
$buf2 = substr($buff, $len);

0 commit comments

Comments
 (0)