示例#1
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.FastBoxBlur(croppedImage, BlurRadius);

                    g.DrawImage(croppedImage, rect);
                }
            }
        }
示例#2
0
文件: Blur.cs 项目: dgotrik/ShareX
 public override Image Apply(Image img)
 {
     ImageHelpers.FastBoxBlur((Bitmap)img, Radius);
     return(img);
 }