¡@

Home 

python Programming Glossary: draw.ellipse

Python PIL: How to draw an ellipse in the middle of an image?

http://stackoverflow.com/questions/4789894/python-pil-how-to-draw-an-ellipse-in-the-middle-of-an-image

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.. 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.. than the size of the ellipse to be drawn. For example draw.ellipse 5 5 15 15 fill 128 Works but only shows part of the rect. Whereas..

How do I generate circular thumbnails with PIL?

http://stackoverflow.com/questions/890051/how-do-i-generate-circular-thumbnails-with-pil

128 128 mask Image.new 'L' size 0 draw ImageDraw.Draw mask draw.ellipse 0 0 size fill 255 im Image.open 'image.jpg' output ImageOps.fit.. 128 mask Image.new 'L' size 255 draw ImageDraw.Draw mask draw.ellipse 0 0 size fill 0 im Image.open 'image.jpg' output ImageOps.fit..