header("Content-type:image/jpg");              //header头(固定的)
$i=imagecreate(100,100);                           //创建画布
$color=imagecolorallocate($i,255,23,140);      //添加背景颜色

$text=imegecolorallocate($img,255,0,0);          //文字背景色

imagettftext(image, size, angle, x, y, color, fontfile, text)     //  添加中文文字   (图片,大小,倾斜角度,x轴,y轴,颜色,字体,文字内容)

imagestring(image, font, x, y, string, color)                     //添加英文文字  (图片,字体大小,x轴,y轴,内容,颜色)

imageline(image, x1, y1, x2, y2, color)                         //添加直线(图片,起始点,结束点,颜色)
imagegif($i);                     //输出

 

posted on 2017-12-22 11:07  PHP`reader  阅读(96)  评论(0编辑  收藏  举报