diff options
| author | crobibero <cody@robibe.ro> | 2021-06-20 07:09:24 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2021-06-20 07:09:24 -0600 |
| commit | 23dd6e2d9fdcb65f3ca13914c83f8ffbbd7e1743 (patch) | |
| tree | 38e905846e02da5e255b1ef23ea27a749b53c453 /MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | |
| parent | 078b6244ee060b2c5caddc3ba8a60633c4e95054 (diff) | |
| parent | 0c3dcdf77b0d124517bffa608bfddf7d8f7682db (diff) | |
Merge remote-tracking branch 'upstream/master' into baseitemkind-fixes
Diffstat (limited to 'MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs index 22105b7d7..11e663301 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs @@ -1,3 +1,5 @@ +#nullable disable + #pragma warning disable CS1591 using System; @@ -24,8 +26,6 @@ namespace MediaBrowser.Controller.Drawing public int ImageIndex { get; set; } - public bool CropWhiteSpace { get; set; } - public int? Width { get; set; } public int? Height { get; set; } @@ -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; } @@ -106,7 +115,6 @@ namespace MediaBrowser.Controller.Drawing PercentPlayed.Equals(0) && !UnplayedCount.HasValue && !Blur.HasValue && - !CropWhiteSpace && string.IsNullOrEmpty(BackgroundColor) && string.IsNullOrEmpty(ForegroundLayer); } |
