//send image
header("Content-type: image/jpeg");
imagejpeg($image);
//free memory associated with image
imagedestroy($image);
?>
boolean imagefill(integer image, integer x, integer y, integer
color)
The imagefill function performs a flood fill at the given point with the given color. The
color argument must be as returned by imagecolorallocate. Starting at the given
point, pixels are changed to the specified color. The coloring spreads out, continuing until
a color different from the one at the specified point is encountered. See the description of
imagearc for an example of use. See imagefilltoborder for an alternative.
boolean imagefilledpolygon(integer image, array points,
integer number, integer color)
The imagefilledpolygon function creates a polygon with its inside filled with the
specified color. The points argument is an array of x and y values for each point: Each
point uses two array elements. The number argument reports how many points to use
from the array.
Figure 12-4. imagefilledpolygon.