1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-29 00:29:55 +02:00

FIX PNGs are now transparent when created from clones

This commit is contained in:
Daniel Hensby
2017-09-11 17:43:50 +01:00
parent 4581c28cdc
commit d0c1415846

View File

@@ -76,6 +76,8 @@ class Driver extends \Intervention\Image\AbstractDriver
$clone = imagecreatetruecolor($width, $height);
imagealphablending($clone, false);
imagesavealpha($clone, true);
$transparency = imagecolorallocatealpha($clone, 0, 0, 0, 127);
imagefill($clone, 0, 0, $transparency);
imagecopy($clone, $core, 0, 0, 0, 0, $width, $height);