0
点赞
收藏
分享

微信扫一扫

php画心


php画心_背景颜色

//创建画布
$image=imagecreatetruecolor(500,500);
//背景颜色
$bgcolor=imagecolorallocate($image,255,255,255);
//创建颜色
imagefill($image,0,0,$bgcolor);
$red = imagecolorallocate($image, 255,0,0);//红色 用于绘制椭圆
imagefilledarc($image, 50, 50, 50, 50, 0, 360, $red, IMG_ARC_PIE);
imagefilledarc($image, 80, 50, 50, 50, 0, 360, $red, IMG_ARC_PIE);
imagefilledarc($image, 70, 100, 90, 90, 220, 310, $red, IMG_ARC_PIE);

//输出格式
header('content-type:image.png');
imagepng($image);

//销毁图片
imagedestroy($image);


举报

相关推荐

0 条评论