diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index b0064bddb..3bcb2699b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -88,7 +88,7 @@ ImProcCoordinator::ImProcCoordinator () fullw(1), fullh(1), pW(-1), pH(-1), plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), - resultValid(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), + resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) {} @@ -778,7 +778,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } // Update the monitor color transform if necessary - if (todo & M_MONITOR) { + if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + lastOutputProfile = params.icm.output; + lastOutputIntent = params.icm.outputIntent; + lastOutputBPC = params.icm.outputBPC; ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); } diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 4e7a8d62e..f20853d6d 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -180,6 +180,13 @@ protected: MyMutex mProcessing; ProcParams params; + // for optimization purpose, the output profile, output rendering intent and + // output BPC will trigger a regeneration of the profile on parameter change only + // and automatically + Glib::ustring lastOutputProfile; + RenderingIntent lastOutputIntent; + bool lastOutputBPC; + // members of the updater: Glib::Thread* thread; MyMutex updaterThreadStart; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 472081c23..3323c795d 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -68,7 +68,7 @@ private: void prepareIntentBox () { - // same order than the enum + // same order as the enum intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); @@ -177,10 +177,10 @@ private: switch (intentBox.getSelected ()) { default: case 0: - intent = rtengine::RI_RELATIVE; + intent = rtengine::RI_PERCEPTUAL; break; case 1: - intent = rtengine::RI_PERCEPTUAL; + intent = rtengine::RI_RELATIVE; break; case 2: intent = rtengine::RI_ABSOLUTE; diff --git a/rtgui/options.cc b/rtgui/options.cc index b1d68560a..66d84914b 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2107,7 +2107,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); - keyFile.set_integer ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); + keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index c47b58b7d..980fc0702 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -702,7 +702,7 @@ Gtk::Widget* Preferences::getColorManagementPanel () for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) monProfile->append_text (*profile); - // same order than enum + // same order as the enum monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE"));