(PHP 3, PHP 4 >= 4.0.0)
int imagecolorallocate (int im, int red, int green, int blue)
int imagecolorallocate
ImageColorAllocate()は、指定したRGB を配色とする色の色IDを返します。 引数imはimagecreate()関数から 返されたものです。 ImageColorAllocate()はimで表される 画像上で使用される各々の色を作成する際にコールする必要があります。
$white = ImageColorAllocate ($im, 255, 255, 255); $black = ImageColorAllocate ($im, 0, 0, 0);