diff options
-rw-r--r-- | doc/HISTORY | 7 | ||||
-rw-r--r-- | editor/ppmcolormask.c | 7 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index bf4082a6..6940c477 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,7 +4,12 @@ Netpbm. CHANGE HISTORY -------------- -17.07.07 BJH Release 10.78.05 +17.06.30 BJH Release 10.78.06 + + ppmcolormask: fix incorrect output when input maxval is not 255. + Always broken (ppmcolormask was new in Netpbm 9.0, April 2000). + +17.06.07 BJH Release 10.78.05 pamgauss: Fix skewed output with even dimension. Always broken (Pamgauss was added in Netpbm 10.23 (July 2004). diff --git a/editor/ppmcolormask.c b/editor/ppmcolormask.c index f3b18ce1..96be89a1 100644 --- a/editor/ppmcolormask.c +++ b/editor/ppmcolormask.c @@ -223,7 +223,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 dc1caea0..2cac3265 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 78 -NETPBM_POINT_RELEASE = 5 +NETPBM_POINT_RELEASE = 6 |