PHP.nl

imagefill

imagefill

Flood fill

true **imagefill** GdImage $image int $x int $y int $color

Performs a flood fill starting at the given coordinate (top left is 0, 0) with the given in the . color``image

xx-coordinate of start point.

yy-coordinate of start point.

colorThe fill color. gd.identifier.color

return.true.always

Voorbeeld: example

<?php

$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);
?>

imagecolorallocate