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);
?>