Re: [Image-SIG] rounded corners

2008-01-09 Thread Stani
I forgot to take of the _t function, so the first lines should be: CROSS = 'Cross' ROUNDED = 'Rounded' SQUARE = 'Square' Stani schreef: > In PIL this is easy. > > The following code preferably uses cache (just a simple python > dictionary) to avoi

Re: [Image-SIG] rounded corners

2008-01-09 Thread Stani
In PIL this is easy. The following code preferably uses cache (just a simple python dictionary) to avoid the overhead of generating the same transparency masks. So typical use would be: cache = {} for image in images: thumbnail = image_round(image.thumbnail(size, filter), cache, radius) Here

[Image-SIG] rounded corners

2008-01-09 Thread Alex K
Hello, Would anyone know how to generate thumbnails with rounded corners using PIL? I'm also considering imagemagick if PIL turns out not to be appropriate for the task. Thank you so much, Alex ___ Image-SIG maillist - Image-SIG@python.org http://mai