Setting transparent overlay on solid color

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hivens
Posts: 8
Joined: 2017-02-24T03:49:36-07:00
Authentication code: 1151

Setting transparent overlay on solid color

Post by hivens »

Hi,

Just a quick one. I was just wondering, but in order to lay a transparent gradient on a solid color does this need to be done in two separate images, and then combined via composite image?

This is what I was trying to do, something like this but haven't had any luck, so just wondering if it must be done as two separate images and combined instead?

Code: Select all

	$gradient->setBackgroundColor(new ImagickPixel('#3a7bd5')); 
	$gradient->newPseudoImage(100, 100, 'gradient:transparent-#3a6073');
Thank you.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Setting transparent overlay on solid color

Post by snibgo »

hivens wrote:... so just wondering if it must be done as two separate images and combined instead?
Yes.
snibgo's IM pages: im.snibgo.com
Post Reply