I'm trying to apply round mask to pictures. The code for creating mask is below:
Where and what did I wrong? Thank you.
private static MagickImage CreateMask(int diameter)
{
var mask = new MagickImage(MagickColor.Transparent, diameter, diameter);
mask.FillColor = new MagickColor(Color.Black);
mask.Draw(new DrawableCircle(diameter / 2.0, diameter / 2.0, diameter / 2.0, 0));
//mask.Blur(0, 1);
mask.Negate();
mask.Alpha(AlphaOption.Deactivate);
return mask;
}
This code creates perfect mask. But it is, ehrm, edgy. I'd like to blur it a little, so I uncomment string with Blur in source code and it returns to me white square mask. It's not what I'm expecting.Where and what did I wrong? Thank you.