about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-02-02 04:12:09 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-02-02 04:12:09 +0000
commit458204e90e9edb29d0f88f92319e23ebe653f0c8 (patch)
tree96900f08eead2d6e9ee8219237dc46805f920e55
parent84013afb7cd4a9651930770bd1c80787f041eab6 (diff)
downloadnetpbm-mirror-458204e90e9edb29d0f88f92319e23ebe653f0c8.tar.gz
netpbm-mirror-458204e90e9edb29d0f88f92319e23ebe653f0c8.tar.xz
netpbm-mirror-458204e90e9edb29d0f88f92319e23ebe653f0c8.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1116 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/ppmtopgm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/converter/other/ppmtopgm.c b/converter/other/ppmtopgm.c
index 86e7ae6a..e20c5660 100644
--- a/converter/other/ppmtopgm.c
+++ b/converter/other/ppmtopgm.c
@@ -36,9 +36,9 @@ convertRaster(FILE *       const ifP,
                 outputRow[col] = (gray) ppm_fastlumin(inputRow[col]);
         } else {
             /* Can't use fast approximation, so fall back on floats. */
-            int col;
+            unsigned int col;
             for (col = 0; col < cols; ++col) 
-                outputRow[col] = (gray) (PPM_LUMIN(inputRow[col]) + 0.5);
+                outputRow[col] = ppm_luminosity(inputRow[col]);
         }
         pgm_writepgmrow(ofP, outputRow, cols, maxval, 0);
     }