imagecolorexact

(PHP 3, PHP 4, PHP 5)

imagecolorexact -- 取得指定彩色的索引值

說明

int imagecolorexact ( resource image, int red, int green, int blue )

返回圖像調色板中指定彩色的索引值。

若果彩色不在圖像的調色板中,返回 -1。

若果從檔案建立了圖像,只有圖像中使用了的彩色會被辨析。僅出現在調色板中的彩色不會被辨析。

參見 imagecolorclosest()