ImageColorAllocate

ImageColorAllocate -- 画像上の色の生成

説明

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

ImageColorAllocate は、RGBで配色を表す画像 ID を返します。 引き数 im はimagecreate関数から返されます。 ImageColorAllocate は、im で表される画像上で使用される 各々の色を作成する際にコールする必要があります。


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