Crop Class

Crops an image.

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

Syntax

C#
public sealed class Crop : Transform

Remarks

Crop transform returns pixels which are inside of the cropping rectangle (see Rectangle property).

Examples

The following code crops a 50*100 pixels rectangle from an image and saves the result in JPEG format.

C#
using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
    var cropRectangle = new System.Drawing.Rectangle(50, 60, 50, 100);

    using (var crop = new Crop(cropRectangle))
    using (var result = crop.Apply(bitmap))
        result.Save(@"Images\Output\out.jpg");
}

Inheritance Hierarchy

System.Object

Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also

Reference

Manual