Google
搜索www.dodoakn 搜索DoDoKan

函数:ImageColorClosest()

ImageColorClosest
计算色表中与指定颜色最接近者。
语法: int imagecolorclosest(int im, int red, int green, int blue);
返回值: 整数
函数种类: 图形处理

内容说明

本函数用来计算调色盘中与指定 RGB 颜色最接近的颜色。参数 red、green、blue 分别为红、绿、蓝三原色,也就是所谓的 RGB 值。

参考

ImageColorExact()  

函数:ImageColorAt()

ImageColorAt
取得图中指定点颜色的索引值。
语法: int imagecolorat(int im, int x, int y);
返回值: 整数
函数种类: 图形处理

内容说明

本函数可取得图形中某指定点的颜色索引值 (index)。

参考

ImageColorSet()  ImageColorsForIndex()  

函数:ImageColorAllocate()

ImageColorAllocate
匹配颜色。
语法: int imagecolorallocate(int im, int red, int green, int blue);
返回值: 整数
函数种类: 图形处理

内容说明

本函数用来匹配图形的颜色,供其它绘图函数使用。参数 im 表示图形的 handle。参数 red、green、blue 是色彩三原色,其值从 0 至 255。

使用范例

<?
$white = ImageColorAllocate($im, 255,255,255);
$black = ImageColorAllocate($im, 0,0,0);
?>

函数:ImageCharUp()

ImageCharUp
写出直式字符。
语法: int imagecharup(int im, int font, int x, int y, string c, int col);
返回值: 整数
函数种类: 图形处理

内容说明

本函数用来书写直式的字符。原点坐标 (0,0) 为图片的左上角,参数 font 表示字体的大小,从最小的 1 起,参数 x、y 是写入字符的坐标值,参数 c 为欲写出的字符,参数 col 为字的颜色。参数 im 表示图形的 handle。

参考

ImageLoadFont()  

函数:ImageChar()

ImageChar
写出横向字符。
语法: int imagechar(int im, int font, int x, int y, string c, int col);
返回值: 整数
函数种类: 图形处理

内容说明

本函数用来书写横向的字符。原点坐标 (0,0) 为图片的左上角,参数 font 表示字体的大小,从最小的 1 起,参数 x、y 是写入字符的坐标值,参数 c 为欲写出的字符,参数 col 为字的颜色。参数 im 表示图形的 handle。

参考

ImageLoadFont()