html resize pics
rbt
rbt at athop1.ath.vt.edu
Wed Dec 28 18:06:59 EST 2005
Peter Hansen wrote:
> rbt wrote:
>> I use Python to generate html pages. I link to several large images at
>> times. I'd like to display a thumbnail image that when clicked will go
>> to the original, large jpg for a more detailed view.
>
> I use PIL with the thumbnail() function for that... depending on what
> sort of web server/framework you are using, you could generate the
> thumbnails dynamically, or you could pre-generate them and store both
> files (this is probably the most common way to do it). The HTML, of
> course, has to be generated to refer to the appropriate file: the IMG
> source is the thumbnail, the anchor's href points to the larger image.
>
> -Peter
>
Thanks PIL is a very handy tool!
More information about the Python-list
mailing list