aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorDavid Ullmer <davidullmer@outlook.de>2021-08-15 20:32:08 +0200
committerCody Robibero <cody@robibe.ro>2022-01-04 08:20:16 -0700
commit4ba168c8a1be41d1c9db581bc79f170e24327d19 (patch)
tree6610e772ba25a292dd79b61e58e8348bd0f2694e /MediaBrowser.Controller
parentc6a1dcf420dfbb4bef80b1267fe26035e67f9a6d (diff)
Add splashscreen builder
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Drawing/IImageEncoder.cs6
-rw-r--r--MediaBrowser.Controller/Drawing/SplashscreenOptions.cs59
2 files changed, 65 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Drawing/IImageEncoder.cs b/MediaBrowser.Controller/Drawing/IImageEncoder.cs
index 4e67cfee4..57d73699f 100644
--- a/MediaBrowser.Controller/Drawing/IImageEncoder.cs
+++ b/MediaBrowser.Controller/Drawing/IImageEncoder.cs
@@ -74,5 +74,11 @@ namespace MediaBrowser.Controller.Drawing
/// <param name="options">The options to use when creating the collage.</param>
/// <param name="libraryName">Optional. </param>
void CreateImageCollage(ImageCollageOptions options, string? libraryName);
+
+ /// <summary>
+ /// Creates a splashscreen image.
+ /// </summary>
+ /// <param name="options">The options to use when creating the splashscreen.</param>
+ void CreateSplashscreen(SplashscreenOptions options);
}
}
diff --git a/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs b/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs
new file mode 100644
index 000000000..d70773d8f
--- /dev/null
+++ b/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs
@@ -0,0 +1,59 @@
+using System.Collections.Generic;
+
+namespace MediaBrowser.Controller.Drawing
+{
+ /// <summary>
+ /// Options used to generate the splashscreen.
+ /// </summary>
+ public class SplashscreenOptions
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SplashscreenOptions"/> class.
+ /// </summary>
+ /// <param name="portraitInputPaths">The portrait input paths.</param>
+ /// <param name="landscapeInputPaths">The landscape input paths.</param>
+ /// <param name="outputPath">The output path.</param>
+ /// <param name="width">Optional. The image width.</param>
+ /// <param name="height">Optional. The image height.</param>
+ /// <param name="applyFilter">Optional. Apply a darkening filter.</param>
+ public SplashscreenOptions(IReadOnlyList<string> portraitInputPaths, IReadOnlyList<string> landscapeInputPaths, string outputPath, int width = 1920, int height = 1080, bool applyFilter = false)
+ {
+ PortraitInputPaths = portraitInputPaths;
+ LandscapeInputPaths = landscapeInputPaths;
+ OutputPath = outputPath;
+ Width = width;
+ Height = height;
+ ApplyFilter = applyFilter;
+ }
+
+ /// <summary>
+ /// Gets or sets the poster input paths.
+ /// </summary>
+ public IReadOnlyList<string> PortraitInputPaths { get; set; }
+
+ /// <summary>
+ /// Gets or sets the landscape input paths.
+ /// </summary>
+ public IReadOnlyList<string> LandscapeInputPaths { get; set; }
+
+ /// <summary>
+ /// Gets or sets the output path.
+ /// </summary>
+ public string OutputPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the width.
+ /// </summary>
+ public int Width { get; set; }
+
+ /// <summary>
+ /// Gets or sets the height.
+ /// </summary>
+ public int Height { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to apply a darkening filter at the end.
+ /// </summary>
+ public bool ApplyFilter { get; set; }
+ }
+}