Soft-proofing: fall back to using the current output profile if no printer profile is specified

Implements #4361
This commit is contained in:
Alberto Griggio
2018-02-03 21:49:41 +01:00
parent 42e9e37ad8
commit dc44212691
4 changed files with 23 additions and 27 deletions

View File

@@ -333,6 +333,10 @@ public:
}
defaultMonitorProfile = settings->monitorProfile;
// initialize the alarm colours for lcms gamut checking -- we use bright green
cmsUInt16Number cms_alarm_codes[cmsMAXCHANNELS] = { 0, 65535, 0 };
cmsSetAlarmCodes(cms_alarm_codes);
}
cmsHPROFILE workingSpace(const Glib::ustring& name) const

View File

@@ -300,18 +300,26 @@ void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile,
if (softProof) {
cmsHPROFILE oprof = nullptr;
RenderingIntent outIntent;
flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE;
if (!settings->printerProfile.empty()) {
oprof = ICCStore::getInstance()->getProfile (settings->printerProfile);
if (settings->printerBPC) {
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
}
outIntent = settings->printerIntent;
} else {
oprof = ICCStore::getInstance()->getProfile(params->icm.output);
if (params->icm.outputBPC) {
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
}
outIntent = params->icm.outputIntent;
}
if (oprof) {
// NOCACHE is for thread safety, NOOPTIMIZE for precision
flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE;
if (settings->printerBPC) {
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
}
if (gamutCheck) {
flags |= cmsFLAGS_GAMUTCHECK;
@@ -321,7 +329,7 @@ void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile,
iprof, TYPE_Lab_FLT,
monitor, TYPE_RGB_8,
oprof,
monitorIntent, settings->printerIntent,
monitorIntent, outIntent,
flags
);