I'm trying to get some code going on my website to dynamically generate images with Python.
I have SSHed into my server and when I run Python from the command line I get no problems at all when I do:
However, the following code:
print "Content-type: image/png"
print "Status: 200 Ok"
import Image, ImageDraw
im = Image.new("RGB", (40, 15), 'white')
draw = ImageDraw.Draw(im)
draw.line((0, 0) + im.size, fill="red")
draw.line((0, im.size, im.size, 0), fill="red")
gives an error 500, and in my logs shows up as:
[Sun Apr 23 13:30:10 2006] [error] [client x.x.x.x] PythonHandler mod_python.cgihandler: ImportError: No module named Image
Any ideas what I'm doing wrong?