I recently wrote a thumbnail cropping script. It'll take an image, scale it down to an on-screen size, then allow you to move a box around and select an area to crop down to a 100x100 thumbnail. the crop box is scaleable and movement and scale increments can be changed.
It uses only PHP and GD. While the interface could be more easily handled with Javascript, I wanted to see if it could be done with strictly PHP.
Essentially GD just overlays a transparent gif containing a green box. The dimensions and location of that box are then passed on to GD for the final image to be cropped.
It creates a new directory to toss temporary images into, which gets cleaned out and deleted at the end. There are never more than 3 temporary overlay images in the directory at the time.
Here is a test, if you'd like to try it (the id number can be changed from 1-17):
http://www.zangofonts.com/zang/test/thumbeditor.php?thumbeditor=yes&id=14
Note: To see the results, click on "Save"
It uses only PHP and GD. While the interface could be more easily handled with Javascript, I wanted to see if it could be done with strictly PHP.
Essentially GD just overlays a transparent gif containing a green box. The dimensions and location of that box are then passed on to GD for the final image to be cropped.
It creates a new directory to toss temporary images into, which gets cleaned out and deleted at the end. There are never more than 3 temporary overlay images in the directory at the time.
Here is a test, if you'd like to try it (the id number can be changed from 1-17):
http://www.zangofonts.com/zang/test/thumbeditor.php?thumbeditor=yes&id=14
Note: To see the results, click on "Save"
