about summary refs log tree commit diff
path: root/editor
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-07-28 23:04:52 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-07-28 23:04:52 +0000
commit2d7433e6242c1750398cad9e319675f0214f8203 (patch)
tree838bb03176b2c73cc6386b4e642f144c479951a6 /editor
parentfce7452ba630791fa9b3bbd8d6158320b4da305e (diff)
downloadnetpbm-mirror-2d7433e6242c1750398cad9e319675f0214f8203.tar.gz
netpbm-mirror-2d7433e6242c1750398cad9e319675f0214f8203.tar.xz
netpbm-mirror-2d7433e6242c1750398cad9e319675f0214f8203.zip
more fixes
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4376 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r--editor/pamcat.c16
1 files changed, 10 insertions, 6 deletions
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);
         }
     }