diff options
author | Binesh Bannerjee <binesh_binesh@hotmail.com> | 2016-07-14 10:21:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-14 10:21:08 +0300 |
commit | fa3370607d9b3022c396bec0e904d7692dcd5b1c (patch) | |
tree | 841fa04ff40d0286801b74d4fb15944ece068aad | |
parent | 6894a4502a6f692cd6408b780425a2a88f33370b (diff) |
Global y1
I BELIEVE y1 is being created globally in the crop function, and that x2 is not actually being used. So, I've changed local x1, x2 to local x1, y1. https://github.com/torch/image/issues/177
-rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -470,7 +470,7 @@ local function crop(...) else iwidth,iheight = src:size(2),src:size(1) end - local x1, x2 + local x1, y1 if format == 'c' then x1, y1 = math.floor((iwidth-width)/2), math.floor((iheight-height)/2) elseif format == 'tl' then |