I need a script that takes cropped image coordinates and dimensions from javascript cropper and crops the image. I know about the copyimage function, and have tried unsuccessfully to implement it. If anyone has tutorial that lays out how to use it or has a script that crop and saves the image to the server, it would be very helpful.

I have already looked at the GD library and functions from it are in my script, but I can't figure out how to get any of it to work.