maccaj51
asked on
PHP Jquery Image upload and crop
Hi Experts,
I am farily new to PHP and jquery so as much detailed help as possible would be greatly appreciated
I need to do the following:
1. Upload an image
2. Crop it to become equal width and length (i.e. Square)
3. Resize it to say 300 x 300 pixels
4. Rename it and save it to a folder
Please someone patch a script together to help!!!
MANY THANKS IN ADVANCE
I am farily new to PHP and jquery so as much detailed help as possible would be greatly appreciated
I need to do the following:
1. Upload an image
2. Crop it to become equal width and length (i.e. Square)
3. Resize it to say 300 x 300 pixels
4. Rename it and save it to a folder
Please someone patch a script together to help!!!
MANY THANKS IN ADVANCE
what kind of images to you need to work with?
ASKER
jpg, gif or png would be great!
you can use the gd library in php to do this.
look in your php_info and see if you have it installed already, most newer version of php do, and it should also tell you what version of it you have.
http://php.net/manual/en/b ook.image. php
This the manual for it.
Give me a few minutes and I will get something together.
look in your php_info and see if you have it installed already, most newer version of php do, and it should also tell you what version of it you have.
http://php.net/manual/en/b
This the manual for it.
Give me a few minutes and I will get something together.
imagemagick is nice but it can be a pain to install and use.
ASKER
I do indeed have it installed... Halo your a legend!
I can arbitrarily crop the image, any size that you want it cropped to, say if the height is larger crop to width or the other way around?
ASKER
It would be nice for the user to crop it... i.e. Jcrop or something like that...
I am making a basic CMS... the images on the site need to be square but i dont trust the users photoshop skills - hence being able to crop online...
Does this make sense?
I am making a basic CMS... the images on the site need to be square but i dont trust the users photoshop skills - hence being able to crop online...
Does this make sense?
ASKER
Basically so they can choose the focus of the image aswell...
so would the locations be passed in with the image so that you don't have to worry about calculating an sort of best location and size.
If that is so this gets easier to do.
I will assume that the locations that are being cropped will be passed in.
If that is so this gets easier to do.
I will assume that the locations that are being cropped will be passed in.
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help!