Crops the image and writes it to the specified file.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public void WriteCropped( string fileName, Rectangle rectangle )
Type: System.String
The name of the file to save the result.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.using (var losslessJpeg = new LosslessJpeg(@"Images\in.jpg")) { losslessJpeg.WriteCropped(@"Images\Output\out.jpg", new System.Drawing.Rectangle(64, 40, 157, 117)); }