PIL.Image.frombuffer/string ... who do data using?

ivan.dm ivan.web at tiscali.it
Sun Jan 8 13:37:43 EST 2006


hello again everyone!

I'm writing a wrapper for tif file that parse its and return the data 
image in this way below :

             self.fp.seek(StripOffsets)
             data = self.fp.read(StripByteCounts)
             return data

where:
self.fp is a file object
StripOffsets is a offset position of image
StripByCounts is extend of image

after we get a data, now to set its in PIL.Image.fromstring(...)
but ( evely! :) ), returned this error follow:

ValueError
"not enough image data"

why???

Should I to convert data in other format???

any suggestion?

Thanks and regard.

Ivan



More information about the Python-list mailing list