Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/image.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinesh Bannerjee <binesh_binesh@hotmail.com>2016-07-14 10:21:08 +0300
committerGitHub <noreply@github.com>2016-07-14 10:21:08 +0300
commitfa3370607d9b3022c396bec0e904d7692dcd5b1c (patch)
tree841fa04ff40d0286801b74d4fb15944ece068aad
parent6894a4502a6f692cd6408b780425a2a88f33370b (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.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 8a14cec..e1bfe63 100644
--- a/init.lua
+++ b/init.lua
@@ -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