diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-26 01:17:19 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-26 01:17:19 -0500 |
| commit | 25db52003c20473e94e07fb02adf43549a4ba213 (patch) | |
| tree | 7685fa52ad45b9142ec247c65160699c0a5b4942 /MediaBrowser.Server.Implementations | |
| parent | 7c8424bf611b90cf27ce8d8d94b26f0da612d114 (diff) | |
added more metadata control
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs index 7ce0cad73..7ddf63cf8 100644 --- a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs +++ b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs @@ -228,17 +228,12 @@ 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) + 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)) { |
