开发者

Copying a transparent image over another transparent image

开发者 https://www.devze.com 2023-02-19 15:05 出处:网络
Im trying to copy a image(a.png) on another. Both contain transparency. a.png shows up with a white background on save.

Im trying to copy a image(a.png) on another. Both contain transparency. a.png shows up with a white background on save.

$base=开发者_JS百科imagecreatefrompng("base.png");
imagealphablending( $base, false );
imagesavealpha( $base, true );
$temp=imagecreatefrompng('a.png');
imagecopymerge($base,$temp,64,144,0,0,16,16,100);


Try this:

$base=imagecreatefrompng("base.png");
imagealphablending( $base, true );
imagesavealpha( $base, true );
$temp=imagecreatefrompng('a.png');
imagecopy($base,$temp,64,144,0,0,16,16);
0

精彩评论

暂无评论...
验证码 换一张
取 消