Add Local Soft Light

This commit is contained in:
Desmis
2018-12-26 09:12:27 +01:00
parent 000b91f5eb
commit ed9b54db5a
12 changed files with 300 additions and 15 deletions

View File

@@ -71,4 +71,30 @@ void ImProcFunctions::softLight(LabImage *lab)
rgb2lab(working, *lab, params->icm.workingProfile);
}
void ImProcFunctions::softLightloc(LabImage *lab, LabImage *dst, float blend)
{
// if (!params->softlight.enabled || !params->softlight.strength) {
// return;
// }
Imagefloat working(lab->W, lab->H);
lab2rgb(*lab, working, params->icm.workingProfile);
// const float blend = stre / 100.f;
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int y = 0; y < working.getHeight(); ++y) {
for (int x = 0; x < working.getWidth(); ++x) {
working.r(y, x) = sl(blend, working.r(y, x));
working.g(y, x) = sl(blend, working.g(y, x));
working.b(y, x) = sl(blend, working.b(y, x));
}
}
rgb2lab(working, *dst, params->icm.workingProfile);
}
} // namespace rtengine