$background_color = imagecolorallocate( $dst_img, 255, 255, 255 ); // white background for images with transparency
ImageFilledRectangle($dst_img, 0, 0, $destWidth, $destHeight, $background_color);
if (function_exists('imagealphablending')) {
imagealphablending($dst_img, false);
imagesavealpha($dst_img, true);
} else {
$background_color = imagecolorallocate( $dst_img, 255, 255, 255 ); // white background for images with transparency
ImageFilledRectangle($dst_img, 0, 0, $destWidth, $destHeight, $background_color);
}
Please Log in to join the conversation.