[Zope] PIL: convert an image-object back to file object

Dieter Maurer dieter at handshake.de
Thu Nov 13 16:48:02 EST 2003


Christoph Landwehr wrote at 2003-11-13 19:33 +0100:
 > I use an external method utilizing PIL (python image library) to do some stuff 
 > with an image.
 > 
 > As I want to do the changes on-the-fly, I pass the fileUpload instance from my 
 > HTML-form to a python script. The script calls a external method. The external 
 > method uses PIL to convert the fielUpload instance to a PIL.Image.Image 
 > instance, does some stuff and returns the PIL.Image.Image instance to the python 
 > script.
 > 
 > In the script I want to save the returned object as an Zope image object using 
 > manage_addImage(). But the manage_addImage method expects a file object, not a 
 > PIL.Image.Image.

It will also allow a string representing the files content...

-- 
Dieter



More information about the Zope mailing list