ImageGear for .NET
Crop Method
See Also  Example Send Feedback
ImageGear21.Core Assembly > ImageGear.Processing Namespace > ImGearProcessing Class : Crop Method




page
Image to crop.
left
Left border of the new image.
top
Top border of the new image.
width
Width of the new image.
height
Height of the new image.

Glossary Item Box

Crops an image according to the specified offsets and dimensions.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Parameters

page
Image to crop.
left
Left border of the new image.
top
Top border of the new image.
width
Width of the new image.
height
Height of the new image.

Remarks

This method processes all channels of the image. It may shift reference point of image's ROI, if it exists, but does not crop it.

ImGearProcessingVerifier.CanApplyCrop method can be called to check whether the operation can be performed.

Example

C#Copy Code
// Crops 100 pixels off the top of an image.
ImGearProcessing.Crop(igRasterPage, 0, 100, igRasterPage.DIB.Width, igRasterPage.DIB.Height - 100);
Visual BasicCopy Code
' Crops 100 pixels off the top of an image.
ImGearProcessing.Crop(igRasterPage, 0, 100, igRasterPage.DIB.Width, igRasterPage.DIB.Height - 100)

See Also

©2013. Accusoft Corporation. All Rights Reserved.