SetFrameCaptureBounds
procedure SetFrameCaptureBounds (LeftPosition: LongInt; TopPosition: LongInt; RightPosition: LongInt; BottomPosition: LongInt);
void __fastcall SetFrameCaptureBounds(System::LongInt LeftPosition, System::LongInt TopPosition, System::LongInt RightPosition, System::LongInt BottomPosition);
public void SetFrameCaptureBounds(int LeftPosition, int TopPosition, int RightPosition, int BottomPosition);
Public Sub SetFrameCaptureBounds(LeftPosition As Integer, TopPosition As Integer, RightPosition As Integer, BottomPosition As Integer)
void SetFrameCaptureBounds (int LeftPosition, int TopPosition, int RightPosition, int BottomPosition);
Specifies a rectangle for the frame capture, making it possible to capture only part of the video frame. E.g.:
Button1 action: VideoGrabber.StartPreview()
Button2 action: VideoGrabber.SetFrameCaptureBounds (50, 50, 150, 150) VideoGrabber.CaptureFrameTo (fc_JPEGFile, "mysquarecapture.jpg")
When starting the preview with Button1, then capturing a frame with Button2, the captured frame will be a square 100x100 image captured at the "x=50 y=50" location on the video frame.
Note: the normal full frame capture can then be restored by invoking SetFrameCaptureBounds (0, 0, 0, 0). Top-down or left-right capture: additionally, it is possible to flip the captured frame top-down or left-right by just inverting the Left/Right or Top/Bottom values.
E.g.: VideoGrabber.SetFrameCaptureBounds (50, 150, 150, 50) will capture a top-down frame.
Remark: to retrieve the current size of the video frame use VideoWidth and VideoHeight