Soft-proofing: fall back to using the current output profile if no printer profile is specified
Implements #4361
This commit is contained in:
parent
42e9e37ad8
commit
dc44212691
@ -1229,8 +1229,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved h
|
||||
SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF
|
||||
SAVEDLG_WARNFILENAME;File will be named
|
||||
SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders.
|
||||
SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the Printer profile.
|
||||
SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate the printer's output by using the Printer profile set in Preferences > Color Management.
|
||||
SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in bright green the pixels which have out of gamut colors from the Printer/Output profile.
|
||||
SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, lets you simulate the appearance of the image when printed (if a Printer profile set in Preferences > Color Management) or when viewed on a display that uses the current output profile (if no printer profile is selected).
|
||||
THRESHOLDSELECTOR_B;Bottom
|
||||
THRESHOLDSELECTOR_BL;Bottom-left
|
||||
THRESHOLDSELECTOR_BR;Bottom-right
|
||||
|
@ -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
|
||||
);
|
||||
|
||||
|
@ -153,7 +153,6 @@ private:
|
||||
Gtk::ToggleButton softProof;
|
||||
Gtk::ToggleButton spGamutCheck;
|
||||
sigc::connection profileConn, intentConn, softproofConn;
|
||||
bool canSProof;
|
||||
Glib::ustring defprof;
|
||||
|
||||
rtengine::StagedImageProcessor* const& processor;
|
||||
@ -212,7 +211,6 @@ private:
|
||||
softProof.set_tooltip_markup (M ("SOFTPROOF_TOOLTIP"));
|
||||
|
||||
softProof.set_active (false);
|
||||
softProof.set_sensitive (canSProof);
|
||||
softProof.show ();
|
||||
|
||||
Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png"));
|
||||
@ -301,8 +299,8 @@ private:
|
||||
intentBox.setItemSensitivity (0, supportsPerceptual);
|
||||
intentBox.setItemSensitivity (1, supportsRelativeColorimetric);
|
||||
intentBox.setItemSensitivity (2, supportsAbsoluteColorimetric);
|
||||
softProof.set_sensitive (canSProof);
|
||||
spGamutCheck.set_sensitive (canSProof);
|
||||
softProof.set_sensitive (true);
|
||||
spGamutCheck.set_sensitive (softProof.get_active());
|
||||
} else {
|
||||
intentBox.setItemSensitivity (0, true);
|
||||
intentBox.setItemSensitivity (1, true);
|
||||
@ -352,15 +350,9 @@ private:
|
||||
|
||||
void updateSoftProofParameters (bool noEvent = false)
|
||||
{
|
||||
if (!canSProof) {
|
||||
ConnectionBlocker profileBlocker (softproofConn);
|
||||
softProof.set_active (false);
|
||||
softProof.set_sensitive (false);
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
} else {
|
||||
softProof.set_sensitive (profileBox.get_active_row_number () > 0);
|
||||
softProof.set_sensitive (profileBox.get_active_row_number () > 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
spGamutCheck.set_sensitive (softProof.get_sensitive() && softProof.get_active());
|
||||
|
||||
@ -390,7 +382,6 @@ private:
|
||||
public:
|
||||
explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) :
|
||||
intentBox (Glib::ustring (), true),
|
||||
canSProof (!options.rtSettings.printerProfile.empty() && options.rtSettings.printerProfile != "None"), // assuming the printer profile exist!
|
||||
processor (ipc)
|
||||
{
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
@ -419,12 +410,6 @@ public:
|
||||
grid->attach_next_to (spGamutCheck, Gtk::POS_RIGHT, 1, 1);
|
||||
}
|
||||
|
||||
void canSoftProof (bool canSP)
|
||||
{
|
||||
canSProof = canSP;
|
||||
updateSoftProofParameters();
|
||||
}
|
||||
|
||||
void updateProcessor()
|
||||
{
|
||||
if (processor) {
|
||||
@ -2305,7 +2290,6 @@ void EditorPanel::tbShowHideSidePanels_managestate()
|
||||
|
||||
void EditorPanel::updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC)
|
||||
{
|
||||
colorMgmtToolBar->canSoftProof (!printerProfile.empty() && printerProfile != "None");
|
||||
}
|
||||
|
||||
void EditorPanel::updateTPVScrollbar (bool hide)
|
||||
|
Loading…
x
Reference in New Issue
Block a user