개정판 3212270d
Compare 수정전 커밋
Change-Id: I6201f815b91f44135ee5ca12498ef0cd31a4def4
KCOM/Common/ImageSourceHelper.cs | ||
---|---|---|
64 | 64 |
|
65 | 65 |
public static BitmapImage GetDownloadImage(string uri) |
66 | 66 |
{ |
67 |
return GetDownloadImage(new Uri(uri)); |
|
67 |
return GetDownloadImage(new Uri(uri),null); |
|
68 |
} |
|
69 |
public static BitmapImage GetDownloadImage(string uri,System.Windows.Size DecodeSize) |
|
70 |
{ |
|
71 |
return GetDownloadImage(new Uri(uri), DecodeSize); |
|
68 | 72 |
} |
69 | 73 |
|
70 |
public static BitmapImage GetDownloadImage(Uri uri) |
|
74 |
public static BitmapImage GetDownloadImage(Uri uri, System.Windows.Size? DecodeSize)
|
|
71 | 75 |
{ |
72 | 76 |
BitmapImage resultImage = new BitmapImage(); |
73 | 77 |
|
74 | 78 |
resultImage.BeginInit(); |
79 |
|
|
80 |
if(DecodeSize != null) |
|
81 |
{ |
|
82 |
resultImage.DecodePixelWidth = (int)DecodeSize.Value.Width; |
|
83 |
resultImage.DecodePixelHeight = (int)DecodeSize.Value.Height; |
|
84 |
} |
|
85 |
|
|
75 | 86 |
resultImage.CacheOption = BitmapCacheOption.OnLoad; |
76 | 87 |
resultImage.UriCachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.Default); |
77 | 88 |
resultImage.UriSource = uri; |
내보내기 Unified diff