how to turn transparent png image to white background jpg?
everytime i create a jpg from png seem the background is black 1.

$thumbnail = @imagecreatetruecolor ($size, size);
imagealphablending($thumbnail, true);
imagesavealpha($thumbnail, true);
$trans_color = imagecolorallocatealpha($thumbnail, 0, 0, 0, 127);
$red = imagecolorallocate($thumbnail, 255, 0, 0);
imagefill($thumbnail, 0, 0, $trans_color);
imagejpeg($thumbnail, $thumbnail_file);

problem solved.
please kindly close the thread.
thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.