Page 1 of 1

matte equivalent in PHP MagickWand

Posted: 2007-11-05T20:06:57-07:00
by apeman
I am attempting to do this example with PHP MagickWand:

The example has the header: Image to Background Difference
http://www.imagemagick.org/Usage/channels/#mask_bgnd

I am able to create a mask, but when I try to translate the following nothing happens:

convert cyclops.png boolean_mask.png \
+matte -compose CopyOpacity -composite \
cyclops_boolean.png


PHP:
$image is the "cyclops.png"

MagickCompositeImage($image, $mask, MW_CopyOpacityCompositeOp,0,0);


I tried reading a previous post, it was solved, but the solution was not posted :(
viewtopic.php?f=10&t=8153&p=24978&hilit ... and#p24978

I think I am having problems because I haven't set the matte, but I don't know how to do this in PHP. Any help or discussion is greatly appreciated.

-apeman

Re: matte equivalent in PHP MagickWand

Posted: 2007-11-05T21:11:13-07:00
by magick
We have a new method MagickSetImageAlpha() in MagickWand For PHP, version 1.0.6, available this weekend. Use it to activate, deactivate, set, or reset the alpha (matte) channel.

Re: matte equivalent in PHP MagickWand

Posted: 2007-11-06T08:14:30-07:00
by el_supremo
@Magick:

The recently added MagickWand function MagickSetImageAlphachannel uses a lower case "c" for "channel" whereas all the other functions I'm aware of use "Channel".
Was this intentional?

Pete

Re: matte equivalent in PHP MagickWand

Posted: 2007-11-06T08:22:52-07:00
by magick
Problem fixed. Thanks.

Re: matte equivalent in PHP MagickWand

Posted: 2007-11-06T22:00:06-07:00
by apeman
magick wrote:We have a new method MagickSetImageAlpha() in MagickWand For PHP, version 1.0.6, available this weekend. Use it to activate, deactivate, set, or reset the alpha (matte) channel.
Thanks, looking forward to it :D

-apeman