Fix incorrect sampled L*a*b* values

Use LCMS to convert values back into L*a*b*. The pipette buffer has the
output or working profile applied with LCMS. Performing the inverse
operation fixes the incorrect values shown in the navigator, histogram
indicator bars, and lockable color pickers.
This commit is contained in:
Lawrence Lee
2023-05-28 18:15:27 -07:00
parent 6a11c59b79
commit 8accebe416
10 changed files with 144 additions and 36 deletions

View File

@@ -18,6 +18,23 @@
*/
#pragma once
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
namespace rtengine
{
namespace procparams
{
class ColorManagementParams;
}
}
class PointerMotionListener
{
protected:
@@ -26,7 +43,7 @@ protected:
public:
virtual ~PointerMotionListener() = default;
virtual void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false) = 0;
virtual void pointerMoved(bool validPos, const rtengine::procparams::ColorManagementParams &cmp, int x, int y, int r, int g, int b, bool isRaw = false) = 0;
virtual void getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB, bool isRaw = false) { sR = "--"; sG = "--"; sB = "--"; }
virtual void getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV) { sH = "--"; sS = "--"; sV = "--"; }
virtual void getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB) { sL = "--"; sA = "--"; sB = "--"; }