Avoid Color shift - Gamut and Munsell Review in RT - branch Munsellgamut (#6673)

* Fixed numerous problems with gamut and Munsell in Local adjustments

* change gamut-munsell in lab adjustmnts - gamut in ciecam

* Improve XYZ colorimetry and tooltip

* Change event - format code - change labels tooltips

* Removed avoid_ and avoidmun_

* Removed avoidcolorshift in labcurve

* Push change proposed by Lawrence37 - compatibility with old pp3
This commit is contained in:
Desmis 2023-01-31 12:32:31 +01:00 committed by GitHub
parent ef7676826e
commit 9a245c1acb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 855 additions and 588 deletions

View File

@ -1414,6 +1414,7 @@ HISTORY_MSG_FILMNEGATIVE_COLORSPACE;Film negative color space
HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
HISTORY_MSG_FILMNEGATIVE_REF_SPOT;FN - Reference input
HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
HISTORY_MSG_GAMUTMUNSEL;Gamut-Munsell
HISTORY_MSG_HISTMATCHING;Auto-matched tone curve
HISTORY_MSG_HLBL;Color propagation - blur
HISTORY_MSG_ICL_LABGRIDCIEXY;Cie xy
@ -1441,6 +1442,7 @@ HISTORY_MSG_LOCALCONTRAST_DARKNESS;Local Contrast - Darkness
HISTORY_MSG_LOCALCONTRAST_ENABLED;Local Contrast
HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Local Contrast - Lightness
HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
HISTORY_MSG_LOCAL_GAMUTMUNSEL;Local - Gamut-Munsell
HISTORY_MSG_METADATA_MODE;Metadata copy mode
HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
@ -2608,8 +2610,6 @@ TP_ICM_WORKING_TRC_SRGB;sRGB g=2.4 s=12.92
TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction
TP_IMPULSEDENOISE_THRESH;Threshold
TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift
TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction (Uniform Perceptual Lab).
TP_LABCURVE_BRIGHTNESS;Lightness
TP_LABCURVE_CHROMATICITY;Chromaticity
TP_LABCURVE_CHROMA_TOOLTIP;To apply B&W toning, set Chromaticity to -100.
@ -2674,7 +2674,7 @@ TP_LOCALLAB_ARTIF_TOOLTIP;ΔE scope threshold increases the range of ΔE scope.
TP_LOCALLAB_AUTOGRAY;Auto mean luminance (Yb%)
TP_LOCALLAB_AUTOGRAYCIE;Auto
TP_LOCALLAB_AVOID;Avoid color shift
TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction (Uniform Perceptual Lab).\nMunsell correction always disabled when Jz or CAM16 is used.
TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction (Uniform Perceptual Lab).\nMunsell correction always disabled when Jz or CAM16 or Color Appearance and Lighting is used.\n\nDefault: Munsell.\nMunsell correction: fixes Lab mode hue drifts due to non-linearity, when chromaticity is changed (Uniform Perceptual Lab).\nLab: applies a gamut control, in relative colorimetric, Munsell is then applied.\nXYZ Absolute, applies gamut control, in absolute colorimetric, Munsell is then applied.\nXYZ Relative, applies gamut control, in relative colorimetric, Munsell is then applied.
TP_LOCALLAB_AVOIDMUN;Munsell correction only
TP_LOCALLAB_AVOIDMUN_TOOLTIP;Munsell correction always disabled when Jz or CAM16 is used.
TP_LOCALLAB_AVOIDRAD;Soft radius
@ -2904,6 +2904,11 @@ TP_LOCALLAB_GAMM;Gamma
TP_LOCALLAB_GAMMASKCOL;Gamma
TP_LOCALLAB_GAMMASK_TOOLTIP;Adjusting Gamma and Slope can provide a soft and artifact-free transformation of the mask by progressively modifying 'L' to avoid any discontinuities.
TP_LOCALLAB_GAMSH;Gamma
TP_LOCALLAB_GAMUTNON;None
TP_LOCALLAB_GAMUTLABRELA;Lab
TP_LOCALLAB_GAMUTXYZABSO;XYZ Absolute
TP_LOCALLAB_GAMUTXYZRELA;XYZ Relative
TP_LOCALLAB_GAMUTMUNSELL;Munsell only
TP_LOCALLAB_GAMW;Gamma (wavelet pyramids)
TP_LOCALLAB_GRADANG;Gradient angle
TP_LOCALLAB_GRADANG_TOOLTIP;Rotation angle in degrees: -180 0 +180.

File diff suppressed because it is too large Load Diff

View File

@ -257,7 +257,7 @@ enum class BlurType {
int shortcu, bool delt, const float hueref, const float chromaref, const float lumaref,
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic, float &fab);
void avoidcolshi(const struct local_params& lp, int sp, LabImage * original, LabImage *transformed, int cy, int cx, int sk);
void avoidcolshi(const struct local_params& lp, int sp, LabImage *transformed, LabImage *reserved, int cy, int cx, int sk);
void deltaEforMask(float **rdE, int bfw, int bfh, LabImage* bufcolorig, const float hueref, const float chromaref, const float lumaref,
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh);

View File

@ -12540,12 +12540,31 @@ void ImProcFunctions::clarimerge(const struct local_params& lp, float &mL, float
}
}
void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImage * original, LabImage *transformed, int cy, int cx, int sk)
void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImage *transformed, LabImage *reserved, int cy, int cx, int sk)
{
if (params->locallab.spots.at(sp).avoid && lp.islocal) {
int avoidgamut = 0;
if (params->locallab.spots.at(sp).avoidgamutMethod == "NONE") {
avoidgamut = 0;
} else if (params->locallab.spots.at(sp).avoidgamutMethod == "LAB") {
avoidgamut = 1;
} else if (params->locallab.spots.at(sp).avoidgamutMethod == "XYZ") {
avoidgamut = 2;
} else if (params->locallab.spots.at(sp).avoidgamutMethod == "XYZREL") {
avoidgamut = 3;
} else if (params->locallab.spots.at(sp).avoidgamutMethod == "MUNS") {
avoidgamut = 4;
}
if (avoidgamut == 0) {
return;
}
if (avoidgamut > 0 && lp.islocal) {
const float ach = lp.trans / 100.f;
bool execmunsell = true;
if(params->locallab.spots.at(sp).expcie && (params->locallab.spots.at(sp).modecam == "all" || params->locallab.spots.at(sp).modecam == "jz" || params->locallab.spots.at(sp).modecam == "cam16")) {
if (params->locallab.spots.at(sp).expcie && (params->locallab.spots.at(sp).modecam == "all" || params->locallab.spots.at(sp).modecam == "jz" || params->locallab.spots.at(sp).modecam == "cam16")) {
execmunsell = false;
}
@ -12556,11 +12575,18 @@ void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImag
{wiprof[2][0], wiprof[2][1], wiprof[2][2]}
};
TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile);
const double wp[3][3] = {//improve precision with double
{wprof[0][0], wprof[0][1], wprof[0][2]},
{wprof[1][0], wprof[1][1], wprof[1][2]},
{wprof[2][0], wprof[2][1], wprof[2][2]}
};
const float softr = params->locallab.spots.at(sp).avoidrad;//max softr = 30
const bool muns = params->locallab.spots.at(sp).avoidmun;//Munsell control with 200 LUT
// const bool muns = params->locallab.spots.at(sp).avoidmun;//Munsell control with 200 LUT
//improve precision with mint and maxt
const float tr = std::min(2.f, softr);
const float mint = 0.15f - 0.06f * tr;//between 0.15f and 0.03f
const float mint = 0.15f - 0.06f * tr;//between 0.15f and 0.03f
const float maxt = 0.98f + 0.008f * tr;//between 0.98f and 0.996f
const bool highlight = params->toneCurve.hrenabled;
@ -12581,6 +12607,7 @@ void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImag
#ifdef _OPENMP
#pragma omp for schedule(dynamic,16)
#endif
for (int y = 0; y < transformed->H; y++) {
const int loy = cy + y;
const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing
@ -12640,7 +12667,7 @@ void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImag
if (lp.shapmet == 0) {
calcTransition(lox, loy, ach, lp, zone, localFactor);
} else /*if (lp.shapmet == 1)*/ {
} else { /*if (lp.shapmet == 1)*/
calcTransitionrect(lox, loy, ach, lp, zone, localFactor);
}
@ -12675,42 +12702,103 @@ void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImag
sincosval.y = aa / (Chprov1 * 327.68f);
sincosval.x = bb / (Chprov1 * 327.68f);
}
#endif
float lnew = transformed->L[y][x];
float anew = transformed->a[y][x];
float bnew = transformed->b[y][x];
Lprov1 = lnew / 327.68f;
//HH = xatan2f(bnew, anew);
Color::pregamutlab(Lprov1, HH, chr);
Chprov1 = rtengine::min(Chprov1, chr);
if(!muns) {
float R, G, B;
if (avoidgamut == 1) { //Lab correction
Color::pregamutlab(Lprov1, HH, chr);
Chprov1 = rtengine::min(Chprov1, chr);
float R, G, B;
Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, mint, maxt);//replace for best results
}
transformed->L[y][x] = Lprov1 * 327.68f;
transformed->a[y][x] = 327.68f * Chprov1 * sincosval.y;
transformed->b[y][x] = 327.68f * Chprov1 * sincosval.x;
lnew = Lprov1 * 327.68f;
anew = 327.68f * Chprov1 * sincosval.y;
bnew = 327.68f * Chprov1 * sincosval.x;
//HH = xatan2f(bnew, anew);
transformed->a[y][x] = anew;
transformed->b[y][x] = bnew;
if (needHH) {
const float Lprov2 = original->L[y][x] / 327.68f;
} else if (avoidgamut == 2 || avoidgamut == 3) { //XYZ correction
float xg, yg, zg;
const float aag = transformed->a[y][x];//anew
const float bbg = transformed->b[y][x];//bnew
float Lag = transformed->L[y][x];
Color::Lab2XYZ(Lag, aag, bbg, xg, yg, zg);
float x0 = xg;
float y0 = yg;
float z0 = zg;
Color::gamutmap(xg, yg, zg, wp);
if (avoidgamut == 3) {//0.5f arbitrary coeff
xg = xg + 0.5f * (x0 - xg);
yg = yg + 0.5f * (y0 - yg);
zg = zg + 0.5f * (z0 - zg);
}
//Color::gamutmap(xg, yg, zg, wp);//Put XYZ in gamut wp
float aag2, bbg2;
Color::XYZ2Lab(xg, yg, zg, Lag, aag2, bbg2);
Lprov1 = Lag / 327.68f;
HH = xatan2f(bbg2, aag2);//rebuild HH in case of...absolute colorimetry
Chprov1 = std::sqrt(SQR(aag2) + SQR(bbg2)) / 327.68f;
if (Chprov1 == 0.0f) {
sincosval.y = 1.f;
sincosval.x = 0.0f;
} else {
sincosval.y = aag2 / (Chprov1 * 327.68f);
sincosval.x = bbg2 / (Chprov1 * 327.68f);
}
lnew = Lprov1 * 327.68f;
anew = 327.68f * Chprov1 * sincosval.y;
bnew = 327.68f * Chprov1 * sincosval.x;
transformed->a[y][x] = anew;
transformed->b[y][x] = bnew;
}
if (needHH && avoidgamut <= 4) {//Munsell
Lprov1 = lnew / 327.68f;
float Chprov = sqrt(SQR(anew) + SQR(bnew)) / 327.68f;
const float Lprov2 = reserved->L[y][x] / 327.68f;
float correctionHue = 0.f; // Munsell's correction
float correctlum = 0.f;
const float memChprov = std::sqrt(SQR(original->a[y][x]) + SQR(original->b[y][x])) / 327.68f;
float Chprov = std::sqrt(SQR(transformed->a[y][x]) + SQR(transformed->b[y][x])) / 327.68f;
if(execmunsell) {
const float memChprov = std::sqrt(SQR(reserved->a[y][x]) + SQR(reserved->b[y][x])) / 327.68f;
if (execmunsell) {
Color::AllMunsellLch(true, Lprov1, Lprov2, HH, Chprov, memChprov, correctionHue, correctlum);
}
if (std::fabs(correctionHue) < 0.015f) {
HH += correctlum; // correct only if correct Munsell chroma very small.
if (correctionHue != 0.f || correctlum != 0.f) {
if (std::fabs(correctionHue) < 0.015f) {
HH += correctlum; // correct only if correct Munsell chroma very small.
}
sincosval = xsincosf(HH + correctionHue);
}
sincosval = xsincosf(HH + correctionHue);
transformed->a[y][x] = 327.68f * Chprov * sincosval.y; // apply Munsell
transformed->b[y][x] = 327.68f * Chprov * sincosval.x;
anew = 327.68f * Chprov * sincosval.y; // apply Munsell
bnew = 327.68f * Chprov * sincosval.x;
transformed->a[y][x] = anew; // apply Munsell
transformed->b[y][x] = bnew;
}
}
}
}
//Guidedfilter to reduce artifacts in transitions
if (softr != 0.f) {//soft for L a b because we change color...
//Guidedfilter to reduce artifacts in transitions : case Lab
if (softr != 0.f && avoidgamut == 1) {//soft for L a b because we change color...
const float tmpblur = softr < 0.f ? -1.f / softr : 1.f + softr;
const int r1 = rtengine::max<int>(6 / sk * tmpblur + 0.5f, 1);
const int r2 = rtengine::max<int>(10 / sk * tmpblur + 0.5f, 1);
@ -12734,13 +12822,15 @@ void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImag
for (int y = 0; y < bh ; y++) {
for (int x = 0; x < bw; x++) {
ble[y][x] = transformed->L[y][x] / 32768.f;
guid[y][x] = original->L[y][x] / 32768.f;
guid[y][x] = reserved->L[y][x] / 32768.f;
}
}
rtengine::guidedFilter(guid, ble, ble, r2, 0.2f * epsil, multiThread);
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
#endif
for (int y = 0; y < bh; y++) {
for (int x = 0; x < bw; x++) {
transformed->L[y][x] = 32768.f * ble[y][x];
@ -12757,11 +12847,13 @@ void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImag
blechro[y][x] = std::sqrt(SQR(transformed->b[y][x]) + SQR(transformed->a[y][x])) / 32768.f;
}
}
rtengine::guidedFilter(guid, blechro, blechro, r1, epsil, multiThread);
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
#endif
for (int y = 0; y < bh; y++) {
for (int x = 0; x < bw; x++) {
const float Chprov1 = std::sqrt(SQR(transformed->a[y][x]) + SQR(transformed->b[y][x]));
@ -13286,7 +13378,7 @@ void ImProcFunctions::Lab_Local(
struct local_params lp;
calcLocalParams(sp, oW, oH, params->locallab, lp, prevDeltaE, llColorMask, llColorMaskinv, llExpMask, llExpMaskinv, llSHMask, llSHMaskinv, llvibMask, lllcMask, llsharMask, llcbMask, llretiMask, llsoftMask, lltmMask, llblMask, lllogMask, ll_Mask, llcieMask, locwavCurveden, locwavdenutili);
avoidcolshi(lp, sp, original, transformed, cy, cx, sk);
//avoidcolshi(lp, sp, transformed, reserved, cy, cx, sk);
const float radius = lp.rad / (sk * 1.4); //0 to 70 ==> see skip
int levred;
@ -19188,7 +19280,7 @@ void ImProcFunctions::Lab_Local(
// Gamut and Munsell control - very important do not deactivated to avoid crash
avoidcolshi(lp, sp, original, transformed, cy, cx, sk);
avoidcolshi(lp, sp, transformed, reserved, cy, cx, sk);
}
}

View File

@ -137,7 +137,7 @@ enum ProcEventCode {
EvHLComprThreshold = 107,
EvResizeBoundingBox = 108,
EvResizeAppliesTo = 109,
EvLAvoidColorShift = 110,
//EvLAvoidColorShift = 110,
obsolete_111 = 111, // obsolete
EvLRSTProtection = 112,
EvDemosaicDCBIter = 113,
@ -617,7 +617,7 @@ enum ProcEventCode {
Evlocallabadjblur = 587,
Evlocallabbilateral = 588,
Evlocallabsensiden = 589,
Evlocallabavoid = 590,
// Evlocallabavoid = 590,
Evlocallabsharcontrast = 591,
EvLocenacontrast = 592,
Evlocallablcradius = 593,
@ -1067,7 +1067,7 @@ enum ProcEventCode {
Evlocallabnlgam = 1037,
Evlocallabdivgr = 1038,
EvLocallabSpotavoidrad = 1039,
EvLocallabSpotavoidmun = 1040,
//EvLocallabSpotavoidmun = 1040,
Evlocallabcontthres = 1041,
Evlocallabnorm = 1042,
Evlocallabreparw = 1043,

View File

@ -608,7 +608,7 @@ LCurveParams::LCurveParams() :
brightness(0),
contrast(0),
chromaticity(0),
avoidcolorshift(false),
gamutmunselmethod("MUN"),
rstprotection(0),
lcredsk(true)
{
@ -630,7 +630,7 @@ bool LCurveParams::operator ==(const LCurveParams& other) const
&& brightness == other.brightness
&& contrast == other.contrast
&& chromaticity == other.chromaticity
&& avoidcolorshift == other.avoidcolorshift
&& gamutmunselmethod == other.gamutmunselmethod
&& rstprotection == other.rstprotection
&& lcredsk == other.lcredsk;
}
@ -2848,6 +2848,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
structexclu(0),
struc(4.0),
shapeMethod("IND"),
avoidgamutMethod("MUNS"),
loc{150, 150, 150, 150},
centerX(0),
centerY(0),
@ -2862,13 +2863,11 @@ LocallabParams::LocallabSpot::LocallabSpot() :
balanh(1.0),
colorde(5.0),
colorscope(30.0),
avoidrad(0.7),
avoidrad(0.),
transitweak(1.0),
transitgrad(0.0),
hishow(false),
activ(true),
avoid(false),
avoidmun(false),
blwh(false),
recurs(false),
laplac(true),
@ -4560,6 +4559,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& structexclu == other.structexclu
&& struc == other.struc
&& shapeMethod == other.shapeMethod
&& avoidgamutMethod == other.avoidgamutMethod
&& loc == other.loc
&& centerX == other.centerX
&& centerY == other.centerY
@ -4579,8 +4579,6 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& transitgrad == other.transitgrad
&& hishow == other.hishow
&& activ == other.activ
&& avoid == other.avoid
&& avoidmun == other.avoidmun
&& blwh == other.blwh
&& recurs == other.recurs
&& laplac == other.laplac
@ -6045,7 +6043,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->labCurve.brightness, "Luminance Curve", "Brightness", labCurve.brightness, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.contrast, "Luminance Curve", "Contrast", labCurve.contrast, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.chromaticity, "Luminance Curve", "Chromaticity", labCurve.chromaticity, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.avoidcolorshift, "Luminance Curve", "AvoidColorShift", labCurve.avoidcolorshift, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.gamutmunselmethod, "Luminance Curve", "Gamutmunse", labCurve.gamutmunselmethod, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.rstprotection, "Luminance Curve", "RedAndSkinTonesProtection", labCurve.rstprotection, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.lcredsk, "Luminance Curve", "LCredsk", labCurve.lcredsk, keyFile);
saveToKeyfile(!pedited || pedited->labCurve.lcurve, "Luminance Curve", "LCurve", labCurve.lcurve, keyFile);
@ -6347,6 +6345,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->structexclu, "Locallab", "StructExclu_" + index_str, spot.structexclu, keyFile);
saveToKeyfile(!pedited || spot_edited->struc, "Locallab", "Struc_" + index_str, spot.struc, keyFile);
saveToKeyfile(!pedited || spot_edited->shapeMethod, "Locallab", "ShapeMethod_" + index_str, spot.shapeMethod, keyFile);
saveToKeyfile(!pedited || spot_edited->avoidgamutMethod, "Locallab", "AvoidgamutMethod_" + index_str, spot.avoidgamutMethod, keyFile);
saveToKeyfile(!pedited || spot_edited->loc, "Locallab", "Loc_" + index_str, spot.loc, keyFile);
saveToKeyfile(!pedited || spot_edited->centerX, "Locallab", "CenterX_" + index_str, spot.centerX, keyFile);
saveToKeyfile(!pedited || spot_edited->centerY, "Locallab", "CenterY_" + index_str, spot.centerY, keyFile);
@ -6366,8 +6365,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->transitgrad, "Locallab", "Transitgrad_" + index_str, spot.transitgrad, keyFile);
saveToKeyfile(!pedited || spot_edited->hishow, "Locallab", "Hishow_" + index_str, spot.hishow, keyFile);
saveToKeyfile(!pedited || spot_edited->activ, "Locallab", "Activ_" + index_str, spot.activ, keyFile);
saveToKeyfile(!pedited || spot_edited->avoid, "Locallab", "Avoid_" + index_str, spot.avoid, keyFile);
saveToKeyfile(!pedited || spot_edited->avoidmun, "Locallab", "Avoidmun_" + index_str, spot.avoidmun, keyFile);
saveToKeyfile(!pedited || spot_edited->blwh, "Locallab", "Blwh_" + index_str, spot.blwh, keyFile);
saveToKeyfile(!pedited || spot_edited->recurs, "Locallab", "Recurs_" + index_str, spot.recurs, keyFile);
saveToKeyfile(!pedited || spot_edited->laplac, "Locallab", "Laplac_" + index_str, spot.laplac, keyFile);
@ -7871,7 +7868,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
// if Saturation == 0, should we set BWToning on?
assignFromKeyfile(keyFile, "Luminance Curve", "Saturation", pedited, labCurve.chromaticity, pedited->labCurve.chromaticity);
// transform AvoidColorClipping into AvoidColorShift
assignFromKeyfile(keyFile, "Luminance Curve", "AvoidColorClipping", pedited, labCurve.avoidcolorshift, pedited->labCurve.avoidcolorshift);
// assignFromKeyfile(keyFile, "Luminance Curve", "AvoidColorClipping", pedited, labCurve.avoidcolorshift, pedited->labCurve.avoidcolorshift);
} else {
if (keyFile.has_key("Luminance Curve", "Chromaticity")) {
labCurve.chromaticity = keyFile.get_integer("Luminance Curve", "Chromaticity");
@ -7885,7 +7882,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
}
}
assignFromKeyfile(keyFile, "Luminance Curve", "AvoidColorShift", pedited, labCurve.avoidcolorshift, pedited->labCurve.avoidcolorshift);
assignFromKeyfile(keyFile, "Luminance Curve", "RedAndSkinTonesProtection", pedited, labCurve.rstprotection, pedited->labCurve.rstprotection);
}
@ -7914,6 +7910,25 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Luminance Curve", "hhCurve", pedited, labCurve.hhcurve, pedited->labCurve.hhcurve);
assignFromKeyfile(keyFile, "Luminance Curve", "LcCurve", pedited, labCurve.lccurve, pedited->labCurve.lccurve);
assignFromKeyfile(keyFile, "Luminance Curve", "ClCurve", pedited, labCurve.clcurve, pedited->labCurve.clcurve);
if (keyFile.has_key("Luminance Curve", "Gamutmunse")) {
assignFromKeyfile(keyFile, "Luminance Curve", "Gamutmunse", pedited, labCurve.gamutmunselmethod, pedited->labCurve.gamutmunselmethod);
} else {
if (ppVersion < 303) {
if (keyFile.has_key("Luminance Curve", "AvoidColorClipping")) {
labCurve.gamutmunselmethod =
keyFile.get_boolean("Luminance Curve", "AvoidColorClipping") ? "LAB" : "NONE";
if (pedited) {
pedited->labCurve.gamutmunselmethod = true;
}
}
} else if (keyFile.has_key("Luminance Curve", "AvoidColorShift")) {
labCurve.gamutmunselmethod =
keyFile.get_boolean("Luminance Curve", "AvoidColorShift") ? "LAB" : "NONE";
if (pedited) {
pedited->labCurve.gamutmunselmethod = true;
}
}
}
}
if (keyFile.has_group("Sharpening")) {
@ -8423,6 +8438,16 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "StructExclu_" + index_str, pedited, spot.structexclu, spotEdited.structexclu);
assignFromKeyfile(keyFile, "Locallab", "Struc_" + index_str, pedited, spot.struc, spotEdited.struc);
assignFromKeyfile(keyFile, "Locallab", "ShapeMethod_" + index_str, pedited, spot.shapeMethod, spotEdited.shapeMethod);
if (keyFile.has_key("Locallab", "AvoidgamutMethod_" + index_str)) {
assignFromKeyfile(keyFile, "Locallab", "AvoidgamutMethod_" + index_str, pedited, spot.avoidgamutMethod, spotEdited.avoidgamutMethod);
} else if (keyFile.has_key("Locallab", "Avoid_" + index_str)) {
const bool avoid = keyFile.get_boolean("Locallab", "Avoid_" + index_str);
const bool munsell = keyFile.has_key("Locallab", "Avoidmun_" + index_str) && keyFile.get_boolean("Locallab", "Avoidmun_" + index_str);
spot.avoidgamutMethod = avoid ? (munsell ? "MUNS" : "LAB") : "NONE";
if (pedited) {
spotEdited.avoidgamutMethod = true;
}
}
assignFromKeyfile(keyFile, "Locallab", "Loc_" + index_str, pedited, spot.loc, spotEdited.loc);
assignFromKeyfile(keyFile, "Locallab", "CenterX_" + index_str, pedited, spot.centerX, spotEdited.centerX);
assignFromKeyfile(keyFile, "Locallab", "CenterY_" + index_str, pedited, spot.centerY, spotEdited.centerY);
@ -8442,8 +8467,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Transitgrad_" + index_str, pedited, spot.transitgrad, spotEdited.transitgrad);
assignFromKeyfile(keyFile, "Locallab", "Hishow_" + index_str, pedited, spot.hishow, spotEdited.hishow);
assignFromKeyfile(keyFile, "Locallab", "Activ_" + index_str, pedited, spot.activ, spotEdited.activ);
assignFromKeyfile(keyFile, "Locallab", "Avoid_" + index_str, pedited, spot.avoid, spotEdited.avoid);
assignFromKeyfile(keyFile, "Locallab", "Avoidmun_" + index_str, pedited, spot.avoidmun, spotEdited.avoidmun);
assignFromKeyfile(keyFile, "Locallab", "Blwh_" + index_str, pedited, spot.blwh, spotEdited.blwh);
assignFromKeyfile(keyFile, "Locallab", "Recurs_" + index_str, pedited, spot.recurs, spotEdited.recurs);
assignFromKeyfile(keyFile, "Locallab", "Laplac_" + index_str, pedited, spot.laplac, spotEdited.laplac);

View File

@ -376,7 +376,7 @@ struct LCurveParams {
int brightness;
int contrast;
int chromaticity;
bool avoidcolorshift;
Glib::ustring gamutmunselmethod;
double rstprotection;
bool lcredsk;
@ -1019,6 +1019,8 @@ struct LocallabParams {
int structexclu;
double struc;
Glib::ustring shapeMethod; // IND, SYM, INDSL, SYMSL
Glib::ustring avoidgamutMethod; // NONE, LAB, XYZ
std::vector<int> loc; // For ellipse/rectangle: {locX, locXL, locY, locYT}
int centerX;
int centerY;
@ -1038,8 +1040,6 @@ struct LocallabParams {
double transitgrad;
bool hishow;
bool activ;
bool avoid;
bool avoidmun;
bool blwh;
bool recurs;
bool laplac;

View File

@ -1185,8 +1185,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
AUTOEXP, //Evlocallabforcebw
AUTOEXP, //Evlocallabsigjz
AUTOEXP, //Evlocallabsigq
AUTOEXP //Evlocallablogcie
AUTOEXP //Evlocallablogcie
};

View File

@ -49,7 +49,8 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB
metHBox->set_spacing (2);
Gtk::Label* metLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_MET") + ":"));
metHBox->pack_start (*metLabel, Gtk::PACK_SHRINK);
method = Gtk::manage (new MyComboBoxText ());
method = Gtk::manage (new MyComboBoxText ());
method->append (M("TP_BWMIX_MET_DESAT"));
method->append (M("TP_BWMIX_MET_LUMEQUAL"));
method->append (M("TP_BWMIX_MET_CHANMIX"));

View File

@ -24,6 +24,7 @@
#include "options.h"
#include "../rtengine/procparams.h"
#include "rtimage.h"
#include "eventmapper.h"
using namespace rtengine;
using namespace procparams;
@ -55,6 +56,7 @@ ControlSpotPanel::ControlSpotPanel():
qualityMethod_(Gtk::manage(new MyComboBoxText())),
//complexMethod_(Gtk::manage(new MyComboBoxText())),
wavMethod_(Gtk::manage(new MyComboBoxText())),
avoidgamutMethod_(Gtk::manage(new MyComboBoxText())),
sensiexclu_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIEXCLU"), 0, 100, 1, 12))),
structexclu_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))),
@ -76,15 +78,13 @@ ControlSpotPanel::ControlSpotPanel():
balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-red-green-small.png"))))),
colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-green-small.png"))))),
colorscope_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORSCOPE"), 0., 100.0, 1., 30.))),
avoidrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AVOIDRAD"), 0., 30.0, 0.1, 0.7))),
avoidrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AVOIDRAD"), 0., 30.0, 0.1, 0.))),
scopemask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCOPEMASK"), 0, 100, 1, 60))),
denoichmask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DENOIMASK"), 0., 100., 0.5, 0))),
lumask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMASK"), -50, 30, 1, 10, Gtk::manage(new RTImage("circle-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-small.png")) ))),
hishow_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_PREVSHOW")))),
activ_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIVSPOT")))),
avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))),
avoidmun_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOIDMUN")))),
blwh_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLWH")))),
recurs_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_RECURS")))),
laplac_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LAPLACC")))),
@ -100,6 +100,7 @@ ControlSpotPanel::ControlSpotPanel():
preview_(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
ctboxshape(Gtk::manage(new Gtk::Box())),
ctboxshapemethod(Gtk::manage(new Gtk::Box())),
ctboxgamut(Gtk::manage(new Gtk::Box())),
controlPanelListener(nullptr),
lastObject_(-1),
@ -111,6 +112,8 @@ ControlSpotPanel::ControlSpotPanel():
excluFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EXCLUF")))),
maskPrevActive(false)
{
auto m = ProcEventMapper::getInstance();
EvLocallabavoidgamutMethod = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_GAMUTMUNSEL");
const bool showtooltip = options.showtooltip;
pack_start(*hishow_);
@ -397,23 +400,30 @@ ControlSpotPanel::ControlSpotPanel():
activConn_ = activ_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::activChanged));
avoidConn_ = avoid_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged));
avoidmunConn_ = avoidmun_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::avoidmunChanged));
Gtk::Frame* const avFrame = Gtk::manage(new Gtk::Frame());
Gtk::Label* const labelgamut = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_AVOID") + ":"));
ctboxgamut->pack_start(*labelgamut, Gtk::PACK_SHRINK, 4);
avoidgamutMethod_->append(M("TP_LOCALLAB_GAMUTNON"));
avoidgamutMethod_->append(M("TP_LOCALLAB_GAMUTLABRELA"));
avoidgamutMethod_->append(M("TP_LOCALLAB_GAMUTXYZABSO"));
avoidgamutMethod_->append(M("TP_LOCALLAB_GAMUTXYZRELA"));
avoidgamutMethod_->append(M("TP_LOCALLAB_GAMUTMUNSELL"));
avoidgamutMethod_->set_active(4);
avoidgamutconn_ = avoidgamutMethod_->signal_changed().connect(
sigc::mem_fun(
*this, &ControlSpotPanel::avoidgamutMethodChanged));
ctboxgamut->pack_start(*avoidgamutMethod_);
if (showtooltip) {
ctboxgamut->set_tooltip_text(M("TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP"));
}
Gtk::Frame* const avFrame = Gtk::manage(new Gtk::Frame());
ToolParamBlock* const avbox = Gtk::manage(new ToolParamBlock());
avFrame->set_label_align(0.025, 0.5);
avFrame->set_label_widget(*avoid_);
avbox->pack_start(*ctboxgamut);
avbox->pack_start(*avoidrad_);
avbox->pack_start(*avoidmun_);
avFrame->add(*avbox);
specCaseBox->pack_start(*avFrame);
if (showtooltip) {
avoidmun_->set_tooltip_text(M("TP_LOCALLAB_AVOIDMUN_TOOLTIP"));
}
blwhConn_ = blwh_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::blwhChanged));
@ -429,7 +439,6 @@ ControlSpotPanel::ControlSpotPanel():
if (showtooltip) {
recurs_->set_tooltip_text(M("TP_LOCALLAB_RECURS_TOOLTIP"));
avoid_->set_tooltip_text(M("TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP"));
}
specCaseBox->pack_start(*recurs_);
@ -854,8 +863,6 @@ void ControlSpotPanel::load_ControlSpot_param()
avoidrad_->setValue((double)row[spots_.avoidrad]);
hishow_->set_active(row[spots_.hishow]);
activ_->set_active(row[spots_.activ]);
avoid_->set_active(row[spots_.avoid]);
avoidmun_->set_active(row[spots_.avoidmun]);
blwh_->set_active(row[spots_.blwh]);
recurs_->set_active(row[spots_.recurs]);
// laplac_->set_active(row[spots_.laplac]);
@ -868,6 +875,8 @@ void ControlSpotPanel::load_ControlSpot_param()
//savrest_->set_active(row[spots_.savrest]);
//complexMethod_->set_active(row[spots_.complexMethod]);
wavMethod_->set_active(row[spots_.wavMethod]);
avoidgamutMethod_->set_active(row[spots_.avoidgamutMethod]);
}
void ControlSpotPanel::controlspotChanged()
@ -1055,6 +1064,34 @@ void ControlSpotPanel::spotMethodChanged()
}
}
void ControlSpotPanel::avoidgamutMethodChanged()
{
// Get selected control spot
const auto s = treeview_->get_selection();
if (!s->count_selected_rows()) {
return;
}
const int meth = avoidgamutMethod_->get_active_row_number();
avoidrad_->show();
if(meth == 2 || meth == 3 || meth == 4) {
avoidrad_->hide();
}
const auto iter = s->get_selected();
Gtk::TreeModel::Row row = *iter;
row[spots_.avoidgamutMethod] = avoidgamutMethod_->get_active_row_number();
// Raise event
if (listener) {
listener->panelChanged(EvLocallabavoidgamutMethod, avoidgamutMethod_->get_active_text());
}
}
void ControlSpotPanel::shapeMethodChanged()
{
// printf("shapeMethodChanged\n");
@ -1217,6 +1254,7 @@ void ControlSpotPanel::updateParamVisibility()
// Update Control Spot GUI according to shapeMethod_ combobox state (to be compliant with shapeMethodChanged function)
const int method = shapeMethod_->get_active_row_number();
const int meth = avoidgamutMethod_->get_active_row_number();
if (!batchMode) {
if (method == 1 || method == 3) { // Symmetrical cases
@ -1260,6 +1298,12 @@ void ControlSpotPanel::updateParamVisibility()
centerY_->show();
}
if(meth == 1) {
avoidrad_->show();
} else {
avoidrad_->hide();
}
// Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with spotMethodChanged function)
if (multiImage && spotMethod_->get_active_text() == M("GENERAL_UNCHANGED")) {
excluFrame->show();
@ -1588,57 +1632,6 @@ void ControlSpotPanel::hishowChanged()
}
void ControlSpotPanel::avoidChanged()
{
// printf("avoidChanged\n");
// Get selected control spot
const auto s = treeview_->get_selection();
if (!s->count_selected_rows()) {
return;
}
const auto iter = s->get_selected();
Gtk::TreeModel::Row row = *iter;
row[spots_.avoid] = avoid_->get_active();
// Raise event
if (listener) {
if (avoid_->get_active()) {
listener->panelChanged(Evlocallabavoid, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(Evlocallabavoid, M("GENERAL_DISABLED"));
}
}
}
void ControlSpotPanel::avoidmunChanged()
{
// printf("avoidmunChanged\n");
// Get selected control spot
const auto s = treeview_->get_selection();
if (!s->count_selected_rows()) {
return;
}
const auto iter = s->get_selected();
Gtk::TreeModel::Row row = *iter;
row[spots_.avoidmun] = avoidmun_->get_active();
// Raise event
if (listener) {
if (avoidmun_->get_active()) {
listener->panelChanged(EvLocallabSpotavoidmun, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(EvLocallabSpotavoidmun, M("GENERAL_DISABLED"));
}
}
}
void ControlSpotPanel::activChanged()
{
// printf("activChanged\n");
@ -1859,8 +1852,6 @@ void ControlSpotPanel::disableParamlistener(bool cond)
avoidrad_->block(cond);
hishowconn_.block(cond);
activConn_.block(cond);
avoidConn_.block(cond);
avoidmunConn_.block(cond);
blwhConn_.block(cond);
recursConn_.block(cond);
laplacConn_.block(cond);
@ -1872,6 +1863,8 @@ void ControlSpotPanel::disableParamlistener(bool cond)
//savrestConn_.block(cond);
//complexMethodconn_.block(cond);
wavMethodconn_.block(cond);
avoidgamutconn_.block(cond);
}
void ControlSpotPanel::setParamEditable(bool cond)
@ -1906,8 +1899,6 @@ void ControlSpotPanel::setParamEditable(bool cond)
avoidrad_->set_sensitive(cond);
hishow_->set_sensitive(cond);
activ_->set_sensitive(cond);
avoid_->set_sensitive(cond);
avoidmun_->set_sensitive(cond);
blwh_->set_sensitive(cond);
recurs_->set_sensitive(cond);
laplac_->set_sensitive(cond);
@ -1920,6 +1911,7 @@ void ControlSpotPanel::setParamEditable(bool cond)
//complexMethod_->set_sensitive(cond);
wavMethod_->set_sensitive(cond);
preview_->set_sensitive(cond);
avoidgamutMethod_->set_sensitive(cond);
if (!cond) {
// Reset complex parameters visibility to default state
@ -2592,8 +2584,6 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int index)
r->lumask = row[spots_.lumask];
r->hishow = row[spots_.hishow];
r->activ = row[spots_.activ];
r->avoid = row[spots_.avoid];
r->avoidmun = row[spots_.avoidmun];
r->blwh = row[spots_.blwh];
r->recurs = row[spots_.recurs];
r->laplac = row[spots_.laplac];
@ -2601,6 +2591,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int index)
r->shortc = row[spots_.shortc];
//r->savrest = row[spots_.savrest];
r->wavMethod = row[spots_.wavMethod];
r->avoidgamutMethod = row[spots_.avoidgamutMethod];
return r;
}
@ -2725,8 +2716,6 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot)
row[spots_.avoidrad] = newSpot->avoidrad;
row[spots_.hishow] = newSpot->hishow;
row[spots_.activ] = newSpot->activ;
row[spots_.avoid] = newSpot->avoid;
row[spots_.avoidmun] = newSpot->avoidmun;
row[spots_.blwh] = newSpot->blwh;
row[spots_.recurs] = newSpot->recurs;
row[spots_.laplac] = newSpot->laplac;
@ -2738,6 +2727,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot)
//row[spots_.savrest] = newSpot->savrest;
row[spots_.complexMethod] = newSpot->complexMethod;
row[spots_.wavMethod] = newSpot->wavMethod;
row[spots_.avoidgamutMethod] = newSpot->avoidgamutMethod;
updateParamVisibility();
disableParamlistener(false);
@ -2845,8 +2835,6 @@ ControlSpotPanel::ControlSpots::ControlSpots()
add(avoidrad);
add(hishow);
add(activ);
add(avoid);
add(avoidmun);
add(blwh);
add(recurs);
add(laplac);
@ -2858,6 +2846,7 @@ ControlSpotPanel::ControlSpots::ControlSpots()
//add(savrest);
add(complexMethod);
add(wavMethod);
add(avoidgamutMethod);
}
//-----------------------------------------------------------------------------

View File

@ -57,6 +57,7 @@ public:
int sensiexclu;
int structexclu;
int shapeMethod; // 0 = Independent (mouse), 1 = Symmetrical (mouse), 2 = Independent (mouse + sliders), 3 = Symmetrical (mouse + sliders)
int avoidgamutMethod;
int locX;
int locXL;
int locY;
@ -79,8 +80,6 @@ public:
double avoidrad;
bool hishow;
bool activ;
bool avoid;
bool avoidmun;
bool blwh;
bool recurs;
bool laplac;
@ -243,7 +242,8 @@ private:
void spotMethodChanged();
void shapeMethodChanged();
void qualityMethodChanged();
//void complexMethodChanged();
void avoidgamutMethodChanged();
//void complexMethodChanged();
void wavMethodChanged();
void updateParamVisibility();
@ -252,8 +252,6 @@ private:
void hishowChanged();
void activChanged();
void avoidChanged();
void avoidmunChanged();
void blwhChanged();
void recursChanged();
void laplacChanged();
@ -293,6 +291,7 @@ private:
Gtk::TreeModelColumn<int> sensiexclu;
Gtk::TreeModelColumn<int> structexclu;
Gtk::TreeModelColumn<int> shapeMethod; // 0 = Independent (mouse), 1 = Symmetrical (mouse), 2 = Independent (mouse + sliders), 3 = Symmetrical (mouse + sliders)
Gtk::TreeModelColumn<int> avoidgamutMethod;
Gtk::TreeModelColumn<int> locX;
Gtk::TreeModelColumn<int> locXL;
Gtk::TreeModelColumn<int> locY;
@ -315,8 +314,6 @@ private:
Gtk::TreeModelColumn<double> avoidrad;
Gtk::TreeModelColumn<bool> hishow;
Gtk::TreeModelColumn<bool> activ;
Gtk::TreeModelColumn<bool> avoid;
Gtk::TreeModelColumn<bool> avoidmun;
Gtk::TreeModelColumn<bool> blwh;
Gtk::TreeModelColumn<bool> recurs;
Gtk::TreeModelColumn<bool> laplac;
@ -347,6 +344,7 @@ private:
};
ControlSpots spots_;
rtengine::ProcEvent EvLocallabavoidgamutMethod;
// Child widgets
Gtk::ScrolledWindow* const scrolledwindow_;
@ -381,6 +379,8 @@ private:
//sigc::connection complexMethodconn_;
MyComboBoxText* const wavMethod_;
sigc::connection wavMethodconn_;
MyComboBoxText* const avoidgamutMethod_;
sigc::connection avoidgamutconn_;
Adjuster* const sensiexclu_;
Adjuster* const structexclu_;
@ -411,10 +411,6 @@ private:
sigc::connection hishowconn_;
Gtk::CheckButton* const activ_;
sigc::connection activConn_;
Gtk::CheckButton* const avoid_;
sigc::connection avoidConn_;
Gtk::CheckButton* const avoidmun_;
sigc::connection avoidmunConn_;
Gtk::CheckButton* const blwh_;
sigc::connection blwhConn_;
Gtk::CheckButton* const recurs_;
@ -438,6 +434,7 @@ private:
Gtk::Box* const ctboxshape;
Gtk::Box* const ctboxshapemethod;
Gtk::Box* const ctboxgamut;
// Internal variables
ControlPanelListener* controlPanelListener;

View File

@ -19,6 +19,7 @@
#include <iomanip>
#include "labcurve.h"
#include "eventmapper.h"
#include "curveeditor.h"
#include "curveeditorgroup.h"
@ -32,61 +33,80 @@
using namespace rtengine;
using namespace rtengine::procparams;
LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), false, true)
LCurve::LCurve() : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), false, true)
{
brightness = Gtk::manage (new Adjuster (M("TP_LABCURVE_BRIGHTNESS"), -100., 100., 1., 0.));
contrast = Gtk::manage (new Adjuster (M("TP_LABCURVE_CONTRAST"), -100., 100., 1., 0.));
chromaticity = Gtk::manage (new Adjuster (M("TP_LABCURVE_CHROMATICITY"), -100., 100., 1., 0.));
auto m = ProcEventMapper::getInstance();
Evgamutmunsell = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_GAMUTMUNSEL");
CurveListener::setMulti(true);
brightness = Gtk::manage(new Adjuster(M("TP_LABCURVE_BRIGHTNESS"), -100., 100., 1., 0.));
contrast = Gtk::manage(new Adjuster(M("TP_LABCURVE_CONTRAST"), -100., 100., 1., 0.));
chromaticity = Gtk::manage(new Adjuster(M("TP_LABCURVE_CHROMATICITY"), -100., 100., 1., 0.));
chromaticity->set_tooltip_markup(M("TP_LABCURVE_CHROMA_TOOLTIP"));
pack_start (*brightness);
brightness->show ();
pack_start(*brightness);
brightness->show();
pack_start (*contrast);
contrast->show ();
pack_start(*contrast);
contrast->show();
pack_start (*chromaticity);
chromaticity->show ();
pack_start(*chromaticity);
chromaticity->show();
brightness->setAdjusterListener (this);
contrast->setAdjusterListener (this);
chromaticity->setAdjusterListener (this);
brightness->setAdjusterListener(this);
contrast->setAdjusterListener(this);
chromaticity->setAdjusterListener(this);
brightness->setLogScale(2, 0, true);
contrast->setLogScale(2, 0, true);
chromaticity->setLogScale(2, 0, true);
//%%%%%%%%%%%%%%%%%%
Gtk::Separator* hsep2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
hsep2->show ();
pack_start (*hsep2, Gtk::PACK_EXPAND_WIDGET, 4);
Gtk::Separator* hsep2 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
hsep2->show();
pack_start(*hsep2, Gtk::PACK_EXPAND_WIDGET, 4);
avoidcolorshift = Gtk::manage (new Gtk::CheckButton (M("TP_LABCURVE_AVOIDCOLORSHIFT")));
avoidcolorshift->set_tooltip_text (M("TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP"));
pack_start (*avoidcolorshift, Gtk::PACK_SHRINK, 4);
lcredsk = Gtk::manage (new Gtk::CheckButton (M("TP_LABCURVE_LCREDSK")));
lcredsk->set_tooltip_markup (M("TP_LABCURVE_LCREDSK_TOOLTIP"));
pack_start (*lcredsk);
rstprotection = Gtk::manage ( new Adjuster (M("TP_LABCURVE_RSTPROTECTION"), 0., 100., 0.1, 0.) );
pack_start (*rstprotection);
rstprotection->show ();
rstprotection->setAdjusterListener (this);
rstprotection->set_tooltip_text (M("TP_LABCURVE_RSTPRO_TOOLTIP"));
Gtk::Box* metHBox = Gtk::manage(new Gtk::Box());
metHBox->set_spacing(2);
Gtk::Label* metLabel = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_AVOID") + ":"));
metHBox->pack_start(*metLabel, Gtk::PACK_SHRINK);
acconn = avoidcolorshift->signal_toggled().connect( sigc::mem_fun(*this, &LCurve::avoidcolorshift_toggled) );
lcconn = lcredsk->signal_toggled().connect( sigc::mem_fun(*this, &LCurve::lcredsk_toggled) );
gamutmunselmethod = Gtk::manage(new MyComboBoxText());
gamutmunselmethod->append(M("TP_LOCALLAB_GAMUTNON"));
gamutmunselmethod->append(M("TP_LOCALLAB_GAMUTLABRELA"));
gamutmunselmethod->append(M("TP_LOCALLAB_GAMUTXYZABSO"));
gamutmunselmethod->append(M("TP_LOCALLAB_GAMUTXYZRELA"));
gamutmunselmethod->append(M("TP_LOCALLAB_GAMUTMUNSELL"));
gamutmunselmethod->set_active(4);
gamutmunselmethod->set_tooltip_text(M("TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP"));
metHBox->pack_start(*gamutmunselmethod);
pack_start(*metHBox);
gamutmunselmethodconn = gamutmunselmethod->signal_changed().connect(sigc::mem_fun(*this, &LCurve::gamutmunselChanged));
lcredsk = Gtk::manage(new Gtk::CheckButton(M("TP_LABCURVE_LCREDSK")));
lcredsk->set_tooltip_markup(M("TP_LABCURVE_LCREDSK_TOOLTIP"));
pack_start(*lcredsk);
rstprotection = Gtk::manage(new Adjuster(M("TP_LABCURVE_RSTPROTECTION"), 0., 100., 0.1, 0.));
pack_start(*rstprotection);
rstprotection->show();
rstprotection->setAdjusterListener(this);
rstprotection->set_tooltip_text(M("TP_LABCURVE_RSTPRO_TOOLTIP"));
lcconn = lcredsk->signal_toggled().connect(sigc::mem_fun(*this, &LCurve::lcredsk_toggled));
//%%%%%%%%%%%%%%%%%%%
Gtk::Separator* hsep3 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
hsep3->show ();
pack_start (*hsep3, Gtk::PACK_EXPAND_WIDGET, 4);
Gtk::Separator* hsep3 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
hsep3->show();
pack_start(*hsep3, Gtk::PACK_EXPAND_WIDGET, 4);
curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir);
curveEditorG->setCurveListener (this);
curveEditorG = new CurveEditorGroup(options.lastLabCurvesDir);
curveEditorG->setCurveListener(this);
lshape = static_cast<DiagonalCurveEditor*>(curveEditorG->addCurve(CT_Diagonal, "L*"));
lshape->setTooltip(M("TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP"));
@ -216,88 +236,111 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"),
// This will add the reset button at the end of the curveType buttons
curveEditorG->curveListComplete();
pack_start (*curveEditorG, Gtk::PACK_SHRINK, 4);
Gtk::Separator* hsepdh = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
hsepdh->show ();
pack_start (*hsepdh, Gtk::PACK_EXPAND_WIDGET, 4);
pack_start(*curveEditorG, Gtk::PACK_SHRINK, 4);
Gtk::Separator* hsepdh = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL));
hsepdh->show();
pack_start(*hsepdh, Gtk::PACK_EXPAND_WIDGET, 4);
show_all_children();
}
LCurve::~LCurve ()
LCurve::~LCurve()
{
delete curveEditorG;
}
void LCurve::read (const ProcParams* pp, const ParamsEdited* pedited)
void LCurve::read(const ProcParams* pp, const ParamsEdited* pedited)
{
disableListener ();
disableListener();
gamutmunselmethodconn.block(true);
brightness->setValue(pp->labCurve.brightness);
contrast->setValue(pp->labCurve.contrast);
chromaticity->setValue(pp->labCurve.chromaticity);
adjusterChanged(chromaticity, pp->labCurve.chromaticity); // To update the GUI sensitiveness
//%%%%%%%%%%%%%%%%%%%%%%
rstprotection->setValue(pp->labCurve.rstprotection);
bwtconn.block(true);
lcconn.block(true);
lcredsk->set_active(pp->labCurve.lcredsk);
bwtconn.block(false);
lcconn.block(false);
lastLCVal = pp->labCurve.lcredsk;
//%%%%%%%%%%%%%%%%%%%%%%
lshape->setCurve(pp->labCurve.lcurve);
ashape->setCurve(pp->labCurve.acurve);
bshape->setCurve(pp->labCurve.bcurve);
ccshape->setCurve(pp->labCurve.cccurve);
chshape->setCurve(pp->labCurve.chcurve);
lhshape->setCurve(pp->labCurve.lhcurve);
hhshape->setCurve(pp->labCurve.hhcurve);
lcshape->setCurve(pp->labCurve.lccurve);
clshape->setCurve(pp->labCurve.clcurve);
if (pedited && !pedited->labCurve.gamutmunselmethod) {
gamutmunselmethod->set_active(4); // "Unchanged"
} else if (pp->labCurve.gamutmunselmethod == "NONE") {
gamutmunselmethod->set_active(0);
} else if (pp->labCurve.gamutmunselmethod == "LAB") {
gamutmunselmethod->set_active(1);
} else if (pp->labCurve.gamutmunselmethod == "XYZ") {
gamutmunselmethod->set_active(2);
} else if (pp->labCurve.gamutmunselmethod == "XYZREL") {
gamutmunselmethod->set_active(3);
} else if (pp->labCurve.gamutmunselmethod == "MUN") {
gamutmunselmethod->set_active(4);
}
gamutmunselChanged();
if (pedited) {
brightness->setEditedState (pedited->labCurve.brightness ? Edited : UnEdited);
contrast->setEditedState (pedited->labCurve.contrast ? Edited : UnEdited);
chromaticity->setEditedState (pedited->labCurve.chromaticity ? Edited : UnEdited);
brightness->setEditedState(pedited->labCurve.brightness ? Edited : UnEdited);
contrast->setEditedState(pedited->labCurve.contrast ? Edited : UnEdited);
chromaticity->setEditedState(pedited->labCurve.chromaticity ? Edited : UnEdited);
//%%%%%%%%%%%%%%%%%%%%%%
rstprotection->setEditedState (pedited->labCurve.rstprotection ? Edited : UnEdited);
avoidcolorshift->set_inconsistent (!pedited->labCurve.avoidcolorshift);
lcredsk->set_inconsistent (!pedited->labCurve.lcredsk);
rstprotection->setEditedState(pedited->labCurve.rstprotection ? Edited : UnEdited);
lcredsk->set_inconsistent(!pedited->labCurve.lcredsk);
//%%%%%%%%%%%%%%%%%%%%%%
lshape->setUnChanged (!pedited->labCurve.lcurve);
ashape->setUnChanged (!pedited->labCurve.acurve);
bshape->setUnChanged (!pedited->labCurve.bcurve);
ccshape->setUnChanged (!pedited->labCurve.cccurve);
chshape->setUnChanged (!pedited->labCurve.chcurve);
lhshape->setUnChanged (!pedited->labCurve.lhcurve);
hhshape->setUnChanged (!pedited->labCurve.hhcurve);
lcshape->setUnChanged (!pedited->labCurve.lccurve);
clshape->setUnChanged (!pedited->labCurve.clcurve);
lshape->setUnChanged(!pedited->labCurve.lcurve);
ashape->setUnChanged(!pedited->labCurve.acurve);
bshape->setUnChanged(!pedited->labCurve.bcurve);
ccshape->setUnChanged(!pedited->labCurve.cccurve);
chshape->setUnChanged(!pedited->labCurve.chcurve);
lhshape->setUnChanged(!pedited->labCurve.lhcurve);
hhshape->setUnChanged(!pedited->labCurve.hhcurve);
lcshape->setUnChanged(!pedited->labCurve.lccurve);
clshape->setUnChanged(!pedited->labCurve.clcurve);
if (!pedited->labCurve.gamutmunselmethod) {
gamutmunselmethod->set_active_text(M("GENERAL_UNCHANGED"));
}
set_inconsistent(multiImage && !pedited->labCurve.enabled);
}
brightness->setValue (pp->labCurve.brightness);
contrast->setValue (pp->labCurve.contrast);
chromaticity->setValue (pp->labCurve.chromaticity);
adjusterChanged(chromaticity, pp->labCurve.chromaticity); // To update the GUI sensitiveness
//%%%%%%%%%%%%%%%%%%%%%%
rstprotection->setValue (pp->labCurve.rstprotection);
gamutmunselmethodconn.block(false);
bwtconn.block (true);
acconn.block (true);
lcconn.block (true);
avoidcolorshift->set_active (pp->labCurve.avoidcolorshift);
lcredsk->set_active (pp->labCurve.lcredsk);
bwtconn.block (false);
acconn.block (false);
lcconn.block (false);
lastACVal = pp->labCurve.avoidcolorshift;
lastLCVal = pp->labCurve.lcredsk;
//%%%%%%%%%%%%%%%%%%%%%%
lshape->setCurve (pp->labCurve.lcurve);
ashape->setCurve (pp->labCurve.acurve);
bshape->setCurve (pp->labCurve.bcurve);
ccshape->setCurve (pp->labCurve.cccurve);
chshape->setCurve (pp->labCurve.chcurve);
lhshape->setCurve (pp->labCurve.lhcurve);
hhshape->setCurve (pp->labCurve.hhcurve);
lcshape->setCurve (pp->labCurve.lccurve);
clshape->setCurve (pp->labCurve.clcurve);
setEnabled(pp->labCurve.enabled);
queue_draw();
enableListener ();
enableListener();
}
void LCurve::autoOpenCurve ()
void LCurve::autoOpenCurve()
{
// Open up the first curve if selected
bool active = lshape->openIfNonlinear();
@ -336,7 +379,7 @@ void LCurve::autoOpenCurve ()
}
void LCurve::setEditProvider (EditDataProvider *provider)
void LCurve::setEditProvider(EditDataProvider *provider)
{
lshape->setEditProvider(provider);
ccshape->setEditProvider(provider);
@ -351,127 +394,128 @@ void LCurve::setEditProvider (EditDataProvider *provider)
}
void LCurve::write (ProcParams* pp, ParamsEdited* pedited)
void LCurve::write(ProcParams* pp, ParamsEdited* pedited)
{
pp->labCurve.enabled = getEnabled();
pp->labCurve.brightness = brightness->getValue ();
pp->labCurve.contrast = (int)contrast->getValue ();
pp->labCurve.chromaticity = (int)chromaticity->getValue ();
//%%%%%%%%%%%%%%%%%%%%%%
pp->labCurve.avoidcolorshift = avoidcolorshift->get_active ();
pp->labCurve.lcredsk = lcredsk->get_active ();
pp->labCurve.rstprotection = rstprotection->getValue ();
pp->labCurve.brightness = brightness->getValue();
pp->labCurve.contrast = (int)contrast->getValue();
pp->labCurve.chromaticity = (int)chromaticity->getValue();
//%%%%%%%%%%%%%%%%%%%%%%
pp->labCurve.lcredsk = lcredsk->get_active();
pp->labCurve.rstprotection = rstprotection->getValue();
//%%%%%%%%%%%%%%%%%%%%%%
pp->labCurve.lcurve = lshape->getCurve ();
pp->labCurve.acurve = ashape->getCurve ();
pp->labCurve.bcurve = bshape->getCurve ();
pp->labCurve.cccurve = ccshape->getCurve ();
pp->labCurve.chcurve = chshape->getCurve ();
pp->labCurve.lhcurve = lhshape->getCurve ();
pp->labCurve.hhcurve = hhshape->getCurve ();
pp->labCurve.lccurve = lcshape->getCurve ();
pp->labCurve.clcurve = clshape->getCurve ();
pp->labCurve.lcurve = lshape->getCurve();
pp->labCurve.acurve = ashape->getCurve();
pp->labCurve.bcurve = bshape->getCurve();
pp->labCurve.cccurve = ccshape->getCurve();
pp->labCurve.chcurve = chshape->getCurve();
pp->labCurve.lhcurve = lhshape->getCurve();
pp->labCurve.hhcurve = hhshape->getCurve();
pp->labCurve.lccurve = lcshape->getCurve();
pp->labCurve.clcurve = clshape->getCurve();
if (pedited) {
pedited->labCurve.brightness = brightness->getEditedState ();
pedited->labCurve.contrast = contrast->getEditedState ();
pedited->labCurve.chromaticity = chromaticity->getEditedState ();
pedited->labCurve.brightness = brightness->getEditedState();
pedited->labCurve.contrast = contrast->getEditedState();
pedited->labCurve.chromaticity = chromaticity->getEditedState();
//%%%%%%%%%%%%%%%%%%%%%%
pedited->labCurve.avoidcolorshift = !avoidcolorshift->get_inconsistent();
pedited->labCurve.lcredsk = !lcredsk->get_inconsistent();
pedited->labCurve.rstprotection = rstprotection->getEditedState ();
pedited->labCurve.rstprotection = rstprotection->getEditedState();
pedited->labCurve.gamutmunselmethod = gamutmunselmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->labCurve.lcurve = !lshape->isUnChanged ();
pedited->labCurve.acurve = !ashape->isUnChanged ();
pedited->labCurve.bcurve = !bshape->isUnChanged ();
pedited->labCurve.cccurve = !ccshape->isUnChanged ();
pedited->labCurve.chcurve = !chshape->isUnChanged ();
pedited->labCurve.lhcurve = !lhshape->isUnChanged ();
pedited->labCurve.hhcurve = !hhshape->isUnChanged ();
pedited->labCurve.lccurve = !lcshape->isUnChanged ();
pedited->labCurve.clcurve = !clshape->isUnChanged ();
pedited->labCurve.lcurve = !lshape->isUnChanged();
pedited->labCurve.acurve = !ashape->isUnChanged();
pedited->labCurve.bcurve = !bshape->isUnChanged();
pedited->labCurve.cccurve = !ccshape->isUnChanged();
pedited->labCurve.chcurve = !chshape->isUnChanged();
pedited->labCurve.lhcurve = !lhshape->isUnChanged();
pedited->labCurve.hhcurve = !hhshape->isUnChanged();
pedited->labCurve.lccurve = !lcshape->isUnChanged();
pedited->labCurve.clcurve = !clshape->isUnChanged();
pedited->labCurve.enabled = !get_inconsistent();
}
if (gamutmunselmethod->get_active_row_number() == 0) {
pp->labCurve.gamutmunselmethod = "NONE";
} else if (gamutmunselmethod->get_active_row_number() == 1) {
pp->labCurve.gamutmunselmethod = "LAB";
} else if (gamutmunselmethod->get_active_row_number() == 2) {
pp->labCurve.gamutmunselmethod = "XYZ";
} else if (gamutmunselmethod->get_active_row_number() == 3) {
pp->labCurve.gamutmunselmethod = "XYZREL";
} else if (gamutmunselmethod->get_active_row_number() == 4) {
pp->labCurve.gamutmunselmethod = "MUN";
}
}
void LCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
void LCurve::setDefaults(const ProcParams* defParams, const ParamsEdited* pedited)
{
brightness->setDefault (defParams->labCurve.brightness);
contrast->setDefault (defParams->labCurve.contrast);
chromaticity->setDefault (defParams->labCurve.chromaticity);
rstprotection->setDefault (defParams->labCurve.rstprotection);
brightness->setDefault(defParams->labCurve.brightness);
contrast->setDefault(defParams->labCurve.contrast);
chromaticity->setDefault(defParams->labCurve.chromaticity);
rstprotection->setDefault(defParams->labCurve.rstprotection);
if (pedited) {
brightness->setDefaultEditedState (pedited->labCurve.brightness ? Edited : UnEdited);
contrast->setDefaultEditedState (pedited->labCurve.contrast ? Edited : UnEdited);
chromaticity->setDefaultEditedState (pedited->labCurve.chromaticity ? Edited : UnEdited);
rstprotection->setDefaultEditedState (pedited->labCurve.rstprotection ? Edited : UnEdited);
brightness->setDefaultEditedState(pedited->labCurve.brightness ? Edited : UnEdited);
contrast->setDefaultEditedState(pedited->labCurve.contrast ? Edited : UnEdited);
chromaticity->setDefaultEditedState(pedited->labCurve.chromaticity ? Edited : UnEdited);
rstprotection->setDefaultEditedState(pedited->labCurve.rstprotection ? Edited : UnEdited);
} else {
brightness->setDefaultEditedState (Irrelevant);
contrast->setDefaultEditedState (Irrelevant);
chromaticity->setDefaultEditedState (Irrelevant);
rstprotection->setDefaultEditedState (Irrelevant);
brightness->setDefaultEditedState(Irrelevant);
contrast->setDefaultEditedState(Irrelevant);
chromaticity->setDefaultEditedState(Irrelevant);
rstprotection->setDefaultEditedState(Irrelevant);
}
}
//%%%%%%%%%%%%%%%%%%%%%%
//Color shift control changed
void LCurve::avoidcolorshift_toggled ()
void LCurve::gamutmunselChanged()
{
if (batchMode) {
if (avoidcolorshift->get_inconsistent()) {
avoidcolorshift->set_inconsistent (false);
acconn.block (true);
avoidcolorshift->set_active (false);
acconn.block (false);
} else if (lastACVal) {
avoidcolorshift->set_inconsistent (true);
}
lastACVal = avoidcolorshift->get_active ();
if (listener && (multiImage || getEnabled())) {
listener->panelChanged(Evgamutmunsell, gamutmunselmethod->get_active_text());
}
if (listener && getEnabled()) {
if (avoidcolorshift->get_active ()) {
listener->panelChanged (EvLAvoidColorShift, M("GENERAL_ENABLED"));
} else {
listener->panelChanged (EvLAvoidColorShift, M("GENERAL_DISABLED"));
}
}
}
void LCurve::lcredsk_toggled ()
void LCurve::lcredsk_toggled()
{
if (batchMode) {
if (lcredsk->get_inconsistent()) {
lcredsk->set_inconsistent (false);
lcconn.block (true);
lcredsk->set_active (false);
lcconn.block (false);
lcredsk->set_inconsistent(false);
lcconn.block(true);
lcredsk->set_active(false);
lcconn.block(false);
} else if (lastLCVal) {
lcredsk->set_inconsistent (true);
lcredsk->set_inconsistent(true);
}
lastLCVal = lcredsk->get_active ();
lastLCVal = lcredsk->get_active();
} else {
lcshape->refresh();
}
if (listener && getEnabled()) {
if (lcredsk->get_active ()) {
listener->panelChanged (EvLLCredsk, M("GENERAL_ENABLED"));
if (lcredsk->get_active()) {
listener->panelChanged(EvLLCredsk, M("GENERAL_ENABLED"));
} else {
listener->panelChanged (EvLLCredsk, M("GENERAL_DISABLED"));
listener->panelChanged(EvLLCredsk, M("GENERAL_DISABLED"));
}
}
}
@ -484,44 +528,44 @@ void LCurve::lcredsk_toggled ()
* If more than one curve has been added, the curve listener is automatically
* set to 'multi=true', and send a pointer of the modified curve in a parameter
*/
void LCurve::curveChanged (CurveEditor* ce)
void LCurve::curveChanged(CurveEditor* ce)
{
if (listener && getEnabled()) {
if (ce == lshape) {
listener->panelChanged (EvLLCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLLCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == ashape) {
listener->panelChanged (EvLaCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLaCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == bshape) {
listener->panelChanged (EvLbCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLbCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == ccshape) {
listener->panelChanged (EvLCCCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLCCCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == chshape) {
listener->panelChanged (EvLCHCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLCHCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == lhshape) {
listener->panelChanged (EvLLHCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLLHCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == hhshape) {
listener->panelChanged (EvLHHCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLHHCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == lcshape) {
listener->panelChanged (EvLLCCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLLCCurve, M("HISTORY_CUSTOMCURVE"));
}
if (ce == clshape) {
listener->panelChanged (EvLCLCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged(EvLCLCurve, M("HISTORY_CUSTOMCURVE"));
}
@ -533,45 +577,43 @@ void LCurve::adjusterChanged(Adjuster* a, double newval)
Glib::ustring costr;
if (a == brightness) {
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
costr = Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), a->getValue());
} else if (a == rstprotection) {
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(1), a->getValue());
costr = Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(1), a->getValue());
} else {
costr = Glib::ustring::format ((int)a->getValue());
costr = Glib::ustring::format((int)a->getValue());
}
if (a == brightness) {
if (listener && getEnabled()) {
listener->panelChanged (EvLBrightness, costr);
listener->panelChanged(EvLBrightness, costr);
}
} else if (a == contrast) {
if (listener && getEnabled()) {
listener->panelChanged (EvLContrast, costr);
listener->panelChanged(EvLContrast, costr);
}
} else if (a == rstprotection) {
if (listener && getEnabled()) {
listener->panelChanged (EvLRSTProtection, costr);
listener->panelChanged(EvLRSTProtection, costr);
}
} else if (a == chromaticity) {
if (multiImage) {
//if chromaticity==-100 (lowest value), we enter the B&W mode and avoid color shift and rstprotection has no effect
rstprotection->set_sensitive( true );
avoidcolorshift->set_sensitive( true );
lcredsk->set_sensitive( true );
rstprotection->set_sensitive(true);
lcredsk->set_sensitive(true);
} else {
//if chromaticity==-100 (lowest value), we enter the B&W mode and avoid color shift and rstprotection has no effect
rstprotection->set_sensitive( int(newval) > -100 ); //no reason for grey rstprotection
avoidcolorshift->set_sensitive( int(newval) > -100 );
lcredsk->set_sensitive( int(newval) > -100 );
rstprotection->set_sensitive(int(newval) > -100); //no reason for grey rstprotection
lcredsk->set_sensitive(int(newval) > -100);
}
if (listener && getEnabled()) {
listener->panelChanged (EvLSaturation, costr);
listener->panelChanged(EvLSaturation, costr);
}
}
}
void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
void LCurve::colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
{
float R = 0.f, G = 0.f, B = 0.f;
@ -586,47 +628,54 @@ void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType
float value = (1.f - 0.7f) * float(valX) + 0.7f;
// whole hue range
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(float(valY*0.8), float(valX), value, R, G, B);
Color::hsv2rgb01(float(valY * 0.8), float(valX), value, R, G, B);
} else if (callerId == 6) { // cc - left bar
float value = (1.f - 0.7f) * float(valX) + 0.7f;
float hue = (1.14056f - 0.92f) * float(valY) + 0.92f;
if (hue > 1.0f) {
hue -= 1.0f;
}
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(hue, float(valX), value, R, G, B);
} else if (callerId == 3) { // lc - bottom bar
float value = (1.f - 0.7f) * float(valX) + 0.7f;
if (lcredsk->get_active()) {
// skin range
// -0.1 rad < Hue < 1.6 rad
// Y axis / from 0.92 up to 0.14056
float hue = (1.14056f - 0.92f) * float(valY) + 0.92f;
if (hue > 1.0f) {
hue -= 1.0f;
}
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(hue, float(valX), value, R, G, B);
} else {
// whole hue range
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(float(valY*0.8), float(valX), value, R, G, B);
Color::hsv2rgb01(float(valY * 0.8), float(valX), value, R, G, B);
}
} else if (callerId == 4) { // LH - bottom bar
Color::hsv2rgb01(float(valX), 0.5f, float(valY), R, G, B);
} else if (callerId == 5) { // HH - bottom bar
float h = float((valY - 0.5) * 0.3 + valX);
if (h > 1.0f) {
h -= 1.0f;
} else if (h < 0.0f) {
h += 1.0f;
}
Color::hsv2rgb01(h, 0.5f, 0.5f, R, G, B);
} else if (callerId == 7) { // cc and cl - left bar
float value = (1.f - 0.7f) * float(valX) + 0.7f;
// whole hue range
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(float(valY*0.8), 1.f - float(valX), value, R, G, B);
Color::hsv2rgb01(float(valY * 0.8), 1.f - float(valX), value, R, G, B);
}
caller->ccRed = double(R);
@ -634,17 +683,19 @@ void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType
caller->ccBlue = double(B);
}
void LCurve::setBatchMode (bool batchMode)
void LCurve::setBatchMode(bool batchMode)
{
ToolPanel::setBatchMode (batchMode);
brightness->showEditedCB ();
contrast->showEditedCB ();
chromaticity->showEditedCB ();
rstprotection->showEditedCB ();
curveEditorG->setBatchMode (batchMode);
ToolPanel::setBatchMode(batchMode);
brightness->showEditedCB();
contrast->showEditedCB();
chromaticity->showEditedCB();
rstprotection->showEditedCB();
curveEditorG->setBatchMode(batchMode);
lcshape->setBottomBarColorProvider(nullptr, -1);
lcshape->setLeftBarColorProvider(nullptr, -1);
gamutmunselmethod->append(M("GENERAL_UNCHANGED"));
}
@ -661,13 +712,13 @@ void LCurve::updateCurveBackgroundHistogram(
const LUTu& histLRETI
)
{
lshape->updateBackgroundHistogram (histLCurve);
ccshape->updateBackgroundHistogram (histCCurve);
lcshape->updateBackgroundHistogram (histCCurve);
clshape->updateBackgroundHistogram (histLCurve);
lshape->updateBackgroundHistogram(histLCurve);
ccshape->updateBackgroundHistogram(histCCurve);
lcshape->updateBackgroundHistogram(histCCurve);
clshape->updateBackgroundHistogram(histLCurve);
}
void LCurve::setAdjusterBehavior (bool bradd, bool contradd, bool satadd)
void LCurve::setAdjusterBehavior(bool bradd, bool contradd, bool satadd)
{
brightness->setAddMode(bradd);
@ -675,7 +726,7 @@ void LCurve::setAdjusterBehavior (bool bradd, bool contradd, bool satadd)
chromaticity->setAddMode(satadd);
}
void LCurve::trimValues (rtengine::procparams::ProcParams* pp)
void LCurve::trimValues(rtengine::procparams::ProcParams* pp)
{
brightness->trimValue(pp->labCurve.brightness);
@ -687,11 +738,11 @@ void LCurve::enabledChanged()
{
if (listener) {
if (get_inconsistent()) {
listener->panelChanged (EvLEnabled, M("GENERAL_UNCHANGED"));
listener->panelChanged(EvLEnabled, M("GENERAL_UNCHANGED"));
} else if (getEnabled()) {
listener->panelChanged (EvLEnabled, M("GENERAL_ENABLED"));
listener->panelChanged(EvLEnabled, M("GENERAL_ENABLED"));
} else {
listener->panelChanged (EvLEnabled, M("GENERAL_DISABLED"));
listener->panelChanged(EvLEnabled, M("GENERAL_DISABLED"));
}
}
}

View File

@ -59,11 +59,14 @@ protected:
DiagonalCurveEditor* cdshape;
//%%%%%%%%%%%%%%%%
Gtk::CheckButton* avoidcolorshift;
Gtk::CheckButton* lcredsk;
MyComboBoxText* gamutmunselmethod;
sigc::connection gamutmunselmethodconn;
rtengine::ProcEvent Evgamutmunsell;
Adjuster* rstprotection;
sigc::connection bwtconn, acconn, lcconn;
sigc::connection bwtconn, lcconn;
bool lastACVal, lastLCVal;
//%%%%%%%%%%%%%%%%
@ -84,8 +87,8 @@ public:
void curveChanged (CurveEditor* ce) override;
void adjusterChanged (Adjuster* a, double newval) override;
void avoidcolorshift_toggled ();
void lcredsk_toggled();
void gamutmunselChanged();
void updateCurveBackgroundHistogram(
const LUTu& histToneCurve,

View File

@ -277,6 +277,18 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
} else {
r->shapeMethod = 3;
}
if (pp->locallab.spots.at(i).avoidgamutMethod == "NONE") {
r->avoidgamutMethod = 0;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "LAB") {
r->avoidgamutMethod = 1;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "XYZ") {
r->avoidgamutMethod= 2;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "XYZREL") {
r->avoidgamutMethod= 3;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "MUNS") {
r->avoidgamutMethod= 4;
}
r->locX = pp->locallab.spots.at(i).loc.at(0);
r->locXL = pp->locallab.spots.at(i).loc.at(1);
@ -306,8 +318,6 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
r->avoidrad = pp->locallab.spots.at(i).avoidrad;
r->hishow = pp->locallab.spots.at(i).hishow;
r->activ = pp->locallab.spots.at(i).activ;
r->avoid = pp->locallab.spots.at(i).avoid;
r->avoidmun = pp->locallab.spots.at(i).avoidmun;
r->blwh = pp->locallab.spots.at(i).blwh;
r->recurs = pp->locallab.spots.at(i).recurs;
r->laplac = true; //pp->locallab.spots.at(i).laplac;
@ -441,6 +451,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->shapeMethod = 3;
}
if (newSpot->avoidgamutMethod == "NONE") {
r->avoidgamutMethod = 0;
} else if (newSpot->avoidgamutMethod == "LAB") {
r->avoidgamutMethod = 1;
} else if (newSpot->avoidgamutMethod == "XYZ") {
r->avoidgamutMethod = 2;
} else if (newSpot->avoidgamutMethod == "XYZREL") {
r->avoidgamutMethod = 3;
} else if (newSpot->avoidgamutMethod == "MUNS") {
r->avoidgamutMethod = 4;
}
// Calculate spot size and center position according to preview area
if (provider && !batchMode) {
provider->getImageSize(imW, imH);
@ -488,8 +510,6 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->avoidrad = newSpot->avoidrad;
r->hishow = newSpot->hishow;
r->activ = newSpot->activ;
r->avoid = newSpot->avoid;
r->avoidmun = newSpot->avoidmun;
r->blwh = newSpot->blwh;
r->recurs = newSpot->recurs;
r->laplac = newSpot->laplac;
@ -742,6 +762,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->shapeMethod = 3;
}
//printf("n0=%f n1=%f n2=%f n3=%f\n", (double) newSpot->loc.at(0), (double) newSpot->loc.at(1), (double) newSpot->loc.at(2), (double) newSpot->loc.at(3));
if (newSpot->avoidgamutMethod == "NONE") {
r->avoidgamutMethod = 0;
} else if (newSpot->avoidgamutMethod == "LAB") {
r->avoidgamutMethod = 1;
} else if (newSpot->avoidgamutMethod== "XYZ") {
r->avoidgamutMethod = 2;
} else if (newSpot->avoidgamutMethod== "XYZREL") {
r->avoidgamutMethod = 3;
} else if (newSpot->avoidgamutMethod== "MUNS") {
r->avoidgamutMethod = 4;
}
//printf("n0=%f n1=%f n2=%f n3=%f\n", (double) newSpot->loc.at(0), (double) newSpot->loc.at(1), (double) newSpot->loc.at(2), (double) newSpot->loc.at(3));
// Calculate spot size and center position according to preview area
if (provider && !batchMode) {
@ -799,8 +831,6 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->colorscope = newSpot->colorscope;
r->avoidrad = newSpot->avoidrad;
r->activ = newSpot->activ;
r->avoid = newSpot->avoid;
r->avoidmun = newSpot->avoidmun;
r->blwh = newSpot->blwh;
r->recurs = newSpot->recurs;
r->laplac = newSpot->laplac;
@ -927,6 +957,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).shapeMethod = "SYMSL";
}
if (r->avoidgamutMethod == 0) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "NONE";
} else if (r->avoidgamutMethod == 1) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "LAB";
} else if (r->avoidgamutMethod == 2) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "XYZ";
} else if (r->avoidgamutMethod == 3) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "XYZREL";
} else if (r->avoidgamutMethod == 4) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "MUNS";
}
pp->locallab.spots.at(pp->locallab.selspot).loc.at(0) = r->locX;
pp->locallab.spots.at(pp->locallab.selspot).loc.at(1) = r->locXL;
pp->locallab.spots.at(pp->locallab.selspot).loc.at(2) = r->locY;
@ -955,8 +997,6 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).avoidrad = r->avoidrad;
pp->locallab.spots.at(pp->locallab.selspot).hishow = r->hishow;
pp->locallab.spots.at(pp->locallab.selspot).activ = r->activ;
pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid;
pp->locallab.spots.at(pp->locallab.selspot).avoidmun = r->avoidmun;
pp->locallab.spots.at(pp->locallab.selspot).blwh = r->blwh;
pp->locallab.spots.at(pp->locallab.selspot).recurs = r->recurs;
pp->locallab.spots.at(pp->locallab.selspot).laplac = r->laplac;

View File

@ -104,7 +104,7 @@ void ParamsEdited::set(bool v)
labCurve.brightness = v;
labCurve.contrast = v;
labCurve.chromaticity = v;
labCurve.avoidcolorshift = v;
labCurve.gamutmunselmethod = v;
labCurve.rstprotection = v;
labCurve.lcredsk = v;
localContrast.enabled = v;
@ -804,7 +804,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
labCurve.brightness = labCurve.brightness && p.labCurve.brightness == other.labCurve.brightness;
labCurve.contrast = labCurve.contrast && p.labCurve.contrast == other.labCurve.contrast;
labCurve.chromaticity = labCurve.chromaticity && p.labCurve.chromaticity == other.labCurve.chromaticity;
labCurve.avoidcolorshift = labCurve.avoidcolorshift && p.labCurve.avoidcolorshift == other.labCurve.avoidcolorshift;
labCurve.gamutmunselmethod = labCurve.gamutmunselmethod && p.labCurve.gamutmunselmethod == other.labCurve.gamutmunselmethod;
labCurve.rstprotection = labCurve.rstprotection && p.labCurve.rstprotection == other.labCurve.rstprotection;
labCurve.lcredsk = labCurve.lcredsk && p.labCurve.lcredsk == other.labCurve.lcredsk;
@ -908,7 +908,6 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
vibrance.avoidcolorshift = vibrance.avoidcolorshift && p.vibrance.avoidcolorshift == other.vibrance.avoidcolorshift;
vibrance.pastsattog = vibrance.pastsattog && p.vibrance.pastsattog == other.vibrance.pastsattog;
vibrance.skintonescurve = vibrance.skintonescurve && p.vibrance.skintonescurve == other.vibrance.skintonescurve;
colorappearance.enabled = colorappearance.enabled && p.colorappearance.enabled == other.colorappearance.enabled;
colorappearance.degree = colorappearance.degree && p.colorappearance.degree == other.colorappearance.degree;
colorappearance.autodegree = colorappearance.autodegree && p.colorappearance.autodegree == other.colorappearance.autodegree;
@ -1090,6 +1089,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).structexclu = locallab.spots.at(j).structexclu && pSpot.structexclu == otherSpot.structexclu;
locallab.spots.at(j).struc = locallab.spots.at(j).struc && pSpot.struc == otherSpot.struc;
locallab.spots.at(j).shapeMethod = locallab.spots.at(j).shapeMethod && pSpot.shapeMethod == otherSpot.shapeMethod;
locallab.spots.at(j).avoidgamutMethod = locallab.spots.at(j).avoidgamutMethod && pSpot.avoidgamutMethod == otherSpot.avoidgamutMethod;
locallab.spots.at(j).loc = locallab.spots.at(j).loc && pSpot.loc == otherSpot.loc;
locallab.spots.at(j).centerX = locallab.spots.at(j).centerX && pSpot.centerX == otherSpot.centerX;
locallab.spots.at(j).centerY = locallab.spots.at(j).centerY && pSpot.centerY == otherSpot.centerY;
@ -1109,8 +1109,6 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).transitgrad = locallab.spots.at(j).transitgrad && pSpot.transitgrad == otherSpot.transitgrad;
locallab.spots.at(j).hishow = locallab.spots.at(j).hishow && pSpot.hishow == otherSpot.hishow;
locallab.spots.at(j).activ = locallab.spots.at(j).activ && pSpot.activ == otherSpot.activ;
locallab.spots.at(j).avoid = locallab.spots.at(j).avoid && pSpot.avoid == otherSpot.avoid;
locallab.spots.at(j).avoidmun = locallab.spots.at(j).avoidmun && pSpot.avoidmun == otherSpot.avoidmun;
locallab.spots.at(j).blwh = locallab.spots.at(j).blwh && pSpot.blwh == otherSpot.blwh;
locallab.spots.at(j).recurs = locallab.spots.at(j).recurs && pSpot.recurs == otherSpot.recurs;
locallab.spots.at(j).laplac = locallab.spots.at(j).laplac && pSpot.laplac == otherSpot.laplac;
@ -2392,8 +2390,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.labCurve.chromaticity = dontforceSet && options.baBehav[ADDSET_LC_CHROMATICITY] ? toEdit.labCurve.chromaticity + mods.labCurve.chromaticity : mods.labCurve.chromaticity;
}
if (labCurve.avoidcolorshift) {
toEdit.labCurve.avoidcolorshift = mods.labCurve.avoidcolorshift;
if (labCurve.gamutmunselmethod) {
toEdit.labCurve.gamutmunselmethod = mods.labCurve.gamutmunselmethod;
}
if (labCurve.rstprotection) {
@ -3434,6 +3432,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).shapeMethod = mods.locallab.spots.at(i).shapeMethod;
}
if (locallab.spots.at(i).avoidgamutMethod) {
toEdit.locallab.spots.at(i).avoidgamutMethod = mods.locallab.spots.at(i).avoidgamutMethod;
}
if (locallab.spots.at(i).loc) {
toEdit.locallab.spots.at(i).loc = mods.locallab.spots.at(i).loc;
}
@ -3510,14 +3512,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).activ = mods.locallab.spots.at(i).activ;
}
if (locallab.spots.at(i).avoid) {
toEdit.locallab.spots.at(i).avoid = mods.locallab.spots.at(i).avoid;
}
if (locallab.spots.at(i).avoidmun) {
toEdit.locallab.spots.at(i).avoidmun = mods.locallab.spots.at(i).avoidmun;
}
if (locallab.spots.at(i).blwh) {
toEdit.locallab.spots.at(i).blwh = mods.locallab.spots.at(i).blwh;
}
@ -7412,6 +7406,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
structexclu(v),
struc(v),
shapeMethod(v),
avoidgamutMethod(v),
loc(v),
centerX(v),
centerY(v),
@ -7431,8 +7426,6 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
transitgrad(v),
hishow(v),
activ(v),
avoid(v),
avoidmun(v),
blwh(v),
recurs(v),
laplac(v),
@ -8104,6 +8097,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
structexclu = v;
struc = v;
shapeMethod = v;
avoidgamutMethod = v;
loc = v;
centerX = v;
centerY = v;
@ -8123,8 +8117,6 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
transitgrad = v;
hishow = v;
activ = v;
avoid = v;
avoidmun = v;
blwh = v;
recurs = v;
laplac = v;

View File

@ -109,7 +109,7 @@ struct LCurveParamsEdited {
bool brightness;
bool contrast;
bool chromaticity;
bool avoidcolorshift;
bool gamutmunselmethod;
bool rstprotection;
bool lcurve;
bool acurve;
@ -402,6 +402,7 @@ public:
bool structexclu;
bool struc;
bool shapeMethod;
bool avoidgamutMethod;
bool loc;
bool centerX;
bool centerY;
@ -421,8 +422,6 @@ public:
bool transitgrad;
bool hishow;
bool activ;
bool avoid;
bool avoidmun;
bool blwh;
bool recurs;
bool laplac;