Python PIL: How to draw an ellipse in the middle of an image?
I seem to be having some trouble getting this code to work: import Image, ImageDraw im = Image.open("1.jpg") draw = ImageDraw.Draw(im) draw.ellipse((60, 60, 40, 40), fill=128) del draw im.save('output.png') im.show() This should draw an ellipse at (60,60) which is 40 by 40 pixels. The image returns nothing. This code works fine however: draw.ellipse ((0,0,40,40), fill=128) It just seems that when i change the first 2 co-ords (for where the ellipse should be placed) it won't work if they are larger than the size of the ellipse to be drawn. For example: draw.ellipse ((5,5,15,15), fill=128) Works
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.