Image

Sheldon sheldon.johnston at home.firstnet.se
Tue Aug 10 22:16:14 CEST 2004


Hi,

Does anyone know how to read an array back into python after writing
it to a .dat file using tostring()?

My method using Image results in a valueerror: data is not enough...

x = open('file.dat')

array = x.read()

print array : results in unreadle garble while

im = Image.fromstring('I', (81,81),array)
gives the valueError: data not enough...

The tutorial on Image leaves a lot to be desired.

Any help or new ideas would be welcomed!

thanks,
Sheldon



More information about the Python-list mailing list