From 0f03cc378e6ce48f17a20e409f93bfc11345a6ed Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 16 May 2017 20:14:22 +0200 Subject: Fix errors and warnings and make the code cleaner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-colour-srgb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/blind-colour-srgb.c') 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); -- cgit v1.2.3-70-g09d2