|
BitmapExtensionsCrop(Image, Rectangle) Method
|
Returns a cropped
Bitmap image of the original.
Namespace: GSF.DrawingAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax Example
This example shows how to crop an image:
using System;
using System.Drawing;
using GSF.Drawing;
class Program
{
static void Main(string[] args)
{
Bitmap original = (Bitmap)Bitmap.FromFile("Original.jpg");
Bitmap originalCropped = original.Crop(new Rectangle(0, 0, 300, 300));
originalCropped.Save("OriginalCropped.jpg");
original.Dispose();
originalCropped.Dispose();
Console.ReadLine();
}
}
See Also