aboutsummaryrefslogtreecommitdiffstats
path: root/src/colorramp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/colorramp.c')
-rw-r--r--src/colorramp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/colorramp.c b/src/colorramp.c
index ed399f8..4d32d7e 100644
--- a/src/colorramp.c
+++ b/src/colorramp.c
@@ -139,10 +139,10 @@ colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
for (int i = 0; i < size; i++) {
gamma_r[i] = pow((float)i/size, 1.0/gamma[0]) *
- UINT16_MAX * brightness * white_point[0];
+ (UINT16_MAX+1) * brightness * white_point[0];
gamma_g[i] = pow((float)i/size, 1.0/gamma[1]) *
- UINT16_MAX * brightness * white_point[1];
+ (UINT16_MAX+1) * brightness * white_point[1];
gamma_b[i] = pow((float)i/size, 1.0/gamma[2]) *
- UINT16_MAX * brightness * white_point[2];
+ (UINT16_MAX+1) * brightness * white_point[2];
}
}