Detailed Description
The crop video filter is a filter used to isolate a subsection of an input image.
Filter Parameters:
Name | Type | Opt/Reqd | Range
=============================================================================
FE2_CROP_TOP | Numeric | Optional | [0,video height]
FE2_CROP_BOTTOM | Numeric | Optional | [0,video height]
FE2_CROP_LEFT | Numeric | Optional | [0,video width]
FE2_CROP_RIGHT | Numeric | Optional | [0,video width]
Example Usage:
|
Deprecated functions |
on2sc | editor_options_GetCrop (const FLIX2HANDLE flix, on2bool *pCrop) |
| Determine if the crop filter is enabled.
|
on2sc | editor_options_SetCrop (FLIX2HANDLE flix, const on2bool crop) |
| Enable/disable the crop filter.
|
on2sc | editor_options_GetCropBounds (const FLIX2HANDLE flix, int32_t *pTop, int32_t *pLeft, int32_t *pBottom, int32_t *pRight) |
| Get the current bounding box used for cropping.
|
on2sc | editor_options_SetCropBounds (FLIX2HANDLE flix, const int32_t top, const int32_t left, const int32_t bottom, const int32_t right) |
| Set the current bounding box used for cropping.
|
Defines |
#define | FE2_FILTER_CROP |
| Filter name for use with Flix2_AddFilter().
|
#define | FE2_CROP_TOP |
| Filter parameter for setting bounding box's top coordinate.
|
#define | FE2_CROP_BOTTOM |
| Filter parameter for setting bounding box's bottom coordinate.
|
#define | FE2_CROP_LEFT |
| Filter parameter for setting bounding box's left coordinate.
|
#define | FE2_CROP_RIGHT |
| Filter parameter for setting bounding box's right coordinate.
|
Define Documentation
Filter parameter for setting bounding box's bottom coordinate.
- Note:
- Default: input image height
Value must be a multiple of 2. Odd values will be silently adjusted down.
Definition at line 61 of file crop.h.
Filter parameter for setting bounding box's left coordinate.
- Note:
- Default: 0
Value must be a multiple of 2. Odd values will be silently adjusted down.
Definition at line 67 of file crop.h.
Filter parameter for setting bounding box's right coordinate.
- Note:
- Default: input image width
Value must be a multiple of 2. Odd values will be silently adjusted down.
Definition at line 73 of file crop.h.
Filter parameter for setting bounding box's top coordinate.
- Note:
- Default: 0
Value must be a multiple of 2. Odd values will be silently adjusted down.
Definition at line 55 of file crop.h.
Function Documentation
Determine if the crop filter is enabled.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pCrop | Variable to update with the current crop enable status |
- Return values:
-
| ON2_OK | The crop enable status was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_CROP. This function will be removed in a future release.
Get the current bounding box used for cropping.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pTop | Topmost row of the cropped area |
[out] | pLeft | Leftmost column of the cropped area |
[out] | pBottom | Bottommost row of the cropped area |
[out] | pRight | Rightmost row of the cropped area |
- Return values:
-
| ON2_OK | The crop bounding box was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_CROP and the FE2_CROP_TOP, FE2_CROP_LEFT, FE2_CROP_BOTTOM and FE2_CROP_RIGHT parameters. This function will be removed in a future release.
Enable/disable the crop filter.
- Parameters:
-
- Return values:
-
| ON2_OK | The crop enable status was successfully set in the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- By default, the crop filter is disabled.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_CROP. This function will be removed in a future release.