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