matte equivalent in PHP MagickWand

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
apeman

matte equivalent in PHP MagickWand

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: matte equivalent in PHP MagickWand

Post 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.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: matte equivalent in PHP MagickWand

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: matte equivalent in PHP MagickWand

Post by magick »

Problem fixed. Thanks.
apeman

Re: matte equivalent in PHP MagickWand

Post 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
Post Reply