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匹配顏色函數使用范例:
- < ?
- $white = imagecolorallocate
($im, 255,255,255);- $black = imagecolorallocate
($im, 0,0,0);- ?>
責任編輯:曹凱
來源:
搜狐博客