aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Drawing/ImageManager.cs
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-03-16 12:41:49 -0400
committerLukePulverenti <luke.pulverenti@gmail.com>2013-03-16 12:41:49 -0400
commitbae89ee8243fea06ba1e17c1f1ed6da890e9f08c (patch)
tree22a01644778de380f4e279c628fcef28f4edadbc /MediaBrowser.Controller/Drawing/ImageManager.cs
parent110ee005178ca3ad04616bc2c7c0445582d56684 (diff)
fix duplicate connections on the dashboard
Diffstat (limited to 'MediaBrowser.Controller/Drawing/ImageManager.cs')
-rw-r--r--MediaBrowser.Controller/Drawing/ImageManager.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageManager.cs b/MediaBrowser.Controller/Drawing/ImageManager.cs
index 3c6f845e5..6bae3510a 100644
--- a/MediaBrowser.Controller/Drawing/ImageManager.cs
+++ b/MediaBrowser.Controller/Drawing/ImageManager.cs
@@ -179,7 +179,7 @@ namespace MediaBrowser.Controller.Drawing
var newHeight = Convert.ToInt32(newSize.Height);
// Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here
- var thumbnail = originalImage.PixelFormat.HasFlag(PixelFormat.Indexed) ? new Bitmap(originalImage, newWidth, newHeight) : new Bitmap(newWidth, newHeight, originalImage.PixelFormat);
+ var thumbnail = !ImageExtensions.IsPixelFormatSupportedByGraphicsObject(originalImage.PixelFormat) ? new Bitmap(originalImage, newWidth, newHeight) : new Bitmap(newWidth, newHeight, originalImage.PixelFormat);
// Preserve the original resolution
thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution);