about summary refs log tree commit diff
path: root/lib/libpamcolor.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpamcolor.c')
-rw-r--r--lib/libpamcolor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libpamcolor.c b/lib/libpamcolor.c
index f9add1a1..e1a24c66 100644
--- a/lib/libpamcolor.c
+++ b/lib/libpamcolor.c
@@ -366,9 +366,7 @@ pnm_parsecolor2(const char * const colorname,
 
     color = pnm_parsecolorn(colorname);
 
-    retval[PAM_RED_PLANE] = ROUNDU(color[PAM_RED_PLANE] * maxval);
-    retval[PAM_GRN_PLANE] = ROUNDU(color[PAM_GRN_PLANE] * maxval);
-    retval[PAM_BLU_PLANE] = ROUNDU(color[PAM_BLU_PLANE] * maxval);
+    pnm_unnormalizetuple(&pam, color, retval);
 
     if (!closeOk) {
         warnIfNotExact(colorname, retval, color, maxval, PAM_RED_PLANE);