diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-05-16 01:53:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-05-16 01:53:28 +0000 |
commit | 853d1761ee6b8796373a977603b31707b9c6459d (patch) | |
tree | f6868aaddee86c1a6894eb52532377ba288af252 /editor/pbmpscale.c | |
parent | 4c050566e208acbbc2ac94d21208a93637a815c0 (diff) | |
download | netpbm-mirror-853d1761ee6b8796373a977603b31707b9c6459d.tar.gz netpbm-mirror-853d1761ee6b8796373a977603b31707b9c6459d.tar.xz netpbm-mirror-853d1761ee6b8796373a977603b31707b9c6459d.zip |
Add and use pbm_cleanrowend_packed
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2488 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pbmpscale.c')
-rw-r--r-- | editor/pbmpscale.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/editor/pbmpscale.c b/editor/pbmpscale.c index 15302c56..9ab89350 100644 --- a/editor/pbmpscale.c +++ b/editor/pbmpscale.c @@ -412,11 +412,7 @@ main(int argc, const char ** argv) { /* Read the top line into nextrow and clean the right end. */ pbm_readpbmrow_packed(ifP, nextrow, cols, format); - - if (cols % 8 > 0) { - nextrow[pbm_packed_bytes(cols) - 1] >>= (8 - cols % 8); - nextrow[pbm_packed_bytes(cols) - 1] <<= (8 - cols % 8); - } + pbm_cleanrowend_packed(nextrow, cols); outrow = pbm_allocrow_packed(outcols); for (i = 0; i < pbm_packed_bytes(outcols); ++i) @@ -440,10 +436,7 @@ main(int argc, const char ** argv) { This provision is for proper handling of the initial edgerow. */ pbm_readpbmrow_packed(ifP, nextrow, cols, format); - if (cols % 8 > 0) { - nextrow[pbm_packed_bytes(cols) - 1] >>= (8 - cols % 8); - nextrow[pbm_packed_bytes(cols) - 1] <<= (8 - cols % 8); - } + pbm_cleanrowend_packed(nextrow, cols); } else /* Bottom of image. */ nextrow = edgerow; |