From f3ec2be2181d8747ba7ba06470f05f93432f3e01 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 20 Feb 2009 23:21:31 +0000 Subject: Use PBM fast path for padded cuts too git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@843 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamcut.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'editor/pamcut.c') diff --git a/editor/pamcut.c b/editor/pamcut.c index ce63da7b..d2d6170c 100644 --- a/editor/pamcut.c +++ b/editor/pamcut.c @@ -563,7 +563,7 @@ extractRowsPBM(const struct pam * const inpamP, int row; unsigned int totalWidth; - assert(0 <= leftcol && leftcol <= rightcol && rightcol < inpamP->width); + assert(leftcol <= rightcol); assert(toprow <= bottomrow); if (leftcol > 0) { @@ -658,8 +658,7 @@ cutOneImage(FILE * const ifP, pnm_writepaminit(&outpam); - if (PNM_FORMAT_TYPE(outpam.format) == PBM_TYPE && - leftcol >= 0 && rightcol < inpam.width) + if (PNM_FORMAT_TYPE(outpam.format) == PBM_TYPE) extractRowsPBM(&inpam, &outpam, leftcol, rightcol, toprow, bottomrow); else extractRowsGen(&inpam, &outpam, leftcol, rightcol, toprow, bottomrow); -- cgit 1.4.1