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 avoid

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)