列表内容imagecreatetruecolor( w, h) 新建一个真彩色图像
imagecreate( x, y) 新建一个基于调色板的图像
imagecolorallocate( im, red, green, blue) 为一幅图像分配颜色(背景色)
imagestring( im, font, x, y, str, color) 水平地画一行字符串
imagepng( im[, filename]) 以 PNG 格式将图像输出到浏览器或文件
<?php
header("Contetn-type:image/png");
$im = @imagecreate(100,50) or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>