How to fill png shape with gradient?

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
donjose
Posts: 1
Joined: 2014-10-21T13:48:41-07:00
Authentication code: 6789
Contact:

How to fill png shape with gradient?

Post by donjose »

To fill png with color:

Code: Select all

$im = new Imagick('image.png');
$im->setImageAlphaChannel(Imagick::ALPHACHANNEL_EXTRACT);
$im->setImageBackgroundColor('red');
$im->setImageAlphaChannel(Imagick::ALPHACHANNEL_SHAPE);
How can i fill png shape with gradient?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Contact:

Re: How to fill png shape with gradient?

Post by fmw42 »

try

colorizeImage()
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Contact:

Re: How to fill png shape with gradient?

Post by fmw42 »

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests