How to flood fill the frame with a pattern image using imagick php class?

426 Views Asked by At

I want to flood fill the frame with tiled image instead of color. Currently im using this codes

$imagick = new \Imagick('image.jpg');
$imagick->scaleImage(300, 300, false);

// Create frame placeholder
$imagick->frameimage( 'red','30','30', 30, 0);

// Flood fill with color
$imagick->floodFillPaintImage('green', 10, '#6e0000',0, 0,false
);

header("Content-Type: image/jpg");
echo $imagick->getImageBlob();

and the result:

enter image description here

but i want a result like this

enter image description here

Thank you very much!

0

There are 0 best solutions below