Custom output gamma, on behalf of Jacques; see issue #666

This commit is contained in:
Oliver Duis
2011-05-05 18:04:11 +02:00
parent a0c548fdf0
commit 22ec6055ce
22 changed files with 382 additions and 20 deletions

View File

@@ -199,10 +199,17 @@ namespace rtengine {
gamma= %f, skip= %d \n",def_mul,ecomp,black,hlcompr,shcompr,br,contr,defmul,gamma_,skip);*/
// compute parameters of the gamma curve
double start = exp(gamma_*log( -0.099 / ((1.0/gamma_-1.0)*1.099 )));
/*double start = exp(gamma_*log( -0.099 / ((1.0/gamma_-1.0)*1.099 )));
double slope = 1.099 * pow (start, 1.0/gamma_-1) - 0.099/start;
double mul = 1.099;
double add = 0.099;
// gamma BT709*/
//normalize gamma to sRGB
double start = exp(gamma_*log( -0.055 / ((1.0/gamma_-1.0)*1.055 )));
double slope = 1.055 * pow (start, 1.0/gamma_-1) - 0.055/start;
double mul = 1.055;
double add = 0.055;
// a: slope of the curve, black: starting point at the x axis
double a = pow (2.0, ecomp);