mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:37:36 +00:00
ICC: Add Profile::to_lab()
This can be used to convert a profile-dependent color to the L*a*b* color space. (I'd like to use this to implement the DeltaE (CIE 2000) algorithm, which is a metric for how similar two colors are perceived. (And I'd like to use that to evaluate color conversion roundtrip quality, once I've implemented full conversions.)
This commit is contained in:
parent
5fc11a316f
commit
f3dbfb85d9
3 changed files with 110 additions and 0 deletions
|
@ -266,6 +266,13 @@ public:
|
|||
// Call connection_space() to find out the space the result is in.
|
||||
ErrorOr<FloatVector3> to_pcs(ReadonlyBytes);
|
||||
|
||||
struct CIELAB {
|
||||
float L; // L*
|
||||
float a; // a*
|
||||
float b; // b*
|
||||
};
|
||||
ErrorOr<CIELAB> to_lab(ReadonlyBytes);
|
||||
|
||||
// Only call these if you know that this is an RGB matrix-based profile.
|
||||
XYZ const& red_matrix_column() const;
|
||||
XYZ const& green_matrix_column() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue