AnalysisImageClick.OCRTools.cutImage C# (CSharp) Method

cutImage() private static method

private static cutImage ( Bitmap bmp, int w, int h, int x, int y ) : Bitmap
bmp System.Drawing.Bitmap
w int
h int
x int
y int
return System.Drawing.Bitmap
        private static Bitmap cutImage(Bitmap bmp, int w, int h, int x, int y)
        {
            Bitmap cut = null;
            try
            {
                cut = new Bitmap(w, h);
                Graphics g = Graphics.FromImage(cut);
                g.DrawImage(bmp, x, y);
                g.Dispose();

            }
            catch (Exception e) { }
            return cut;
        }