Changes to Exposure tab. Exposure controls (blackpoint, brightness, contrast, S/H compression) are now implemented with NURBS curves. Brightness bug seems fixed as a consequence. Luminance tone curve has been expanded to separate curves for L,a,b; saturation slider has been added, but at the moment saturation limiting has not been implemented in the modified tool.

This commit is contained in:
Emil Martinec
2010-10-17 14:55:40 -05:00
parent 4de32da4c0
commit 9d31c6ad19
27 changed files with 517 additions and 88 deletions

View File

@@ -37,9 +37,12 @@ void ParamsEdited::set (bool v) {
toneCurve.autoexp = v;
toneCurve.clip = v;
toneCurve.expcomp = v;
lumaCurve.curve = v;
lumaCurve.brightness = v;
lumaCurve.contrast = v;
labCurve.lcurve = v;
labCurve.acurve = v;
labCurve.bcurve = v;
labCurve.brightness = v;
labCurve.contrast = v;
labCurve.saturation = v;
sharpening.enabled = v;
sharpening.radius = v;
sharpening.amount = v;
@@ -158,10 +161,13 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
toneCurve.autoexp = toneCurve.autoexp && p.toneCurve.autoexp == other.toneCurve.autoexp;
toneCurve.clip = toneCurve.clip && p.toneCurve.clip == other.toneCurve.clip;
toneCurve.expcomp = toneCurve.expcomp && p.toneCurve.expcomp == other.toneCurve.expcomp;
lumaCurve.curve = lumaCurve.curve && p.lumaCurve.curve == other.lumaCurve.curve;
lumaCurve.brightness = lumaCurve.brightness && p.lumaCurve.brightness == other.lumaCurve.brightness;
lumaCurve.contrast = lumaCurve.contrast && p.lumaCurve.contrast == other.lumaCurve.contrast;
sharpening.enabled = sharpening.enabled && p.sharpening.enabled == other.sharpening.enabled;
labCurve.lcurve = labCurve.lcurve && p.labCurve.lcurve == other.labCurve.lcurve;
labCurve.acurve = labCurve.acurve && p.labCurve.acurve == other.labCurve.acurve;
labCurve.bcurve = labCurve.bcurve && p.labCurve.bcurve == other.labCurve.bcurve;
labCurve.brightness = labCurve.brightness && p.labCurve.brightness == other.labCurve.brightness;
labCurve.contrast = labCurve.contrast && p.labCurve.contrast == other.labCurve.contrast;
labCurve.saturation = labCurve.saturation && p.labCurve.saturation == other.labCurve.saturation;
sharpening.enabled = sharpening.enabled && p.sharpening.enabled == other.sharpening.enabled;
sharpening.radius = sharpening.radius && p.sharpening.radius == other.sharpening.radius;
sharpening.amount = sharpening.amount && p.sharpening.amount == other.sharpening.amount;
sharpening.threshold = sharpening.threshold && p.sharpening.threshold == other.sharpening.threshold;
@@ -273,9 +279,12 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (toneCurve.autoexp) toEdit.toneCurve.autoexp = mods.toneCurve.autoexp;
if (toneCurve.clip) toEdit.toneCurve.clip = mods.toneCurve.clip;
if (toneCurve.expcomp) toEdit.toneCurve.expcomp = options.baBehav[ADDSET_TC_EXPCOMP] ? toEdit.toneCurve.expcomp + mods.toneCurve.expcomp : mods.toneCurve.expcomp;
if (lumaCurve.curve) toEdit.lumaCurve.curve = mods.lumaCurve.curve;
if (lumaCurve.brightness) toEdit.lumaCurve.brightness = options.baBehav[ADDSET_LC_BRIGHTNESS] ? toEdit.lumaCurve.brightness + mods.lumaCurve.brightness : mods.lumaCurve.brightness;
if (lumaCurve.contrast) toEdit.lumaCurve.contrast = options.baBehav[ADDSET_LC_CONTRAST] ? toEdit.lumaCurve.contrast + mods.lumaCurve.contrast : mods.lumaCurve.contrast;
if (labCurve.lcurve) toEdit.labCurve.lcurve = mods.labCurve.lcurve;
if (labCurve.acurve) toEdit.labCurve.acurve = mods.labCurve.acurve;
if (labCurve.bcurve) toEdit.labCurve.bcurve = mods.labCurve.bcurve;
if (labCurve.brightness) toEdit.labCurve.brightness = options.baBehav[ADDSET_LC_BRIGHTNESS] ? toEdit.labCurve.brightness + mods.labCurve.brightness : mods.labCurve.brightness;
if (labCurve.contrast) toEdit.labCurve.contrast = options.baBehav[ADDSET_LC_CONTRAST] ? toEdit.labCurve.contrast + mods.labCurve.contrast : mods.labCurve.contrast;
if (labCurve.saturation) toEdit.labCurve.saturation = options.baBehav[ADDSET_LC_SATURATION] ? toEdit.labCurve.saturation + mods.labCurve.saturation : mods.labCurve.saturation;
if (sharpening.enabled) toEdit.sharpening.enabled = mods.sharpening.enabled;
if (sharpening.radius) toEdit.sharpening.radius = mods.sharpening.radius;
if (sharpening.amount) toEdit.sharpening.amount = options.baBehav[ADDSET_SHARP_AMOUNT] ? toEdit.sharpening.amount + mods.sharpening.amount : mods.sharpening.amount;