LosslessJpeg.WriteCropped Method (String, Rectangle)

Crops the image and writes it to the specified file.

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

Syntax

C#
public void WriteCropped(
	string fileName,
	Rectangle rectangle
)

Parameters

fileName

Type: System.String

The name of the file to save the result.
rectangle

Type: System.Drawing.Rectangle

The cropping rectangle. The rectangle must be inside the image. Note, coordinates of this rectangle and coordinates of the cropped portion of image may be different.

Examples

C#
using (var losslessJpeg = new LosslessJpeg(@"Images\in.jpg"))
{
    losslessJpeg.WriteCropped(@"Images\Output\out.jpg", new System.Drawing.Rectangle(64, 40, 157, 117));
}

See Also

Reference

Manual