0

I am provided the byte array for a jpeg via a CDATA xml node. I need to display that on a WPF application. I would prefer not to save it to disk and set the source of a System.Windows.Controls.Image. I would like to do it all in memory.

How can I go from the byte array or System.Drawing.Image to the Source for System.Windows.Media.Image?

I also welcome better suggestions on how to do this and display multiple images per minute (even multiple per second occasionally)

Roger
  • 2,063
  • 4
  • 32
  • 65
  • You can make a `MemoryStream` object from a `byte[]`. I assume there's a way to go from that directly to a `System.Windows.Media.Image` via some `FromStream` equivalent but I've never done any image stuff in WPF before. – Matthew Haugen Sep 09 '14 at 23:06
  • 3
    Surely you are looking [for this](http://stackoverflow.com/questions/5346727/convert-memory-stream-to-bitmapimage). – Hans Passant Sep 09 '14 at 23:50

0 Answers0