Page 1 of 1
client side image resizing???
Posted: Mon Oct 11, 2004 4:55 pm
by nleco
I have a website, where I allow people to upload pictures up to X K in size. This runs under PHP.
My question is: Is there a way to use a combination of Javascript/PHP to resize pictures on the client's side? or maybe some links to some free opensource software that my users can use to resize images?
If not, what would be best on the server side. We currently use ImageMagick for some of our image needs.
thank you.
Posted: Tue Oct 12, 2004 3:16 am
by phpScott
i use the gd library in php for graphic manipulation because it was there.
As far as I know you can't resize images using javascript but you can limit the file size which might help so you don't get those monster files being uploaded.
check out the options for <input type="file" /> it is something like max_file_size= someNumber.
Otherwise free resizing tools check out download.com or tucows for something on the client side that they can download and use.
phpScott
Posted: Tue Oct 12, 2004 3:44 am
by twigletmac
If you're using ImageMagik you could continue using that or the GD library. Probably an idea to set a maximum size of image so that you don't have to spend too much server energy doing this work. Users could have a go with the Gimp -
http://www.gimp.org/ - free and opensource
Mac
thanks
Posted: Tue Oct 12, 2004 10:25 am
by nleco
thanks for the ideas. I felt it was impossible to do this. Yes, i was considering some kind of server side application, but that would require server processing time. I just wasnt sure if anyone has dealt with this, or maybe even partnershiped with an outside company. if you've heard of anything like this, please let me know.
and yes, i've looked into the opensource community, it's where i went to first.

and yes, we do limit uploads, however not through the input field. I wasnt sure that was possible, thanks for that idea!
Re: thanks
Posted: Tue Oct 12, 2004 10:30 am
by twigletmac
nleco wrote: we do limit uploads, however not through the input field. I wasnt sure that was possible, thanks for that idea!
It can be circumvented but at least it saves your server some hassle.
Mac
Posted: Tue Oct 12, 2004 12:51 pm
by nleco
i asked the original question because some of my users try to upload pictures way bigger than the max upload size.
I am trying to find a way to convert the image to a smaller size either through:
1) the client's computer
2) our servers (last measure)
I'd like to implement this so that it ties in nicely with our website. the second option sounds easy, since i can resize a picture and get it bellow my required limit. however, that would mean we'd have to use our servers.
any ideas?
Posted: Wed Oct 13, 2004 1:46 pm
by potsed
irfanview is an excellant image tool that is freeware... small and easy to use too..
http://www.irfanview.com