Back to FabImage Library website
You are here: Start » Function Reference » Image » Image Spatial Transforms » TrimImageToRegion
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Trims an image to the area of the specified region.
Syntax
C++
C#
void fil::TrimImageToRegion ( const fil::Image& inImage, const fil::Region& inRegion, const fil::Pixel& inBorderColor, fil::Image& outImage )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inImage | const Image& | Input image | |
![]() |
inRegion | const Region& | Input region | |
![]() |
inBorderColor | const Pixel& | Color used for locations outside the region | |
![]() |
outImage | Image& | Output image |
Description
The operation extracts part of the inImage that corresponds to the region.
Other pixels are set to inBorderColor color.
Examples
![]() |
![]() |
TrimImageToRegion performed on the sample image and region.