You are here: Start » AVL.NET » Invoke.CropImageToRectangle

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
inImageAvl.ImageInput image.
inRectangleAvl.Rectangle2DRectangle defining a rotated subimage.
inRectangleAlignmentAtl.Optional<Avl.CoordinateSystem2D>Adjusts the rectangle to the position of the inspected object. Default value: atl::NIL.
inScaleModeAvl.CropScaleModeInputScaleInputScale keeps the input scale unchanged, AlignedScale rescales according to the input alignment scale. Default value: InputScale.
inInterpolationMethodAvl.InterpolationMethodBilinearDefault value: Bilinear.
inMarginfloat<0.0f, INF>Width of an additional margin for the output image.
inBorderColorAvl.PixelColor used for locations outside the rectangle.
outImageAvl.ImageOutput image.
outAlignedRectangleAtl.Optional<Avl.Rectangle2D>Input rectangle after transformation (in the image coordinates).
outOutputAlignmentAtl.Optional<Avl.CoordinateSystem2D>Alignment of the output image.

See also