From 55ac48fbed50638fc45b64a583ecf972ab1e8eed Mon Sep 17 00:00:00 2001 From: ffsup2 Date: Wed, 2 Jun 2010 23:23:07 +0200 Subject: [PATCH] Corrected problem with SONY A100 RAW --- rtexif/sonyminoltaattribs.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 2eb10520d..caa9364d8 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -468,8 +468,14 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { virtual std::string toString (Tag* t) { int lensID = t->toInt(); - double maxApertureAtFocal = pow(2.0, t->getParent()->getParent()->getTag(0x9205)->toDouble()/2.0); // MaxApertureValue at focal Length - double focalLength = t->getParent()->getParent()->getTag(0x920A)->toDouble(); // Focal Length + Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue"); + 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 ); } };