Menu Close

How Can We Help?

< Back
You are here:
Print

Convert a video frame to Bitmap from the OnFrameBitmap event

private void VideoGrabber1_OnFrameBitmap(object sender, VidGrab.TOnFrameBitmapEventArgs e)
{
   Helpers.TFrameBitmapInfo FrameBitmapInfo = (Helpers.TFrameBitmapInfo)Marshal.PtrToStructure((IntPtr)e.bitmapInfo, typeof(Helpers.TFrameBitmapInfo));
   Bitmap bitmap = System.Drawing.Bitmap.FromHbitmap(FrameBitmapInfo.bitmapHandle);
   …
}

Table of Contents