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
matte equivalent in PHP MagickWand
Re: matte equivalent in PHP MagickWand
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.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: matte equivalent in PHP MagickWand
@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
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
Problem fixed. Thanks.
Re: matte equivalent in PHP MagickWand
Thanks, looking forward to itmagick 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.
-apeman