PHP匹配颜色函数的使用技巧

开发 后端
PHP匹配颜色函数的语法为 int imagecolorallocate(int im, int red, int green, int blue);可以为我们用来匹配图形的颜色。

PHP匹配颜色函数为imagecolorallocate,许多PHP程序员们在处理图形的时候,经常会用到这一函数。下面我们就为大家具体介绍这一函数的相关用法。#t#

定义

匹配颜色。

语法:

int imagecolorallocate(int im, int red, int green, int blue);

返回值:

整数

函数种类:

图形处理

PHP匹配颜色函数内容说明:

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

PHP匹配颜色函数使用范例:

  1. < ?  
  2. $white = imagecolorallocate
    ($im, 255,255,255);  
  3. $black = imagecolorallocate
    ($im, 0,0,0);  
  4. ?> 
责任编辑:曹凯 来源: 搜狐博客
相关推荐

2009-11-30 09:21:39

PHP函数rmdir(

2009-12-01 10:50:45

PHP函数requir

2009-11-27 09:30:58

PHP函数mb_str

2009-12-07 10:54:46

PHP uploade

2009-12-07 14:29:08

PHP array_w

2009-12-08 13:07:57

PHP函数mt_sra

2009-12-01 14:26:19

PHP函数ob_sta

2009-12-02 13:53:12

PHP使用技巧

2009-12-04 10:19:11

PHP hack

2009-12-11 14:16:13

PHP获取字段长度

2009-12-08 14:00:11

PHP函数microt

2009-12-11 10:59:48

PHP函数extrac

2009-11-30 15:10:46

PHP substr函

2009-12-08 09:51:10

PHP intval函

2009-11-25 17:28:26

PHP对话

2009-11-23 18:47:51

PHP中用header

2009-12-01 19:23:22

PHP缓存技术

2009-12-10 17:09:42

PHP编码转换函数

2009-12-10 11:02:44

PHP函数eval()

2010-09-02 15:45:18

PHP函数echo
点赞
收藏

51CTO技术栈公众号