Disable LCP CA correction if LCP distortion is enabled

This was the old behaviour before lensfun integration. In order to enable both CA and distortion correction from the LCP, more work is needed.

(temporary) fix for #4159
This commit is contained in:
Alberto Griggio 2017-10-26 15:02:55 +02:00
parent 8c328cafd1
commit 1c86c3c44d
2 changed files with 6 additions and 4 deletions

View File

@ -796,9 +796,6 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag
case ImProcFunctions::TRANSFORM_HIGH_QUALITY: {
enableLCPDist = pLCPMap && params->lensProf.useDist;
if (enableLCPCA) {
enableLCPDist = false;
}
enableCA = enableLCPCA || needsCA();
}
//no break on purpose
@ -810,6 +807,10 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag
}
}
if (enableLCPCA) {
enableLCPDist = false;
}
if (!enableCA) {
chDist[0] = 0.0;
}

View File

@ -817,7 +817,8 @@ private:
trImg = baseImg;
} else {
trImg = new Imagefloat (fw, fh);
} ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh,
}
ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh,
imgsrc->getMetaData(), imgsrc->getRotateDegree(), true);
if(trImg != baseImg) {
delete baseImg;