[Image-SIG] [BUG - minor][1.1.7] ImageDraw.Draw.rectangle - box argument
Nicolas DAVID
nicolas.david.mail at gmail.com
Tue Oct 16 12:10:45 CEST 2012
*ImageDraw.Draw.rectangle : - v1.1.7*
It is stated in the docs that the second coordinates pair of the box
argument defines a point just *outside* the rectangle, but defines in fact
a point located *inside* the rectangle
*ex :*
>>> im = Image.new('1', (10,10), 0)
>>> draw = ImageDraw.Draw(im)
>>> # according to doc, the following rectangle size is (4,4)
>>> draw.rectangle((0,0,4,4), fill=0xff)
>>> # to check, pixel (4,4) should be black, as outside the drawn rectangle
>>> im.getpixel((4,4))
255
>>> # Problem ! ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20121016/2d4005c4/attachment-0001.html>
More information about the Image-SIG
mailing list