imagefill

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Flood fill
imagefill(¬†¬†¬†¬†GdImage $image,¬†¬†¬†¬†int $x,¬†¬†¬†¬†int $y,¬†¬†¬†¬†int $color): bool
            imagecopy($base$resource0000$width$height);




            
imagefill($resource$x$y$filling);




            
imagecopy($base$resource0000$width$height);
        }




        
imagefill($resource00$matte);




        
imagecolortransparent($resource$matte);
        if ($transIndex != -1) {

            
$rgba imagecolorsforindex($modified$transIndex);

            
$transColor imagecolorallocatealpha($modified$rgba['red'], $rgba['green'], $rgba['blue'], 127);

            
imagefill($modified00$transColor);

            
imagecolortransparent($modified$transColor);

        } else {

            
imagealphablending($modifiedfalse);
        $background = new Color($background);

        
imagefill($image->getCore(), 00$background->getInt());



        return 
$image;

    }
        imagealphablending($clonefalse);

        
imagesavealpha($clonetrue);

        
$transparency imagecolorallocatealpha($clone000127);

        
imagefill($clone00$transparency);

        

        
imagecopy($clone$core0000$width$height);