I'm using the attached PHP class to resize images. One problem I'm having is that when I use the crop() function in such a way that the canvas expands/gets bigger, the new canvas has a black background. I need the class modified so that the new canvas background is always white when accessing the crop() function.
To see an example -- attached [login to view URL] was transformed into [login to view URL] using code similar to this:
$imgTrans = new imageTransform();
$imgTrans->sourceFile = "original_pic.jpg";
$imgTrans->targetFile = "resized_pic.jpg";
$imgTrans->resizeToWidth = 108;
$imgTrans->resize();
// Should now have width of 108 and height of 35
// Now make the graphic a perfect square (108x108)
$imgTrans->sourceFile = "resized_pic.jpg";
$imgTrans->targetFile = "resized_pic.jpg";
$imgTrans->crop(0, -36, 108, 72);
So basically I want the class to produce exactly what is shown in [login to view URL], only with a white background on the top and bottom parts instead of black.