diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-16 09:32:51 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-16 09:32:51 +0200 |
commit | aa679157765fdaf3c2e2ae5dd7d016bd7acbed15 (patch) | |
tree | a7bc6df77e6c38afc593d1d05da766d2281a2b2c | |
parent | 4c2c62ee964782607aecf8317290e01348d65149 (diff) |
resize: fix wrong image size when using non ZP origin
-rw-r--r-- | sys/src/cmd/resize.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/resize.c b/sys/src/cmd/resize.c index 626097eeb..bc863b6a2 100644 --- a/sys/src/cmd/resize.c +++ b/sys/src/cmd/resize.c @@ -160,7 +160,9 @@ main(int argc, char **argv) freememimage(im); im = nim; } - if((nim = allocmemimage(Rect(im->r.min.x, im->r.min.y, xsize, ysize), tchan)) == nil) + if((nim = allocmemimage( + Rect(im->r.min.x, im->r.min.y, im->r.min.x+xsize, im->r.min.y+ysize), + tchan)) == nil) sysfatal("addocmemimage: %r"); resample(nim, nim->r, im, im->r); freememimage(im); |