From c3753fa6ff8423fd9e299413530911d6fb42c104 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 13 Jul 2020 17:51:49 +0200 Subject: [PATCH] Enable curve C=f(H) --- rtengine/iplocallab.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index d2cbe949e..82b8b66f2 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -13754,6 +13754,15 @@ void ImProcFunctions::Lab_Local( } + + if (locchCurve && CHutili && lp.qualcurvemet != 0) {//C=f(H) curve + const float rhue = xatan2f(bufcolcalcb, bufcolcalca); + const float valparam = locchCurve[500.f * Color::huelab_to_huehsv2(rhue)] - 0.5f; //get valp=f(H) + float chromaChfactor = 1.0f + valparam; + bufcolcalca *= chromaChfactor;//apply C=f(H) + bufcolcalcb *= chromaChfactor; + } + if (ctoning) {//color toning and direct change color if (lp.gridmet == 0) { bufcolcalca += kd * bufcolcalcL * a_scale + a_base;