Stani wrote:
> Any chance for a cross-platform solution?
aggdraw in itself is cross-platform. if you're not on Windows, or prefer
to write portable code, you can either use tostring() or PIL to transfer
the images from aggdraw's internal buffer to the format used by the UI
toolkit you're using.
for example, you can write portable Tkinter code via PIL's ImageTk layer:
im = Image.new("RGB", size)
draw = aggdraw.Draw(im)
...
draw.flush()
del draw
image = ImageTk.PhotoImage(im)
or you can use something like the WCK's ui_image method:
draw = aggdraw.Draw(mode, size)
...
image = self.ui_image(draw.mode, draw.size, draw.tostring())
for wxPython, something like:
draw = aggdraw.Draw("RGB", size)
...
image = wx.EmptyImage(*size)
image.SetData(draw.tostring())
should work.
</F>
_______________________________________________
Image-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/image-sig