aggdraw for PIL

A

Adam Endicott

Does anyone know anything about the aggdraw module for PIL? I think I
would like to use it because I need to do some drawing with
semi-transparent pen styles (I'm simulating using a highlighter). It
seems to be working great, but I think I'm running into a memory leak
that's noted in the documentation at
http://effbot.org/zone/pythondoc-aggdraw.htm#aggdraw.Draw-class

"Note: The Draw(im) form leaks memory in aggdraw 1.1b1 and earlier.
Don't use this form in long-running program that creates multiple
drawings. The memory leak has been fixed in release 1.1b2."

Sounds good, except I can't find 1.1b2 anywhere. Is it not released
yet? If so, does anyone know when it might be released?
 
F

Fredrik Lundh

Adam said:
Does anyone know anything about the aggdraw module for PIL? I think I
would like to use it because I need to do some drawing with
semi-transparent pen styles (I'm simulating using a highlighter). It
seems to be working great, but I think I'm running into a memory leak
that's noted in the documentation at
http://effbot.org/zone/pythondoc-aggdraw.htm#aggdraw.Draw-class

"Note: The Draw(im) form leaks memory in aggdraw 1.1b1 and earlier.
Don't use this form in long-running program that creates multiple
drawings. The memory leak has been fixed in release 1.1b2."

as a workaround, you can use the original constructor syntax instead,
together with fromstring/tostring:

d = Draw(im.mode, im.size)
d.fromstring(im.tostring())

# draw your stuff

im.fromstring(d.tostring())
Sounds good, except I can't find 1.1b2 anywhere. Is it not released
yet? If so, does anyone know when it might be released?

it has been delayed, but it should appear within a week or two.

</F>
 
A

Adam Endicott

You know, I tried doing it that way, and I must have done something
wrong the first time because I was getting an error. It works now
though, and it performs much better. Thanks!

I'll keep an eye out for the new version, that kind of timeframe will
be in plenty of time for the project I'm currently doing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top