mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 08:45:23 +03:00
only call set resolution if we have positive x and y values
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user