Click here to Skip to main content
15,884,628 members

Comments by Spencer Kittleson (Top 2 by date)

Spencer Kittleson 10-Feb-15 16:12pm View    
Reason for my vote of 5 \n Very good work! The dynamic declarations makes it easy and fast.
Spencer Kittleson 31-May-14 17:31pm View    
This solution works great. Here is a image object held in memory based solution as well.

//convert bitmap to bitmapimage
using (var memory = new MemoryStream())
{
image.Save(memory, ImageFormat.Png);
memory.Position = 0;

var bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.StreamSource = memory;
bitmapImage.CacheOption = BitmapCacheOption.OnLoad; // this is key to destory the image with a new image coming in.
bitmapImage.EndInit();

wpfPictureBox.Source = bitmapImage;
}