[Image-SIG] create image-instances from data strings

Torsten Gallmeister galle@rostock.zgdv.de
Wed, 18 Oct 2000 12:41:37 +0200


Hello,

can anyone help me?

I try to convert JPEG images from LDAP and put it in an
ZOPE-Application.
I think I have to use the fromstring and tostring methods, but don't
know, which parameters to use.

Image.fromstring("RGB",(150,200), data)   raises "ValueError: not enough
image data"
Another problem in this way is to get the imagesize.

Or is there another way to do that.
Putting the data in an file , using Image.open(), Image.save() an
finally read the data from the saved file works. But it's not the way I
want to do that. Perhaps there is a similar way to .open() and .save()
with using memory data ??

Thanks for any help,
                                            Torsten.