Hello,
I have a table where only store images related to x Article.
db_define_table('images',
Field('original_image', 'upload'),
Field('thumb_image', 'upload')
Is efficient even, possible to make 'thumb_image' Field a computed Field?
Something like:
Field('thumb_image', 'upload', *compute*= lambda r:*make_thumb*(r,
85))
def *make_thumb*(r, thumb_size):
try:
from PIL import Image
except:
raise ImportError, "Requires PIL installed in your system."
size = (thumb_size, thumb_size)
....
Any help is welcome!
thanks!