Dynamic image creation for the web...

Fredrik Lundh fredrik at pythonware.com
Mon Aug 29 09:57:54 EDT 2005


"Tompa" <tompa1969 at yahoo.com> wrote:

> Yes, I believe so too. Something like this, as suggested by Benjamin:
> sys.stdout.write('Status: 200 OK\r\n')
> sys.stdout.write('Content-type: image/gif\r\n')
> sys.stdout.write('\r\n')
> im.save(sys.stdout, "GIF")
>
> But it does not work for some reason!?

"does not work" isn't a good way to report a problem -- to help you
figure out what's wrong, you have to tell us exactly what happens.

if the problem is that you're getting an image, but that the browser
cannot display it, you probably have a misconfigured IIS.  see this
FAQ entry for a solution:

http://www.python.org/doc/faq/windows.html#cgi-py-or-other-cgi-programming-doesn-t-work-sometimes-on-nt-or-win95

</F> 






More information about the Python-list mailing list