add full image control

This commit is contained in:
Desmis
2019-12-05 18:44:07 +01:00
parent 3b326cb5cb
commit b2b4ffe3d7
10 changed files with 66 additions and 2 deletions

View File

@@ -733,6 +733,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
centx = new float[sizespot];
float *centy = nullptr;
centy = new float[sizespot];
for (int sp = 0; sp < params->locallab.nbspot && sp < sizespot; sp++) {
@@ -749,6 +750,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locyT[sp] = params->locallab.spots.at(sp).locYT / 2000.0;
centx[sp] = params->locallab.spots.at(sp).centerX / 2000.0 + 0.5;
centy[sp] = params->locallab.spots.at(sp).centerY / 2000.0 + 0.5;
bool fullim = true;
if(params->locallab.spots.at(sp).fullimage == false) {
fullim = false;
}
if (log[sp] && autocomput[sp]) {
constexpr int SCALE = 10;
@@ -759,6 +764,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
float yend = std::min(static_cast<float>(centy[sp] + locy[sp]), 1.f);
float xsta = std::max(static_cast<float>(centx[sp] - locxL[sp]), 0.f);
float xend = std::min(static_cast<float>(centx[sp] + locx[sp]), 1.f);
if(fullim) {
ysta = 0.f;
yend = 1.f;
xsta = 0.f;
xend = 1.f;
}
ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, fw, fh, xsta, xend, ysta, yend, SCALE);
params->locallab.spots.at(sp).blackEv = blackev[sp];

View File

@@ -880,6 +880,7 @@ enum ProcEventCode {
EvlocallabtargetGray = 851,
Evlocallabdetail = 852,
Evlocallabsensilog = 853,
Evlocallabfullimage = 854,
NUMOFEVENTS
};

View File

@@ -2774,6 +2774,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
sourceGray(18.),
targetGray(18.),
Autogray(true),
fullimage(true),
blackEv(-5.0),
whiteEv(10.0),
detail(1),
@@ -3164,6 +3165,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& sourceGray == other.sourceGray
&& targetGray == other.targetGray
&& Autogray == other.Autogray
&& fullimage == other.fullimage
&& blackEv == other.blackEv
&& whiteEv == other.whiteEv
&& detail == other.detail
@@ -4521,6 +4523,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sourceGray, "Locallab", "SourceGray_" + std::to_string(i), spot.sourceGray, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).targetGray, "Locallab", "TargetGray_" + std::to_string(i), spot.targetGray, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).Autogray, "Locallab", "Autogray_" + std::to_string(i), spot.Autogray, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fullimage, "Locallab", "Fullimage_" + std::to_string(i), spot.fullimage, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blackEv, "Locallab", "BlackEv_" + std::to_string(i), spot.blackEv, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).whiteEv, "Locallab", "WhiteEv_" + std::to_string(i), spot.whiteEv, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).detail, "Locallab", "Detail_" + std::to_string(i), spot.detail, keyFile);
@@ -6043,6 +6046,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "SourceGray_" + std::to_string(i), pedited, spot.sourceGray, spotEdited.sourceGray);
assignFromKeyfile(keyFile, "Locallab", "TargetGray_" + std::to_string(i), pedited, spot.targetGray, spotEdited.targetGray);
assignFromKeyfile(keyFile, "Locallab", "AutoGray_" + std::to_string(i), pedited, spot.Autogray, spotEdited.Autogray);
assignFromKeyfile(keyFile, "Locallab", "Fullimage_" + std::to_string(i), pedited, spot.fullimage, spotEdited.fullimage);
assignFromKeyfile(keyFile, "Locallab", "BlackEv_" + std::to_string(i), pedited, spot.blackEv, spotEdited.blackEv);
assignFromKeyfile(keyFile, "Locallab", "WhiteEv_" + std::to_string(i), pedited, spot.whiteEv, spotEdited.whiteEv);
assignFromKeyfile(keyFile, "Locallab", "Detail_" + std::to_string(i), pedited, spot.detail, spotEdited.detail);

View File

@@ -1318,6 +1318,7 @@ struct LocallabParams {
double sourceGray;
double targetGray;
bool Autogray;
bool fullimage;
double blackEv;
double whiteEv;
int detail;

View File

@@ -883,7 +883,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //EvlocallabwhiteEv
LUMINANCECURVE, //EvlocallabtargetGray
LUMINANCECURVE, //Evlocallabdetail
LUMINANCECURVE //Evlocallabsensilog
LUMINANCECURVE, //Evlocallabsensilog
AUTOEXP //Evlocallabfullimage
};