用2坐标在PHP中裁剪图像[重复]

Possible Duplicate:
Crop image in PHP

How to crop a part of an image when i have the coordinates of the upper left corner and lower right corner? I can't use the imagecopyresampled function cause in only use the upper left corner as a staring point and the end of the rectangle is determined automatically not by the coordinates of the lower right corner . :( Can anyone help? pls

First of all here's a tutorial that was recommended to me for a similar problem. If this doesn't help, your solution will be buried away in the GD library somewhere. Here is the API for it. Hope that's of some use to you!

As Andrej correctly pointed out, imagecopyresampled() is probably the one you're looking for.