The bitmap class has a Clone method that directly accepts the target rectangle.
Since you are already working with Bitmap , calling Clone with your rectangle and the desired PixelFormat (which may be originalBitmap.PixelFormat ) should provide you with what you need, without any additional dependencies.
Bitmap croppedImage = originalBitmap.Clone(theRect, originalBitmap.PixelFormat);
Reed copsey
source share