From 2d7433e6242c1750398cad9e319675f0214f8203 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 28 Jul 2022 23:04:52 +0000 Subject: more fixes git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4376 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamcat.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'editor') diff --git a/editor/pamcat.c b/editor/pamcat.c index c6799751..ea9ddaa8 100644 --- a/editor/pamcat.c +++ b/editor/pamcat.c @@ -725,10 +725,10 @@ createLrImgCtlArray(const struct pam * const inpam, /* array */ case PAD_AUTO: thisEntryP->cachedRow = pnm_allocpamrow(&inpam[i]); pnm_readpamrow(inpamP, thisEntryP->cachedRow); - padPlanesRow(planePadMethod, &inpam[i], thisEntryP->cachedRow, - outpamP); pnm_scaletuplerow(&inpam[i], thisEntryP->cachedRow, thisEntryP->cachedRow, outpamP->maxval); + padPlanesRow(planePadMethod, &inpam[i], thisEntryP->cachedRow, + outpamP); { struct pam cachedRowPam; cachedRowPam = *outpamP; @@ -821,10 +821,10 @@ concatenateLeftRightGen(const struct pam * const outpamP, } else if (row >= thisEntryP->padtop && row < thisEntryP->padtop + inpamP->height) { pnm_readpamrow(&inpam[i], thisEntryP->out); - padPlanesRow(planePadMethod, &inpam[i], thisEntryP->out, - outpamP); pnm_scaletuplerow(&inpam[i], thisEntryP->out, thisEntryP->out, outpamP->maxval); + padPlanesRow(planePadMethod, &inpam[i], thisEntryP->out, + outpamP); } else { /* It's a row of padding, so image i's part of outrow[] is already set appropriately. @@ -923,10 +923,10 @@ readFirstTBRowAndDetermineBackground(const struct pam * const inpamP, pnm_readpamrow(inpamP, out); - padPlanesRow(planePadMethod, inpamP, out, outpamP); - pnm_scaletuplerow(inpamP, out, out, outpamP->maxval); + padPlanesRow(planePadMethod, inpamP, out, outpamP); + { partialOutpam = *outpamP; partialOutpam.width = inpamP->width; @@ -1018,6 +1018,10 @@ concatenateTopBottomGen(const struct pam * const outpamP, for (row = startRow; row < inpamP->height; ++row) { pnm_readpamrow(inpamP, out); + pnm_scaletuplerow(inpamP, out, out, outpamP->maxval); + + padPlanesRow(planePadMethod, inpamP, out, outpamP); + pnm_writepamrow(outpamP, newTuplerow); } } -- cgit 1.4.1