/// <summary> /// Unloads this PreviewBitmap and deletes its JPEG source. /// </summary> public void Unload() { DeleteSource(); image = null; NotifyImageChanged(); }
/// <summary> /// Loads this PreviewBitmap from its JPEG source. /// </summary> public void Load() { WriteableBitmap bmp; using (Stream source = StreamSource) { bmp = PictureDecoder.DecodeJpeg(source); } image = new ManipulableBitmap(bmp); NotifyImageChanged(); }