Merge branch 'dev' into testoutputprofile
This commit is contained in:
@@ -332,6 +332,7 @@ ToneCurveParams::ToneCurveParams() :
|
||||
hlcompr(0),
|
||||
hlcomprthresh(33),
|
||||
histmatching(false),
|
||||
fromHistMatching(false),
|
||||
clampOOG(true)
|
||||
{
|
||||
}
|
||||
@@ -356,6 +357,7 @@ bool ToneCurveParams::operator ==(const ToneCurveParams& other) const
|
||||
&& hlcompr == other.hlcompr
|
||||
&& hlcomprthresh == other.hlcomprthresh
|
||||
&& histmatching == other.histmatching
|
||||
&& fromHistMatching == other.fromHistMatching
|
||||
&& clampOOG == other.clampOOG;
|
||||
}
|
||||
|
||||
@@ -2763,6 +2765,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || pedited->toneCurve.hlcomprthresh, "Exposure", "HighlightComprThreshold", toneCurve.hlcomprthresh, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->toneCurve.shcompr, "Exposure", "ShadowCompr", toneCurve.shcompr, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->toneCurve.histmatching, "Exposure", "HistogramMatching", toneCurve.histmatching, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->toneCurve.fromHistMatching, "Exposure", "FromHistogramMatching", toneCurve.fromHistMatching, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->toneCurve.clampOOG, "Exposure", "ClampOOG", toneCurve.clampOOG, keyFile);
|
||||
|
||||
// Highlight recovery
|
||||
@@ -3542,6 +3545,14 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
}
|
||||
|
||||
assignFromKeyfile(keyFile, "Exposure", "HistogramMatching", pedited, toneCurve.histmatching, pedited->toneCurve.histmatching);
|
||||
if (ppVersion < 340) {
|
||||
toneCurve.fromHistMatching = false;
|
||||
if (pedited) {
|
||||
pedited->toneCurve.fromHistMatching = true;
|
||||
}
|
||||
} else {
|
||||
assignFromKeyfile(keyFile, "Exposure", "FromHistogramMatching", pedited, toneCurve.fromHistMatching, pedited->toneCurve.fromHistMatching);
|
||||
}
|
||||
assignFromKeyfile(keyFile, "Exposure", "ClampOOG", pedited, toneCurve.clampOOG, pedited->toneCurve.clampOOG);
|
||||
}
|
||||
|
||||
@@ -4243,7 +4254,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Color Management", "WorkingTRCSlope", pedited, icm.workingTRCSlope, pedited->icm.workingTRCSlope);
|
||||
|
||||
assignFromKeyfile(keyFile, "Color Management", "OutputProfile", pedited, icm.outputProfile, pedited->icm.outputProfile);
|
||||
if (ppVersion < 340) {
|
||||
if (ppVersion < 341) {
|
||||
if (icm.outputProfile == "RT_Medium_gsRGB") {
|
||||
icm.outputProfile = "RTv4_Medium";
|
||||
} else if (icm.outputProfile == "RT_Large_gBT709" || icm.outputProfile == "RT_Large_g10" || icm.outputProfile == "RT_Large_gsRGB") {
|
||||
@@ -5111,10 +5122,14 @@ void PartialProfile::set(bool v)
|
||||
}
|
||||
}
|
||||
|
||||
void PartialProfile::applyTo(ProcParams* destParams) const
|
||||
void PartialProfile::applyTo(ProcParams* destParams, bool fromLastSave) const
|
||||
{
|
||||
if (destParams && pparams && pedited) {
|
||||
bool fromHistMatching = fromLastSave && destParams->toneCurve.histmatching && pparams->toneCurve.histmatching;
|
||||
pedited->combine(*destParams, *pparams, true);
|
||||
if (!fromLastSave) {
|
||||
destParams->toneCurve.fromHistMatching = fromHistMatching;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user