Hello list!
I'm using python to store some images as strings.
        image = PIL.Image.open(sname)
        self.__simagestr = image.tostring()
        os.remove(sname)

Later, I have to store this string on a file:
def savedraw(self, suri):
       #suri is a path like "/home/image.jpeg"
        data = StringIO.StringIO(self.__simagestr)
        im = PIL.Image.open(data)
        im.save(data,'JPEG')

But the system shows the next error when execute PIL.Image.open(data)
    raise IOError("cannot identify image file")

What is wrong?
        Thanks jmd
-- 
THOGROM.terra.es <[EMAIL PROTECTED]>

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to