Crops the bitmap using specified rectangle (which is not obligatory totally inside the bitmap).
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public void Crop(
int x,
int y,
int width,
int height
)
Type: System.Int32
The x-coordinate of the upper-left corner of the cropping rectangle.Type: System.Int32
The y-coordinate of the upper-left corner of the cropping rectangle.Type: System.Int32
The width of the cropping rectangle.Type: System.Int32
The height of the cropping rectangle.using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
bitmap.Transforms.Crop(50, 60, 50, 100);
bitmap.Save(@"Images\Output\out.jpg");
}