[Zope] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Tom Von Lahndorff
I'm trying to resize an image uploaded from a form using PIL. I got it to work on an existing image but I can't seem to get it to work on an image that's uploaded through the form. The ID of the file I'm trying to upload is DSCF0004.jpg. The form, script and traceback are listed below.

Re: [Zope] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Marco Bizzarri
Jusst a shot in the dark: can you try to use a name without a dot inside? -- Marco Bizzarri http://iliveinpisa.blogspot.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! **

Re: [Zope] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Jonathan
- Original Message - From: Tom Von Lahndorff [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, February 22, 2007 1:29 PM Subject: [Zope] Resizing an Image with PIL via a Form Upload I'm trying to resize an image uploaded from a form using PIL. I got it to work on an existing

Re: [Zope] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Andrew Langmead
On Feb 22, 2007, at 1:29 PM, Tom Von Lahndorff wrote: 8original_image=getattr(self, original_id) 9original_file=StringIO(str(original_image.data)) [and later] AttributeError: DSCF0004.jpg I think your line numbers are off by one, because I'd think it is the getattr that would be

Re: [Zope] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Tom Von Lahndorff
Thanks for everyone's help. I got it to work, here's the script. It creates 4 images, enhances them and adds some properties to the largest one. -- def makeImages(self, imagefile, newkeywords, newcaption): import PIL.Image, ImageEnhance, ImageFilter import PIL from