TransformsProvider.Crop Method (Int32, Int32, Int32, Int32)

Crops the bitmap using specified rectangle (which is not obligatory totally inside the bitmap).

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public void Crop(
	int x,
	int y,
	int width,
	int height
)

Parameters

x

Type: System.Int32

The x-coordinate of the upper-left corner of the cropping rectangle.
y

Type: System.Int32

The y-coordinate of the upper-left corner of the cropping rectangle.
width

Type: System.Int32

The width of the cropping rectangle.
height

Type: System.Int32

The height of the cropping rectangle.

Remarks

You can also use Crop class to crop the image.

Examples

C#
using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
    bitmap.Transforms.Crop(50, 60, 50, 100);
    bitmap.Save(@"Images\Output\out.jpg");
}

See Also

Reference

Manual