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

ivan.dm ivan.web at tiscali.it
Mon Jan 9 17:01:28 EST 2006


Peter Hansen ha scritto:
> ivan.dm wrote:
> 
>> 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
> 
> ...
> 
>> 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 are you doing it this way instead of just using Image.open()?  PIL 
> already knows how to read and convert TIFF images...
> 
> -Peter
> 
yes! for all format it can decode, except for compression G3/G4.
I'm searching a method for decode this compression format

Ivan



More information about the Python-list mailing list