OnVideoFrameBitmap usage

OnVideoFrameBitmap sample usage:

Bitmap bmp = new Bitmap(@"c:\vf\pics\1.jpg");

using (Graphics g = Graphics.FromImage(e.Frame))
{
    g.DrawImage(bmp, 0, 0, bmp.Width, bmp.Height);
    e.UpdateData = true;
}

bmp.Dispose();

Main idea – usage of Graphics to update existing Bitmap, Graphics object must be disposed, e.UpdateData must be set to true.

VisioForge © 2006-2020

  • GitHub-Mark-64px
  • Twitter Социальные Иконка
  • VisioForge Facebook page
  • YouTube channel