imagefill() function in PHP

The imagefill() function is used to fill the image.

Syntax

imagefill(img, x, y, color)

Parameters

  • img
    Create a blank image with imagecreatetruecolor().

  • x 
    x-coordinate of start point


  • y-coordinate of start point

  • color 
    The fill color.

Return

The imagefill() function returns TRUE on success or FALSE on failure.

Example

The following is an example:

Output

The following is the output:

Updated on: 2019-12-31T06:21:35+05:30

436 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements