You are here: Start » AVL.NET » Function Reference » Image » Image Spatial Transforms » AVL.CropImageToRectangle
Creates an image from a rectangular fragment of another image (with black margins if requested).
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void CropImageToRectangle ( AvlNet.Image inImage, AvlNet.Rectangle2D inRectangle, AvlNet.CropScaleMode inScaleMode, AvlNet.InterpolationMethod inInterpolationMethod, float inMargin, AvlNet.Pixel inBorderColor, AvlNet.Image outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | AvlNet.Image | Input image. | ||
![]() | inRectangle | AvlNet.Rectangle2D | Rectangle defining a rotated subimage. | ||
![]() | inScaleMode | AvlNet.CropScaleMode | InputScale | InputScale keeps the input scale unchanged, AlignedScale rescales according to the input alignment scale. Default value: InputScale. | |
![]() | inInterpolationMethod | AvlNet.InterpolationMethod | Bilinear | Default value: Bilinear. | |
![]() | inMargin | float | <0.0f, INF> | Width of an additional margin for the output image. | |
![]() | inBorderColor | AvlNet.Pixel | Color used for locations outside the rectangle. | ||
![]() | outImage | AvlNet.Image | Output image. |
Examples
![]() |
![]() |
CropImageToRectangle used to extract an image of an object.
Function Overrides
- CropImageToRectangle(Image, Rectangle2D, Nullable<CoordinateSystem2D>, CropScaleMode, InterpolationMethod, Single, Pixel, Image)
- CropImageToRectangle(Image, Rectangle2D, Nullable<CoordinateSystem2D>, CropScaleMode, InterpolationMethod, Single, Pixel, Image, NullableValue<Rectangle2D>, NullableValue<CoordinateSystem2D>)
- CropImageToRectangle(Image, Rectangle2D, Nullable<CoordinateSystem2D>, CropScaleMode, InterpolationMethod, Single, Pixel, Image, Rectangle2D, CoordinateSystem2D)