Standardizing random image sizes by padding with PHP
ImageMagick or GD, doesn't matter, as long as it's in PHP.
I am extracting several images from a website. I need every image to be padded to fit 280x210. Padding color should be #CCCCCC or RGB equivalent.
What I need:
A function that checks an image for its size, then pads the image to fit 280x210 with the image CENTERED and PADDED with the above specified color. Please do not hard code 280x210, but make them the defaults for this function. The function should return the image.