Some changes requested by Elle
This commit is contained in:
parent
49d61d5209
commit
be82e1bde2
@ -1276,9 +1276,9 @@ TP_COARSETRAF_TOOLTIP_HFLIP;Flip horizontally.
|
||||
TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n<b>[</b> - Multiple Editor Tabs Mode,\n<b>Alt-[</b> - Single Editor Tab Mode.
|
||||
TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n<b>]</b> - Multiple Editor Tabs Mode,\n<b>Alt-]</b> - Single Editor Tab Mode.
|
||||
TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically.
|
||||
TP_COLORAPP_ADAPTSCENE;Scene luminosity
|
||||
TP_COLORAPP_ADAPTSCENE;Scene absolute luminance
|
||||
TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider.
|
||||
TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²)
|
||||
TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²)
|
||||
TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²).
|
||||
TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first.
|
||||
TP_COLORAPP_ALGO;Algorithm
|
||||
@ -1325,6 +1325,8 @@ TP_COLORAPP_LIGHT;Lightness (J)
|
||||
TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness.
|
||||
TP_COLORAPP_MODEL;WP Model
|
||||
TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\n<b>WB [RT] + [output]</b>: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\n<b>WB [RT+CAT02] + [output]</b>: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\n<b>Free temp+green + CAT02 + [output]:</b> temp and green are selected bu user, output device's white balance is set in Viewing Conditions.
|
||||
TP_COLORAPP_NEUTRAL;Reset
|
||||
TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values
|
||||
TP_COLORAPP_RSTPRO;Red & skin-tones protection
|
||||
TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves.
|
||||
TP_COLORAPP_SHARPCIE;--unused--
|
||||
@ -1349,7 +1351,9 @@ TP_COLORAPP_TONECIE;Tone mapping using CIECAM02
|
||||
TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect.
|
||||
TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output]
|
||||
TP_COLORAPP_WBRT;WB [RT] + [output]
|
||||
TP_COLORAPP_YB;Yb (mean luminance)
|
||||
TP_COLORAPP_YB;Yb%(mean luminance)
|
||||
TP_COLORAPP_YBSCENE;Yb%(mean luminance)
|
||||
TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance
|
||||
TP_COLORTONING_AB;o C/L
|
||||
TP_COLORTONING_AUTOSAT;Automatic
|
||||
TP_COLORTONING_BALANCE;Balance
|
||||
|
@ -958,9 +958,9 @@ void Crop::update (int todo)
|
||||
}
|
||||
|
||||
if (settings->ciecamfloat) {
|
||||
float d, dj; // not used after this block
|
||||
float d, dj, yb; // not used after this block
|
||||
parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3,
|
||||
dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1);
|
||||
dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, yb, 1);
|
||||
} else {
|
||||
double dd, dj; // not used after this block
|
||||
|
||||
|
@ -746,7 +746,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
|
||||
int begh = 0;
|
||||
int endh = pH;
|
||||
float d, dj;
|
||||
float d, dj, yb;
|
||||
bool execsharp = false;
|
||||
|
||||
if(!ncie) {
|
||||
@ -766,14 +766,14 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
CAMBrightCurveJ.dirty = true;
|
||||
CAMBrightCurveQ.dirty = true;
|
||||
|
||||
ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, 1);
|
||||
ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1);
|
||||
|
||||
if(params.colorappearance.autodegree && acListener && params.colorappearance.enabled) {
|
||||
if((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) {
|
||||
acListener->autoCamChanged(100.*(double)d, 100.*(double)dj);
|
||||
}
|
||||
|
||||
if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) {
|
||||
acListener->adapCamChanged(adap); //real value of adapt scene luminosity
|
||||
if((params.colorappearance.autoadapscen || params.colorappearance.autoybscen) && acListener && params.colorappearance.enabled) {
|
||||
acListener->adapCamChanged(adap, (int) yb); //real value of adapt scene luminosity and Yb scene
|
||||
}
|
||||
|
||||
readyphase++;
|
||||
|
@ -1487,7 +1487,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
// Copyright (c) 2012 Jacques Desmis <jdesmis@gmail.com>
|
||||
void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params,
|
||||
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3,
|
||||
LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt)
|
||||
LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt)
|
||||
{
|
||||
if (params->colorappearance.enabled) {
|
||||
|
||||
@ -1514,7 +1514,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
float Yw;
|
||||
Yw = 1.0;
|
||||
double Xw, Zw;
|
||||
float f, nc, yb = 0.f, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2;
|
||||
float f, nc, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2;
|
||||
float fl, n, nbb, ncb, aw; //d
|
||||
float xwd, ywd, zwd, xws, yws, zws;
|
||||
int alg = 0;
|
||||
@ -1834,7 +1834,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
//evaluate lightness, contrast
|
||||
}
|
||||
|
||||
if (settings->viewinggreySc == 0) { //auto
|
||||
|
||||
|
||||
// if (settings->viewinggreySc == 0) { //auto
|
||||
if (params->colorappearance.autoybscen && pwb == 2) {//auto
|
||||
|
||||
if (mean < 15.f) {
|
||||
yb = 3.0f;
|
||||
} else if (mean < 30.f) {
|
||||
@ -1858,8 +1862,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
} else {
|
||||
yb = 90.0f;
|
||||
}
|
||||
} else if (settings->viewinggreySc == 1) {
|
||||
yb = 18.0f; //fixed
|
||||
// } else if (settings->viewinggreySc == 1) {
|
||||
} else {
|
||||
yb = (float) params->colorappearance.ybscen;
|
||||
}
|
||||
|
||||
const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated
|
||||
|
@ -226,7 +226,7 @@ public:
|
||||
void luminanceCurve (LabImage* lold, LabImage* lnew, LUTf &curve);
|
||||
void ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params,
|
||||
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
|
||||
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt);
|
||||
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt);
|
||||
void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params,
|
||||
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
|
||||
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt);
|
||||
|
@ -509,6 +509,8 @@ enum ProcEvent {
|
||||
EvCATAutoDegreeout = 479,
|
||||
EvCATtempsc = 480,
|
||||
EvCATgreensc = 481,
|
||||
EvCATybscen = 482,
|
||||
EvCATAutoyb = 483,
|
||||
|
||||
NUMOFEVENTS
|
||||
|
||||
|
@ -1159,6 +1159,8 @@ void ProcParams::setDefaults ()
|
||||
colorappearance.badpixsl = 0;
|
||||
colorappearance.adapscen = 2000.0;
|
||||
colorappearance.autoadapscen = true;
|
||||
colorappearance.ybscen = 18;
|
||||
colorappearance.autoybscen = true;
|
||||
colorappearance.algo = "No";
|
||||
colorappearance.wbmodel = "RawT";
|
||||
colorappearance.jlight = 0.0;
|
||||
@ -2169,6 +2171,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
|
||||
keyFile.set_boolean ("Color appearance", "AutoAdapscen", colorappearance.autoadapscen);
|
||||
}
|
||||
|
||||
if (!pedited || pedited->colorappearance.ybscen) {
|
||||
keyFile.set_integer ("Color appearance", "YbScene", colorappearance.ybscen);
|
||||
}
|
||||
|
||||
if (!pedited || pedited->colorappearance.autoybscen) {
|
||||
keyFile.set_boolean ("Color appearance", "Autoybscen", colorappearance.autoybscen);
|
||||
}
|
||||
|
||||
if (!pedited || pedited->colorappearance.surrsource) {
|
||||
keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource);
|
||||
}
|
||||
@ -5136,6 +5146,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("Color appearance", "YbScene")) {
|
||||
colorappearance.ybscen = keyFile.get_integer ("Color appearance", "YbScene");
|
||||
|
||||
if (pedited) {
|
||||
pedited->colorappearance.ybscen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("Color appearance", "Autoybscen")) {
|
||||
colorappearance.autoybscen = keyFile.get_boolean ("Color appearance", "Autoybscen");
|
||||
|
||||
if (pedited) {
|
||||
pedited->colorappearance.autoybscen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("Color appearance", "SurrSource")) {
|
||||
colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource");
|
||||
|
||||
@ -8302,6 +8328,8 @@ bool ProcParams::operator== (const ProcParams& other)
|
||||
&& colorappearance.surround == other.colorappearance.surround
|
||||
&& colorappearance.adapscen == other.colorappearance.adapscen
|
||||
&& colorappearance.autoadapscen == other.colorappearance.autoadapscen
|
||||
&& colorappearance.ybscen == other.colorappearance.ybscen
|
||||
&& colorappearance.autoybscen == other.colorappearance.autoybscen
|
||||
&& colorappearance.adaplum == other.colorappearance.adaplum
|
||||
&& colorappearance.badpixsl == other.colorappearance.badpixsl
|
||||
&& colorappearance.wbmodel == other.colorappearance.wbmodel
|
||||
|
@ -597,6 +597,8 @@ public:
|
||||
Glib::ustring surround;
|
||||
double adapscen;
|
||||
bool autoadapscen;
|
||||
int ybscen;
|
||||
bool autoybscen;
|
||||
|
||||
double adaplum;
|
||||
int badpixsl;
|
||||
|
@ -508,7 +508,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, // EvCATDegreeout
|
||||
LUMINANCECURVE, // EvCATAutoDegreeout
|
||||
LUMINANCECURVE, // EvCATtempsc
|
||||
LUMINANCECURVE // EvCATgreensc
|
||||
LUMINANCECURVE, // EvCATgreensc
|
||||
LUMINANCECURVE, // EvCATybscen
|
||||
LUMINANCECURVE // EvCATAutoyb
|
||||
|
||||
|
||||
};
|
||||
|
@ -274,7 +274,7 @@ class AutoCamListener
|
||||
public :
|
||||
virtual ~AutoCamListener() {}
|
||||
virtual void autoCamChanged (double ccam, double ccamout) {}
|
||||
virtual void adapCamChanged (double cadap) {}
|
||||
virtual void adapCamChanged (double cadap, int ybscn) {}
|
||||
};
|
||||
|
||||
class AutoChromaListener
|
||||
|
@ -1260,7 +1260,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
||||
16);
|
||||
int begh = 0, endh = labView->H;
|
||||
bool execsharp = false;
|
||||
float d, dj;
|
||||
float d, dj, yb;
|
||||
float fnum = fnumber;// F number
|
||||
float fiso = iso;// ISO
|
||||
float fspeed = shutter;//speed
|
||||
@ -1296,7 +1296,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
||||
CAMMean = NAN;
|
||||
CAMBrightCurveJ.dirty = true;
|
||||
CAMBrightCurveQ.dirty = true;
|
||||
ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, rtt);
|
||||
ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, yb, rtt);
|
||||
delete cieView;
|
||||
}
|
||||
|
||||
|
@ -1122,16 +1122,16 @@ private:
|
||||
|
||||
if (params.sharpening.enabled) {
|
||||
if(settings->ciecamfloat) {
|
||||
float d, dj;
|
||||
ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1);
|
||||
float d, dj, yb;
|
||||
ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1);
|
||||
} else {
|
||||
double dd, dj;
|
||||
ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1);
|
||||
}
|
||||
} else {
|
||||
if(settings->ciecamfloat) {
|
||||
float d, dj;
|
||||
ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1);
|
||||
float d, dj, yb;
|
||||
ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1);
|
||||
} else {
|
||||
double dd, dj;
|
||||
ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1);
|
||||
|
@ -191,6 +191,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPTSCENE_TOOLTIP"));
|
||||
p1VBox->pack_start (*adapscen);
|
||||
|
||||
ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18));
|
||||
|
||||
if (ybscen->delay < options.adjusterMaxDelay) {
|
||||
ybscen->delay = options.adjusterMaxDelay;
|
||||
}
|
||||
|
||||
ybscen->throwOnButtonRelease();
|
||||
ybscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP"));
|
||||
ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCENE_TOOLTIP"));
|
||||
p1VBox->pack_start (*ybscen);
|
||||
|
||||
p1Frame->add (*p1VBox);
|
||||
pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
|
||||
@ -199,12 +210,19 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
|
||||
|
||||
// Process 1 frame
|
||||
|
||||
expadjust = Gtk::manage(new MyExpander(false, M ("TP_COLORAPP_LABEL_CAM02")));
|
||||
setExpandAlignProperties (expadjust, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||
expadjust->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ColorAppearance::foldAllButMe), expadjust) );
|
||||
/*
|
||||
Gtk::Frame *p2Frame;
|
||||
// Vertical box container for the content of the Process 1 frame
|
||||
Gtk::VBox *p2VBox;
|
||||
|
||||
p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) );
|
||||
p2Frame->set_label_align (0.025, 0.5);
|
||||
*/
|
||||
Gtk::VBox *p2VBox;
|
||||
|
||||
p2VBox = Gtk::manage ( new Gtk::VBox());
|
||||
p2VBox->set_spacing (2);
|
||||
@ -429,10 +447,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
|
||||
|
||||
|
||||
p2Frame->add (*p2VBox);
|
||||
// p2Frame->add (*p2VBox);
|
||||
expadjust->add (*p2VBox, false);
|
||||
expadjust->setLevel(2);
|
||||
pack_start (*expadjust);
|
||||
|
||||
|
||||
pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
// pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
|
||||
|
||||
|
||||
@ -450,7 +470,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
p3VBox = Gtk::manage ( new Gtk::VBox());
|
||||
p3VBox->set_spacing (2);
|
||||
|
||||
adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 1000., 0.1, 16.));
|
||||
adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.));
|
||||
|
||||
if (adaplum->delay < options.adjusterMaxDelay) {
|
||||
adaplum->delay = options.adjusterMaxDelay;
|
||||
@ -481,7 +501,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
|
||||
tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider));
|
||||
greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1));
|
||||
ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18));
|
||||
ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18));
|
||||
|
||||
tempout->show();
|
||||
greenout->show();
|
||||
@ -533,6 +553,21 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
badpixsl->throwOnButtonRelease();
|
||||
badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP"));
|
||||
pack_start (*badpixsl, Gtk::PACK_SHRINK);
|
||||
|
||||
|
||||
//reset button
|
||||
neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL")));
|
||||
setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||
RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png"));
|
||||
setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||
neutral->set_image (*resetImg);
|
||||
neutral->set_tooltip_text (M ("TP_COLORAPP_NEUTRAL_TIP"));
|
||||
neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &ColorAppearance::neutral_pressed) );
|
||||
neutral->show();
|
||||
|
||||
//-------------
|
||||
|
||||
pack_start (*neutral);
|
||||
|
||||
// ------------------------ Listening events
|
||||
|
||||
@ -545,6 +580,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
||||
degree->setAdjusterListener (this);
|
||||
degreeout->setAdjusterListener (this);
|
||||
adapscen->setAdjusterListener (this);
|
||||
ybscen->setAdjusterListener (this);
|
||||
adaplum->setAdjusterListener (this);
|
||||
badpixsl->setAdjusterListener (this);
|
||||
jlight->setAdjusterListener (this);
|
||||
@ -575,7 +611,58 @@ ColorAppearance::~ColorAppearance ()
|
||||
delete curveEditorG3;
|
||||
}
|
||||
|
||||
void ColorAppearance::foldAllButMe (GdkEventButton* event, MyExpander *expander)
|
||||
{
|
||||
if (event->button == 3) {
|
||||
expadjust->set_expanded(expadjust == expander);
|
||||
}
|
||||
}
|
||||
|
||||
void ColorAppearance::writeOptions(std::vector<int> &tpOpen)
|
||||
{
|
||||
tpOpen.push_back (expadjust->get_expanded ());
|
||||
}
|
||||
|
||||
void ColorAppearance::updateToolState(std::vector<int> &tpOpen)
|
||||
{
|
||||
if(tpOpen.size() >= 1) {
|
||||
expadjust->set_expanded(tpOpen.at(0));
|
||||
}
|
||||
}
|
||||
|
||||
void ColorAppearance::neutral_pressed ()
|
||||
{
|
||||
jlight->resetValue (false);
|
||||
qbright->resetValue (false);
|
||||
chroma->resetValue (false);
|
||||
schroma->resetValue (false);
|
||||
mchroma->resetValue (false);
|
||||
rstprotection->resetValue (false);
|
||||
contrast->resetValue (false);
|
||||
qcontrast->resetValue (false);
|
||||
colorh->resetValue (false);
|
||||
tempout->resetValue (false);
|
||||
greenout->resetValue (false);
|
||||
ybout->resetValue (false);
|
||||
tempsc->resetValue (false);
|
||||
greensc->resetValue (false);
|
||||
badpixsl->resetValue (false);
|
||||
wbmodel->set_active (0);
|
||||
toneCurveMode->set_active (0);
|
||||
toneCurveMode2->set_active (0);
|
||||
toneCurveMode3->set_active (0);
|
||||
shape->reset();
|
||||
shape2->reset();
|
||||
shape3->reset();
|
||||
degree->setAutoValue (true);
|
||||
degree->resetValue (false);
|
||||
adapscen->resetValue (false);
|
||||
adapscen->setAutoValue (true);
|
||||
degreeout->resetValue (false);
|
||||
degreeout->setAutoValue (true);
|
||||
ybscen->resetValue (false);
|
||||
ybscen->setAutoValue (true);
|
||||
}
|
||||
|
||||
bool ColorAppearance::bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip)
|
||||
{
|
||||
@ -606,6 +693,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited);
|
||||
degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited);
|
||||
adapscen->setEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited);
|
||||
ybscen->setEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited);
|
||||
adaplum->setEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited);
|
||||
badpixsl->setEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited);
|
||||
jlight->setEditedState (pedited->colorappearance.jlight ? Edited : UnEdited);
|
||||
@ -632,6 +720,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
degree->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegree);
|
||||
degreeout->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegreeout);
|
||||
adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen);
|
||||
ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen);
|
||||
set_inconsistent (multiImage && !pedited->colorappearance.enabled);
|
||||
|
||||
shape->setUnChanged (!pedited->colorappearance.curve);
|
||||
@ -736,6 +825,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
lastAutoDegree = pp->colorappearance.autodegree;
|
||||
lastAutoAdapscen = pp->colorappearance.autoadapscen;
|
||||
lastAutoDegreeout = pp->colorappearance.autodegreeout;
|
||||
lastAutoybscen = pp->colorappearance.autoybscen;
|
||||
|
||||
degree->setValue (pp->colorappearance.degree);
|
||||
degree->setAutoValue (pp->colorappearance.autodegree);
|
||||
@ -743,6 +833,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
adapscen->setAutoValue (pp->colorappearance.autoadapscen);
|
||||
degreeout->setValue (pp->colorappearance.degreeout);
|
||||
degreeout->setAutoValue (pp->colorappearance.autodegreeout);
|
||||
ybscen->setValue (pp->colorappearance.ybscen);
|
||||
ybscen->setAutoValue (pp->colorappearance.autoybscen);
|
||||
|
||||
adaplum->setValue (pp->colorappearance.adaplum);
|
||||
badpixsl->setValue (pp->colorappearance.badpixsl);
|
||||
@ -785,6 +877,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->colorappearance.enabled = getEnabled();
|
||||
pp->colorappearance.adapscen = adapscen->getValue ();
|
||||
pp->colorappearance.autoadapscen = adapscen->getAutoValue ();
|
||||
pp->colorappearance.ybscen = ybscen->getValue ();
|
||||
pp->colorappearance.autoybscen = ybscen->getAutoValue ();
|
||||
pp->colorappearance.adaplum = adaplum->getValue ();
|
||||
pp->colorappearance.badpixsl = badpixsl->getValue ();
|
||||
pp->colorappearance.jlight = jlight->getValue ();
|
||||
@ -842,6 +936,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->colorappearance.degreeout = degreeout->getEditedState ();
|
||||
pedited->colorappearance.adapscen = adapscen->getEditedState ();
|
||||
pedited->colorappearance.adaplum = adaplum->getEditedState ();
|
||||
pedited->colorappearance.ybscen = ybscen->getEditedState ();
|
||||
pedited->colorappearance.badpixsl = badpixsl->getEditedState ();
|
||||
pedited->colorappearance.jlight = jlight->getEditedState ();
|
||||
pedited->colorappearance.qbright = qbright->getEditedState ();
|
||||
@ -855,6 +950,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->colorappearance.autodegree = !degree->getAutoInconsistent();
|
||||
pedited->colorappearance.autodegreeout = !degreeout->getAutoInconsistent();
|
||||
pedited->colorappearance.autoadapscen = !adapscen->getAutoInconsistent();
|
||||
pedited->colorappearance.autoybscen = !ybscen->getAutoInconsistent();
|
||||
pedited->colorappearance.enabled = !get_inconsistent();
|
||||
pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED");
|
||||
pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED");
|
||||
@ -1140,6 +1236,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit
|
||||
degree->setDefault (defParams->colorappearance.degree);
|
||||
degreeout->setDefault (defParams->colorappearance.degreeout);
|
||||
adapscen->setDefault (defParams->colorappearance.adapscen);
|
||||
ybscen->setDefault (defParams->colorappearance.ybscen);
|
||||
adaplum->setDefault (defParams->colorappearance.adaplum);
|
||||
badpixsl->setDefault (defParams->colorappearance.badpixsl);
|
||||
jlight->setDefault (defParams->colorappearance.jlight);
|
||||
@ -1161,6 +1258,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit
|
||||
degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited);
|
||||
degreeout->setDefaultEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited);
|
||||
adapscen->setDefaultEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited);
|
||||
ybscen->setDefaultEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited);
|
||||
adaplum->setDefaultEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited);
|
||||
badpixsl->setDefaultEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited);
|
||||
jlight->setDefaultEditedState (pedited->colorappearance.jlight ? Edited : UnEdited);
|
||||
@ -1182,6 +1280,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit
|
||||
degree->setDefaultEditedState (Irrelevant);
|
||||
degreeout->setDefaultEditedState (Irrelevant);
|
||||
adapscen->setDefaultEditedState (Irrelevant);
|
||||
ybscen->setDefaultEditedState (Irrelevant);
|
||||
adaplum->setDefaultEditedState (Irrelevant);
|
||||
badpixsl->setDefaultEditedState (Irrelevant);
|
||||
jlight->setDefaultEditedState (Irrelevant);
|
||||
@ -1227,9 +1326,10 @@ bool ColorAppearance::autoCamComputed_ ()
|
||||
return false;
|
||||
}
|
||||
|
||||
void ColorAppearance::adapCamChanged (double cadap)
|
||||
void ColorAppearance::adapCamChanged (double cadap, int ybsc)
|
||||
{
|
||||
nextCadap = cadap;
|
||||
nextYbscn = ybsc;
|
||||
|
||||
const auto func = [] (gpointer data) -> gboolean {
|
||||
static_cast<ColorAppearance*> (data)->adapCamComputed_();
|
||||
@ -1245,6 +1345,7 @@ bool ColorAppearance::adapCamComputed_ ()
|
||||
disableListener ();
|
||||
// degree->setEnabled (true);
|
||||
adapscen->setValue (nextCadap);
|
||||
ybscen->setValue (nextYbscn);
|
||||
enableListener ();
|
||||
|
||||
return false;
|
||||
@ -1283,6 +1384,8 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval)
|
||||
listener->panelChanged (EvCATDegreeout, a->getTextValue());
|
||||
} else if (a == adapscen) {
|
||||
listener->panelChanged (EvCATAdapscen, a->getTextValue());
|
||||
} else if (a == ybscen) {
|
||||
listener->panelChanged (EvCATybscen, a->getTextValue());
|
||||
} else if (a == adaplum) {
|
||||
listener->panelChanged (EvCATAdapLum, a->getTextValue());
|
||||
} else if (a == badpixsl) {
|
||||
@ -1352,6 +1455,15 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval)
|
||||
|
||||
lastAutoAdapscen = adapscen->getAutoValue();
|
||||
|
||||
if (ybscen->getAutoInconsistent()) {
|
||||
ybscen->setAutoInconsistent (false);
|
||||
ybscen->setAutoValue (false);
|
||||
} else if (lastAutoybscen) {
|
||||
ybscen->setAutoInconsistent (true);
|
||||
}
|
||||
|
||||
lastAutoybscen = ybscen->getAutoValue();
|
||||
|
||||
}
|
||||
|
||||
if (listener && (multiImage || getEnabled()) ) {
|
||||
@ -1387,6 +1499,16 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval)
|
||||
}
|
||||
}
|
||||
|
||||
if (a == ybscen) {
|
||||
if (ybscen->getAutoInconsistent()) {
|
||||
listener->panelChanged (EvCATAutoyb, M ("GENERAL_UNCHANGED"));
|
||||
} else if (ybscen->getAutoValue()) {
|
||||
listener->panelChanged (EvCATAutoyb, M ("GENERAL_ENABLED"));
|
||||
} else {
|
||||
listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1512,6 +1634,7 @@ void ColorAppearance::setBatchMode (bool batchMode)
|
||||
degreeout->showEditedCB ();
|
||||
adapscen->showEditedCB ();
|
||||
adaplum->showEditedCB ();
|
||||
ybscen->showEditedCB ();
|
||||
badpixsl->showEditedCB ();
|
||||
jlight->showEditedCB ();
|
||||
qbright->showEditedCB ();
|
||||
@ -1573,6 +1696,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp)
|
||||
degree->trimValue (pp->colorappearance.degree);
|
||||
degreeout->trimValue (pp->colorappearance.degreeout);
|
||||
adapscen->trimValue (pp->colorappearance.adapscen);
|
||||
ybscen->trimValue (pp->colorappearance.ybscen);
|
||||
adaplum->trimValue (pp->colorappearance.adaplum);
|
||||
badpixsl->trimValue (pp->colorappearance.badpixsl);
|
||||
jlight->trimValue (pp->colorappearance.jlight);
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
// void sharpcie_toggled ();
|
||||
void autoCamChanged (double ccam, double ccamout);
|
||||
bool autoCamComputed_ ();
|
||||
void adapCamChanged (double cadap);
|
||||
void adapCamChanged (double cadap, int ybscn);
|
||||
bool adapCamComputed_ ();
|
||||
|
||||
void curveChanged (CurveEditor* ce);
|
||||
@ -69,6 +69,7 @@ public:
|
||||
bool curveMode2Changed_ ();
|
||||
void curveMode3Changed ();
|
||||
bool curveMode3Changed_ ();
|
||||
void neutral_pressed ();
|
||||
|
||||
void expandCurve (bool isExpanded);
|
||||
bool isCurveExpanded ();
|
||||
@ -78,10 +79,13 @@ public:
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI);
|
||||
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller);
|
||||
void updateToolState (std::vector<int> &tpOpen);
|
||||
void writeOptions (std::vector<int> &tpOpen);
|
||||
|
||||
private:
|
||||
bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip);
|
||||
bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip);
|
||||
void foldAllButMe (GdkEventButton* event, MyExpander *expander);
|
||||
|
||||
Glib::RefPtr<Gtk::Tooltip> bgTTips;
|
||||
Glib::RefPtr<Gtk::Tooltip> srTTips;
|
||||
@ -90,6 +94,7 @@ private:
|
||||
|
||||
Adjuster* degree;
|
||||
Adjuster* adapscen;
|
||||
Adjuster* ybscen;
|
||||
Adjuster* adaplum;
|
||||
Adjuster* degreeout;
|
||||
Adjuster* badpixsl;
|
||||
@ -108,6 +113,8 @@ private:
|
||||
Adjuster* tempsc;
|
||||
Adjuster* greensc;
|
||||
|
||||
MyExpander* expadjust;
|
||||
|
||||
MyComboBoxText* toneCurveMode;
|
||||
MyComboBoxText* toneCurveMode2;
|
||||
MyComboBoxText* toneCurveMode3;
|
||||
@ -119,6 +126,7 @@ private:
|
||||
Gtk::CheckButton* datacie;
|
||||
Gtk::CheckButton* tonecie;
|
||||
// Gtk::CheckButton* sharpcie;
|
||||
Gtk::Button* neutral;
|
||||
|
||||
MyComboBoxText* surround;
|
||||
sigc::connection surroundconn;
|
||||
@ -128,7 +136,7 @@ private:
|
||||
sigc::connection algoconn;
|
||||
sigc::connection surrconn;
|
||||
sigc::connection gamutconn, datacieconn, tonecieconn /*,badpixconn , sharpcieconn*/;
|
||||
sigc::connection tcmodeconn, tcmode2conn, tcmode3conn;
|
||||
sigc::connection tcmodeconn, tcmode2conn, tcmode3conn, neutralconn;
|
||||
CurveEditorGroup* curveEditorG;
|
||||
CurveEditorGroup* curveEditorG2;
|
||||
CurveEditorGroup* curveEditorG3;
|
||||
@ -137,9 +145,11 @@ private:
|
||||
DiagonalCurveEditor* shape2;
|
||||
DiagonalCurveEditor* shape3;
|
||||
double nextCcam, nextCcamout, nextCadap;
|
||||
int nextYbscn;
|
||||
bool lastAutoDegree;
|
||||
bool lastAutoAdapscen;
|
||||
bool lastAutoDegreeout;
|
||||
bool lastAutoybscen;
|
||||
bool lastsurr;
|
||||
bool lastgamut;
|
||||
bool lastdatacie;
|
||||
|
@ -180,6 +180,8 @@ void ParamsEdited::set (bool v)
|
||||
colorappearance.surround = v;
|
||||
colorappearance.adapscen = v;
|
||||
colorappearance.autoadapscen = v;
|
||||
colorappearance.ybscen = v;
|
||||
colorappearance.autoybscen = v;
|
||||
colorappearance.adaplum = v;
|
||||
colorappearance.badpixsl = v;
|
||||
colorappearance.wbmodel = v;
|
||||
@ -708,6 +710,8 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround;
|
||||
colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen;
|
||||
colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen;
|
||||
colorappearance.ybscen = colorappearance.ybscen && p.colorappearance.ybscen == other.colorappearance.ybscen;
|
||||
colorappearance.autoybscen = colorappearance.autoybscen && p.colorappearance.autoybscen == other.colorappearance.autoybscen;
|
||||
colorappearance.adaplum = colorappearance.adaplum && p.colorappearance.adaplum == other.colorappearance.adaplum;
|
||||
colorappearance.badpixsl = colorappearance.badpixsl && p.colorappearance.badpixsl == other.colorappearance.badpixsl;
|
||||
colorappearance.wbmodel = colorappearance.wbmodel && p.colorappearance.wbmodel == other.colorappearance.wbmodel;
|
||||
@ -1739,6 +1743,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.colorappearance.adapscen = mods.colorappearance.adapscen;
|
||||
}
|
||||
|
||||
if (colorappearance.autoybscen) {
|
||||
toEdit.colorappearance.autoybscen = mods.colorappearance.autoybscen;
|
||||
}
|
||||
|
||||
if (colorappearance.ybscen) {
|
||||
toEdit.colorappearance.ybscen = mods.colorappearance.ybscen;
|
||||
}
|
||||
|
||||
if (colorappearance.adaplum) {
|
||||
toEdit.colorappearance.adaplum = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTVIEWING] ? toEdit.colorappearance.adaplum + mods.colorappearance.adaplum : mods.colorappearance.adaplum;
|
||||
}
|
||||
|
@ -292,9 +292,11 @@ public:
|
||||
bool degreeout;
|
||||
bool autodegreeout;
|
||||
bool autoadapscen;
|
||||
bool autoybscen;
|
||||
bool surround;
|
||||
bool adapscen;
|
||||
bool adaplum;
|
||||
bool ybscen;
|
||||
bool badpixsl;
|
||||
bool wbmodel;
|
||||
bool algo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user