aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-05-08 12:22:09 +0100
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2021-05-08 12:22:09 +0100
commit7185de970c2abef0255ca1ce5321c5d841ddefb8 (patch)
tree1f84882205d234a00057c9542c50bd1fab0cb4bf /MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs
parentdca02987106d0433ee4139fb380dd78d92921dae (diff)
parentd4a50be22c3c4b9bb0adfb957ee558287fd219d9 (diff)
Merge remote-tracking branch 'upstream/master' into UrlDecoding
Diffstat (limited to 'MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs')
-rw-r--r--MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs14
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);
}