Page 1 of 1

MagickSetImageOpacity is an undefined function

Posted: 2008-02-05T12:57:16-07:00
by mrBlaQ
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

Re: MagickSetImageOpacity is an undefined function

Posted: 2008-02-05T13:08:20-07:00
by mrBlaQ
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

Posted: 2008-02-05T13:25:07-07:00
by mrBlaQ
I answered my first problem. I had to add the following code...

Code: Select all

ZEND_FE( magicksetimageopacity, NULL )
right before

Code: Select all

ZEND_FE( magicksetimageoption, NULL )
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

Re: MagickSetImageOpacity is an undefined function

Posted: 2008-02-05T14:43:55-07:00
by mrBlaQ
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);