diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-02-01 23:41:25 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2016-02-01 23:41:25 +0300 |
commit | 4543acebcd340632fd7a3de309ccab0e79f5df22 (patch) | |
tree | edefbaf36bf09907b1fb0ec56a078046f4997932 | |
parent | ee646fdee4bb0ac86762f0210b00f2ae577acc2d (diff) | |
parent | 6a1efd27e9090ec9111ef0428a3b8ec99e6cbb71 (diff) |
Merge pull request #138 from colesbury/master
Only scale output in image.crop if dst is provded
-rw-r--r-- | init.lua | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -466,8 +466,11 @@ local function crop(...) x = src.new(endy-starty,endx-startx) end src.image.cropNoScale(src,x,startx,starty) - dst = dst or src.new():resizeAs(x) - image.scale(dst,x) + if dst then + image.scale(dst, x) + else + dst = x + end end return dst end |