Feather / halo effect

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
justbluemail

Feather / halo effect

Post by justbluemail »

Here is what I can do and what I want:
http://www.uploadhouse.com/viewfile.php?id=362485
Image

Here is the code I'm using.

Code: Select all

<?php
$sourceWand = NewMagickWand();
$compositeWand = NewMagickWand();
$back = NewMagickWand();

MagickReadImage( $compositeWand, 'test2.png' );
MagickReadImage( $sourceWand, 'castlecut.jpg' );
MagickReadImage( $back, 'back.jpg' );


MagickCompositeImage($sourceWand, $compositeWand, MW_SrcAtopCompositeOp,0,0);

MagickPaintTransparentImage($sourceWand, NewPixelWand( 'black' ));

MagickCompositeImage($back, $sourceWand, MW_SrcAtopCompositeOp,0,0);


header( 'Content-Type: image/gif' );
MagickEchoImageBlob( $back );
MagickWriteImage( $back, 'new_image2.jpg' );

?>
Need help and suggestions for the expected result.
Thanks.
justbluemail

Re: Feather / halo effect

Post by justbluemail »

Now I can get this Image.

I just added this : MagickBlurImage($sourceWand,0, 30, MW_OpacityChannel);

Code: Select all

...
MagickPaintTransparentImage($sourceWand, NewPixelWand( 'black' ),100,40);

MagickBlurImage($sourceWand,0, 30, MW_OpacityChannel);

MagickCompositeImage($back, $sourceWand, MW_SrcAtopCompositeOp,0,0);
...
But I can't still do what I want. I don't understand the black halo around the image.
Post Reply