Bug fix: the monitor profile and softproofing profile are now computed

automatically even without special trigger event. The order of the
Monitor Intent is now correct.
This commit is contained in:
Hombre 2016-08-29 21:04:59 +02:00
parent a1981dbd4d
commit 7c7cb9f9f1
5 changed files with 17 additions and 7 deletions

View File

@ -88,7 +88,7 @@ ImProcCoordinator::ImProcCoordinator ()
fullw(1), fullh(1), fullw(1), fullh(1),
pW(-1), pH(-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), 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) 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 // 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); ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck);
} }

View File

@ -180,6 +180,13 @@ protected:
MyMutex mProcessing; MyMutex mProcessing;
ProcParams params; 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: // members of the updater:
Glib::Thread* thread; Glib::Thread* thread;
MyMutex updaterThreadStart; MyMutex updaterThreadStart;

View File

@ -68,7 +68,7 @@ private:
void prepareIntentBox () void prepareIntentBox ()
{ {
// same order than the enum // same order as the enum
intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL"));
intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE"));
intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE"));
@ -177,10 +177,10 @@ private:
switch (intentBox.getSelected ()) { switch (intentBox.getSelected ()) {
default: default:
case 0: case 0:
intent = rtengine::RI_RELATIVE; intent = rtengine::RI_PERCEPTUAL;
break; break;
case 1: case 1:
intent = rtengine::RI_PERCEPTUAL; intent = rtengine::RI_RELATIVE;
break; break;
case 2: case 2:
intent = rtengine::RI_ABSOLUTE; intent = rtengine::RI_ABSOLUTE;

View File

@ -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_working" , fastexport_icm_working );
keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); 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_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_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma );
keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled );
keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale );

View File

@ -702,7 +702,7 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
for (std::vector<Glib::ustring>::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) for (std::vector<Glib::ustring>::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile)
monProfile->append_text (*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_PERCEPTUAL"));
monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE"));
monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE"));