public static Bitmap SubImage(this Bitmap bm, Rect rect) { return SubImage(bm, MathF.RoundToInt(rect.X), MathF.RoundToInt(rect.Y), MathF.RoundToInt(rect.W), MathF.RoundToInt(rect.H)); }