diff options
| author | Odd Stråbø <oddstr13@openshell.no> | 2021-03-17 00:15:09 +0100 |
|---|---|---|
| committer | Odd Stråbø <oddstr13@openshell.no> | 2021-04-11 08:20:47 +0200 |
| commit | 383aa4e4d9cf4b0997b9277df838728102e0db3c (patch) | |
| tree | 95bd4fc8273f888abc709e7915ae834c97d43c73 /MediaBrowser.Controller/Drawing | |
| parent | 240e67d48568e1bedddd1658a68e0dac0a2f8699 (diff) | |
Add Resize to fill box alternative to image endpoints
Diffstat (limited to 'MediaBrowser.Controller/Drawing')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageHelper.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageHelper.cs b/MediaBrowser.Controller/Drawing/ImageHelper.cs index 87c28d577..740726119 100644 --- a/MediaBrowser.Controller/Drawing/ImageHelper.cs +++ b/MediaBrowser.Controller/Drawing/ImageHelper.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Drawing { // Determine the output size based on incoming parameters var newSize = DrawingUtils.Resize(originalImageSize.Value, options.Width ?? 0, options.Height ?? 0, options.MaxWidth ?? 0, options.MaxHeight ?? 0); - + newSize = DrawingUtils.ResizeFill(newSize, options.FillWidth, options.FillHeight); return newSize; } diff --git a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs index 22de9a43e..4befb29c4 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs @@ -32,6 +32,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; } |
