示例#1
0
        public override Image Apply(Image img)
        {
            if (Radius <= 0)
            {
                return(img);
            }

            ImageHelpers.Blur((Bitmap)img, Radius);
            return(img);
        }
示例#2
0
        public override void OnDrawFinal(Graphics g, Bitmap bmp)
        {
            if (BlurRadius > 1)
            {
                using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, Rectangle))
                {
                    ImageHelpers.Blur(croppedImage, BlurRadius);

                    g.DrawImage(croppedImage, Rectangle);
                }
            }
        }
示例#3
0
        public override void OnDrawFinal(Graphics g, Bitmap bmp)
        {
            if (BlurRadius > 1)
            {
                Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
                rect.Intersect(Rectangle);

                using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
                {
                    ImageHelpers.Blur(croppedImage, BlurRadius);

                    g.DrawImage(croppedImage, rect);
                }
            }
        }