Latest web development tutorials

PHP imagecolorexact – 取得指定顏色的索引值

PHP 圖像處理 PHP圖像處理

imagecolorexact — 取得指定顏色的索引值。

語法

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

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

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

如果從文件創建了圖像,只有圖像中使用了的顏色會被辨析。 僅出現在調色板中的顏色不會被辨析。

相關文章

PHP 圖像處理 PHP圖像處理