Skip to content

CaptureFrameTo

method

Delphi
function CaptureFrameTo (Dest: TFrameCaptureDest; FileName: string): Boolean;
C++Builder
bool __fastcall CaptureFrameTo(TFrameCaptureDest Dest, System::UnicodeString FileName);
C#
public bool CaptureFrameTo(TFrameCaptureDest Dest, string FileName);
VB.NET
Public Function CaptureFrameTo(Dest As TFrameCaptureDest, FileName As String) As Boolean
C++/Qt
BOOL CaptureFrameTo (TFrameCaptureDest Dest, wchar_t *FileName);

Captures asynchronously the next video frame to memory or to files automatically, depending of 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)

The frame grabber must be enabled to use this function. The video frame is returned asynchronously by the OnFrameCaptureCompleted event. To let TVideoGrabber generate automatically the file name when capturing a BMP or JPEG image to a file (Dest = fc_BmpFile or Dest = fc_JpegFile), pass an empty string in the FileName property. In this case a file name will be generated automatically in the StoragePath directory according to AutoFileName and AutoFilePrefix. E.g.: CaptureFrameTo (fc_JpegFile, ''); Otherwise you can specify yourself in the FileName property the path/file name to save the BMP or JPEG image.