I have been looking into how to resize images on the fly. For some reason my
code isn't working
my controller consists of the following code
def myImage():
if len(request.args) == 1:
return response.download(request, db)
else:
im = request.args(0)
im = os.path.join(request.folder, "uploads", im)
width = request.args(1)
height = request.args(2)
size = width, height
myImage = Image.open(im)
resized_image = myImage.thumbnail((size), Image.ANTIALIAS)
resized_image.save(myImage.format)
return resized_image
The width and height I am passing as arguments from view what am I doing
wrong with my image resize code....
Any ideas
*cheers