diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
commit | cdf6e0151411d887fef61245cb303ef190b29335 (patch) | |
tree | 678c2212e125e66e0a868773e2b4ec460794da4e /generator/pgmkernel.c | |
parent | de1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff) | |
download | netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip |
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator/pgmkernel.c')
-rw-r--r-- | generator/pgmkernel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generator/pgmkernel.c b/generator/pgmkernel.c index ec634c16..37072c38 100644 --- a/generator/pgmkernel.c +++ b/generator/pgmkernel.c @@ -223,11 +223,13 @@ main(int argc, const char * argv[]) { unsigned int col; for (col = 0; col < (cmdline.cols +1) / 2; ++col) { + double const epsilon = 1e-15; double const dx2 = SQR(col - xcenter); double const normalized = t(dx2, dy2, cmdline.weight) / 2 / tMax; - gray const grayval = ROUNDU(cmdline.maxval * (0.5 + normalized)); + gray const grayval = + ROUNDU(cmdline.maxval * (0.5 + normalized + epsilon)); halfKernel[arow][col ] = grayval; halfKernel[arow][cmdline.cols - col - 1] = grayval; |