From 4c233fcfb54b386fcd96f71deb1e88e10d635825 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 27 Mar 2010 19:22:22 +0000 Subject: Release 10.50.00 - copied from trunk git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1162 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/ppmtopgm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'converter/other/ppmtopgm.c') 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); } -- cgit 1.4.1