From 6ed380ed1be293ef636570cf2f16c9c95f0858eb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 5 Jan 2014 16:53:22 -0500 Subject: only call set resolution if we have positive x and y values --- MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs') diff --git a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs index d75f2647c..6378cef52 100644 --- a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs +++ b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs @@ -229,7 +229,7 @@ namespace MediaBrowser.Server.Implementations.Drawing using (var thumbnail = new Bitmap(newWidth, newHeight, PixelFormat.Format32bppPArgb)) { // Mono throw an exeception if assign 0 to SetResolution - if (originalImage.HorizontalResolution >= 0 && originalImage.VerticalResolution >= 0) + if (originalImage.HorizontalResolution > 0 && originalImage.VerticalResolution > 0) { // Preserve the original resolution thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution); -- cgit v1.2.3