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); //销毁图像
?>
茶杯头甜蜜终章dlc 官方手机版v1.0.0.3
下载火柴人传说暗影格斗内置菜单 最新版v3.0.1
下载荒野乱斗测试服 安卓版v61.10.3
下载荒野乱斗彩虹服 安卓版v61.10.3
下载寒霜启示录 安卓版v1.25.10
寒霜启示录是一款生存模拟游戏,不少玩家可能对于末日都有着自己
末日城堡免广告版 安卓最新版v0.7.1
末日城堡免广告版是一款非常好玩的模拟经营类游戏,内部可以不看
甜蜜人生模拟器 最新版v1.4.5
甜蜜人生模拟器是一款非常好玩的模拟恋爱手游,玩家在这里能够对
武器锻造师内置功能菜单 v10.4
武器锻造师内置菜单版是游戏的破解版本,在该版本中为玩家提供了
开放空间overfield 安卓版v1.0.5
开放空间Overfield是一款箱庭养成经营手游,让你在广阔