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
No, just regular web2py webserver on my machine.
Jan 9, 2013 2:36 AM、Bruno Rocha のメッセージ:
> are you running on Google App Engine?
> --
>
>
>
--
are you running on Google App Engine?
--
It seems to be uploading the full-sized image properly but for the thumb it
says 'thumbnail': None where thumbnail is the field name in the db.py file.
On Wed, Jan 9, 2013 at 1:06 AM, Daniele Pestilli wrote:
> Hmm still not working.
> I'm wondering if this is the problem:
>
> uploadfolder=os.pat
Hmm still not working.
I'm wondering if this is the problem:
uploadfolder=os.path.join(request.folder, 'uploads', 'profiles', 'thumbs')
should it be
uploadfolder=os.path.join(request.folder, 'uploads', 'profiles/thumbs') or
something?
On Wed, Jan 9, 2013 at 12:43 AM, Bruno Rocha wrote:
> Yeah
Yeah it is a problem in THUMB function, thumb function looks for files
under /uploads and you are defining another folder.
change the imageutils module replacing /uploads with /uploads/profile
On Tue, Jan 8, 2013 at 9:30 PM, Daniele Pestilli wrote:
> I put imageutils in my app's modules director
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.thumbna
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 :
> I am using this recipe:
>
> http://www.web2pyslices.com/slice/sho
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.
--
They made it even simpler now... (look at contrib/imageutils.py)
#
# Put this file in yourapp/modules/images.py
#
# Given the model
#
# db.define_table("table_name", Field("picture", "upload"),
Field("thumbnail", "upload"))
#
# # to resize the picture on upload
#
# from images import RESIZE
#
# db
Take a look here for a somewhat similar example...
http://www.web2pyslices.com/slice/show/1387/upload-image-and-make-a-thumbnail
You'll need the PIL (python image library) installed.
On Tuesday, January 8, 2013 11:43:36 AM UTC-7, Daniele wrote:
>
> How can i make it so that when a user uploads a
11 matches
Mail list logo