You are here: Start » AVL.NET » Invoke.CropImageToRectangle
Creates an image from a rectangular fragment of another image (with black margins if requested).
| Namespace: | Avl | 
|---|---|
| Assembly: | AvlNet.dll | 
Syntax
C++
C#
public static void CropImageToRectangle ( Avl.Image inImage, Avl.Rectangle2D inRectangle, Optional<Avl.CoordinateSystem2D> inRectangleAlignment, Avl.CropScaleMode inScaleMode, Avl.InterpolationMethod inInterpolationMethod, float inMargin, Avl.Pixel inBorderColor, Avl.Image outImage, Optional<Avl.Rectangle2D> outAlignedRectangle, Optional<Avl.CoordinateSystem2D> outOutputAlignment )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]()  | inImage | Avl.Image | Input image. | ||
![]()  | inRectangle | Avl.Rectangle2D | Rectangle defining a rotated subimage. | ||
![]()  | inRectangleAlignment | Atl.Optional<Avl.CoordinateSystem2D> | Adjusts the rectangle to the position of the inspected object. Default value: atl::NIL. | ||
![]()  | inScaleMode | Avl.CropScaleMode | InputScale | InputScale keeps the input scale unchanged, AlignedScale rescales according to the input alignment scale. Default value: InputScale. | |
![]()  | inInterpolationMethod | Avl.InterpolationMethod | Bilinear | Default value: Bilinear. | |
![]()  | inMargin | float | <0.0f, INF> | Width of an additional margin for the output image. | |
![]()  | inBorderColor | Avl.Pixel | Color used for locations outside the rectangle. | ||
![]()  | outImage | Avl.Image | Output image. | ||
![]()  | outAlignedRectangle | Atl.Optional<Avl.Rectangle2D> | Input rectangle after transformation (in the image coordinates). | ||
![]()  | outOutputAlignment | Atl.Optional<Avl.CoordinateSystem2D> | Alignment of the output image. | 


