I have an array of bytes like this:
private byte[] m_Frame
I need to turn it into an image, but since I'm in a WPF
it's not possible to just play a bitmap
within a PictureBox
because that element simply does not exist in WPF
.
For now, I have this development:
BitmapImage bmpi = new BitmapImage();
bmpi.BeginInit();
bmpi.StreamSource = new MemoryStream(m_Frame);
bmpi.EndInit();
m_picture.Source = bmpi;
Note: m_picture
is <Image/>
But when I call the method that this excerpt is inserted the VS
returns me a Exception:System.NotSupportedException: 'No imaging component suitable to complete this operation was found.
What do I need to do?