示例#1
0
        private void Blur()
        {
            Bitmap bmp = Screenshot.TakeSnapshot(panel1);

            BitmapFilter.GaussianBlur(bmp, 0);
            pb.Image = bmp;
            pb.BringToFront();
        }
示例#2
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));
        }