通过php向图片中加入文字
php备忘
<?php
header("content-type:image/png");
$img=ImageCreate(200,200);
$bgcolor=ImageColorAllocate($img,255,255,255);
$red=ImageColorAllocate($img,0,0,0);
$font="simhei.ttf";
$str = "见证人:某某某";
$date = "日期:2016年03月09日";
imagettftext($img,10,0,80,150,$red,$font,$str);
imagettftext($img,10,0,80,180,$red,$font,$date);
$logo = imagecreatefrompng('logo.png');
$size = getimagesize('logo.png');
imagecopy($img,$logo,0,0,0,0,$size[0],$size[1]);
ImagePng($img);
ImageDestroy($img);
?>