imagecreatetruecolor()返回一个图像标识符代表指定大小的黑色形象。
根据你的php教程和gd版本中函数定义与否。对于php 4.0.6通过4.1.x这个函数总是存在的
,
*/
$im=imagecreatetruecolor(100,100); //创建图像
$string='n'; //定义字符
$white=imagecolorallocate($im,255,255,255); //定义白色
$black=imagecolorallocate($im,0,0,0); //定义黑色
$red=imagecolorallocate($im,255,0,0); //定义红色
//在白色的背景上输出一个黑色的"z",其实是颠倒的n
imagecharup($im,6,20,20,$string,$white);
imagechar($im,2,40,40,"r",$red); //使用红色画出字符
header('content-type: image/png'); //输出头部信息
imagepng($im); //输出png文件
imagedestroy($im); //销毁图像
//
$img=imagecreatetruecolor(400,400); //创建图像
$white=imagecolorallocate($img,255,255,255); //定义白色
$black=imagecolorallocate($img,0,0,0); //定义黑色
imagearc($img,200,200,350,350,0,360,$white); //画椭圆弧
header("content-type: image/png"); //输出头信息
imagepng($img); //输出为png图像
imagedestroy($img); //销毁图像
//
$size=300;
$image=imagecreatetruecolor($size,$size);
//用白色背景加黑色边框画个方框
$back=imagecolorallocate($image,255,255,255);
$border=imagecolorallocate($image,0,0,0);
imagefilledrectangle($image,0,0,$size-1,$size-1,$back);
imagerectangle($image,0,0,$size-1,$size-1,$border);
$yellow_x=100;
$yellow_y=75;
$red_x=120;
$red_y=165;
$blue_x=187;
$blue_y=125;
$radius=150;
//用alpha值分配一些颜色
$yellow=imagecolorallocatealpha($image,255,255,0,75);
$red=imagecolorallocatealpha($image,255,0,0,75);
$blue=imagecolorallocatealpha($image,0,0,255,75);
//画三个交迭的圆
imagefilledellips教程e($image,$yellow_x,$yellow_y,$radius,$radius,$yellow);
imagefilledellipse($image,$red_x,$red_y,$radius,$radius,$red);
imagefilledellipse($image,$blue_x,$blue_y,$radius,$radius,$blue);
//输出header文件头
header('content-type: image/png');
//最后输出结果
imagepng($image);
imagedestroy($image);
//
$im=imagecreate(100,100); //创建图像
$string='php'; //定义字符串
$bg=imagecolorallocate($im,255,255,255); //定义白色
$black=imagecolorallocate($im,0,0,0); //定义黑色
//在左上角输出指定字符
imagechar($im,1,0,0,$string,$black);
header('content-type: image/png'); //输出头部信息
imagepng($im); //输出png文件
imagedestroy($im); //销毁图像
?>
荒野乱斗国际版 (BrawlStars)最新版本v56.274
下载一波超人内置修改器菜单版 安卓版v1.0.2
下载敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载继承了一座戏园子无限声望铜钱版 内置菜单最新版v1.7
继承了一座戏园子折相思版是游戏的破解版本,在该版本中为玩家提
山河半世橙光清软金手指版 无限鲜花v3.24
山河半世是一款超级好玩的橙光恋爱游戏,在游戏中玩家们需要扮演
蓬莱手游折相思版 安卓版v1.0.0
蓬莱免广告版是游戏的修改版本,在该版本中为玩家去除了广告,玩
当红影后橙光游戏破解版2025 最新版v1.0
当红影后橙光破解版是一款超级好玩的娱乐圈题材的橙光游戏,在这
忽然成了万人迷清软完结版 无限鲜花版v12.15
忽然成了万人迷破解版是一款非常好玩的男性向橙光游戏,在有一天