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.
client side image resizing???
Moderator: General Moderators
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
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
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
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
Mac
thanks
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!
and yes, i've looked into the opensource community, it's where i went to first.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Re: thanks
It can be circumvented but at least it saves your server some hassle.nleco wrote: we do limit uploads, however not through the input field. I wasnt sure that was possible, thanks for that idea!
Mac
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?
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?
irfanview is an excellant image tool that is freeware... small and easy to use too..
http://www.irfanview.com
http://www.irfanview.com