In Progress

PHP image class modification

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 [url removed, login to view] was transformed into [url removed, login to view] using code similar to this:

$imgTrans = new imageTransform();

$imgTrans->sourceFile = "original_pic.jpg";

$imgTrans->targetFile = "resized_pic.jpg";

$imgTrans->resizeToWidth = 108;


// 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 [url removed, login to view], only with a white background on the top and bottom parts instead of black.

Skills: PHP

See more: imgtrans sourcefile, php picture modification, resize image background, parts now, background imageresizephp, create pefect crop php, free image modification, image modification php, php images modification, imageresize php white background, picture resize 108x108, php image modification, php uses image modification, perfect way, image resize, image crop, image background

About the Employer:
( 5 reviews ) Walnut Creek, United States

Project ID: #249245

Awarded to:


hello, please check the PM

$40 USD in 0 days
(196 Reviews)