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

@@ -24,6 +24,18 @@
class CropWindow;
namespace rtengine
{
namespace procparams
{
class ColorManagementParams;
}
}
class LockablePickerToolListener
{
public:
@@ -60,8 +72,7 @@ private:
rtengine::Coord position; // Coordinate in image space
rtengine::Coord anchorOffset;
Size size;
Glib::ustring *outputProfile;
Glib::ustring *workingProfile;
rtengine::procparams::ColorManagementParams *color_management_params;
Validity validity;
float r, g, b; // red green blue in [0;1] range
float rpreview, gpreview, bpreview;
@@ -72,7 +83,7 @@ private:
public:
LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile);
LockableColorPicker (CropWindow* cropWindow, rtengine::procparams::ColorManagementParams *color_management_params);
void draw (const Cairo::RefPtr<Cairo::Context> &cr);