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) { if (processLCE) {
double sub = lceamount*(mapval-factor*(r*lumimul[0] + g*lumimul[1] + b*lumimul[2])); double sub = lceamount*(mapval-factor*(r*lumimul[0] + g*lumimul[1] + b*lumimul[2]));
r = CLIP(factor*r-sub); r = factor*r-sub;
g = CLIP(factor*g-sub); g = factor*g-sub;
b = CLIP(factor*b-sub); b = factor*b-sub;
} }
else { else {
r = CLIP(factor*r); r = factor*r;
g = CLIP(factor*g); g = factor*g;
b = CLIP(factor*b); 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 // fill with luminance
for (int i=0; i<H; i++) for (int i=0; i<H; i++)
for (int j=0; j<W; j++) { 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 #ifdef _OPENMP
#pragma omp parallel #pragma omp parallel