aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-11-08 20:46:36 +0100
committerMattias Andrée <maandree@kth.se>2019-11-08 20:46:36 +0100
commit18ea84e232f0a4b34894dcfc5b44055d40193fa2 (patch)
tree6eb5abf5cb67c6a75a547f7c272f9dc2edc2821f
parentAdd todo-file (diff)
downloadradharc-18ea84e232f0a4b34894dcfc5b44055d40193fa2.tar.gz
radharc-18ea84e232f0a4b34894dcfc5b44055d40193fa2.tar.bz2
radharc-18ea84e232f0a4b34894dcfc5b44055d40193fa2.tar.xz
Use linear RGB
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--radharc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/radharc.c b/radharc.c
index 10969b1..4be3b43 100644
--- a/radharc.c
+++ b/radharc.c
@@ -243,7 +243,9 @@ fill_filter(libcoopgamma_filter_t *restrict filter, double red, double green, do
#define X(CONST, MEMBER, MAX, TYPE)\
case CONST:\
libclut_start_over(&(filter->ramps.MEMBER), MAX, TYPE, 1, 1, 1);\
+ libclut_linearise(&(filter->ramps.MEMBER), MAX, TYPE, 1, 1, 1);\
libclut_rgb_brightness(&(filter->ramps.MEMBER), MAX, TYPE, red, green, blue);\
+ libclut_standardise(&(filter->ramps.MEMBER), MAX, TYPE, 1, 1, 1);\
break;
LIST_DEPTHS
#undef X
@@ -269,6 +271,7 @@ set_ramps(double red, double green, double blue)
int r;
size_t i, j;
+ libclut_model_standard_to_linear(&red, &green, &blue);
for (i = 0, r = 1; i < filters_n; i++) {
if (!(crtc_updates[i].master) || !(crtc_info[crtc_updates[i].crtc].supported))
continue;