Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: It seems that blur is doing something strange.

$
0
0
I'm trying to apply round mask to pictures. The code for creating mask is below:
    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.

Viewing all articles
Browse latest Browse all 3693

Trending Articles