Further patches to exposure and tone curve. Histogram now stays fixed in tone curve, but all sliders up to and including brightness/contrast are applied before tone curve histogram is calculated and displayed. Bug in tone curve interaction with highlight reconstruction is fixed.

This commit is contained in:
Emil Martinec
2010-11-14 17:11:54 -06:00
parent aa666fd19c
commit c296961a56
3 changed files with 186 additions and 9 deletions

View File

@@ -104,7 +104,7 @@ class CurveFactory {
return y*clower2(x/m, slope*m/y, 2.0-sr);
} else {
double slope = a/(1-b);
double m = a*D>1 ? b/a+(0.25+0.75*(1-1/D))/slope : b+(1-b)/4;
double m = a*D>1 ? b/a+(0.25)/slope : b+(1-b)/4;
double y = a*D>1 ? 0.25 : (m-b/a)*slope;
if (x<=m)
return b==0 ? x*slope : clower (x/m, slope*m/y, sr) * y;