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:
Oliver Duis
2011-09-04 09:20:33 +02:00
parent 9ac2163c70
commit 9dc19120c2
2 changed files with 7 additions and 7 deletions

View File

@@ -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;
}
}

View File

@@ -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