diff options
Diffstat (limited to 'MediaBrowser.ServerApplication/App.xaml.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/App.xaml.cs | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/MediaBrowser.ServerApplication/App.xaml.cs b/MediaBrowser.ServerApplication/App.xaml.cs index db008c3d9..362dd4bc0 100644 --- a/MediaBrowser.ServerApplication/App.xaml.cs +++ b/MediaBrowser.ServerApplication/App.xaml.cs @@ -291,81 +291,5 @@ namespace MediaBrowser.ServerApplication Dispatcher.Invoke(Shutdown); } - - /// <summary> - /// Gets the image. - /// </summary> - /// <param name="uri">The URI.</param> - /// <returns>Image.</returns> - /// <exception cref="System.ArgumentNullException">uri</exception> - public Image GetImage(string uri) - { - if (string.IsNullOrEmpty(uri)) - { - throw new ArgumentNullException("uri"); - } - - return GetImage(new Uri(uri)); - } - - /// <summary> - /// Gets the image. - /// </summary> - /// <param name="uri">The URI.</param> - /// <returns>Image.</returns> - /// <exception cref="System.ArgumentNullException">uri</exception> - public Image GetImage(Uri uri) - { - if (uri == null) - { - throw new ArgumentNullException("uri"); - } - - return new Image { Source = GetBitmapImage(uri) }; - } - - /// <summary> - /// Gets the bitmap image. - /// </summary> - /// <param name="uri">The URI.</param> - /// <returns>BitmapImage.</returns> - /// <exception cref="System.ArgumentNullException">uri</exception> - public BitmapImage GetBitmapImage(string uri) - { - if (string.IsNullOrEmpty(uri)) - { - throw new ArgumentNullException("uri"); - } - - return GetBitmapImage(new Uri(uri)); - } - - /// <summary> - /// Gets the bitmap image. - /// </summary> - /// <param name="uri">The URI.</param> - /// <returns>BitmapImage.</returns> - /// <exception cref="System.ArgumentNullException">uri</exception> - public BitmapImage GetBitmapImage(Uri uri) - { - if (uri == null) - { - throw new ArgumentNullException("uri"); - } - - var bitmap = new BitmapImage - { - CreateOptions = BitmapCreateOptions.DelayCreation, - CacheOption = BitmapCacheOption.OnDemand, - UriCachePolicy = new RequestCachePolicy(RequestCacheLevel.CacheIfAvailable) - }; - - bitmap.BeginInit(); - bitmap.UriSource = uri; - bitmap.EndInit(); - - RenderOptions.SetBitmapScalingMode(bitmap, BitmapScalingMode.Fant); - return bitmap; - } } } |
