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);