[Image-SIG] ImageDraw.ellipse bug
by Dave Johnston other posts by this author
Jul 20 2005 12:49PM messages near this date
Re: [Image-SIG] Returned mail: Data format error
|
Re: [Image-SIG] Best Method to Dither a Grayscale image
ImageDraw.ellipse appears to have a bug in it from the inaccuracy of the
code that leads to it drawing ellipses 1 pixel bigger than the specified
bounding box.
The bug is that ellipses of even-width end up being a pixel wider. For
example, ellipses draw with bounding boxes of 1x1, 2x2, 3x3, 4x4, 5x5
are actually drawn using these bounding boxes: 1x1, 3x2, 3x3, 5x4, 5x5.
I don't know if this pattern continues for ever, but the inaccuracy has
been causing precision errors in generated images and ruining the
algorithms I've been working on.
Maybe there's a chance that the Bresenham algorithm could be added to
the library for drawing circles?
Ta,
Dave
_______________________________________________
Image-SIG maillist - Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
|