diff options
Diffstat (limited to 'editor/pnmshear.c')
-rw-r--r-- | editor/pnmshear.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/pnmshear.c b/editor/pnmshear.c index 6318f8e4..657f265d 100644 --- a/editor/pnmshear.c +++ b/editor/pnmshear.c @@ -241,14 +241,15 @@ main(int argc, char * argv[]) { pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0); newxelrow = pnm_allocrow(newcols); - bgxel = backgroundColor(cmdline.background, xelrow, cols, newmaxval, - format); - for (row = 0; row < rows; ++row) { double shearCols; pnm_readpnmrow(ifP, xelrow, cols, newmaxval, format); + if (row == 0) + bgxel = backgroundColor(cmdline.background, + xelrow, cols, newmaxval, format); + if (cmdline.angle > 0.0) shearCols = row * shearfac; else |