diff options
| author | cvium <clausvium@gmail.com> | 2021-09-10 11:40:28 +0200 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2021-09-10 11:40:28 +0200 |
| commit | 8496d7638ab7823169c220b615289c401cefa9a0 (patch) | |
| tree | 66134cb10250319dc4be0dc8abf6b2a6573e4cbf /MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | |
| parent | fb7587dd84784afb7c64aadf1fc2d0bab5251814 (diff) | |
| parent | b96dbbf553820861eab9d1a453adcc8ce8a9ef05 (diff) | |
Merge branch 'master' into NetworkAccessPolicy
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); } |
