Hello Coen, thank you, that helped! I didn't notice the flush statement.
Johannes Coen van der Kamp wrote: > drever wrote: >> Hello! >> >> I'm using PIL to load and save images. To draw images I use >> ImageDraw, but I am not content with the drawing quality. aggdraw >> uses agg which is a high quality drawing engine. I could not install >> it, so is there an alternative or can anybody help? >> >> I tried to install it on ubuntu 7.10 with python 2.5.1. After >> building the package the ./selftest.py crashed with a segfault. >> >> When I import aggdraw to python, I can use it with Image without >> crashes, but I don't see anything on the Image. >> >> Thanks for any advice! >> >> Johannes >> _______________________________________________ >> Image-SIG maillist - Image-SIG@python.org >> http://mail.python.org/mailman/listinfo/image-sig >> >> > Hello Drever, > > You don't have errors when importing aggdraw and Image? Than this has > to work: > > import aggdraw, Image > im = Image.new("RGB", (100, 100), ("white")) > draw = aggdraw.Draw(im) > pen = aggdraw.Pen('black', width=5, opacity=255) > draw.ellipse((10,10,90,90), pen) > draw.flush() # Without the flush you'll get an empty image! > # im.show() # Has compression > im.save("/path/to/your/folder/test.png", "png") # Clean aggdraw image > > Hope it helps! > Coen _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig