imagefill

(PHP 3, PHP 4, PHP 5)

imagefill - Заливка

Описание

bool imagefill ( resource image, int x, int y, int color )

imagefill() performs a flood fill starting at coordinate x, y (top left is 0, 0) with color color in the image image.

Пример 1. imagefill() example
$im = imagecreatetruecolor(100, 100);

// sets background to red
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);

header('Content-type: image/png'); 
imagepng($im);
imagedestroy($im);

Результат выполнения:

Смотрите также imagecolorallocate(), примеры работы с изображениями на PHP.

Все функции изображение
Все функции gd
Описание на ru2.php.net
Описание на php.ru