[Zope] PIL and sizing image
brocken22@gmx.de
brocken22@gmx.de
Thu, 2 Nov 2000 16:20:06 +0100 (MET)
Hallo,
that's what I like:the user sends a graphic and we are creating a
news-item with a thumbnail and a printable one.So I installed PIL and tried the
following:
#bildk.py
import PIL.Image
def bildk(graffik,modus):
im = PIL.Image.open(graffik)
im.thumbnail((100,100))
#if modus = 'gif':
# im.format = 'GIF'
#else:
# im.format= 'JPEG'
return im
Error Type: IOError
Error Value: [Errno 2] No such file or directory: 'header.gif'
That's right cause I pass the image-object from within Zope and not from
the local filesystem.
Am I forced to save the thumbnail locally and reimport it??
There must be a better solution.
Thanks!!
--
Sent through GMX FreeMail - http://www.gmx.net