ImageGear .NET - Updated
Crop Method
Example 




ImageGear23.Core Assembly > ImageGear.Processing Namespace > ImGearProcessing Class : Crop Method
Image to crop.
Left border of the new image.
Top border of the new image.
Width of the new image.
Height of the new image.
Crops an image according to the specified offsets and dimensions.
Syntax
'Declaration
 
Public Shared Sub Crop( _
   ByVal page As ImGearPage, _
   ByVal left As Integer, _
   ByVal top As Integer, _
   ByVal width As Integer, _
   ByVal height As Integer _
) 
'Usage
 
Dim page As ImGearPage
Dim left As Integer
Dim top As Integer
Dim width As Integer
Dim height As Integer
 
ImGearProcessing.Crop(page, left, top, width, height)
public static void Crop( 
   ImGearPage page,
   int left,
   int top,
   int width,
   int height
)
public: static void Crop( 
   ImGearPage* page,
   int left,
   int top,
   int width,
   int height
) 
public:
static void Crop( 
   ImGearPage^ page,
   int left,
   int top,
   int width,
   int height
) 

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
// Crops 100 pixels off the top of an image.
ImGearProcessing.Crop(igRasterPage, 0, 100, igRasterPage.DIB.Width, igRasterPage.DIB.Height - 100);
' Crops 100 pixels off the top of an image.
ImGearProcessing.Crop(igRasterPage, 0, 100, igRasterPage.DIB.Width, igRasterPage.DIB.Height - 100)
See Also

Reference

ImGearProcessing Class
ImGearProcessing Members
ImGearPage Class
CanApplyCrop Method