Example #1
0
 private void OnNewFrame(object sender, NewFrameEventArgs e)
 {
     BeginInvoke(new Action(() =>
     {
         frameSource?.CopyLastFrame(frameData);
         imageControl.LoadImage(frameData.DynamicData, frameData.W, frameData.H, frameData.Stride);
         toolStripLabelFPS.Text = $"FPS: {e.Fps,2:N1}";
     }));
 }
Example #2
0
 private void toolStripButtonSave_Click(object sender, EventArgs e)
 {
     frameSource.CopyLastFrame(frameData);
     using (var bmp = frameData.ToBitmap())
         bmp.Save("tmp.png", ImageFormat.Png);
 }