Jump to content

Help with imagefill


emma57573

Recommended Posts

When I perform the below crop if the image is smaller than the crop the background is filled with black.

Ive used imagefill to create a white background as I need a white background.

 

HOWEVER it works great until the image I am I am cropping has a black fill whithin it and then the image gets filled as well as the background! Which is not the desired effect. I just want the background fill to be white.

 

Im a bit stumped.....any ideas?

 


imagecopyresampled($dest_image, $source_image, 0, 0, $left, $top, $dest_width, $dest_height, max($width, $max_width), max($height, $max_height));





$white = imagecolorallocate($dest_image,255,255,255);

imagefill($dest_image,0,0,$white);


Link to comment
https://forums.phpfreaks.com/topic/147313-help-with-imagefill/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.