From 3d614d93c049f28c93c4c30f3a873b9cabf65fde Mon Sep 17 00:00:00 2001 From: Chuan Li Date: Wed, 20 Apr 2016 10:20:43 +0200 Subject: [PATCH] Fixed rounding bug in computeBB --- mylib/helper.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mylib/helper.lua b/mylib/helper.lua index 9f012f9..8487278 100644 --- a/mylib/helper.lua +++ b/mylib/helper.lua @@ -135,7 +135,7 @@ function computeBB(width, height, alpha) end end - return math.floor(min_x), math.floor(min_y), math.floor(max_x), math.floor(max_y) + return math.max(math.floor(min_x), 1), math.max(math.floor(min_y), 1), math.floor(max_x), math.floor(max_y) end function computegrid(width, height, block_size, block_stride, flag_all)