From 7d1d159b8a9a256b1e9e9b6ac1f98a4dbcae0b22 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 11 Apr 2021 13:34:22 +0200 Subject: Merge pull request #5556 from oddstr13/image-fill-resize (cherry picked from commit 790f7430aa1218a240fdcc0d3b3f9226bf8b9774) Signed-off-by: Joshua M. Boniface --- MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs') diff --git a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs index 22105b7d7..6ae3a602a 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs @@ -34,6 +34,10 @@ namespace MediaBrowser.Controller.Drawing public int? MaxHeight { get; set; } + public int? FillWidth { get; set; } + + public int? FillHeight { get; set; } + public int Quality { get; set; } public IReadOnlyCollection SupportedOutputFormats { get; set; } @@ -95,6 +99,11 @@ namespace MediaBrowser.Controller.Drawing return false; } + if (sizeValue.Width > FillWidth || sizeValue.Height > FillHeight) + { + return false; + } + return true; } -- cgit v1.2.3