Page 1 of 1

Simply set label colour to white

Posted: 2017-03-04T01:11:06-07:00
by hivens
Hi,

This sounds like an easy thing but stakeoverflow has failed me, so I'm hoping you will be able to help. I've got a transparent pseudo image which has a label field like this:

Code: Select all

$image->newPseudoImage(400, 300, "label:$inputdata");
This is then merged onto another pseduo layer with a gradient and then shown.

I can't work out how I am meant to set the label colour to white. I know it was fairly simple when using annotate image, but I don't know about how to do it with label. Any help would be appreciated.

Re: Simply set label colour to white

Posted: 2017-03-04T11:08:57-07:00
by snibgo
The question is often asked, and I think the answer is: in IMagick, you can't set the fill colour for "label:".

Re: Simply set label colour to white

Posted: 2017-03-04T11:12:03-07:00
by fmw42
try

Code: Select all

$image->newPseudoImage(400, 300, "canvas:white");
or

Code: Select all

$image->newPseudoImage(400, 300, "xc:white");
See http://us3.php.net/manual/en/imagick.newpseudoimage.php and http://www.imagemagick.org/script/formats.php#pseudo