From d762ef45109e2dd9afc8239c0cfce9e84aa43616 Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 30 Aug 2016 02:06:10 +0200 Subject: [PATCH] Bugfix + cleanup --- rtengine/improccoordinator.cc | 5 +++++ rtengine/improcfun.cc | 3 --- rtgui/icmpanel.cc | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 3bcb2699b..4aa0b8243 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -779,6 +779,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Update the monitor color transform if necessary if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + if (lastOutputIntent == RI__COUNT) { + // initializing... + monitorProfile = options.rtSettings.monitorProfile; + monitorIntent = options.rtSettings.monitorIntent; + } lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b53254959..081afdf43 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -95,17 +95,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con Color::GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createGammaProfile (icm, ga); - printf("ImProcFunctions::updateColorProfiles / iccStore->createGammaProfile (icm, ga);\n"); } else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 Color::GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createCustomGammaOutputProfile (icm, ga); - printf("ImProcFunctions::updateColorProfiles / iccStore->createCustomGammaOutputProfile (icm, ga);\n"); } else { oprof = iccStore->getProfile(icm.output); - printf("ImProcFunctions::updateColorProfiles / iccStore->getProfile(%s);\n", icm.output.c_str()); } } diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 0098b4f16..ea258a319 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -321,12 +321,14 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch } void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) { - const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); + const uint8_t supportedIntents = rtengine::iccStore->getOutputIntents (profile); const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; const bool supportsRelative = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; const bool supportsSaturation = supportedIntents & 1 << INTENT_SATURATION; const bool supportsAbsolute = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; + //printf("Intents: %d / Perceptual: %d Relative: %d Saturation: %d Absolute: %d\n", supportedIntents, supportsPerceptual, supportsRelative, supportsSaturation, supportsAbsolute); + if (!profile.empty() && (supportsPerceptual || supportsRelative || supportsSaturation || supportsAbsolute)) { ointent->set_sensitive (true); ointent->setItemSensitivity(0, supportsPerceptual);