CSharp examples for System.Windows.Media.Imaging:BitmapImage
BitmapImage From Stream
using System.Windows.Media.Imaging; using System.Reflection; using System.IO;// w w w . j av a 2s . co m using System; public class Main{ public static BitmapImage FromStream(Stream stream) { var image = new BitmapImage(); image.BeginInit(); image.CacheOption = BitmapCacheOption.OnLoad; image.StreamSource = stream; image.EndInit(); return image; } }