public Image CutImage(Image src, int left, int top, int right, int bottom)
{
Bitmap srcBitmap = new Bitmap(src);
int width = right - left;
int height = bottom - top;
Bitmap destBitmap = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(destBitmap))
{
g.Clear(Color.Transparent);
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
g.DrawImage(srcBitmap, new Rectangle(0, 0, width, height), left, top, width, height, GraphicsUnit.Pixel);
}
return destBitmap;
}