hi, does anybody knows how to place an image in the webpage, but both position and clipping (maybe also resizing) are interactively done by user ?, i need it for my registration page, i've done some clipping and resizing from css and javascript, and it's not really solve the problem. If it's can be done by php, it will be perfect ! thx.
Here is a brief summary:
Let the user browse for and upload a photo.
Validate the photo is of correct type and dimensions using PHP's image functions.
Show the user the photo in the browser, along with a draggable DIV that they can resize and move. This is the cropping area.
When they click "Next", you transmit the
x,y,width,height
of the DIV to the server either by AJAX or simply as hidden fields in a form.Again, use the PHP image functions to crop the image, and then resize it.
Save it to a permanent location.
Post a comment for further specific answers.
No matter what you're going to need to use either JavaScript or Flash to maintain intractability for a clientside resize of you image.
The following tutorial shows you how to use jQuery's simplified AJAX and PHP to upload an image to a temporary location, resize it, and save the resized copy where you desire.
Hope it helps!
http://www.webmotionuk.co.uk/jquery-image-upload-and-crop-for-php/
Try this class
http://www.verot.net/php_class_upload_samples.htm
All images that are being uploaded by user can be edited in anyway using php