diff options
| author | Tommaso Stocchi <tommasostocchi@outlook.com> | 2021-06-03 17:15:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-03 17:15:32 +0200 |
| commit | 2b232df07ff1e6b82005deb9e2797260fdd48b8b (patch) | |
| tree | bafa3828f2299d8e2ff23faef415871d7818ad3a /MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | |
| parent | dc261b815f4ce5fbace33e787902636c43618881 (diff) | |
| parent | b060d9d0f1b3dac523288a3aaf182f7e35cf875c (diff) | |
Merge branch 'master' into bug/authorization-header-issue
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); } |
