Python Substitute for PHP GD, Resizing an image on the client side

brahmaforces brahmaforces at gmail.com
Tue Aug 19 03:48:08 EDT 2008


Hi Everyone,

Thanks for your responses. Sorry I should have been clearer in my
question. Yes PHP is server side, and it seems that all image
processing using GD or ImageMagicks etc happens on the server.
Therefore Diez's suggestion of using javascript to select a rectangle
on the client side would be the best option and then upload this small
selection to the server and then process there.

Does anyone have any code that does the javascript "selecting the
rectangle bit" and uploading to the server. Also incidentally is ftp
or put the recommended way to go for uploading the reduced image to
the server?

Thanks...


On Aug 19, 11:54 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> brahmaforces schrieb:
>
> > Hi Folks,
>
> > I am using cherrypy and python. I am trying to get a user profile
> > image to resize on the client side before uploading to the server. PHP
> > has a gd library that does it it seems. Has anyone done this in a
> > python environment without uploading to the server?
>
> Everything PHP is server-side. And displaying images is *always* done
> through uploading and then displaying it.
>
> The resizing is done using JavaScript, and then communicating back the
> selected rectangle to the server - *then* GD or whatnot (PIL,
> ImageMagick) are used to resize the image.
>
> Diez




More information about the Python-list mailing list