我的网站

         
当前位置: 主页 > 我的网站5 >

【GD函数分享】PHP函数imagelayereffect分享(2021-9-1)

时间:2024-10-20 18:40 来源:网络整理 转载:我的网站
【GD函数分享】PHP函数imagelayereffect 分享(2021-9-1)

每日分享PHP知识点,大家都赞同关注是一种动力,分享是一种美德,再说了关注分享一下又不会怀孕?只要你开心就好......

imagelayereffect??设定 alpha 混色标志以使用绑定的 libgd 分层效果? ?。

bool imagelayereffect(resource$image,int$effect)

设定 alpha 混色标志以使用绑定的 libgd 分层效果。

参数

image

由图象创建函数(例如imagecreatetruecolor())返回的图象资源。

effect

One of the following constants:

返回值:

成功后返回图象资源,失败后返回。

案例:

// Setup an image

$im=imagecreatetruecolor(100,100);

// Set a background

imagefilledrectangle($im,,,100,100,imagecolorallocate($im,220,220,220));

// Apply the overlay alpha blending flag

imagelayereffect($im,IMG_EFFECT_OVERLAY);

// Draw two grey ellipses

imagefilledellipse($im,50,50,40,40,imagecolorallocate($im,100,255,100));

imagefilledellipse($im,50,50,50,80,imagecolorallocate($im,100,100,255));

imagefilledellipse($im,50,50,80,50,imagecolorallocate($im,255,100,100));

// Output

header('Content-type: image/png');

imagepng($im);

imagedestroy($im);

?>

关注是一种动力分享是一种美德关注分享一下又不会怀孕!