From dc7f2c091252b27de2b2f26bfca3904574488d8d Mon Sep 17 00:00:00 2001 From: "U-PC-BUREAU\\jacques" Date: Sun, 18 Nov 2018 11:02:30 +0100 Subject: [PATCH] Small changes to increase precision gamma --- rtdata/iccprofiles/output/RTv2_Medium.icc | Bin 856 -> 868 bytes rtengine/iplab2rgb.cc | 1 + rtgui/iccprofilecreator.cc | 13 ++++++------- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rtdata/iccprofiles/output/RTv2_Medium.icc b/rtdata/iccprofiles/output/RTv2_Medium.icc index 454f40d9086dc16fbed0f7c4b8a55fb2851b53a6..ebaf4d133aabc2fdc3a71d6aa7ea1b5152b38b94 100644 GIT binary patch delta 90 zcmcb?_Joavfq^+?BFlHtDJi*mDGUru7Z?~A8j`XLN`Mjpn*|un8TEwIjr0sHEsYE< iiw*P)KtK_w2n>W7(iw~x^cV~oEP>DnL{H9SdJh1^lM;;p delta 78 zcmaFDc7u(Dfq^+s<(j7t3JMtVjD#Rhr? YAfO0T00#UF=?q2;dO&P2xs>TW0OZ*an*aa+ diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 9094f3526..da8e687ed 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -368,6 +368,7 @@ Imagefloat* ImProcFunctions::lab2rgbOut(LabImage* lab, int cx, int cy, int cw, i cmsToneCurve* GammaTRC[3]; if(slopetag == 0.) { + //printf("gammatag=%f\n", gammatag); GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, gammatag); } else { diff --git a/rtgui/iccprofilecreator.cc b/rtgui/iccprofilecreator.cc index 97d22ca0b..60b45519a 100644 --- a/rtgui/iccprofilecreator.cc +++ b/rtgui/iccprofilecreator.cc @@ -154,7 +154,7 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow) //--------------------------------- sliders gampos and slpos - aGamma = Gtk::manage(new Adjuster(M("ICCPROFCREATOR_GAMMA"), 1, 3.5, 0.01, 2.4)); + aGamma = Gtk::manage(new Adjuster(M("ICCPROFCREATOR_GAMMA"), 1, 3.5, 0.00001, 2.4)); setExpandAlignProperties(aGamma, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); if (aGamma->delay < options.adjusterMaxDelay) { @@ -867,9 +867,8 @@ void ICCProfileCreator::savePressed() ga[2] = 0.; ga[3] = 1. / eps; ga[4] = 0.; - presetGamma = 2.2; + presetGamma = 2.19921875; presetSlope = 0.0; - } else if (gammaPreset == "standard_g1.8") { sGammaPreset = "g=1.8"; ga[0] = 1.8; //gamma=1.8(as gamma of Prophoto) @@ -877,7 +876,7 @@ void ICCProfileCreator::savePressed() ga[2] = 0.; ga[3] = 1. / eps; ga[4] = 0.; - presetGamma = 1.8; + presetGamma = 1.80078125; presetSlope = 0.0; } else if (gammaPreset == "Lab_g3.0s9.03296") { @@ -907,7 +906,7 @@ void ICCProfileCreator::savePressed() //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); sGammaPreset = Glib::ustring::compose("g%1_s%2", - Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), gamma), + Glib::ustring::format(std::setw(6), std::fixed, std::setprecision(6), gamma), Glib::ustring::format(std::setw(6), std::fixed, std::setprecision(5), slope)); presetGamma = gamma; presetSlope = slope; @@ -930,12 +929,12 @@ void ICCProfileCreator::savePressed() Glib::ustring sSlope; if (gammaPreset == "Custom") { - sGamma = Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), gamma); + sGamma = Glib::ustring::format(std::setw(6), std::fixed, std::setprecision(6), gamma); sSlope = Glib::ustring::format(std::setw(6), std::fixed, std::setprecision(5), slope); fName = Glib::ustring::compose("RT%1_%2_g%3_s%4.icc", profileVersion, sPrimariesAndIlluminant, sGamma, sSlope); profileDesc = sPrimariesPreset; } else { - sGamma = Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), presetGamma); + sGamma = Glib::ustring::format(std::setw(6), std::fixed, std::setprecision(6), presetGamma); sSlope = Glib::ustring::format(std::setw(6), std::fixed, std::setprecision(5), presetSlope); fName = Glib::ustring::compose("RT%1_%2_%3.icc", profileVersion, sPrimariesAndIlluminant, sGammaPreset); profileDesc = sPrimariesPreset + sGammaPreset;