private void videoCaptureDeviceNewFrame(object sender, NewFrameEventArgs eventArgs) { try { using (Bitmap img = (Bitmap)eventArgs.Frame.Clone()) { using (MemoryStream ms = new MemoryStream()) { img.Save(ms, ImageFormat.Jpeg); ms.Seek(0, SeekOrigin.Begin); BitmapImage bi = new BitmapImage(); bi.BeginInit(); bi.CacheOption = BitmapCacheOption.OnLoad; bi.StreamSource = ms; bi.EndInit(); bi.Freeze(); Dispatcher.BeginInvoke(new Action(() => captureImage.Source = bi)); } } } catch (Exception error) { Console.WriteLine("ERROR: " + error.ToString()); } }