개정판 8a9f6742
issue #670 image load modify
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
711 | 711 |
uri = String.Format(Properties.Settings.Default.subServerImageWebPath, _ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, e.PageNumber); |
712 | 712 |
} |
713 | 713 |
|
714 |
var defaultBitmapImage = new BitmapImage(new Uri(uri)); |
|
715 |
|
|
714 |
var defaultBitmapImage = new BitmapImage(); |
|
715 |
defaultBitmapImage.BeginInit(); |
|
716 |
defaultBitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache; |
|
717 |
defaultBitmapImage.CacheOption = BitmapCacheOption.OnLoad; |
|
718 |
defaultBitmapImage.UriSource = new Uri(uri); |
|
719 |
defaultBitmapImage.EndInit(); |
|
720 |
|
|
721 |
ViewerDataModel.Instance.ImageViewPath = null; |
|
722 |
GC.Collect(); |
|
716 | 723 |
ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage; |
717 | 724 |
ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth; |
718 | 725 |
ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight; |
... | ... | |
721 | 728 |
{ |
722 | 729 |
defaultBitmapImage.DownloadCompleted += (ex, arg) => |
723 | 730 |
{ |
731 |
defaultBitmapImage.Freeze(); |
|
732 |
mainPanel.UpdateLayout(); |
|
733 |
GC.Collect(); |
|
734 |
//System.Diagnostics.Debug.WriteLine("image changed"); |
|
724 | 735 |
ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage; |
725 | 736 |
ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth; |
726 | 737 |
ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight; |
내보내기 Unified diff