(PHP 3, PHP 4) 指定した画像パレットの色数を返します。 imagecolorat() および imagecolorsforindex() も参考にしてください。