public static bool GaussianBlur(Bitmap b, int nWeight /* default to 4*/) { ConvMatrix m = new ConvMatrix(); m.SetAll(1); m.Pixel = nWeight; m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2; m.Factor = nWeight + 12; return(BitmapFilter.Conv3x3(b, m)); }
//Uses Gaussian Blur to blur the whole Panel. public void Blur() { Bitmap bmp = Screenshot.TakeSnapshot(this.panelBlur); BitmapFilter.GaussianBlur(bmp, 4); BitmapFilter.GaussianBlur(bmp, 4); BitmapFilter.GaussianBlur(bmp, 4); this.myBlur.Image = bmp; this.myBlur.BringToFront(); }