Fixed enabling shadow/highlights on some pics clips highlights; weired artifacts with negatives
latter fix by Emil; see issue 965
This commit is contained in:
@@ -304,14 +304,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, LUTf & hltone
|
||||
}
|
||||
if (processLCE) {
|
||||
double sub = lceamount*(mapval-factor*(r*lumimul[0] + g*lumimul[1] + b*lumimul[2]));
|
||||
r = CLIP(factor*r-sub);
|
||||
g = CLIP(factor*g-sub);
|
||||
b = CLIP(factor*b-sub);
|
||||
r = factor*r-sub;
|
||||
g = factor*g-sub;
|
||||
b = factor*b-sub;
|
||||
}
|
||||
else {
|
||||
r = CLIP(factor*r);
|
||||
g = CLIP(factor*g);
|
||||
b = CLIP(factor*b);
|
||||
r = factor*r;
|
||||
g = factor*g;
|
||||
b = factor*b;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,7 @@ void SHMap::update (Imagefloat* img, double radius, double lumi[3], bool hq, int
|
||||
// fill with luminance
|
||||
for (int i=0; i<H; i++)
|
||||
for (int j=0; j<W; j++) {
|
||||
map[i][j] = lumi[0]*img->r[i][j] + lumi[1]*img->g[i][j] + lumi[2]*img->b[i][j];
|
||||
map[i][j] = fabs(lumi[0]*img->r[i][j]) + fabs(lumi[1]*img->g[i][j]) + fabs(lumi[2]*img->b[i][j]);
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
|
Reference in New Issue
Block a user