Bugfix + cleanup
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user