Call
image = Image.open(data) image.thumbnail((36,36), Image.NEAREST)
will maintain aspect ratio. But I need to display the image as follows:
<img src="/media/image.png" style="height:36px; width:36px" />
Can I have a mailbox style with transparent or white color around the image?
python png thumbnails alpha python-imaging-library
Paul Tarjan Sep 06 '09 at 18:33 2009-09-06 18:33
source share