This is the code i am trying to use with the following image
Code: Select all
using( MagickImage image = new MagickImage( "d:\\mainimage.jpg" ) )
using( var savedShadowImageStream = new FileStream( "d:\\shadow-imagemagik.jpg", FileMode.Create ) )
{
image.Strip();
image.Quality = 100;
image.Resize( 2000, 0 );
MagickImage shadow = image.Clone();
shadow.Quality = 100;
// shadow( x, y, sigma, alpha, colour )
// basically i dont get any sort of blurred shadow
// x and y dont seem to do anything at all
// sigma seems to be shadow size and not the amount of blur
// alpha doesnt seem to do anything either
shadow.Shadow( 10, 10, 0.5, new Percentage( 80 ), MagickColor.FromRgb( 127, 127, 127 ) ); // this makes the shadow size tiny
// shadow.Shadow( 10, 10, 20, new Percentage( 80 ), MagickColor.FromRgb( 127, 127, 127 ) ); // this makes the shadow size bigger, but why its supposed to be the blur size
shadow.Composite( image, CompositeOperator.Replace );
shadow.Write( savedShadowImageStream, MagickFormat.Jpeg );
}
When what i want is:
Can anyone help please; i have spent all day on this and am not really any further forward.