|
From: Ken M. <mc...@ii...> - 2006-03-27 18:32:35
|
On Mar 25, 2006, at 10:15 AM, Steve Bergman wrote: > I need to be able to render a plot (actually a pie) in png, jpg, or > gif format directly into a variable that I can return to the > application server. I'm currently using the rather ugly method of > writing to a temp file and then reading it back in and returning > the data. Is there a way to do this completely in memory? Attached is a script which uses the Agg backend and the Python Imaging Library to generate the PNG as a string. The same caveats about pylab and multithreading still apply. I hope this helps you get started. Ken |