コード例 #1
0
        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));
        }
コード例 #2
0
        //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();
        }