public Filter VideoInput = null; public Capture CaptureInfo = null; public Filters InputOptions = new Filters(); private void startCap(int camNum = 0) { this.VideoInput = this.InputOptions.VideoInputDevices[camNum]; this.CaptureInfo = new Capture(this.VideoInput, null); this.CaptureInfo.PreviewWindow = pictureBox1; this.CaptureInfo.RenderPreview(); this.CaptureInfo.FrameCaptureComplete += new Capture.FrameCapHandler(CaptureInfo_FrameCaptureComplete); CaptureInfo.CaptureFrame(); } void CaptureInfo_FrameCaptureComplete(PictureBox Frame) { Image nwImage = Frame.Image; using (MemoryStream ms = new MemoryStream()) { nwImage.Save(ms, ImageFormat.Png); Debug.WriteLine("length "+ms.Length); //<===== length ms.Close(); ms.Dispose(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)