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); } } }
public override Image Apply(Image img) { ImageHelpers.FastBoxBlur((Bitmap)img, Radius); return(img); }