I'm using MagickWand 1.0.6 as a php extension on FreeBSD with a PHP version of 5.2.4. My ImageMagic version is 6.3.6
As stated in the topic MagickSetImageOpacity is undefined in my context. Any other MW functions I've tried work as expected. If this function does indeed exist, what is the proper way to call it?
If not, how can I accomplish a simple 'layer opacity' composition between two images. I have two images to compose on top of each other. The bottom layer will always be opaque and the top layer may or may not have an existing alpha mask.
Thank you,
Dave
MagickSetImageOpacity is an undefined function
Re: MagickSetImageOpacity is an undefined function
My followup question, To me it seems MagickCompositeImage should have an 'argument' variable. Why doesn't it, or how can I set one? I basically want to accomplish the example here: http://www.imagemagick.org/Usage/compose/#dissolve
Re: MagickSetImageOpacity is an undefined function
I answered my first problem. I had to add the following code...
right before
in magickwand.c
I recompiled MagickWand and it seems to work now. I'm still interested in my followup question about the 'missing' argument value.
Thanks,
Dave
Code: Select all
ZEND_FE( magicksetimageopacity, NULL )
Code: Select all
ZEND_FE( magicksetimageoption, NULL )
I recompiled MagickWand and it seems to work now. I'm still interested in my followup question about the 'missing' argument value.
Thanks,
Dave
Re: MagickSetImageOpacity is an undefined function
When there's a will, there's a way. I've discovered that I can set the opacity of my top layer image with the following syntax:
Code: Select all
MagickEvaluateImage($wnd, MW_DivideEvaluateOperator, (100/$alpha), MW_AlphaChannel);