<?php
====================
PHP--GD库
====================
一、支持:需要php支持gd库
二、绘画步骤:
1. 创建一个画布(画板)、画笔、色彩。
2. *开始绘画
3. 输出图像(复制型)
4. 销毁图像资源(释放内存)
示例:
<?php
//1.创建一个画布,颜色
$im = imagecreate(200,200);
$red = imagecolorallocate($im,255,0,0); //创建一个颜色:红色
$blue = imagecolorallocate($im,0,0,255); //创建一个颜色:蓝色
$c1 = imagecolorallocate($im,200,200,200);
//2.开始绘画
imagefill($im,0,0,$c1); //填充背景
//....
//3.输出图像
header(
====================
PHP--GD库
====================
一、支持:需要php支持gd库
二、绘画步骤:
1. 创建一个画布(画板)、画笔、色彩。
2. *开始绘画
3. 输出图像(复制型)
4. 销毁图像资源(释放内存)
示例:
<?php
//1.创建一个画布,颜色
$im = imagecreate(200,200);
$red = imagecolorallocate($im,255,0,0); //创建一个颜色:红色
$blue = imagecolorallocate($im,0,0,255); //创建一个颜色:蓝色
$c1 = imagecolorallocate($im,200,200,200);
//2.开始绘画
imagefill($im,0,0,$c1); //填充背景
//....
//3.输出图像
header(