From 68cf16416ba4fb88293b2bdac9867c5534fd7357 Mon Sep 17 00:00:00 2001 From: abeloin Date: Wed, 25 Dec 2013 14:26:49 -0500 Subject: Linux fixes: -Copy PropertyChanged.Fody.dll to Tools/Fody in MediaBrowser.Model.csproj -Check if root for WebSocketServer.FlashAccessPolicyEnabled (port < 1024) -Check resolution value !=0 before SetResolution -Catch _userManager.RefreshUsersMetadata exception when running MB3 for the first time -Fix _appHost.Init() missing argument -FFmpeg: set default and execute permission(766) to ffmpeg and ffprobe -FFmpeg: Detect the OS type and download the correct version -Rename MediaBrowser.WebDashboard/dashboard-ui/scripts/Itemdetailpage.js to itemdetailpage.js --- MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (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 fbe78e938..7ce0cad73 100644 --- a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs +++ b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs @@ -228,8 +228,17 @@ namespace MediaBrowser.Server.Implementations.Drawing // Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here using (var thumbnail = new Bitmap(newWidth, newHeight, PixelFormat.Format32bppPArgb)) { + #if __MonoCS__ + // Mono throw an exeception if assign 0 to SetResolution + if (originalImage.HorizontalResolution != 0 && originalImage.VerticalResolution != 0) + { + // Preserve the original resolution + thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution); + } + #else // Preserve the original resolution thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution); + #endif using (var thumbnailGraph = Graphics.FromImage(thumbnail)) { -- cgit v1.2.3