Using PIL(/other?) to display resized images over the web?

Steve Castellotti stevec at innocent.com
Wed Oct 8 19:03:10 EDT 2003


Hey all--

        I have a simple photo website written in python. I would
like to be able to use Python Imaging Library (or similar) to read an
image file from the disk, resize/thumbnail it in memory, and then print
the modified image to stdout (sending it to the client web browser after
the proper MIME headings).

        Currently, I have only managed to do this via
Image.save() to a temporary file and then sending that, but of course that
is somewhat inefficient. Surely there's an easier way to do this, perhaps
via file descriptors?

Cheers

-Steve Castellotti
 SteveC (at) Innocent.com
 http://www.deltaflux.org




More information about the Python-list mailing list