Local Adjustments - Cam16 - lacam16n2 (new) (#7010)
* Restore settings and options * Clean code and windows.yml * Gui improvment * Fixed wrong value maxicam * Change GUI TRC and Log encoding and sigmoid * Clean code locallabtools2 * Fomat locallabtools2 * New calcualtion gray when using Q * Improve sigmoid Q with meanQ * Change labels and tooltip * Change DR with log * Change location GUI TRC * Change GUI sigmoid hide - show * Fixed bug with trc * Added whites to TRC & whites * Small modification whites - comment code * Change GUI and selection for sigmoid and log encoding Q * Change yml worksflow * Added cat to workingtrc rtthumbnail * Delete entries in defualt languages * Blacks and whites distribution * Change tooltips * Fixed some issues * Change GUI hide to set_sensitive * first step white and black log encoding * GUI Labels - tooltips * Compress brightness log encoding * Change compression threshold * Clean procparams * Improve GUI and threshold compression * Improvment GUI and tooltips * First step primaries cam16 * Primaries loc step 2 * Primaries loc step 3 * jdcmax primaries - format iplab2rgb * Improve GUI * Beta RGB primaries and message * Change tooltips * Change order prim * CIExy diagram step 1 * CIExy step 2 * CIExy step 2 * CIExy diagram step 4 * CIExy diagram step 5 * Change improccordinator and locallabtool2s listener * Forgoten delete in improccordinator * Disable setListener * Improve GUI and behavior TRC and Primaries * TRC primaries - illuminant step 1 * TRC primaries - illuminant step 2 * TRC primaries - illuminant step 3 * TRC primaries - illuminant step 4 * Gamut control - remove old listener and added listener locallabcieLC * publish pre dev labels windows appimage * publish pre dev labels windows appimage [] * Move log encoding cie - step 1 * Step 2 * Move Log encoding CIE and improve GUI step 3 * Pre Ciecam midtones step 1 * Mid tones step 2 and tooltips * Forgoten label and tooltips * Improve tooltips - and change yml files * Include repository in appimage and windows.yml - change labels * Forgotten surroundcie in procparams.cc * Improve GUI with expander - clean code * Change tooltip * Clean locallabtools2 - improve Jpro * Bypass Ciecam step 1 * step 2 * Step 3 * Change settings - improve GUI * Clean code * Improve sigmoid cam16 * Improve sigmoid cam16 * Added illuminant E to illmethod * Change iccmatrices * Working profile JDCmax stdA and Abstract Profile * Pre-ciecam JDCmax stdA * Abstract profile - cat method step 1 * Step 3 * Step 4 and various changes * Enable default gamutcontrol - improve GUI * Refine color pre-ciecam * Step 2 * step 3 * Step - 4 * Refine colors Abstract profiles * Expander true Abstract Profile * Clean and comment code * Tooltip pre-ciecam * Change tooltips * Improve GUI free primaries * Labgrid dominant color * Shift dominant color step 1 * Shift xy dominant color * History msg shift * Fixed various bad behavior - change scalrefi * Improve behavior DR vs deltaE - log encoding and pre-ciecam * Limited reduce deltaE to 1 - comment code * Improve behavior TIF/JPG * Forgotten code * Various small changes to refinement color pre-ciecam * Foramt iplab2rgb and simpleprocees - small change meanx meany * Bad behavior with simpleprocess abstract profile and pre-ciecam * Re-enable code for simpleprocess * Iprove iplab2rgb * Improve GUI if selection Jz * provis with precision * Chnage GUI log encoding basic - improve shiftxl shiftyl pre-ciecam * Improve GUI with expanders * Change location pre-ciecam expander * Change label tooltip pre-ciecam * Improve white distribution and equalizer * Bad behavior Source data adjustments * Comment code * Improve Dynamic Range Compression - for some images with very high DR * Clean code * Improve TM fattal with saturation control in LA * saturation control fattal LA * RE-order paramsedit * Change local contrast in LA - log encoding and Cam16 * LA settings avoidcolorshift XYZabsolute * Change GUI precision blackEv WhiteEv BlackEvjz WhiteEvjz * Check button smoothcie - smooth highlights * Change order midtones - log encoding - other method smooth * Change maximum gamma in TRC cam16 * Change maximum slope in TRC cam16 * refine smooth highlights * Small improvment - comment code * Bad behavior - black screen - in Cam16 * setLogscale for slopjcie * Change source data GUI - PQ and other DR functions * PQ mode advanced - adjustments and tooltip * Comment and clean code * Simplified GUI in Basic mode - Source Data Adjustments * Added primaries to source date adjustements - fix basic problem * GUI graduaded filter cie cam16 * Graduated filter - LA Color appearance * More illuminant cam16 - D120 - Tungsten 2000K - Tungsten 1500K * Abstract profile ICM - shift x - shift y * Frame color dominant Abstract profile * Frame color dominant Abstract profile * Illuminant E - abstract profile * Abstact profile - midtones * Abstrcat profile - smooth highlights checkbutton * Abstract Profile - Smooth highligts rtengine * Bad behavior LA gamut - re-enabled Munsell in settings * adapts Abstract profile and auto-match tone curve * Change chromaticity curve c(h) - ppversion 351 and procparams * icmpanel fixed bad wmidtcie * Change in procparams assignfromkeyfile color Management * Remove message in console * Missing code procparams.cc wcat * Clean message in console * Disable ppversion 351 - surround extremely dark * Choice surround scene Disable ciecam * Improve GUI for surround Disable Ciecam * Small change gamutcontrol - message g0..g5 verbose * Remove gautcontrol on limits * Strength log encoding - Source data adjustments * Fixed genral bug in lacam16n - bad behavior color * Checkbutton saturation control - Cam16 log encoding * Change default saturation controle log encoding - false * GUI LA Log encoding - Strength - saturation control - part 1 * Checkbox saturation control LA Log encoding * Change repartition GUI brightnees - hue - chroma * Hide primaries and illuminant in standard mode * Merge with dev 2 * reduces sigmoid Q contrast * Provisory disable Sigmoid Q * Re-enable sigmoid function complexity mode * Re-enable log encoding Q - with Ciecam * GUI improvments - small code improvments * Change tooltip * Simplify GUI mode Basic - Standard - added tooltip * Change tooltip - LA settings - Avoid color shift * hope to fix the bug between Jz and Cam16 * Another change for Jz - format astyle locallabtool2.cc * Clean code GUI - remove Zcam * Change label in Recovery based on luminance mask * Reduces minimum spot size from 2 to 1.5 * Improve behavior GUI with Jzczhz * Clean code iplocallab.cc * Small improvement ciecam02.cc * Fixed bad behvior GUI and code between Cam16 and Jzczhz * Improve Jz and surround effects * Improve Jz and Local contrast Cam16 & Jz taking account surround * Disable local contrast if cam16 and not ciecam surround * Restore epsil 0.001 loccont * Improve local contrast when surround low and Jz * Clean code locallabtool2 - weakened a little Local Contrast in connection with surround * Remove Laplacian threshold in Cam16 and JzCzHz mask * Simplify Mask for JzCzHz * Enable choice complexity mask in mode advanced * Solved bad behavior GUI masks * Optimize GUI mask Jz and cam16 * Change 3 icon .png without png * Remove wrong message in console without problem * Remove warning with & in some tooltips and TP_WBALANCE_AUTO_HEADER * Smoothcie Method GUI * Replace checkbutton smooth highlight bya combobox * Improve behavior GUI - CIECAM - advanced - tempout and greenout * Fixed - I hope - crash when delete spot and cam16 * Clean code with maxcam and dependencies * Added Smooth highlight rolloff or not * Improve smooth lights - gamma mode only - standard and advanced - gray balance * Improve Smoothing lights - take into account the 2 Yb * Change tooltip * Chnage wrong lable scope => slope * Clean and comment code * Reduces the effect of - Smoothing light -Ev mode - Small change range Slope * Scale Yb scene white whiteEv * Hide Scale in some GUI cases * Clean comment code Smotth and TM function * Change GUI - Smooth highlights and tone mapping - allows also Basic * Change labels * Change tooltip * Remove arrow.cur in windows.yml as suggested by Lawrence37 * Reverse last changes * Change limits slope based in SDA * Clean locallabtools2.cc * Set minimum slope based to 0.6 * Change label highlight * Change listener scene parameters to GUI * Clean code sine changes listener * Limits Blackev Whiteev values in slope base to avoid crash * Change a little limits BlackEv WhiteEv * Small changes in console - remove warnings * Change XYZ relative - avoid color shift * Improve gamutmap * re build gamutmap
This commit is contained in:
@@ -65,12 +65,20 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
EvICMLabGridciexy = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICL_LABGRIDCIEXY");
|
||||
EvICMfbw = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_FBW");
|
||||
EvICMgamut = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_GAMUT");
|
||||
EvICMcat = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_CAT");
|
||||
EvICMrefi = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_REFI");
|
||||
EvICMtrcExp = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_TRCEXP");
|
||||
EvICMshiftx = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_SHIFTX");
|
||||
EvICMshifty = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_SHIFTY");
|
||||
EvICMwmidtcie = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_MIDTCIE");
|
||||
EvICMwsmoothcie = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_SMOOTHCIE");
|
||||
|
||||
isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = false;
|
||||
|
||||
ipDialog = Gtk::manage(new MyFileChooserButton(M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||
ipDialog->set_tooltip_text(M("TP_ICM_INPUTCUSTOM_TOOLTIP"));
|
||||
bindCurrentFolder(*ipDialog, options.lastIccDir);
|
||||
labgridcie = Gtk::manage(new LabGrid(EvICMLabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true));
|
||||
labgridcie = Gtk::manage(new LabGrid(EvICMLabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true, true));
|
||||
|
||||
|
||||
// ------------------------------- Input profile
|
||||
@@ -205,12 +213,13 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
|
||||
//-----------------gamma TRC working
|
||||
// Gtk::Frame *trcFrame = Gtk::manage(new Gtk::Frame(M("TP_ICM_TRCFRAME")));
|
||||
trcExp = Gtk::manage(new MyExpander(false, M("TP_ICM_TRCFRAME")));
|
||||
trcExp = Gtk::manage(new MyExpander(true, M("TP_ICM_TRCFRAME")));
|
||||
setExpandAlignProperties(trcExp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||
// trcFrame->set_label_align(0.025, 0.5);
|
||||
Gtk::Box *trcProfVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
|
||||
trcExp->set_tooltip_text(M("TP_ICM_TRCFRAME_TOOLTIP"));
|
||||
trcExp->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ICMPanel::foldAllButMe), trcExp) );
|
||||
trcExpconn = trcExp->signal_enabled_toggled().connect(sigc::mem_fun(*this, &ICMPanel::trcExpChanged));
|
||||
|
||||
wTRCBox = Gtk::manage(new Gtk::Box());
|
||||
|
||||
@@ -233,11 +242,19 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
|
||||
wGamma = Gtk::manage(new Adjuster(M("TP_ICM_WORKING_TRC_GAMMA"), 0.40, 15.0, 0.001, 2.222));
|
||||
wSlope = Gtk::manage(new Adjuster(M("TP_ICM_WORKING_TRC_SLOPE"), 0., 300., 0.01, 4.5));
|
||||
wmidtcie = Gtk::manage(new Adjuster(M("TP_LOCALLAB_MIDTCIE"), -100., 100., 1., 0.));
|
||||
wsmoothcie = Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_SMOOTHCIE")));
|
||||
trcProfVBox->pack_start(*wGamma, Gtk::PACK_SHRINK);
|
||||
wGamma->show();
|
||||
|
||||
trcProfVBox->pack_start(*wSlope, Gtk::PACK_SHRINK);
|
||||
wSlope->show();
|
||||
trcProfVBox->pack_start(*wmidtcie, Gtk::PACK_SHRINK);
|
||||
wmidtcie->show();
|
||||
trcProfVBox->pack_start(*wsmoothcie, Gtk::PACK_SHRINK);
|
||||
wsmoothcie->show();
|
||||
wsmoothcieconn = wsmoothcie->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::wsmoothcieChanged));
|
||||
wsmoothcie->set_active(false);
|
||||
|
||||
willuBox = Gtk::manage(new Gtk::Box());
|
||||
willulab = Gtk::manage(new Gtk::Label(M("TP_ICM_WORKING_ILLU") + ":"));
|
||||
@@ -257,6 +274,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
will->append(M("TP_ICM_WORKING_ILLU_STDA"));
|
||||
will->append(M("TP_ICM_WORKING_ILLU_2000"));
|
||||
will->append(M("TP_ICM_WORKING_ILLU_1500"));
|
||||
will->append(M("TP_ICM_WORKING_ILLU_E"));
|
||||
will->set_active(0);
|
||||
will->set_tooltip_text(M("TP_ICM_ILLUMPRIM_TOOLTIP"));
|
||||
|
||||
@@ -270,11 +288,11 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
fbw = Gtk::manage(new Gtk::CheckButton((M("TP_ICM_FBW"))));
|
||||
fbw->set_active(true);
|
||||
gamut = Gtk::manage(new Gtk::CheckButton((M("TP_ICM_GAMUT"))));
|
||||
gamut->set_active(false);
|
||||
gamut->set_active(true);
|
||||
|
||||
trcProfVBox->pack_start(*wprimBox, Gtk::PACK_EXPAND_WIDGET);
|
||||
trcProfVBox->pack_start(*fbw, Gtk::PACK_EXPAND_WIDGET);
|
||||
trcProfVBox->pack_start(*gamut, Gtk::PACK_EXPAND_WIDGET);
|
||||
// trcProfVBox->pack_start(*gamut, Gtk::PACK_EXPAND_WIDGET);
|
||||
|
||||
neutral = Gtk::manage (new Gtk::Button (M ("TP_ICM_NEUTRAL")));
|
||||
setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||
@@ -296,6 +314,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_WID"));
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_AC0"));
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_JDCMAX"));
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_JDCMAXSTDA"));
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_BRU"));
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_BET"));
|
||||
wprim->append(M("TP_ICM_WORKING_PRIM_BST"));
|
||||
@@ -327,6 +346,10 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
redFrame->set_label_align(0.025, 0.5);
|
||||
redFrame->set_tooltip_text(M("TP_ICM_WORKING_PRIMFRAME_TOOLTIP"));
|
||||
|
||||
colorFramecie = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COLORFRAME")));
|
||||
colorFramecie->set_label_align(0.025, 0.5);
|
||||
colorFramecie->set_tooltip_text(M("TP_LOCALLAB_PRECAMREFIMAIN_TOOLTIP"));
|
||||
|
||||
Gtk::Box *redVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
|
||||
primCoordGrid = Gtk::manage(new Gtk::Grid());
|
||||
primCoordGrid->set_column_homogeneous(true);
|
||||
@@ -355,22 +378,53 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
redVBox->pack_start(*cielab, Gtk::PACK_SHRINK);
|
||||
|
||||
redVBox->pack_start(*labgridcie, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
redVBox->pack_start(*gamut, Gtk::PACK_EXPAND_WIDGET);
|
||||
|
||||
refi = Gtk::manage(new Adjuster(M("TC_PRIM_REFI"), -0.5, 1., 0.0001, 0.));
|
||||
shiftx = Gtk::manage(new Adjuster(M("TC_LOCALLAB_PRIM_SHIFTX"), -0.2, 0.2, 0.0001, 0.));
|
||||
shifty = Gtk::manage(new Adjuster(M("TC_LOCALLAB_PRIM_SHIFTY"), -0.2, 0.2, 0.0001, 0.));
|
||||
|
||||
wcatBox = Gtk::manage(new Gtk::Box());
|
||||
wcatlab = Gtk::manage(new Gtk::Label(M("TP_ICM_WORKING_CAT") + ":"));
|
||||
wcatBox->pack_start(*wcatlab, Gtk::PACK_SHRINK);
|
||||
wcat = Gtk::manage(new MyComboBoxText());
|
||||
wcatBox->pack_start(*wcat, Gtk::PACK_EXPAND_WIDGET);
|
||||
|
||||
wcat->append(M("TP_ICM_WORKING_CAT_BRAD"));
|
||||
wcat->append(M("TP_ICM_WORKING_CAT_CAT16"));
|
||||
wcat->append(M("TP_ICM_WORKING_CAT_CAT02"));
|
||||
wcat->append(M("TP_ICM_WORKING_CAT_VK"));
|
||||
wcat->append(M("TP_ICM_WORKING_CAT_XYZ"));
|
||||
wcat->set_active(0);
|
||||
redVBox->pack_start(*wcatBox, Gtk::PACK_SHRINK);
|
||||
|
||||
ToolParamBlock* const colorBox = Gtk::manage(new ToolParamBlock());
|
||||
|
||||
colorBox->pack_start(*refi, Gtk::PACK_EXPAND_WIDGET);
|
||||
colorBox->pack_start(*shiftx, Gtk::PACK_EXPAND_WIDGET);
|
||||
colorBox->pack_start(*shifty, Gtk::PACK_EXPAND_WIDGET);
|
||||
colorFramecie->add(*colorBox);
|
||||
redVBox->pack_start(*colorFramecie);
|
||||
redFrame->add(*redVBox);
|
||||
|
||||
wGamma->setAdjusterListener(this);
|
||||
wSlope->setLogScale(16, 0);
|
||||
wSlope->setAdjusterListener(this);
|
||||
wmidtcie->setAdjusterListener(this);
|
||||
redx->setAdjusterListener(this);
|
||||
redy->setAdjusterListener(this);
|
||||
grex->setAdjusterListener(this);
|
||||
grey->setAdjusterListener(this);
|
||||
blux->setAdjusterListener(this);
|
||||
bluy->setAdjusterListener(this);
|
||||
refi->setAdjusterListener(this);
|
||||
shiftx->setAdjusterListener(this);
|
||||
shifty->setAdjusterListener(this);
|
||||
|
||||
wGamma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||
|
||||
wSlope->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||
wmidtcie->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||
|
||||
// Rendering intent
|
||||
riaHBox = Gtk::manage(new Gtk::Box());
|
||||
@@ -479,6 +533,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
wtrcconn = wTRC->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wtrcinChanged));
|
||||
willconn = will->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::willChanged));
|
||||
wprimconn = wprim->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprimChanged));
|
||||
wcatconn = wcat->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wcatChanged));
|
||||
|
||||
fbwconn = fbw->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::fbwChanged));
|
||||
gamutconn = gamut->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::gamutChanged));
|
||||
@@ -525,6 +580,8 @@ void ICMPanel::neutral_pressed ()
|
||||
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::ACES_P0));
|
||||
} else if (wProfNames->get_active_text() == "JDCmax") {
|
||||
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::JDC_MAX));
|
||||
} else if (wProfNames->get_active_text() == "JDCmax stdA") {
|
||||
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::JDC_MAXSTDA));
|
||||
} else if (wProfNames->get_active_text() == "BruceRGB") {
|
||||
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::BRUCE_RGB));
|
||||
} else if (wProfNames->get_active_text() == "Beta RGB") {
|
||||
@@ -535,9 +592,11 @@ void ICMPanel::neutral_pressed ()
|
||||
const ColorManagementParams defPar;
|
||||
wGamma->setValue(defPar.workingTRCGamma);//2.4
|
||||
wSlope->setValue(defPar.workingTRCSlope);//12.92
|
||||
wmidtcie->setValue(defPar.wmidtcie);
|
||||
preser->setValue(defPar.preser);
|
||||
fbw->set_active(defPar.fbw);
|
||||
gamut->set_active(defPar.gamut);
|
||||
wsmoothcie->set_active(defPar.wsmoothcie);
|
||||
wTRC->set_active(toUnderlying(ColorManagementParams::WorkingTrc::NONE));//reset to none
|
||||
will->set_active(toUnderlying(ColorManagementParams::Illuminant::DEFAULT));//reset to default - after wprim
|
||||
}
|
||||
@@ -614,7 +673,7 @@ void ICMPanel::primChanged (float rx, float ry, float bx, float by, float gx, fl
|
||||
);
|
||||
}
|
||||
|
||||
void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y)
|
||||
void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y, float m_x, float m_y)
|
||||
{//update CIE xy graph
|
||||
nextrx = r_x;
|
||||
nextry = r_y;
|
||||
@@ -624,6 +683,8 @@ void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g
|
||||
nextgy = g_y;
|
||||
nextwx = w_x;
|
||||
nextwy = w_y;
|
||||
nextmx = m_x;
|
||||
nextmy = m_y;
|
||||
//convert xy datas in datas for labgrid areas
|
||||
nextrx = 1.81818f * (nextrx + 0.1f) - 1.f;
|
||||
nextry = 1.81818f * (nextry + 0.1f) - 1.f;
|
||||
@@ -633,12 +694,14 @@ void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g
|
||||
nextgy = 1.81818f * (nextgy + 0.1f) - 1.f;
|
||||
nextwx = 1.81818f * (nextwx + 0.1f) - 1.f;
|
||||
nextwy = 1.81818f * (nextwy + 0.1f) - 1.f;
|
||||
nextmx = 1.81818f * (nextmx + 0.1f) - 1.f;
|
||||
nextmy = 1.81818f * (nextmy + 0.1f) - 1.f;
|
||||
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
{
|
||||
disableListener();
|
||||
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, false);
|
||||
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, nextmx, nextmy, false);
|
||||
enableListener();
|
||||
return false;
|
||||
}
|
||||
@@ -793,6 +856,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
ConnectionBlocker obpcconn_(obpcconn);
|
||||
ConnectionBlocker fbwconn_(fbwconn);
|
||||
ConnectionBlocker gamutconn_(gamutconn);
|
||||
ConnectionBlocker wsmoothcieconn_(wsmoothcieconn);
|
||||
ConnectionBlocker ipc_(ipc);
|
||||
ConnectionBlocker tcurveconn_(tcurveconn);
|
||||
ConnectionBlocker ltableconn_(ltableconn);
|
||||
@@ -806,6 +870,9 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
ConnectionBlocker wtrcconn_(wtrcconn);
|
||||
ConnectionBlocker willconn_(willconn);
|
||||
ConnectionBlocker wprimconn_(wprimconn);
|
||||
ConnectionBlocker wcatconn_(wcatconn);
|
||||
ConnectionBlocker trcExpconn_(trcExpconn);
|
||||
|
||||
trcExp->set_expanded(false);
|
||||
|
||||
if (pp->icm.inputProfile.substr(0, 5) != "file:" && !ipDialog->get_filename().empty()) {
|
||||
@@ -847,10 +914,14 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
will->set_active(rtengine::toUnderlying(pp->icm.will));
|
||||
|
||||
wprim->set_active(rtengine::toUnderlying(pp->icm.wprim));
|
||||
wcat->set_active(rtengine::toUnderlying(pp->icm.wcat));
|
||||
|
||||
wtrcinChanged();
|
||||
willChanged();
|
||||
wprimChanged();
|
||||
wcatChanged();
|
||||
gamutChanged();
|
||||
wsmoothcieChanged();
|
||||
|
||||
if (pp->icm.outputProfile == ColorManagementParams::NoICMString) {
|
||||
oProfNames->set_active_text(M("TP_ICM_NOICM"));
|
||||
@@ -867,7 +938,9 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
|
||||
obpc->set_active(pp->icm.outputBPC);
|
||||
fbw->set_active(pp->icm.fbw);
|
||||
trcExp->setEnabled(pp->icm.trcExp);
|
||||
gamut->set_active(pp->icm.gamut);
|
||||
wsmoothcie->set_active(pp->icm.wsmoothcie);
|
||||
ckbToneCurve->set_active(pp->icm.toneCurve);
|
||||
lastToneCurve = pp->icm.toneCurve;
|
||||
ckbApplyLookTable->set_active(pp->icm.applyLookTable);
|
||||
@@ -879,20 +952,26 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
|
||||
wGamma->setValue(pp->icm.workingTRCGamma);
|
||||
wSlope->setValue(pp->icm.workingTRCSlope);
|
||||
wmidtcie->setValue(pp->icm.wmidtcie);
|
||||
redx->setValue(pp->icm.redx);
|
||||
redy->setValue(pp->icm.redy);
|
||||
grex->setValue(pp->icm.grex);
|
||||
grey->setValue(pp->icm.grey);
|
||||
blux->setValue(pp->icm.blux);
|
||||
bluy->setValue(pp->icm.bluy);
|
||||
refi->setValue(pp->icm.refi);
|
||||
shiftx->setValue(pp->icm.shiftx);
|
||||
shifty->setValue(pp->icm.shifty);
|
||||
preser->setValue(pp->icm.preser);
|
||||
labgridcie->setParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, false);
|
||||
labgridcie->setParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy, false);
|
||||
|
||||
if (pedited) {
|
||||
iunchanged->set_active(!pedited->icm.inputProfile);
|
||||
obpc->set_inconsistent(!pedited->icm.outputBPC);
|
||||
fbw->set_inconsistent(!pedited->icm.fbw);
|
||||
trcExp->set_inconsistent(!pedited->icm.trcExp);
|
||||
gamut->set_inconsistent(!pedited->icm.gamut);
|
||||
wsmoothcie->set_inconsistent(!pedited->icm.wsmoothcie);
|
||||
ckbToneCurve->set_inconsistent(!pedited->icm.toneCurve);
|
||||
ckbApplyLookTable->set_inconsistent(!pedited->icm.applyLookTable);
|
||||
ckbApplyBaselineExposureOffset->set_inconsistent(!pedited->icm.applyBaselineExposureOffset);
|
||||
@@ -929,17 +1008,26 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
if (!pedited->icm.wprim) {
|
||||
wprim->set_active_text(M("GENERAL_UNCHANGED"));
|
||||
}
|
||||
labgridcie->setEdited(pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy);
|
||||
|
||||
if (!pedited->icm.wcat) {
|
||||
wcat->set_active_text(M("GENERAL_UNCHANGED"));
|
||||
}
|
||||
|
||||
labgridcie->setEdited(pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy || pedited->icm.labgridcieMx || pedited->icm.labgridcieMy);
|
||||
|
||||
wGamma->setEditedState(pedited->icm.workingTRCGamma ? Edited : UnEdited);
|
||||
wSlope->setEditedState(pedited->icm.workingTRCSlope ? Edited : UnEdited);
|
||||
wmidtcie->setEditedState(pedited->icm.wmidtcie ? Edited : UnEdited);
|
||||
redx->setEditedState(pedited->icm.redx ? Edited : UnEdited);
|
||||
redy->setEditedState(pedited->icm.redy ? Edited : UnEdited);
|
||||
grex->setEditedState(pedited->icm.grex ? Edited : UnEdited);
|
||||
grey->setEditedState(pedited->icm.grey ? Edited : UnEdited);
|
||||
blux->setEditedState(pedited->icm.blux ? Edited : UnEdited);
|
||||
bluy->setEditedState(pedited->icm.bluy ? Edited : UnEdited);
|
||||
refi->setEditedState(pedited->icm.refi ? Edited : UnEdited);
|
||||
preser->setEditedState(pedited->icm.preser ? Edited : UnEdited);
|
||||
shiftx->setEditedState(pedited->icm.shiftx ? Edited : UnEdited);
|
||||
shifty->setEditedState(pedited->icm.shifty ? Edited : UnEdited);
|
||||
|
||||
}
|
||||
|
||||
@@ -947,11 +1035,15 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
case ColorManagementParams::WorkingTrc::NONE: {
|
||||
wSlope->set_sensitive(false);
|
||||
wGamma->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(false);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(false);
|
||||
wprim->set_sensitive(false);
|
||||
wcat->set_sensitive(false);
|
||||
wcatlab->set_sensitive(false);
|
||||
fbw->set_sensitive(false);
|
||||
gamut->set_sensitive(false);
|
||||
wsmoothcie->set_sensitive(false);
|
||||
wprimlab->set_sensitive(false);
|
||||
riaHBox->set_sensitive(false);
|
||||
redFrame->hide();
|
||||
@@ -962,8 +1054,17 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
redFrame->hide();
|
||||
@@ -992,9 +1093,11 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
if (pp->icm.workingTRCGamma <= 1.) {
|
||||
wGamma->set_sensitive(true);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(true);
|
||||
} else {
|
||||
wGamma->set_sensitive(true);
|
||||
wSlope->set_sensitive(true);
|
||||
wmidtcie->set_sensitive(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1002,14 +1105,24 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
case ColorManagementParams::WorkingTrc::BT709:
|
||||
wGamma->setValue(2.222);
|
||||
wSlope->setValue(4.5);
|
||||
will->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
redFrame->hide();
|
||||
} else {
|
||||
@@ -1020,14 +1133,23 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
case ColorManagementParams::WorkingTrc::SRGB:
|
||||
wGamma->setValue(2.4);
|
||||
wSlope->setValue(12.92);
|
||||
will->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(true);
|
||||
riaHBox->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
redFrame->hide();
|
||||
@@ -1038,15 +1160,24 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
case ColorManagementParams::WorkingTrc::GAMMA_2_2:
|
||||
wGamma->setValue(2.2);
|
||||
wSlope->setValue(0.);
|
||||
will->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
redFrame->show();
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(true);
|
||||
riaHBox->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
redFrame->hide();
|
||||
@@ -1057,11 +1188,19 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
case ColorManagementParams::WorkingTrc::GAMMA_1_8:
|
||||
wGamma->setValue(1.8);
|
||||
wSlope->setValue(0.);
|
||||
will->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
riaHBox->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
@@ -1071,18 +1210,28 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
}
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(true);
|
||||
break;
|
||||
case ColorManagementParams::WorkingTrc::LINEAR:
|
||||
wGamma->setValue(1.);
|
||||
wSlope->setValue(1.);
|
||||
will->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(true);
|
||||
riaHBox->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
redFrame->hide();
|
||||
@@ -1102,6 +1251,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
case ColorManagementParams::Primaries::WIDE_GAMUT:
|
||||
case ColorManagementParams::Primaries::ACES_P0:
|
||||
case ColorManagementParams::Primaries::JDC_MAX:
|
||||
case ColorManagementParams::Primaries::JDC_MAXSTDA:
|
||||
case ColorManagementParams::Primaries::BRUCE_RGB:
|
||||
case ColorManagementParams::Primaries::BETA_RGB:
|
||||
case ColorManagementParams::Primaries::BEST_RGB: {
|
||||
@@ -1148,7 +1298,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
|
||||
pp->icm.workingProfile = wProfNames->get_active_text();
|
||||
pp->icm.dcpIlluminant = rtengine::max<int>(dcpIll->get_active_row_number(), 0);
|
||||
labgridcie->getParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy);
|
||||
labgridcie->getParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy);
|
||||
|
||||
if (oProfNames->get_active_text() == M("TP_ICM_NOICM")) {
|
||||
pp->icm.outputProfile = ColorManagementParams::NoICMString;
|
||||
@@ -1175,6 +1325,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->icm.workingTRC = ColorManagementParams::WorkingTrc(wTRC->get_active_row_number());
|
||||
pp->icm.will = ColorManagementParams::Illuminant(will->get_active_row_number());
|
||||
pp->icm.wprim = ColorManagementParams::Primaries(wprim->get_active_row_number());
|
||||
pp->icm.wcat = ColorManagementParams::Cat(wcat->get_active_row_number());
|
||||
|
||||
pp->icm.toneCurve = ckbToneCurve->get_active();
|
||||
pp->icm.applyLookTable = ckbApplyLookTable->get_active();
|
||||
@@ -1182,15 +1333,21 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->icm.applyHueSatMap = ckbApplyHueSatMap->get_active();
|
||||
pp->icm.outputBPC = obpc->get_active();
|
||||
pp->icm.fbw = fbw->get_active();
|
||||
pp->icm.trcExp = trcExp->getEnabled();
|
||||
pp->icm.gamut = gamut->get_active();
|
||||
pp->icm.wsmoothcie = wsmoothcie->get_active();
|
||||
pp->icm.workingTRCGamma = wGamma->getValue();
|
||||
pp->icm.workingTRCSlope = wSlope->getValue();
|
||||
pp->icm.wmidtcie = wmidtcie->getValue();
|
||||
pp->icm.redx = redx->getValue();
|
||||
pp->icm.redy = redy->getValue();
|
||||
pp->icm.grex = grex->getValue();
|
||||
pp->icm.grey = grey->getValue();
|
||||
pp->icm.blux = blux->getValue();
|
||||
pp->icm.bluy = bluy->getValue();
|
||||
pp->icm.refi = refi->getValue();
|
||||
pp->icm.shiftx = shiftx->getValue();
|
||||
pp->icm.shifty = shifty->getValue();
|
||||
pp->toneCurve.fromHistMatching = false;
|
||||
pp->icm.preser = preser->getValue();
|
||||
|
||||
@@ -1202,7 +1359,9 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->icm.aRendIntent = aRendIntent->getSelected() < 4;
|
||||
pedited->icm.outputBPC = !obpc->get_inconsistent();
|
||||
pedited->icm.fbw = !fbw->get_inconsistent();
|
||||
pedited->icm.trcExp = !trcExp->get_inconsistent();
|
||||
pedited->icm.gamut = !gamut->get_inconsistent();
|
||||
pedited->icm.wsmoothcie = !wsmoothcie->get_inconsistent();
|
||||
pedited->icm.dcpIlluminant = dcpIll->get_active_text() != M("GENERAL_UNCHANGED");
|
||||
pedited->icm.toneCurve = !ckbToneCurve->get_inconsistent();
|
||||
pedited->icm.applyLookTable = !ckbApplyLookTable->get_inconsistent();
|
||||
@@ -1210,12 +1369,14 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->icm.applyHueSatMap = !ckbApplyHueSatMap->get_inconsistent();
|
||||
pedited->icm.workingTRCGamma = wGamma->getEditedState();
|
||||
pedited->icm.workingTRCSlope = wSlope->getEditedState();
|
||||
pedited->icm.wmidtcie = wmidtcie->getEditedState();
|
||||
pedited->icm.workingTRC = wTRC->get_active_text() != M("GENERAL_UNCHANGED");
|
||||
pedited->icm.will = will->get_active_text() != M("GENERAL_UNCHANGED");
|
||||
pedited->icm.wprim = wprim->get_active_text() != M("GENERAL_UNCHANGED");
|
||||
pedited->icm.wcat = wcat->get_active_text() != M("GENERAL_UNCHANGED");
|
||||
pedited->icm.redx = redx->getEditedState();
|
||||
pedited->icm.redy = redy->getEditedState();
|
||||
pedited->icm.labgridcieALow = pedited->icm.labgridcieBLow = pedited->icm.labgridcieAHigh = pedited->icm.labgridcieBHigh = pedited->icm.labgridcieGx = pedited->icm.labgridcieGy = pedited->icm.labgridcieWx = pedited->icm.labgridcieWy = labgridcie->getEdited();
|
||||
pedited->icm.labgridcieALow = pedited->icm.labgridcieBLow = pedited->icm.labgridcieAHigh = pedited->icm.labgridcieBHigh = pedited->icm.labgridcieGx = pedited->icm.labgridcieGy = pedited->icm.labgridcieWx = pedited->icm.labgridcieWy = pedited->icm.labgridcieMx = pedited->icm.labgridcieMy = labgridcie->getEdited();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,36 +1384,48 @@ void ICMPanel::setDefaults(const ProcParams* defParams, const ParamsEdited* pedi
|
||||
{
|
||||
wGamma->setDefault(defParams->icm.workingTRCGamma);
|
||||
wSlope->setDefault(defParams->icm.workingTRCSlope);
|
||||
wmidtcie->setDefault(defParams->icm.wmidtcie);
|
||||
redx->setDefault(defParams->icm.redx);
|
||||
redy->setDefault(defParams->icm.redy);
|
||||
grex->setDefault(defParams->icm.grex);
|
||||
grey->setDefault(defParams->icm.grey);
|
||||
blux->setDefault(defParams->icm.blux);
|
||||
bluy->setDefault(defParams->icm.bluy);
|
||||
refi->setDefault(defParams->icm.refi);
|
||||
shiftx->setDefault(defParams->icm.shiftx);
|
||||
shifty->setDefault(defParams->icm.shifty);
|
||||
preser->setDefault(defParams->icm.preser);
|
||||
labgridcie->setDefault(defParams->icm.labgridcieALow, defParams->icm.labgridcieBLow , defParams->icm.labgridcieAHigh, defParams->icm.labgridcieBHigh, defParams->icm.labgridcieGx, defParams->icm.labgridcieGy, defParams->icm.labgridcieWx, defParams->icm.labgridcieWy);
|
||||
labgridcie->setDefault(defParams->icm.labgridcieALow, defParams->icm.labgridcieBLow , defParams->icm.labgridcieAHigh, defParams->icm.labgridcieBHigh, defParams->icm.labgridcieGx, defParams->icm.labgridcieGy, defParams->icm.labgridcieWx, defParams->icm.labgridcieWy, defParams->icm.labgridcieMx, defParams->icm.labgridcieMy);
|
||||
|
||||
if (pedited) {
|
||||
wGamma->setDefaultEditedState(pedited->icm.workingTRCGamma ? Edited : UnEdited);
|
||||
wSlope->setDefaultEditedState(pedited->icm.workingTRCSlope ? Edited : UnEdited);
|
||||
wmidtcie->setDefaultEditedState(pedited->icm.wmidtcie ? Edited : UnEdited);
|
||||
redx->setDefaultEditedState(pedited->icm.redx ? Edited : UnEdited);
|
||||
redy->setDefaultEditedState(pedited->icm.redy ? Edited : UnEdited);
|
||||
grex->setDefaultEditedState(pedited->icm.grex ? Edited : UnEdited);
|
||||
grey->setDefaultEditedState(pedited->icm.grey ? Edited : UnEdited);
|
||||
blux->setDefaultEditedState(pedited->icm.blux ? Edited : UnEdited);
|
||||
bluy->setDefaultEditedState(pedited->icm.bluy ? Edited : UnEdited);
|
||||
labgridcie->setEdited((pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy) ? Edited : UnEdited);
|
||||
refi->setDefaultEditedState(pedited->icm.refi ? Edited : UnEdited);
|
||||
shiftx->setDefaultEditedState(pedited->icm.shiftx ? Edited : UnEdited);
|
||||
shifty->setDefaultEditedState(pedited->icm.shifty ? Edited : UnEdited);
|
||||
labgridcie->setEdited((pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy || pedited->icm.labgridcieMx || pedited->icm.labgridcieMy) ? Edited : UnEdited);
|
||||
preser->setDefaultEditedState(pedited->icm.preser ? Edited : UnEdited);
|
||||
|
||||
} else {
|
||||
wGamma->setDefaultEditedState(Irrelevant);
|
||||
wSlope->setDefaultEditedState(Irrelevant);
|
||||
wmidtcie->setDefaultEditedState(Irrelevant);
|
||||
redx->setDefaultEditedState(Irrelevant);
|
||||
redy->setDefaultEditedState(Irrelevant);
|
||||
grex->setDefaultEditedState(Irrelevant);
|
||||
grey->setDefaultEditedState(Irrelevant);
|
||||
blux->setDefaultEditedState(Irrelevant);
|
||||
bluy->setDefaultEditedState(Irrelevant);
|
||||
refi->setDefaultEditedState(Irrelevant);
|
||||
shiftx->setDefaultEditedState(Irrelevant);
|
||||
shifty->setDefaultEditedState(Irrelevant);
|
||||
preser->setDefaultEditedState(Irrelevant);
|
||||
labgridcie->setEdited(Edited);
|
||||
|
||||
@@ -1273,6 +1446,8 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval)
|
||||
listener->panelChanged(EvICMgamm, costr2);
|
||||
} else if (a == wSlope) {
|
||||
listener->panelChanged(EvICMslop, costr2);
|
||||
} else if (a == wmidtcie) {
|
||||
listener->panelChanged(EvICMwmidtcie, costr2);
|
||||
} else if (a == redx) {
|
||||
listener->panelChanged(EvICMredx, costr2);
|
||||
} else if (a == redy) {
|
||||
@@ -1287,6 +1462,12 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval)
|
||||
listener->panelChanged(EvICMbluy, costr2);
|
||||
} else if (a == preser) {
|
||||
listener->panelChanged(EvICMpreser, costr2);
|
||||
} else if (a == refi) {
|
||||
listener->panelChanged(EvICMrefi, costr2);
|
||||
} else if (a == shiftx) {
|
||||
listener->panelChanged(EvICMshiftx, costr2);
|
||||
} else if (a == shifty) {
|
||||
listener->panelChanged(EvICMshifty, costr2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1305,11 +1486,13 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::NONE: {
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
wmidtcie->set_sensitive(false);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(false);
|
||||
wprim->set_sensitive(false);
|
||||
fbw->set_sensitive(false);
|
||||
gamut->set_sensitive(false);
|
||||
wsmoothcie->set_sensitive(false);
|
||||
wprimlab->set_sensitive(false);
|
||||
redFrame->hide();
|
||||
riaHBox->set_sensitive(false);
|
||||
@@ -1319,8 +1502,12 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::CUSTOM: {
|
||||
will->set_sensitive(false);
|
||||
wprim->set_sensitive(true);
|
||||
wmidtcie->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
willulab->set_sensitive(true);
|
||||
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
|
||||
@@ -1350,11 +1537,15 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::BT709: {
|
||||
wGamma->setValue(2.222);
|
||||
wSlope->setValue(4.5);
|
||||
wmidtcie->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
@@ -1376,11 +1567,15 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::SRGB: {
|
||||
wGamma->setValue(2.4);
|
||||
wSlope->setValue(12.92);
|
||||
wmidtcie->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
riaHBox->set_sensitive(true);
|
||||
@@ -1403,11 +1598,15 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::GAMMA_2_2: {
|
||||
wGamma->setValue(2.2);
|
||||
wSlope->setValue(0.);
|
||||
wmidtcie->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
@@ -1431,11 +1630,15 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::GAMMA_1_8: {
|
||||
wGamma->setValue(1.8);
|
||||
wSlope->setValue(0.);
|
||||
wmidtcie->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
@@ -1459,11 +1662,15 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::WorkingTrc::LINEAR: {
|
||||
wGamma->setValue(1.0);
|
||||
wSlope->setValue(1.);
|
||||
wmidtcie->set_sensitive(true);
|
||||
will->set_sensitive(false);
|
||||
willulab->set_sensitive(true);
|
||||
wprim->set_sensitive(true);
|
||||
wcat->set_sensitive(true);
|
||||
wcatlab->set_sensitive(true);
|
||||
fbw->set_sensitive(true);
|
||||
gamut->set_sensitive(true);
|
||||
wsmoothcie->set_sensitive(true);
|
||||
wprimlab->set_sensitive(true);
|
||||
wGamma->set_sensitive(false);
|
||||
wSlope->set_sensitive(false);
|
||||
@@ -1485,6 +1692,7 @@ void ICMPanel::wtrcinChanged()
|
||||
}
|
||||
}
|
||||
wprimChanged();
|
||||
wcatChanged();
|
||||
|
||||
switch (ColorManagementParams::Primaries(wprim->get_active_row_number())) {
|
||||
case ColorManagementParams::Primaries::DEFAULT:
|
||||
@@ -1496,6 +1704,7 @@ void ICMPanel::wtrcinChanged()
|
||||
case ColorManagementParams::Primaries::WIDE_GAMUT:
|
||||
case ColorManagementParams::Primaries::ACES_P0:
|
||||
case ColorManagementParams::Primaries::JDC_MAX:
|
||||
case ColorManagementParams::Primaries::JDC_MAXSTDA:
|
||||
case ColorManagementParams::Primaries::BRUCE_RGB:
|
||||
case ColorManagementParams::Primaries::BETA_RGB:
|
||||
case ColorManagementParams::Primaries::BEST_RGB: {
|
||||
@@ -1519,6 +1728,8 @@ void ICMPanel::wtrcinChanged()
|
||||
|
||||
if (ColorManagementParams::WorkingTrc(wTRC->get_active_row_number()) == ColorManagementParams::WorkingTrc::NONE) {
|
||||
redFrame->hide();
|
||||
will->set_sensitive(false);
|
||||
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
@@ -1538,6 +1749,7 @@ void ICMPanel::willChanged()
|
||||
case ColorManagementParams::Primaries::WIDE_GAMUT:
|
||||
case ColorManagementParams::Primaries::ACES_P0:
|
||||
case ColorManagementParams::Primaries::JDC_MAX:
|
||||
case ColorManagementParams::Primaries::JDC_MAXSTDA:
|
||||
case ColorManagementParams::Primaries::BRUCE_RGB:
|
||||
case ColorManagementParams::Primaries::BETA_RGB:
|
||||
case ColorManagementParams::Primaries::BEST_RGB: {
|
||||
@@ -1663,6 +1875,17 @@ void ICMPanel::wprimChanged()
|
||||
break;
|
||||
}
|
||||
|
||||
case ColorManagementParams::Primaries::JDC_MAXSTDA: {
|
||||
redx->setValue(0.734702);
|
||||
redy->setValue(0.265302);
|
||||
grex->setValue(0.021908);
|
||||
grey->setValue(0.930288);
|
||||
blux->setValue(0.120593);
|
||||
bluy->setValue(0.001583);
|
||||
will->set_active(toUnderlying(ColorManagementParams::Illuminant::STDA));
|
||||
break;
|
||||
}
|
||||
|
||||
case ColorManagementParams::Primaries::BRUCE_RGB: {
|
||||
redx->setValue(0.64);
|
||||
redy->setValue(0.33);
|
||||
@@ -1762,7 +1985,15 @@ void ICMPanel::wprimChanged()
|
||||
grey->setValue(0.930288);
|
||||
blux->setValue(0.120593);
|
||||
bluy->setValue(0.001583);
|
||||
will->set_active(toUnderlying(ColorManagementParams::Illuminant::D50));
|
||||
will->set_active(toUnderlying(ColorManagementParams::Illuminant::D50));//D50
|
||||
} else if (wProfNames->get_active_text() == "JDCmax stdA") {
|
||||
redx->setValue(0.734702);
|
||||
redy->setValue(0.265302);
|
||||
grex->setValue(0.021908);
|
||||
grey->setValue(0.930288);
|
||||
blux->setValue(0.120593);
|
||||
bluy->setValue(0.001583);
|
||||
will->set_active(toUnderlying(ColorManagementParams::Illuminant::STDA));
|
||||
} else if (wProfNames->get_active_text() == "BruceRGB") {
|
||||
redx->setValue(0.64);
|
||||
redy->setValue(0.33);
|
||||
@@ -1820,6 +2051,14 @@ void ICMPanel::wprimChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void ICMPanel::wcatChanged()
|
||||
{
|
||||
if (listener) {
|
||||
listener->panelChanged(EvICMcat, wcat->get_active_text());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ICMPanel::dcpIlluminantChanged()
|
||||
{
|
||||
if (listener) {
|
||||
@@ -2066,6 +2305,20 @@ void ICMPanel::oBPCChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void ICMPanel::trcExpChanged()
|
||||
{
|
||||
|
||||
if (listener) {
|
||||
if (trcExp->getEnabled()) {
|
||||
listener->panelChanged(EvICMtrcExp, M("GENERAL_ENABLED"));
|
||||
} else {
|
||||
listener->panelChanged(EvICMtrcExp, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ICMPanel::fbwChanged()
|
||||
{
|
||||
if (multiImage) {
|
||||
@@ -2106,11 +2359,17 @@ void ICMPanel::gamutChanged()
|
||||
|
||||
lastgamut = gamut->get_active();
|
||||
}
|
||||
|
||||
|
||||
if (gamut->get_active()) {
|
||||
wcatBox->set_sensitive(true);
|
||||
} else {
|
||||
wcatBox->set_sensitive(false);
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (gamut->get_inconsistent()) {
|
||||
listener->panelChanged(EvICMgamut, M("GENERAL_UNCHANGED"));
|
||||
} else if (fbw->get_active()) {
|
||||
} else if (gamut->get_active()) {
|
||||
listener->panelChanged(EvICMgamut, M("GENERAL_ENABLED"));
|
||||
} else {
|
||||
listener->panelChanged(EvICMgamut, M("GENERAL_DISABLED"));
|
||||
@@ -2118,6 +2377,33 @@ void ICMPanel::gamutChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void ICMPanel::wsmoothcieChanged()
|
||||
{
|
||||
if (multiImage) {
|
||||
if (wsmoothcie->get_inconsistent()) {
|
||||
wsmoothcie->set_inconsistent(false);
|
||||
wsmoothcieconn.block(true);
|
||||
wsmoothcie->set_active(false);
|
||||
wsmoothcieconn.block(false);
|
||||
} else if (lastwsmoothcie) {
|
||||
wsmoothcie->set_inconsistent(true);
|
||||
}
|
||||
|
||||
lastwsmoothcie = wsmoothcie->get_active();
|
||||
}
|
||||
|
||||
|
||||
if (listener) {
|
||||
if (wsmoothcie->get_inconsistent()) {
|
||||
listener->panelChanged(EvICMwsmoothcie, M("GENERAL_UNCHANGED"));
|
||||
} else if (wsmoothcie->get_active()) {
|
||||
listener->panelChanged(EvICMwsmoothcie, M("GENERAL_ENABLED"));
|
||||
} else {
|
||||
listener->panelChanged(EvICMwsmoothcie, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ICMPanel::setRawMeta(bool raw, const rtengine::FramesData* pMeta)
|
||||
{
|
||||
@@ -2230,12 +2516,16 @@ void ICMPanel::setBatchMode(bool batchMode)
|
||||
dcpIll->append(M("GENERAL_UNCHANGED"));
|
||||
wGamma->showEditedCB();
|
||||
wSlope->showEditedCB();
|
||||
wmidtcie->showEditedCB();
|
||||
redx->showEditedCB();
|
||||
redy->showEditedCB();
|
||||
grex->showEditedCB();
|
||||
grey->showEditedCB();
|
||||
blux->showEditedCB();
|
||||
bluy->showEditedCB();
|
||||
refi->showEditedCB();
|
||||
shiftx->showEditedCB();
|
||||
shifty->showEditedCB();
|
||||
preser->showEditedCB();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user