[Image-SIG] tostring

Kai Hendry hendry at cs.helsinki.fi
Sat Apr 17 10:35:05 EDT 2004


I can't work out tostring. Could someone fix this or provide me an
example?

#!/usr/bin/python2.3
import Image

jpgimage = '/home/hendry/kodak/DCP_6655.JPG'

print "Content-Type: image/jpeg"
print

#this works of course
#print open(jpgimage).read()

i = Image.open(jpgimage)
#print i.tostring()
#this isn't ...
print i.tostring("jpeg", '')



More information about the Image-SIG mailing list