Click to See Complete Forum and Search --> : Cropping Images


econnections
11-24-2005, 12:02 PM
Hi, I don't know if this question fits here of in the Java forum?

I looking for code I can use in my web page that will allow users to view their wedding pictures and choose a 10x8 or 6x7 ratio for cropping. On selecting the ratio a rectangle would appear over the image that the user could position and size. Then on pressing OK the coordinates of the frame in relation to the picture are captured and used for cropping the origional picture.

Don't know where to start with this, any help would be much appreciated?

Cheers.

bokeh
11-24-2005, 02:11 PM
What you are talking about is pretty simple and can ba achieved with PHP but it is not simply a question of cropping to an aspect ratio. When I do a wedding each photo is only available in one aspect ratio. If you start letting people crop your photographic work this undermines you as a photographer because Jo Public normally makes bad decisions in this respect like cutting off the bride's feet and suchlike.

Here is a demo of what can be achieved with dynamic use of PHP's GD image manipulation library. (http://bokehman.com/image_crop.php)