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
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)