aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-colour-srgb.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-05-16 20:14:22 +0200
committerMattias Andrée <maandree@kth.se>2017-05-16 20:14:22 +0200
commit0f03cc378e6ce48f17a20e409f93bfc11345a6ed (patch)
treef4768c6fe96e1ac2a9c5833dee897924300d4a45 /src/blind-colour-srgb.c
parentAdd blind-tempral-mean (diff)
downloadblind-0f03cc378e6ce48f17a20e409f93bfc11345a6ed.tar.gz
blind-0f03cc378e6ce48f17a20e409f93bfc11345a6ed.tar.bz2
blind-0f03cc378e6ce48f17a20e409f93bfc11345a6ed.tar.xz
Fix errors and warnings and make the code cleaner
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-colour-srgb.c')
-rw-r--r--src/blind-colour-srgb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blind-colour-srgb.c b/src/blind-colour-srgb.c
index 26ff59b..3a23a0f 100644
--- a/src/blind-colour-srgb.c
+++ b/src/blind-colour-srgb.c
@@ -1,5 +1,5 @@
/* See LICENSE file for copyright and license details. */
-#include "util.h"
+#include "common.h"
USAGE("[-d depth] [-l] red green blue")
@@ -26,9 +26,9 @@ main(int argc, char *argv[])
max = 1ULL << (depth - 1);
max |= max - 1;
- red = etolf_arg("the red value", argv[0]) / max;
- green = etolf_arg("the green value", argv[1]) / max;
- blue = etolf_arg("the blue value", argv[2]) / max;
+ red = etolf_arg("the red value", argv[0]) / (double)max;
+ green = etolf_arg("the green value", argv[1]) / (double)max;
+ blue = etolf_arg("the blue value", argv[2]) / (double)max;
if (!linear) {
red = srgb_decode(red);
green = srgb_decode(green);