Class VideoCropSettings
- Namespace
- VisioForge.Core.Types
- Assembly
- VisioForge.Core.dll
Defines settings for cropping a video frame, specifying the region to be retained.
public class VideoCropSettingsInheritance
Inherited Members
Examples
// To crop a video to a 640x480 region starting at (100, 50):
var cropSettings = new VideoCropSettings(100, 50, 740, 530);
// To disable cropping:
var noCrop = new VideoCropSettings();
Remarks
This class is used to define a rectangular area within the video frame that should be kept, effectively discarding everything outside of it. The coordinates are typically in pixels relative to the top-left corner of the original video frame.
Constructors
VideoCropSettings()
Initializes a new instance of the VisioForge.Core.Types.VideoCropSettings class with default (no cropping) values.
public VideoCropSettings()VideoCropSettings(int, int, int, int)
Initializes a new instance of the VisioForge.Core.Types.VideoCropSettings class with specified crop coordinates.
public VideoCropSettings(int left, int top, int right, int bottom)Parameters
leftint-
The left coordinate of the crop region.
topint-
The top coordinate of the crop region.
rightint-
The right coordinate of the crop region.
bottomint-
The bottom coordinate of the crop region.
Properties
Bottom
Gets or sets the bottom coordinate of the crop region.
public int Bottom { get; set; }Property Value
Left
Gets or sets the left coordinate of the crop region.
public int Left { get; set; }Property Value
Right
Gets or sets the right coordinate of the crop region.
public int Right { get; set; }Property Value
Top
Gets or sets the top coordinate of the crop region.
public int Top { get; set; }