Exception on BitmapFrame.Create (bug in WPF framework?)

后端 未结 4 1827
借酒劲吻你
借酒劲吻你 2021-01-11 16:17

I implemented a C# application that recevies frame RGB at framerate of 30fps.

The event of frame arrive is managed with this code:

void client_ColorFra         


        
4条回答
  •  清酒与你
    2021-01-11 16:47

    Running with .NET Framework 4.5, I had to change the similar line in the Microsoft SDK WPF Photo Viewer sample from

      _image = BitmapFrame.Create(_source);
    

    to

      _image = BitmapFrame.Create(_source, BitmapCreateOptions.None, BitmapCacheOption.None);
    

    to avoid the ConfigurationErrorsException. Things seem to be drifting under the hood...

提交回复
热议问题