diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-06-30 03:14:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-06-30 03:14:34 +0000 |
commit | e21f4e95d897c93a4779bf78c71f1341d164a222 (patch) | |
tree | 4f5e275f28fe9f30a7c13a9aa874cc84198dc70a /editor/ppmcolormask.c | |
parent | f9aeba86b7572e433c798f9cb2210e014077d1b9 (diff) | |
download | netpbm-mirror-e21f4e95d897c93a4779bf78c71f1341d164a222.tar.gz netpbm-mirror-e21f4e95d897c93a4779bf78c71f1341d164a222.tar.xz netpbm-mirror-e21f4e95d897c93a4779bf78c71f1341d164a222.zip |
Release 10.78.06
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3013 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/ppmcolormask.c')
-rw-r--r-- | editor/ppmcolormask.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 |