Merge branch 'dev' into favorites-gui

This commit is contained in:
Lawrence Lee
2023-02-03 21:58:34 -08:00
39 changed files with 1583 additions and 929 deletions

View File

@@ -279,6 +279,18 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
} else {
r->shapeMethod = 3;
}
if (pp->locallab.spots.at(i).avoidgamutMethod == "NONE") {
r->avoidgamutMethod = 0;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "LAB") {
r->avoidgamutMethod = 1;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "XYZ") {
r->avoidgamutMethod= 2;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "XYZREL") {
r->avoidgamutMethod= 3;
} else if (pp->locallab.spots.at(i).avoidgamutMethod == "MUNS") {
r->avoidgamutMethod= 4;
}
r->locX = pp->locallab.spots.at(i).loc.at(0);
r->locXL = pp->locallab.spots.at(i).loc.at(1);
@@ -308,8 +320,6 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
r->avoidrad = pp->locallab.spots.at(i).avoidrad;
r->hishow = pp->locallab.spots.at(i).hishow;
r->activ = pp->locallab.spots.at(i).activ;
r->avoid = pp->locallab.spots.at(i).avoid;
r->avoidmun = pp->locallab.spots.at(i).avoidmun;
r->blwh = pp->locallab.spots.at(i).blwh;
r->recurs = pp->locallab.spots.at(i).recurs;
r->laplac = true; //pp->locallab.spots.at(i).laplac;
@@ -443,6 +453,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->shapeMethod = 3;
}
if (newSpot->avoidgamutMethod == "NONE") {
r->avoidgamutMethod = 0;
} else if (newSpot->avoidgamutMethod == "LAB") {
r->avoidgamutMethod = 1;
} else if (newSpot->avoidgamutMethod == "XYZ") {
r->avoidgamutMethod = 2;
} else if (newSpot->avoidgamutMethod == "XYZREL") {
r->avoidgamutMethod = 3;
} else if (newSpot->avoidgamutMethod == "MUNS") {
r->avoidgamutMethod = 4;
}
// Calculate spot size and center position according to preview area
if (provider && !batchMode) {
provider->getImageSize(imW, imH);
@@ -490,8 +512,6 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->avoidrad = newSpot->avoidrad;
r->hishow = newSpot->hishow;
r->activ = newSpot->activ;
r->avoid = newSpot->avoid;
r->avoidmun = newSpot->avoidmun;
r->blwh = newSpot->blwh;
r->recurs = newSpot->recurs;
r->laplac = newSpot->laplac;
@@ -744,6 +764,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->shapeMethod = 3;
}
//printf("n0=%f n1=%f n2=%f n3=%f\n", (double) newSpot->loc.at(0), (double) newSpot->loc.at(1), (double) newSpot->loc.at(2), (double) newSpot->loc.at(3));
if (newSpot->avoidgamutMethod == "NONE") {
r->avoidgamutMethod = 0;
} else if (newSpot->avoidgamutMethod == "LAB") {
r->avoidgamutMethod = 1;
} else if (newSpot->avoidgamutMethod== "XYZ") {
r->avoidgamutMethod = 2;
} else if (newSpot->avoidgamutMethod== "XYZREL") {
r->avoidgamutMethod = 3;
} else if (newSpot->avoidgamutMethod== "MUNS") {
r->avoidgamutMethod = 4;
}
//printf("n0=%f n1=%f n2=%f n3=%f\n", (double) newSpot->loc.at(0), (double) newSpot->loc.at(1), (double) newSpot->loc.at(2), (double) newSpot->loc.at(3));
// Calculate spot size and center position according to preview area
if (provider && !batchMode) {
@@ -801,8 +833,6 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->colorscope = newSpot->colorscope;
r->avoidrad = newSpot->avoidrad;
r->activ = newSpot->activ;
r->avoid = newSpot->avoid;
r->avoidmun = newSpot->avoidmun;
r->blwh = newSpot->blwh;
r->recurs = newSpot->recurs;
r->laplac = newSpot->laplac;
@@ -929,6 +959,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).shapeMethod = "SYMSL";
}
if (r->avoidgamutMethod == 0) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "NONE";
} else if (r->avoidgamutMethod == 1) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "LAB";
} else if (r->avoidgamutMethod == 2) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "XYZ";
} else if (r->avoidgamutMethod == 3) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "XYZREL";
} else if (r->avoidgamutMethod == 4) {
pp->locallab.spots.at(pp->locallab.selspot).avoidgamutMethod = "MUNS";
}
pp->locallab.spots.at(pp->locallab.selspot).loc.at(0) = r->locX;
pp->locallab.spots.at(pp->locallab.selspot).loc.at(1) = r->locXL;
pp->locallab.spots.at(pp->locallab.selspot).loc.at(2) = r->locY;
@@ -957,8 +999,6 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).avoidrad = r->avoidrad;
pp->locallab.spots.at(pp->locallab.selspot).hishow = r->hishow;
pp->locallab.spots.at(pp->locallab.selspot).activ = r->activ;
pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid;
pp->locallab.spots.at(pp->locallab.selspot).avoidmun = r->avoidmun;
pp->locallab.spots.at(pp->locallab.selspot).blwh = r->blwh;
pp->locallab.spots.at(pp->locallab.selspot).recurs = r->recurs;
pp->locallab.spots.at(pp->locallab.selspot).laplac = r->laplac;