Did you manage to figure this out?
I am trying out the gluon/ contrib/ imageutils and it isn't working for me
either.
The
db.table_name.picture.requires = RESIZE(200, 200)
and
db.table_name.thumbnail.compute = lambda row: THUMB(row.picture, 200, 200)
Both are not working for me. Instead the picture is being uploaded in its
original size.
On Wednesday, January 9, 2013 7:30:14 AM UTC+8, Daniele Pestilli wrote:
>
> I put imageutils in my app's modules directory, then I added:
> Field("thumbnail", "upload", uploadfolder=os.path.join(request.folder,
> 'uploads', 'profiles', 'thumbs')),
> to the appropriate database table, and below that, in the same file
> (db.py) I wrote:
>
> from imageutils import THUMB
> db.tutor.thumbnail.compute = lambda row: THUMB(row.picture, 200, 200)
>
> but the resizing doesn't seem to work. Am I doing something wrong?
>
>
> On Tue, Jan 8, 2013 at 9:29 PM, Michele Comitini <[email protected]
> <javascript:>> wrote:
>
>> I use wand for the task: http://pypi.python.org/pypi/Wand/0.1.10
>> there are many other bindings on the impressive *magick libraries, but
>> this one being a ctypes implementation is light and fast enough..
>>
>> mic
>>
>>
>> 2013/1/8 Bruno Rocha <[email protected] <javascript:>>:
>> > I am using this recipe:
>> >
>> >
>> http://www.web2pyslices.com/slice/show/1522/generate-a-thumbnail-that-fits-in-a-box
>> >
>> > I have plans to integrate it with a JavaScript Cropper plugin to get the
>> > dimensions.
>> >
>> > --
>> >
>> >
>> >
>>
>> --
>>
>>
>>
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.