Completed

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;

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

Skills: PHP

See more: php image class, imgtrans sourcefile, best php image class, class modification image php, php crop image black canvas, php picture modification, resize image background, parts now, php image class resize square, background imageresizephp, class crop images php, php crop class, imgtrans sourcefile http, php crop white instead black, create pefect crop php, php operating_system imageclassphp, free image modification, image modification php, image resize php class, php image resize imagephp crop white, use crop image class, php images modification, php resize image perfect square, php class image resize canvas, image class php free

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

Project ID: #249245

Awarded to:

drailean

hello, please check the PM

$40 USD in 0 days
(196 Reviews)
6.6