How can I take a 500×500 (or any sized) image that has been uploaded to the server and generate a new image from defined specific x,y coordinates? For example (0,0) to (50,0); (0,50) to (50,50). Rather than resizing an image down to 50x50px, I want to grab the top left part of an image and in a sense “crop” it to use as a thumbnail.
How can I go about doing this in PHP?
You want to use imagecopy. First create an image with the dimensions you want and then use imagecopy to a portion of the source image into the new image: