diff options
Diffstat (limited to 'lib/Image')
-rw-r--r-- | lib/Image/ExifTool.pm | 2 | ||||
-rw-r--r-- | lib/Image/ExifTool/Jpeg2000.pm | 27 | ||||
-rw-r--r-- | lib/Image/ExifTool/Nikon.pm | 5 | ||||
-rw-r--r-- | lib/Image/ExifTool/Olympus.pm | 4 | ||||
-rw-r--r-- | lib/Image/ExifTool/PNG.pm | 11 | ||||
-rw-r--r-- | lib/Image/ExifTool/QuickTimeStream.pl | 20 | ||||
-rw-r--r-- | lib/Image/ExifTool/Sony.pm | 4 | ||||
-rw-r--r-- | lib/Image/ExifTool/TagLookup.pm | 2 | ||||
-rw-r--r-- | lib/Image/ExifTool/TagNames.pod | 14 | ||||
-rw-r--r-- | lib/Image/ExifTool/WriteQuickTime.pl | 2 |
10 files changed, 53 insertions, 38 deletions
diff --git a/lib/Image/ExifTool.pm b/lib/Image/ExifTool.pm index 94a73505..96521672 100644 --- a/lib/Image/ExifTool.pm +++ b/lib/Image/ExifTool.pm @@ -28,7 +28,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes %mimeType $swapBytes $swapWords $currentByteOrder %unpackStd %jpegMarker %specialTags %fileTypeLookup $testLen $exePath); -$VERSION = '12.28'; +$VERSION = '12.29'; $RELEASE = ''; @ISA = qw(Exporter); %EXPORT_TAGS = ( diff --git a/lib/Image/ExifTool/Jpeg2000.pm b/lib/Image/ExifTool/Jpeg2000.pm index 1438a5d6..26dbb3bf 100644 --- a/lib/Image/ExifTool/Jpeg2000.pm +++ b/lib/Image/ExifTool/Jpeg2000.pm @@ -16,7 +16,7 @@ use strict; use vars qw($VERSION); use Image::ExifTool qw(:DataAccess :Utils); -$VERSION = '1.29'; +$VERSION = '1.30'; sub ProcessJpeg2000Box($$$); sub ProcessJUMD($$$); @@ -607,23 +607,24 @@ my %jumbfTypes = ( PROCESS_PROC => \&ProcessJUMD, GROUPS => { 0 => 'JUMBF', 1 => 'JUMBF', 2 => 'Image' }, NOTES => 'Information extracted from the JUMBF description box.', - 'jumd-type' => { + 'type' => { Name => 'JUMDType', ValueConv => 'unpack "H*", $val', PrintConv => q{ my @a = $val =~ /^(\w{8})(\w{4})(\w{4})(\w{16})$/; return $val unless @a; my $ascii = pack 'H*', $a[0]; - $a[0] = $ascii if $ascii =~ /^[a-zA-Z0-9]{4}$/; + $a[0] = "($ascii)" if $ascii =~ /^[a-zA-Z0-9]{4}$/; return join '-', @a; }, # seen: # cacb/cast/caas/cacl/casg/json-00110010800000aa00389b71 # 6579d6fbdba2446bb2ac1b82feeb89d1 - JPEG image }, - 'jumd-label' => { Name => 'JUMDLabel' }, - 'jumd-flags' => { - Name => 'JUMDFlags', + 'label' => { Name => 'JUMDLabel' }, + 'toggles' => { + Name => 'JUMDToggles', + Unknown => 1, PrintConv => { BITMASK => { 0 => 'Requestable', 1 => 'Label', @@ -631,8 +632,8 @@ my %jumbfTypes = ( 3 => 'Signature', }}, }, - 'jumd-id' => { Name => 'JUMDID', Description => 'JUMD ID' }, - 'jumd-sig' => { Name => 'JUMDSignature', PrintConv => 'unpack "H*", $val' }, + 'id' => { Name => 'JUMDID', Description => 'JUMD ID' }, + 'sig' => { Name => 'JUMDSignature', PrintConv => 'unpack "H*", $val' }, ); #------------------------------------------------------------------------------ @@ -675,16 +676,16 @@ sub ProcessJUMD($$$) delete $$et{JUMBFLabel}; $$dirInfo{DirLen} < 17 and $et->Warn('Truncated JUMD directory'), return 0; my $type = substr($$dataPt, $pos, 4); - $et->HandleTag($tagTablePtr, 'jumd-type', substr($$dataPt, $pos, 16)); + $et->HandleTag($tagTablePtr, 'type', substr($$dataPt, $pos, 16)); $pos += 16; my $flags = Get8u($dataPt, $pos++); - $et->HandleTag($tagTablePtr, 'jumd-flags', $flags); + $et->HandleTag($tagTablePtr, 'toggles', $flags); if ($flags & 0x02) { # label exists? pos($$dataPt) = $pos; $$dataPt =~ /\0/g or $et->Warn('Missing JUMD label terminator'), return 0; my $len = pos($$dataPt) - $pos; my $name = substr($$dataPt, $pos, $len); - $et->HandleTag($tagTablePtr, 'jumd-label', $name); + $et->HandleTag($tagTablePtr, 'label', $name); $pos += $len; if ($len) { $name =~ s/[^-_a-zA-Z0-9]([a-z])/\U$1/g; # capitalize characters after illegal characters @@ -696,12 +697,12 @@ sub ProcessJUMD($$$) } if ($flags & 0x04) { # ID exists? $pos + 4 > $end and $et->Warn('Missing JUMD ID'), return 0; - $et->HandleTag($tagTablePtr, 'jumd-id', Get32u($dataPt, $pos)); + $et->HandleTag($tagTablePtr, 'id', Get32u($dataPt, $pos)); $pos += 4; } if ($flags & 0x08) { # signature exists? $pos + 32 > $end and $et->Warn('Missing JUMD signature'), return 0; - $et->HandleTag($tagTablePtr, 'jumd-sig', substr($$dataPt, $pos, 32)); + $et->HandleTag($tagTablePtr, 'sig', substr($$dataPt, $pos, 32)); $pos += 32; } $pos == $end or $et->Warn('Extra data in JUMD box'." $pos $end", 1); diff --git a/lib/Image/ExifTool/Nikon.pm b/lib/Image/ExifTool/Nikon.pm index 561fde4f..f7721622 100644 --- a/lib/Image/ExifTool/Nikon.pm +++ b/lib/Image/ExifTool/Nikon.pm @@ -62,7 +62,7 @@ use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool::Exif; use Image::ExifTool::GPS; -$VERSION = '3.97'; +$VERSION = '3.98'; sub LensIDConv($$$); sub ProcessNikonAVI($$$); @@ -4722,6 +4722,9 @@ my %nikonFocalConversions = ( 21 => 'Nikkor Z 50mm f/1.2 S', #IB 22 => 'Nikkor Z 24-50mm f/4-6.3', #IB 23 => 'Nikkor Z 14-24mm f/2.8 S', #IB + 24 => 'Nikkor Z MC 105mm f/2.8 VR S', #IB + 27 => 'Nikkor Z MC 50mm f/2.8', #IB + 29 => 'Nikkor Z 28mm f/2.8', #IB }, }, 0x36 => { diff --git a/lib/Image/ExifTool/Olympus.pm b/lib/Image/ExifTool/Olympus.pm index e2ee5eb1..49213c47 100644 --- a/lib/Image/ExifTool/Olympus.pm +++ b/lib/Image/ExifTool/Olympus.pm @@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool::Exif; use Image::ExifTool::APP12; -$VERSION = '2.72'; +$VERSION = '2.73'; sub PrintLensInfo($$$); @@ -113,6 +113,7 @@ my %olympusLensTypes = ( '0 34 00' => 'Olympus Zuiko Digital ED 9-18mm F4.0-5.6', #7 '0 34 10' => 'Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro', #IB '0 35 00' => 'Olympus Zuiko Digital 14-54mm F2.8-3.5 II', #PH + '0 35 10' => 'Olympus M.Zuiko 100-400mm F5.0-6.3', #IB '0 36 10' => 'Olympus M.Zuiko Digital ED 8-25mm F4 Pro', #IB # Sigma lenses '1 01 00' => 'Sigma 18-50mm F3.5-5.6 DC', #8 @@ -183,6 +184,7 @@ my %olympusLensTypes = ( '2 36 10' => 'Leica DG Elmarit 200mm F2.8 Power OIS', #IB '2 37 10' => 'Leica DG Vario-Elmarit 50-200mm F2.8-4 Asph. Power OIS', #IB '2 38 10' => 'Leica DG Vario-Summilux 10-25mm F1.7 Asph.', #IB + '2 40 10' => 'Leica DG Vario-Summilux 25-50mm F1.7 Asph.', #IB (H-X2550) '3 01 00' => 'Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph.', #11 '3 02 00' => 'Leica D Summilux 25mm F1.4 Asph.', #11 # Tamron lenses diff --git a/lib/Image/ExifTool/PNG.pm b/lib/Image/ExifTool/PNG.pm index 8a7e3b8a..5686fdc3 100644 --- a/lib/Image/ExifTool/PNG.pm +++ b/lib/Image/ExifTool/PNG.pm @@ -36,7 +36,7 @@ use strict; use vars qw($VERSION $AUTOLOAD %stdCase); use Image::ExifTool qw(:DataAccess :Utils); -$VERSION = '1.57'; +$VERSION = '1.58'; sub ProcessPNG_tEXt($$$); sub ProcessPNG_iTXt($$$); @@ -89,7 +89,7 @@ $Image::ExifTool::PNG::colorType = -1; # data and text chunk types my %isDatChunk = ( IDAT => 1, JDAT => 1, JDAA => 1 ); -my %isTxtChunk = ( tEXt => 1, zTXt => 1, iTXt => 1 ); +my %isTxtChunk = ( tEXt => 1, zTXt => 1, iTXt => 1, eXIf => 1 ); # chunks that we shouldn't move other chunks across (ref 3) my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND => 1, @@ -1382,9 +1382,8 @@ sub ProcessPNG($$) # to add it as a text profile chunk if this isn't successful # (ie. if Compress::Zlib wasn't available) Add_iCCP($et, $outfile); - AddChunks($et, $outfile) or $err = 1; # all all text chunks - # add EXIF before end chunk if not found already - AddChunks($et, $outfile, 'IFD0') if $chunk eq $endChunk; + AddChunks($et, $outfile) or $err = 1; # add all text chunks + AddChunks($et, $outfile, 'IFD0') or $err = 1; # and eXIf chunk } elsif ($chunk eq 'PLTE') { # iCCP chunk must come before PLTE (and IDAT, handled above) # (ignore errors -- will add later as text profile if this fails) @@ -1444,7 +1443,7 @@ sub ProcessPNG($$) } else { $msg = 'fixed'; } - $et->WarnOnce("Text chunk(s) found after $$et{FileType} $wasDat ($msg)", 1); + $et->WarnOnce("Text/EXIF chunk(s) found after $$et{FileType} $wasDat ($msg)", 1); } # read chunk data and CRC unless ($raf->Read($dbuf,$len)==$len and $raf->Read($cbuf, 4)==4) { diff --git a/lib/Image/ExifTool/QuickTimeStream.pl b/lib/Image/ExifTool/QuickTimeStream.pl index 0d6e9119..bb7530fc 100644 --- a/lib/Image/ExifTool/QuickTimeStream.pl +++ b/lib/Image/ExifTool/QuickTimeStream.pl @@ -2107,9 +2107,9 @@ sub Process_mebx($$$) # parse using information from 'keys' table (eg. Apple iPhone7+ hevc 'Core Media Data Handler') $et->VerboseDir('mebx', undef, length $$dataPt); - my $pos = 0; - while ($pos + 8 < length $$dataPt) { - my $len = Get32u($dataPt, $pos); + my ($pos, $len); + for ($pos=0; $pos+8<length($$dataPt); $pos+=$len) { + $len = Get32u($dataPt, $pos); last if $len < 8 or $pos + $len > length $$dataPt; my $id = substr($$dataPt, $pos+4, 4); my $info = $$ee{'keys'}{$id}; @@ -2132,7 +2132,6 @@ sub Process_mebx($$$) } else { $et->WarnOnce('No key information for mebx ID ' . PrintableTagID($id,1)); } - $pos += $len; } return 1; } @@ -2645,12 +2644,19 @@ sub ProcessInsta360($;$) my $tmp = substr($buff, $p, $dlen); my @a = unpack('VVvaa8aa8aa8a8a8', $tmp); next unless $a[3] eq 'A'; # (ignore void fixes) - last unless ($a[5] eq 'N' or $a[5] eq 'S') and # (quick validation) - ($a[7] eq 'E' or $a[7] eq 'W'); + unless (($a[5] eq 'N' or $a[5] eq 'S') and # (quick validation) + ($a[7] eq 'E' or $a[7] eq 'W' or + # (odd, but I've seen "O" instead of "W". Perhaps + # when the language is french? ie. "Ouest"?) + $a[7] eq 'O')) + { + $et->Warn('Unrecognized INSV GPS format'); + last; + } $$et{DOC_NUM} = ++$$et{DOC_COUNT}; $a[$_] = GetDouble(\$a[$_], 0) foreach 4,6,8,9,10; $a[4] = -abs($a[4]) if $a[5] eq 'S'; # (abs just in case it was already signed) - $a[6] = -abs($a[6]) if $a[7] eq 'W'; + $a[6] = -abs($a[6]) if $a[7] ne 'E'; $et->HandleTag($tagTbl, GPSDateTime => Image::ExifTool::ConvertUnixTime($a[0]) . 'Z'); $et->HandleTag($tagTbl, GPSLatitude => $a[4]); $et->HandleTag($tagTbl, GPSLongitude => $a[6]); diff --git a/lib/Image/ExifTool/Sony.pm b/lib/Image/ExifTool/Sony.pm index a63d603c..3005fbc9 100644 --- a/lib/Image/ExifTool/Sony.pm +++ b/lib/Image/ExifTool/Sony.pm @@ -10131,6 +10131,10 @@ my %isoSetting2010 = ( PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)', }, 0x8001 => { Name => 'Sony_rtmd_0x8001', Format => 'int16u', %hidUnk }, + 0x8004 => { Name => 'Sony_rtmd_0x8004', Format => 'int16u', %hidUnk }, + 0x8005 => { Name => 'Sony_rtmd_0x8005', Format => 'int16u', %hidUnk }, + 0x800a => { Name => 'Sony_rtmd_0x800a', Format => 'int16u', %hidUnk }, + 0x800b => { Name => 'Sony_rtmd_0x800b', Format => 'int16u', %hidUnk }, # 0x8100 - 16 bytes starting with 0x060e2b340401 0x8100 => { Name => 'Sony_rtmd_0x8100', Format => 'int8u', %hidUnk }, 0x8101 => { Name => 'Sony_rtmd_0x8101', Format => 'int8u', %hidUnk }, # seen: 0,1 diff --git a/lib/Image/ExifTool/TagLookup.pm b/lib/Image/ExifTool/TagLookup.pm index ddad0c1c..681ec9ab 100644 --- a/lib/Image/ExifTool/TagLookup.pm +++ b/lib/Image/ExifTool/TagLookup.pm @@ -8729,10 +8729,10 @@ my %tagExists = ( 'jumbf' => 1, 'jumbfbox' => 1, 'jumbfdescr' => 1, - 'jumdflags' => 1, 'jumdid' => 1, 'jumdlabel' => 1, 'jumdsignature' => 1, + 'jumdtoggles' => 1, 'jumdtype' => 1, 'jumptoxpep' => 1, 'junk' => 1, diff --git a/lib/Image/ExifTool/TagNames.pod b/lib/Image/ExifTool/TagNames.pod index 9908949b..9852e7d8 100644 --- a/lib/Image/ExifTool/TagNames.pod +++ b/lib/Image/ExifTool/TagNames.pod @@ -21910,13 +21910,13 @@ tags in Jpeg2000 images. Information extracted from the JUMBF description box. - Tag ID Tag Name Writable - ------ -------- -------- - 'jumd-flags' JUMDFlags no - 'jumd-id' JUMDID no - 'jumd-label' JUMDLabel no - 'jumd-sig' JUMDSignature no - 'jumd-type' JUMDType no + Tag ID Tag Name Writable + ------ -------- -------- + 'id' JUMDID no + 'label' JUMDLabel no + 'sig' JUMDSignature no + 'toggles' JUMDToggles? no + 'type' JUMDType no =head3 Jpeg2000 CaptureResolution Tags diff --git a/lib/Image/ExifTool/WriteQuickTime.pl b/lib/Image/ExifTool/WriteQuickTime.pl index f31dabe8..30875887 100644 --- a/lib/Image/ExifTool/WriteQuickTime.pl +++ b/lib/Image/ExifTool/WriteQuickTime.pl @@ -849,7 +849,7 @@ sub WriteQuickTime($$$) # --> hold this terminator to the end $term = $hdr; } elsif ($n != 0) { - $et->Error('File format error'); + $et->Error("Unknown $n bytes at end of file", 1); } last; } |