Image-ExifTool
view release on metacpan or search on metacpan
lib/Image/ExifTool/Minolta.pm view on Meta::CPAN
to bottom, with each row scanned left-to-right. The 21st value is the
middle cell, which gives the spot metering
},
ValueConv => sub { join ' ', map( { ($_ - 106) / 8 } split(' ',$_[0]) ) },
ValueConvInv => sub { join ' ', map( { int($_ * 8 + 106.5) } split(' ',$_[0]) ) },
},
0x690 => {
Name => 'MeasuredLV',
Notes => 'measured light value based on MeteringMode',
ValueConv => '($val-106)/8',
ValueConvInv => '$val * 8 + 106',
},
0x691 => {
Name => 'BrightnessValue',
ValueConv => '($val-106)/8',
ValueConvInv => '$val * 8 + 106',
},
# 0x87f - int8u: 33mm Equivalent magnification (FocusDistance = (1.5 * $val + 1) * FocalLength) (255=inf)
0x104c => { # (9600 bytes: 4 sets of 40x30 int16u values in the range 0-8191)
Name => 'TiffMeteringImage',
Format => 'undef[9600]',
Notes => q{
13-bit RBGG (?) 40x30 pixels, presumably metering info, converted to a 16-bit
TIFF image;
},
ValueConv => sub {
my ($val, $et) = @_;
return undef unless length $val >= 9600;
return \ "Binary data 7404 bytes" unless $et->Options('Binary');
my @dat = unpack('n*', $val); # for Big-endian
# TIFF header for a 16-bit RGB 10dpi 40x30 image
$val = Image::ExifTool::MakeTiffHeader(40,30,3,16,10);
# re-order data to RGB pixels
my ($i, @val);
for ($i=0; $i<40*30; ++$i) {
# data is 13-bit (max 8191), shift left to fill 16 bits
# (typically, this gives a very dark image since the data should
# really be anti-logged to convert from EV to perceived brightness)
# push @val, $dat[$i]<<3, $dat[$i+2400]<<3, $dat[$i+1200]<<3;
push @val, int(5041.1*log($dat[$i]+1)/log(2)), int(5041.1*log($dat[$i+2400]+1)/log(2)), int(5041.1*log($dat[$i+1200]+1)/log(2));
}
$val .= pack('v*', @val); # add TIFF strip data
return \$val;
},
},
0x49b8 => {
Name => 'ExposureTime',
ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
},
0x49ba => {
Name => 'ISO',
ValueConv => '2 ** (($val-48)/8) * 100',
ValueConvInv => '48 + 8*log($val/100)/log(2)',
PrintConv => 'int($val + 0.5)',
PrintConvInv => '$val',
},
0x49bb => { # (https://exiftool.org/forum/index.php/topic,3688.0.html)
# if this value is the 35mm equivalent magnification, then the formula could
# be (1.5 * 2**($val/16-5)+1) * FocalLength, but this tends to underestimate
# distance by about 18% (ref 20) (255=inf)
Name => 'FocusDistance',
ValueConv => '2**(($val-126)/16)',
ValueConvInv => 'log($val)/log(2)*16+126',
PrintConv => '$val > 266 ? "inf" : sprintf("%.2f m", $val)',
PrintConvInv => '$val=~s/ ?m//; $val=~/inf/i ? 267 : $val',
},
0x49bd => {
Name => 'LensType',
Format => 'int16uRev',
SeparateTable => 1,
ValueConvInv => 'int($val)', # (must truncate decimal part)
PrintConv => \%minoltaLensTypes,
PrintInt => 1,
},
0x49c0 => {
Name => 'ExposureCompensation', # (in exposure bracketing, this is the actual value used)
Format => 'int8s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x49c1 => {
Name => 'FlashExposureComp',
Description => 'Flash Exposure Compensation',
Format => 'int8s',
ValueConv => '$val / 8',
ValueConvInv => '$val * 8',
PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
0x49c2 => {
Name => 'ImageStabilization',
PrintConv => \%offOn,
},
0x49c3 => {
Name => 'BrightnessValue',
ValueConv => '($val-106)/8',
ValueConvInv => '$val * 8 + 106',
},
0x49c5 => {
Name => 'MaxAperture',
ValueConv => '2 ** (($val-8)/16)',
ValueConvInv => '8 + 16*log($val)/log(2)',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
# 0x49c6 - gives focal length using same formula as 0x49bb
0x49c7 => {
Name => 'FNumber',
ValueConv => '2 ** (($val-8)/16)',
ValueConvInv => '8 + 16*log($val)/log(2)',
PrintConv => 'sprintf("%.1f",$val)',
PrintConvInv => '$val',
},
0x49dc => {
Name => 'InternalSerialNumber',
Format => 'string[12]',
},
);
# tags in Konica Minolta MOV videos (ref PH)
# (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
%Image::ExifTool::Minolta::MOV1 = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
FIRST_ENTRY => 0,
NOTES => q{
This information is found in MOV videos from some Konica Minolta models such
as the DiMage Z10 and X50.
},
0 => {
Name => 'Make',
Format => 'string[32]',
},
0x20 => {
Name => 'ModelType',
Format => 'string[8]',
},
# (01 00 at offset 0x28)
0x2e => {
Name => 'ExposureTime',
Format => 'int32u',
ValueConv => '$val ? 10 / $val : 0',
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
},
0x32 => {
Name => 'FNumber',
Format => 'rational64u',
PrintConv => 'sprintf("%.1f",$val)',
},
0x3a => {
Name => 'ExposureCompensation',
Format => 'rational64s',
PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
},
# 0x4c => 'WhiteBalance', ?
0x50 => {
Name => 'FocalLength',
Format => 'rational64u',
PrintConv => 'sprintf("%.1f mm",$val)',
},
);
# tags in Minolta MOV videos (ref PH)
# (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
%Image::ExifTool::Minolta::MOV2 = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
( run in 0.462 second using v1.01-cache-2.11-cpan-39bf76dae61 )