Crop(Rectangle) Method (VintasoftImage)
Crops this image by the specified rectangle.
This method works synchronously, use the CropCommand if you need to crop image asynchronously with progress indicator.
This C#/VB.NET code shows how to load image from disk, crop it and save to file.
' load image from file
Using image As New Vintasoft.Imaging.VintasoftImage("c:\original-image.tif")
' crop image
image.Crop(New System.Drawing.Rectangle(100, 100, 300, 200))
' save processed image to file
image.Save("c:\processed-image.tif")
End Using
// load image from file
using (Vintasoft.Imaging.VintasoftImage image =
new Vintasoft.Imaging.VintasoftImage(@"c:\original-image.tif"))
{
// crop image
image.Crop(new System.Drawing.Rectangle(100, 100, 300, 200));
// save processed image to file
image.Save(@"c:\processed-image.tif");
}
Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5