Пример #1
0
        void Get()
        {
            LiveViewData LiveViewData = null;

            try
            {
                LiveViewData = _cameraDevice.GetLiveViewImage();
                if (LiveViewData != null && LiveViewData.ImageData != null)
                {
                    Bitmap bitmap = new Bitmap(new MemoryStream(LiveViewData.ImageData,
                                                                LiveViewData.ImageDataPosition,
                                                                LiveViewData.ImageData.Length - LiveViewData.ImageDataPosition));
                    _image.Dispatcher.Invoke(() => _image.Source = BitmapUtils.BitmapToImageSource(bitmap));
                }
            }
            catch (Exception)
            {
            }
        }
Пример #2
0
 private void DisplayImage(Bitmap image)
 {
     GridMixFaces.Dispatcher.Invoke(() => ImageMixFaces.Source = BitmapUtils.BitmapToImageSource(image));
 }