PIL and cgi

Mathieu zehp at netcourrier.com
Tue Mar 7 19:43:22 CET 2000

i'd like to use PIL for make picture on the fly, i try 

#!D:\Program Files\Python\Python.exe

from cStringIO import *
import Image

img = Image.open('tmp.jpg')

tmp = StringIO()
img.save(tmp, 'JPEG')
image = tmp.read()
print '''\
Content-type: image/jpeg
Content-length: %s

%s''' % (len(image), image)

but, the picture lokks strange, like she was shuffled, where is the
it was done on Apache 1.3, Pil 1.0, Python 1.52 on an NT4



More information about the Python-list mailing list