Example #1
0
        public static void Sharpen(Bitmap img, int nWeight /* default to 11*/)
        {
            Bitmap     b = img;
            ConvMatrix m = new ConvMatrix();

            m.SetAll(0);
            m.Pixel  = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = -2;
            m.Factor = nWeight - 8;

            //if (Conv3x3(b, m))
            //{
            //    if (Rounded)
            //        RoundImage(b, 30);
            //}
        }
Example #2
0
        public static void GaussianBlur(Bitmap img, int nWeight)
        {
            Bitmap     b = img;
            ConvMatrix m = new ConvMatrix();

            m.SetAll(1);
            m.Pixel  = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2;
            m.Factor = nWeight + 12;

            if (Conv3x3(b, m))
            {
                //if (Rounded)
                //    RoundImage(b, 30);
            }
        }
Example #3
0
        public static void Sharpen(Bitmap img, int nWeight /* default to 11*/ )
        {
            Bitmap b = img;
            ConvMatrix m = new ConvMatrix();
            m.SetAll(0);
            m.Pixel = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = -2;
            m.Factor = nWeight - 8;

            //if (Conv3x3(b, m))
            //{
            //    if (Rounded)
            //        RoundImage(b, 30);
            //}
        }
Example #4
0
        public static void GaussianBlur(Bitmap img, int nWeight)
        {
            Bitmap b = img;
            ConvMatrix m = new ConvMatrix();
            m.SetAll(1);
            m.Pixel = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2;
            m.Factor = nWeight + 12;

            if (Conv3x3(b, m))
            {
                //if (Rounded)                
                //    RoundImage(b, 30);
            }
        }
Example #5
0
        public static Bitmap Sharpen(Bitmap img, int nWeight /* default to 11*/ )
        {
            Bitmap b = (Bitmap)img.Clone();
            ConvMatrix m = new ConvMatrix();
            m.SetAll(0);
            m.Pixel = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = -2;
            m.Factor = nWeight - 8;

            if (Conv3x3(b, m))
            {
                if (Rounded)
                    RoundImage(b, 30);

                return b;
            }

            else return null;
        }