Corrected problem with SONY A100 RAW

This commit is contained in:
ffsup2 2010-06-02 23:23:07 +02:00
parent 3ed72f5236
commit 55ac48fbed

View File

@ -468,8 +468,14 @@ class SALensIDInterpreter : public IntLensInterpreter< int > {
virtual std::string toString (Tag* t) virtual std::string toString (Tag* t)
{ {
int lensID = t->toInt(); int lensID = t->toInt();
double maxApertureAtFocal = pow(2.0, t->getParent()->getParent()->getTag(0x9205)->toDouble()/2.0); // MaxApertureValue at focal Length Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue");
double focalLength = t->getParent()->getParent()->getTag(0x920A)->toDouble(); // Focal Length Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength");
double maxApertureAtFocal = 0.;
double focalLength = 0.;
if( apertureTag )
maxApertureAtFocal = pow(2.0, apertureTag->toDouble()/2.0);
if( focalLengthTag )
focalLength = focalLengthTag->toDouble();
return guess( lensID, focalLength, maxApertureAtFocal ); return guess( lensID, focalLength, maxApertureAtFocal );
} }
}; };