CaptureFrameTo
function CaptureFrameTo (Dest: TFrameCaptureDest; FileName: string): Boolean;
bool __fastcall CaptureFrameTo(TFrameCaptureDest Dest, System::UnicodeString FileName);
public bool CaptureFrameTo(TFrameCaptureDest Dest, string FileName);
Public Function CaptureFrameTo(Dest As TFrameCaptureDest, FileName As String) As Boolean
BOOL CaptureFrameTo (TFrameCaptureDest Dest, wchar_t *FileName);
Asynchronously captures the next video frame, depending on the Dest parameter (TFrameCaptureDest type):
-
fc_TBitmap: to a memory bitmap,
-
fc_BmpFile: to a BMP file,
-
fc_JpegFile: to a JPEG file,
-
fc_Clipboard: to the clipboard (CF_BITMAP format),
-
fc_TiffFile: to a TIFF file,
-
fc_PngFile: to a PNG file,
-
fc_TBitmapTopdown: to a top-down memory bitmap (same as fc_TBitmap, with the scanlines stored from top to bottom).
The frame grabber must be enabled to use this function. The video frame is returned asynchronously by the OnFrameCaptureCompleted event.
To let TVideoGrabber generate the file name automatically when capturing the frame to an image file (Dest = fc_BmpFile, fc_JpegFile, fc_TiffFile or fc_PngFile), pass an empty string in the FileName parameter. The file name is then generated in the StoragePath directory according to AutoFileName and AutoFilePrefix, e.g.:
CaptureFrameTo (fc_JpegFile, '');
Otherwise, specify the path/file name of the image in the FileName parameter.