PHP class for cropping and resizing images