ImageColorAllocate
(PHP3 , PHP4)
ImageColorAllocate --- 分配图形的颜色
语法 :
int imagecolorallocate
(int im, int red, int green, int blue)说明 :
ImageColorAllocate( )传回一个颜色的 identifier,表示颜色是由给予的RGB成份所组成的,参数 im是由imagecreate( )传回的,要用在图形 im中的颜色,必须呼叫ImageColorAllocate( )来建立各种颜色。
Example :
<?php
$white = ImageColorAllocate ($im, 255, 255, 255);
$black = ImageColorAllocate ($im, 0, 0, 0);
?>