public static Image CropImage(Image source, Rectangle rect) { Bitmap bmp = new Bitmap(rect.Width, rect.Height); using (var g = Graphics.FromImage(bmp)) g.DrawImage(source, 0, 0, rect, GraphicsUnit.Pixel); return bmp; }