imagecolorset

(PHP 4, PHP 5, PHP 7, PHP 8)

imagecolorset給指定調色板索引設定顏色

說明

imagecolorset(
    resource $image,
    int $index,
    int $red,
    int $green,
    int $blue
): void

本函數(shù)將調色板中指定的索引設定為指定的顏色。對于在調色板圖像中創(chuàng)建類似區(qū)域填充(flood-fill)的效果很有用,免去了真的去填充的開銷。

參見 imagecolorat()。