diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-04-11 13:34:22 +0200 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2021-04-11 14:13:44 -0400 |
| commit | 7d1d159b8a9a256b1e9e9b6ac1f98a4dbcae0b22 (patch) | |
| tree | f5216abb0c337144ff9729ce5f8c38899352ad09 /MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | |
| parent | c3c98331d973f79e4c38bbcd15e71e297641f483 (diff) | |
Merge pull request #5556 from oddstr13/image-fill-resize
(cherry picked from commit 790f7430aa1218a240fdcc0d3b3f9226bf8b9774)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | 9 |
1 files changed, 9 insertions, 0 deletions
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<ImageFormat> SupportedOutputFormats { get; set; } @@ -95,6 +99,11 @@ namespace MediaBrowser.Controller.Drawing return false; } + if (sizeValue.Width > FillWidth || sizeValue.Height > FillHeight) + { + return false; + } + return true; } |
