Crops and resizes an image.