diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-06-27 18:33:15 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-06-27 18:33:15 +0000 |
commit | 5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f (patch) | |
tree | f11d76c7176d0ef0e5c07a3af6f895538fc6317c /editor | |
parent | 77fb425477358f9af21e38d2f5e55d9de1375a75 (diff) | |
download | netpbm-mirror-5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f.tar.gz netpbm-mirror-5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f.tar.xz netpbm-mirror-5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f.zip |
Release 10.47.45
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@1960 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/pnmremap.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/editor/pnmremap.c b/editor/pnmremap.c index 5b58addb..db35e2c0 100644 --- a/editor/pnmremap.c +++ b/editor/pnmremap.c @@ -377,6 +377,24 @@ randomizeError(long ** const err, static void +zeroError(long ** const err, + unsigned int const width, + unsigned int const depth) { +/*---------------------------------------------------------------------------- + Set all errors to zero in the error array err[][]. +-----------------------------------------------------------------------------*/ + unsigned int col; + + for (col = 0; col < width; ++col) { + unsigned int plane; + for (plane = 0; plane < depth; ++plane) + err[plane][col] = 0; + } +} + + + +static void fserrSetForward(struct fserr * const fserrP) { fserrP->fsForward = TRUE; @@ -433,6 +451,8 @@ initFserr(struct pam * const pamP, if (initRandom) randomizeError(fserrP->thiserr, fserrSize, pamP->depth); + else + zeroError(fserrP->thiserr, fserrSize, pamP->depth); fserrSetForward(fserrP); } |