drawRect throws error when lineWidth>1 and a pixel coordinate of the rectangle is out of the image boundary. e.g., the following code could not succeed
/scratch0/torch/install/share/lua/5.1/image/init.lua:2172: bad argument #2 to 'drawRect' (out of range at /tmp/luarocks_torch-scm-1-3526/torch7/lib/TH/generic/THTensor.c:759)
stack traceback:
[C]: at 0x7f9ca8b008e0
[C]: in function 'drawRect'
/scratch0/torch/install/share/lua/5.1/image/init.lua:2172: in function 'drawRect'
/scratch0/image/test.lua:3: in main chunk
After this fix, the same code could generate rectangles on top of the image with ignored pixels on the line and out of the image boundary.
drawRect
throws error whenlineWidth>1
and a pixel coordinate of the rectangle is out of the image boundary. e.g., the following code could not succeedwhich throws error:
After this fix, the same code could generate rectangles on top of the image with ignored pixels on the line and out of the image boundary.