mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-25 11:34:43 +01:00
Add Resize to fill box alternative to image endpoints
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user