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 22:51:17 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-07-28 22:51:17 +0000
commitfce7452ba630791fa9b3bbd8d6158320b4da305e (patch)
treede6bfd5221af060394b0c7204f3e604b11db2a2f /editor
parent80c75e546075dc4829dcb328e1ca7cad8d71fd72 (diff)
downloadnetpbm-mirror-fce7452ba630791fa9b3bbd8d6158320b4da305e.tar.gz
netpbm-mirror-fce7452ba630791fa9b3bbd8d6158320b4da305e.tar.xz
netpbm-mirror-fce7452ba630791fa9b3bbd8d6158320b4da305e.zip
Fix padding in top-bottom concatenation
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4375 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r--editor/pamcat.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/pamcat.c b/editor/pamcat.c
index d9706e29..c6799751 100644
--- a/editor/pamcat.c
+++ b/editor/pamcat.c
@@ -801,8 +801,10 @@ concatenateLeftRightGen(const struct pam *  const outpamP,
                    image 'i', so set its part of outrow[] to padding.
                 */
                 unsigned int col;
-                for (col = 0; col < inpamP->width; ++col)
-                    thisEntryP->out[col] = thisEntryP->background;
+                for (col = 0; col < inpamP->width; ++col) {
+                    pnm_assigntuple(outpamP, thisEntryP->out[col],
+                                    thisEntryP->background);
+                }
             }
             if (row == thisEntryP->padtop && thisEntryP->cachedRow) {
                 /* We're at the top row of file 'i', and that row
@@ -810,9 +812,10 @@ concatenateLeftRightGen(const struct pam *  const outpamP,
                    background.  Copy it to image i's part of outrow[].
                 */
                 unsigned int col;
-                for (col = 0; col < inpamP->width; ++col)
-                    thisEntryP->out[col] = thisEntryP->cachedRow[col];
-
+                for (col = 0; col < inpamP->width; ++col) {
+                    pnm_assigntuple(outpamP, thisEntryP->out[col],
+                                    thisEntryP->cachedRow[col]);
+                }
                 free(thisEntryP->cachedRow);
                 thisEntryP->cachedRow = NULL;
             } else if (row >= thisEntryP->padtop &&