Menu
I have a watermark png with transparency and I’m trying to write it into a photo. But when I do it it doesn’t use the transparency in the png at all, and the watermark is overlayed in a solid white square. How do I make it respect the alpha of watermark.png?
[code=php]
$w = imagecreatefrompng(“watermark.png”);
$photo = imagecreatefrompng(“photo.png”);
imagealphablending($w, true);
imagealphablending($photo, true);
imagecopy($photo, $w, 0, 0, 0, 0, 50, 50);
imagepng($photo, $path);