[web2py] Re: how can i write a PIL image object to response

2014-10-03 Thread Leonel Câmara
I think Image.save is available in GAE, I don't use it but I see lots of code examples on the web using Image.save with GAE. Anyway, you can use Image.tobytes(encoder_name='PNG') and write that to response.body. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:/

[web2py] Re: how can i write a PIL image object to response

2014-10-03 Thread M.C. Botha
> > This does not work on appengine, there is no save method. > What is the appengine way of doing this? > from PIL import Image > def image(): > image = Image.new("RGB", (800, 600)) > response.headers['Content-Type']="image/png" > image.save(response.body, "PNG") > r