Я пытаюсь создать прозрачное png-изображение и слой для разных png и jpg, чтобы создать окончательный png с прозрачностью. У меня возникли проблемы с созданием моего первоначального пустого прозрачного png. В настоящее время он имеет белый фон.
Может ли кто-нибудь указать мне в правильном направлении. Это мой код до сих пор...
$image = imagecreatetruecolor(485, 500);
imagealphablending($image, false);
imagesavealpha($image, true);
$col=imagecolorallocatealpha($image,255,255,255,127);
imagefill($image, 0, 0, $col);
//imagefilledrectangle($image,0,0,485, 500,$col);
/* add door glass */
$img_doorGlass = imagecreatefrompng("glass/$doorStyle/$doorGlass.png");
imagecopyresampled($image, $img_doorGlass, 106, 15, 0, 0, 185, 450, 185, 450);
/* add door */
$img_doorStyle = imagecreatefrompng("door/$doorStyle/$doorStyle"."_"."$doorColor.png");
imagecopyresampled($image, $img_doorStyle, 106, 15, 0, 0, 185, 450, 185, 450);
$fn = md5(microtime()."door_builder").".png";
if(imagepng($image, "user_doors/$fn", 1)){
echo "user_doors/$fn";
}
imagedestroy($image);