Add Local Soft Light
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user