14 Nov
2003
14 Nov
'03
12:50 a.m.
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.
Save the PIL Image into an intermediary cStringIO instance and pass that one into manage_addImage. jens