php使用GD库生成图片
$src = imagecreatefromstring(file_get_contents($prize['prize_url']));
list($src_w, $src_h) = getimagesize($prize['prize_url']);
$img=imagecreatetruecolor($src_w,$src_h);
imagecopymerge($img,$src,0,0,0,0,$src_w,$src_h,100);
$user_name_xy = explode(',', $prize['username']);
$white = ImageColorAllocate($img, $font_color[0],$font_color[1],$font_color[2]);
imagettftext($img,$prize['font_size'],0,$user_name_xy[0],$user_name_xy[1],$white,$ttf,$user_name); //写 TTF 文字到图中
header("Content-Type:images/png");
imagePng($img,'./cert/' . $date . '.png');//第二个参数是输出图片到文件夹 P大写!!