Soft-proofing: fall back to using the current output profile if no printer profile is specified
Implements #4361
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user