Skip to content

SendImageToVideoFromBitmaps

function

Delphi
function SendImageToVideoFromBitmaps (ImageFilePath: string; BitmapHandle: HBITMAP; CanFreeBitmapHandle: Boolean; EndOfData: Boolean): Boolean;
C++Builder
bool __fastcall SendImageToVideoFromBitmaps(System::UnicodeString ImageFilePath, HBITMAP BitmapHandle, bool CanFreeBitmapHandle, bool EndOfData);
C#
public bool SendImageToVideoFromBitmaps(string ImageFilePath, IntPtr BitmapHandle, bool CanFreeBitmapHandle, bool EndOfData);
VB.NET
Public Function SendImageToVideoFromBitmaps(ImageFilePath As String, BitmapHandle As IntPtr, CanFreeBitmapHandle As Boolean, EndOfData As Boolean) As Boolean
C++/Qt
BOOL SendImageToVideoFromBitmaps (wchar_t *ImageFilePath, HBITMAP BitmapHandle, BOOL CanFreeBitmapHandle, BOOL EndOfData);

Passes the image or bitmap handle to TVideoGrabber when VideoSource = vs_JPEGsOrBitmaps: in this mode, TVideoGrabber needs the video frames to be passed by SendImageToVideoFromBitmaps or SendImageToVideoFromBitmaps2.

SendImageToVideoFromBitmaps can be invoked:

Pass either a file path to a BMP or JPEG file through the ImageFilePath parameter (and set BitmapHandle to 0), or a bitmap handle through the BitmapHandle parameter. With a bitmap handle, set CanFreeBitmapHandle to true if TVideoGrabber must free the bitmap handle, or to false to reuse the bitmap later. If no more images are available, set EndOfData to true to notify the end of the recording or preview.

See Video clips built on the fly by passing bitmap handles, BMP or JPEG files for more information.

Sample code is available in the MainDemo project included in the package, or in the VideoFromBitmapHandles or VideoFromBMPorJPEGfiles demos.