diff --git a/rtdata/images/Dark/actions/gamut-softproof.png b/rtdata/images/Dark/actions/gamut-softproof.png new file mode 100644 index 000000000..d61874507 Binary files /dev/null and b/rtdata/images/Dark/actions/gamut-softproof.png differ diff --git a/rtdata/images/Dark/actions/gamut-warning.png b/rtdata/images/Dark/actions/gamut-warning.png new file mode 100644 index 000000000..f6bb292a9 Binary files /dev/null and b/rtdata/images/Dark/actions/gamut-warning.png differ diff --git a/rtdata/images/Light/actions/gamut-softproof.png b/rtdata/images/Light/actions/gamut-softproof.png new file mode 100644 index 000000000..e745d8dd6 Binary files /dev/null and b/rtdata/images/Light/actions/gamut-softproof.png differ diff --git a/rtdata/images/Light/actions/gamut-warning.png b/rtdata/images/Light/actions/gamut-warning.png new file mode 100644 index 000000000..cbbf89a56 Binary files /dev/null and b/rtdata/images/Light/actions/gamut-warning.png differ diff --git a/rtdata/languages/default b/rtdata/languages/default index a9fd457e6..1a84760f1 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1368,8 +1368,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, pixels with colors that are outside the gamut of the Printer/Output profile are highlighted. +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 diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 81d0583ac..e77ea7f0f 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -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, 65535 }; + cmsSetAlarmCodes(cms_alarm_codes); } cmsHPROFILE workingSpace(const Glib::ustring& name) const diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 93cfff0bf..6af505ab1 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -47,8 +47,7 @@ #undef CLIPD #define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f) -namespace -{ +namespace { using namespace rtengine; // begin of helper function for rgbProc() @@ -319,18 +318,26 @@ void ImProcFunctions::updateColorProfiles(const Glib::ustring& monitorProfile, R 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; @@ -340,7 +347,7 @@ void ImProcFunctions::updateColorProfiles(const Glib::ustring& monitorProfile, R iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, oprof, - monitorIntent, settings->printerIntent, + monitorIntent, outIntent, flags ); diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 7f5869a95..d6574ac68 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -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; @@ -205,17 +204,16 @@ private: void prepareSoftProofingBox () { - Gtk::Image *softProofImage = Gtk::manage (new RTImage ("softProof.png")); + Gtk::Image *softProofImage = Gtk::manage (new RTImage ("gamut-softproof.png")); softProofImage->set_padding (0, 0); softProof.add (*softProofImage); softProof.set_relief (Gtk::RELIEF_NONE); 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")); + Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("gamut-warning.png")); spGamutCheckImage->set_padding (0, 0); spGamutCheck.add (*spGamutCheckImage); spGamutCheck.set_relief (Gtk::RELIEF_NONE); @@ -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) { @@ -2306,7 +2291,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) diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 7f159861d..e34a909df 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -38,6 +38,8 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt mbox->set_name("Navigator"); previewWindow = Gtk::manage (new PreviewWindow ()); mbox->pack_start (*previewWindow, Gtk::PACK_SHRINK, 2); + dimension = Gtk::manage (new Gtk::Label ()); + mbox->pack_start (*dimension, Gtk::PACK_SHRINK, 2); position = Gtk::manage (new Gtk::Label ()); mbox->pack_start (*position, Gtk::PACK_SHRINK, 2); @@ -207,10 +209,9 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt void Navigator::setInvalid (int fullWidth, int fullHeight) { if (fullWidth > 0 && fullHeight > 0) { - position->set_text (Glib::ustring::compose (M("NAVIGATOR_XY_FULL"), fullWidth, fullHeight)); - } else { - position->set_text (M("NAVIGATOR_XY_NA")); + dimension->set_text (Glib::ustring::compose (M("NAVIGATOR_XY_FULL"), fullWidth, fullHeight)); } + position->set_text (M("NAVIGATOR_XY_NA")); R->set_text (M("NAVIGATOR_NA")); G->set_text (M("NAVIGATOR_NA")); diff --git a/rtgui/navigator.h b/rtgui/navigator.h index e6ca33559..6108e2809 100644 --- a/rtgui/navigator.h +++ b/rtgui/navigator.h @@ -37,6 +37,7 @@ private: void cycleUnitsHSV (GdkEventButton *event); protected: + Gtk::Label* dimension; Gtk::Label* position; Gtk::Label *R, *G, *B; Gtk::Label *H, *S, *V; diff --git a/tools/source_icons/scalable/gamut-softproof.file b/tools/source_icons/scalable/gamut-softproof.file new file mode 100644 index 000000000..18b57b0a2 --- /dev/null +++ b/tools/source_icons/scalable/gamut-softproof.file @@ -0,0 +1 @@ +gamut-softproof.png,w22,actions diff --git a/tools/source_icons/scalable/gamut-softproof.svg b/tools/source_icons/scalable/gamut-softproof.svg new file mode 100644 index 000000000..5129ab9de --- /dev/null +++ b/tools/source_icons/scalable/gamut-softproof.svg @@ -0,0 +1,303 @@ + + + + + Icons for the "Expert" tab in RawTherapee + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Icons for the "Expert" tab in RawTherapee + + + Morgan Hardwood + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/gamut-warning.file b/tools/source_icons/scalable/gamut-warning.file new file mode 100644 index 000000000..da853059c --- /dev/null +++ b/tools/source_icons/scalable/gamut-warning.file @@ -0,0 +1 @@ +gamut-warning.png,w22,actions diff --git a/tools/source_icons/scalable/gamut-warning.svg b/tools/source_icons/scalable/gamut-warning.svg new file mode 100644 index 000000000..be75417c2 --- /dev/null +++ b/tools/source_icons/scalable/gamut-warning.svg @@ -0,0 +1,123 @@ + + + + + Icons for the "Expert" tab in RawTherapee + + + + + + + + image/svg+xml + + Icons for the "Expert" tab in RawTherapee + + + Morgan Hardwood + + + + + + + + + + + + + + + + + + ! + + diff --git a/tools/source_icons/scalable/softProof.file b/tools/source_icons/scalable/softProof.file deleted file mode 100644 index e275113ec..000000000 --- a/tools/source_icons/scalable/softProof.file +++ /dev/null @@ -1 +0,0 @@ -softProof.png,w22,actions diff --git a/tools/source_icons/scalable/softProof.svg b/tools/source_icons/scalable/softProof.svg deleted file mode 100644 index d09f316a2..000000000 --- a/tools/source_icons/scalable/softProof.svg +++ /dev/null @@ -1,1389 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/tools/source_icons/scalable/spGamutCheck.file b/tools/source_icons/scalable/spGamutCheck.file deleted file mode 100644 index f8b0d6338..000000000 --- a/tools/source_icons/scalable/spGamutCheck.file +++ /dev/null @@ -1 +0,0 @@ -spGamutCheck.png,w22,actions diff --git a/tools/source_icons/scalable/spGamutCheck.svg b/tools/source_icons/scalable/spGamutCheck.svg deleted file mode 100644 index 9748e3916..000000000 --- a/tools/source_icons/scalable/spGamutCheck.svg +++ /dev/null @@ -1,1344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - ! -