Fix autowb issues, fixes #3690
This commit is contained in:
@@ -87,7 +87,7 @@ ImProcCoordinator::ImProcCoordinator ()
|
||||
fw(0), fh(0), tr(0),
|
||||
fullw(1), fullh(1),
|
||||
pW(-1), pH(-1),
|
||||
plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr),
|
||||
plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), awbListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr),
|
||||
resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false),
|
||||
butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f)
|
||||
{}
|
||||
@@ -305,6 +305,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
|
||||
params.wb.temperature = currWB.getTemp ();
|
||||
params.wb.green = currWB.getGreen ();
|
||||
if(params.wb.method == "Auto" && awbListener) {
|
||||
awbListener->WBChanged(params.wb.temperature, params.wb.green);
|
||||
}
|
||||
|
||||
int tr = getCoarseBitMask(params.coarse);
|
||||
|
||||
|
@@ -156,6 +156,8 @@ protected:
|
||||
AutoExpListener* aeListener;
|
||||
AutoCamListener* acListener;
|
||||
AutoBWListener* abwListener;
|
||||
AutoWBListener* awbListener;
|
||||
|
||||
AutoColorTonListener* actListener;
|
||||
AutoChromaListener* adnListener;
|
||||
WaveletListener* awavListener;
|
||||
@@ -311,6 +313,10 @@ public:
|
||||
{
|
||||
abwListener = abw;
|
||||
}
|
||||
void setAutoWBListener (AutoWBListener* awb)
|
||||
{
|
||||
awbListener = awb;
|
||||
}
|
||||
void setAutoColorTonListener (AutoColorTonListener* bwct)
|
||||
{
|
||||
actListener = bwct;
|
||||
|
@@ -310,6 +310,14 @@ public :
|
||||
|
||||
};
|
||||
|
||||
class AutoWBListener
|
||||
{
|
||||
public :
|
||||
virtual ~AutoWBListener() {}
|
||||
virtual void WBChanged (double temp, double green) {}
|
||||
|
||||
};
|
||||
|
||||
class WaveletListener
|
||||
{
|
||||
public :
|
||||
@@ -411,6 +419,7 @@ public:
|
||||
virtual void setPreviewImageListener (PreviewImageListener* l) = 0;
|
||||
virtual void setAutoCamListener (AutoCamListener* l) = 0;
|
||||
virtual void setAutoBWListener (AutoBWListener* l) = 0;
|
||||
virtual void setAutoWBListener (AutoWBListener* l) = 0;
|
||||
virtual void setAutoColorTonListener (AutoColorTonListener* l) = 0;
|
||||
virtual void setAutoChromaListener (AutoChromaListener* l) = 0;
|
||||
virtual void setRetinexListener (RetinexListener* l) = 0;
|
||||
|
@@ -488,6 +488,7 @@ void ToolPanelCoordinator::initImage (rtengine::StagedImageProcessor* ipc_, bool
|
||||
ipc->setAutoExpListener (toneCurve);
|
||||
ipc->setAutoCamListener (colorappearance);
|
||||
ipc->setAutoBWListener (blackwhite);
|
||||
ipc->setAutoWBListener (whitebalance);
|
||||
ipc->setAutoColorTonListener (colortoning);
|
||||
ipc->setAutoChromaListener (dirpyrdenoise);
|
||||
ipc->setWaveletListener (wavelet);
|
||||
|
@@ -884,3 +884,11 @@ inline Gtk::TreeRow WhiteBalance::getActiveMethod ()
|
||||
{
|
||||
return *(method->get_active());
|
||||
}
|
||||
|
||||
void WhiteBalance::WBChanged(double temperature, double greenVal)
|
||||
{
|
||||
disableListener();
|
||||
temp->setValue(temperature);
|
||||
green->setValue(greenVal);
|
||||
enableListener();
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
virtual void spotWBRequested (int size) {}
|
||||
};
|
||||
|
||||
class WhiteBalance : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel
|
||||
class WhiteBalance : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoWBListener
|
||||
{
|
||||
|
||||
enum WB_LabelType {
|
||||
@@ -114,6 +114,7 @@ public:
|
||||
wblistener = l;
|
||||
}
|
||||
void setWB (int temp, double green);
|
||||
void WBChanged (double temp, double green);
|
||||
|
||||
void setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
|
Reference in New Issue
Block a user