ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved