You need to look at imagecopyresampled(). You can pass the coordinates into the image to resize. See here for an example: http://stackoverflow.com/questions/1855996/crop-image-in-php
Xara Designer Pro X enables you to edit an image from all corners,you can check out on it. Good luck!