From 9d864b9364601bac99be4b74d4a914c701024d99 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 30 Jun 2017 03:19:43 +0000 Subject: Release 10.73.13 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3014 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- doc/HISTORY | 5 +++++ editor/ppmcolormask.c | 7 ++++++- version.mk | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/HISTORY b/doc/HISTORY index 7aec1771..6f16efe6 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,11 @@ Netpbm. CHANGE HISTORY -------------- +17.06.30 BJH Release 10.73.13 + + ppmcolormask: fix incorrect output when input maxval is not 255. + Always broken (ppmcolormask was new in Netpbm 9.0, April 2000). + 17.06.28 BJH Release 10.73.12 pamgauss: Fix skewed output with even dimension. Always broken diff --git a/editor/ppmcolormask.c b/editor/ppmcolormask.c index 31fbff2a..5ef8d1c1 100644 --- a/editor/ppmcolormask.c +++ b/editor/ppmcolormask.c @@ -222,7 +222,12 @@ main(int argc, char *argv[]) { int col; ppm_readppmrow(ifP, inputRow, cols, maxval, format); for (col = 0; col < cols; ++col) { - if (colorIsInSet(inputRow[col], maxval, cmdline)) { + pixel thisColor; + /* Color of this pixel with same maxval as used in + 'cmdline' + */ + PPM_DEPTH(thisColor, inputRow[col], maxval, PPM_MAXMAXVAL); + if (colorIsInSet(thisColor, PPM_MAXMAXVAL, cmdline)) { maskRow[col] = PBM_BLACK; ++numPixelsMasked; } else diff --git a/version.mk b/version.mk index 74120acb..f5c26e84 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 73 -NETPBM_POINT_RELEASE = 12 +NETPBM_POINT_RELEASE = 13 -- cgit 1.4.1