Image crop and resize
I'm looking for a script where I can upload an image and then crop this to a perfect square.
The final image that is saved should be 200 x 200 pixels.
So, if the uploaded image is too small, I want it to fill the rest of the area with white.
If the uploaded file is too wide or too high, the user should be able to crop the part they want to be the visible 200x200 pixels.
I found this script http://keithics.com/blog/jquery/ajax...-php-crop-tool
But I don't understand where to change the bits and pieces to make it work for me.
I want to make it simple and don't need the user input fields where they have to set the size and things like that.
I just want them to use the upload button and the crop tool and then end up at another page where I can have their uploaded picture showing and also have the url to the image inserted into my db.
Does anyone know what to change in this script or if there is something simple out there that might just do what I'm looking for?
I think Jquery Jcrop plugin might help you. Please google it.
Thanx Jimmybrion. Testing that one as we speak. Looks great. I will see if I can make that one work.
I have used a jQuery script to achieve that very result before and it was very sleek. However there is quite often some hefty PHP attached to pulling that off. Obviously jQuery itself cannot achieve this. Are you familiar at all with the GD library of PHP? It's truly incredible in the amount of things it can do. It was a bit of a learning curve for me but I'm very glad that I took the time to familiarize myself with it. Since then I have written an image.class that I can call upon, pass a few variables into it and achieve a whole plethora of functionality very quickly.
Originally Posted by brad62