about summary refs log tree commit diff
path: root/editor
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-02-02 03:52:20 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-02-02 03:52:20 +0000
commited7bfe0376695a6ea811eb451289d18f8abe0619 (patch)
tree32ec116eaa50e60b5656e788f0c24de44acc21c2 /editor
parent9e4706e0282082ef0a2153e4b91c24660b007d68 (diff)
downloadnetpbm-mirror-ed7bfe0376695a6ea811eb451289d18f8abe0619.tar.gz
netpbm-mirror-ed7bfe0376695a6ea811eb451289d18f8abe0619.tar.xz
netpbm-mirror-ed7bfe0376695a6ea811eb451289d18f8abe0619.zip
Use ppm_luminosity() instead of PPM_LUMIN() so as to get proper rounding
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1113 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r--editor/pnmremap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/pnmremap.c b/editor/pnmremap.c
index 5b58addb..29e05905 100644
--- a/editor/pnmremap.c
+++ b/editor/pnmremap.c
@@ -30,6 +30,7 @@
 #include "nstring.h"
 #include "shhopt.h"
 #include "pam.h"
+#include "ppm.h"
 #include "pammap.h"
 
 #define MAXCOLORS 32767u
@@ -1122,7 +1123,7 @@ getSpecifiedMissingColor(struct pam * const pamP,
             specColor[PAM_GRN_PLANE] = PPM_GETG(color);
             specColor[PAM_BLU_PLANE] = PPM_GETB(color);
         } else if (pamP->depth == 1) {
-            specColor[0] = PPM_LUMIN(color);
+            specColor[0] = ppm_luminosity(color);
         } else {
             pm_error("You may not use -missing with a colormap that is not "
                      "of depth 1 or 3.  Yours has depth %u",