diff options
Diffstat (limited to 'MediaBrowser.Controller/Drawing/IImageProcessor.cs')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/IImageProcessor.cs | 76 |
1 files changed, 20 insertions, 56 deletions
diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs index a11e2186f..7ca0e851b 100644 --- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs +++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs @@ -1,16 +1,18 @@ +#pragma warning disable CS1591 + using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using Jellyfin.Data.Entities; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; namespace MediaBrowser.Controller.Drawing { /// <summary> - /// Interface IImageProcessor + /// Interface IImageProcessor. /// </summary> public interface IImageProcessor { @@ -21,16 +23,16 @@ namespace MediaBrowser.Controller.Drawing IReadOnlyCollection<string> SupportedInputFormats { get; } /// <summary> - /// Gets the image enhancers. + /// Gets a value indicating whether [supports image collage creation]. /// </summary> - /// <value>The image enhancers.</value> - IImageEnhancer[] ImageEnhancers { get; } + /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value> + bool SupportsImageCollageCreation { get; } /// <summary> /// Gets the dimensions of the image. /// </summary> /// <param name="path">Path to the image file.</param> - /// <returns>ImageDimensions</returns> + /// <returns>ImageDimensions.</returns> ImageDimensions GetImageDimensions(string path); /// <summary> @@ -38,31 +40,15 @@ namespace MediaBrowser.Controller.Drawing /// </summary> /// <param name="item">The base item.</param> /// <param name="info">The information.</param> - /// <returns>ImageDimensions</returns> + /// <returns>ImageDimensions.</returns> ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info); /// <summary> - /// Gets the dimensions of the image. + /// Gets the blurhash of the image. /// </summary> - /// <param name="item">The base item.</param> - /// <param name="info">The information.</param> - /// <param name="updateItem">Whether or not the item info should be updated.</param> - /// <returns>ImageDimensions</returns> - ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info, bool updateItem); - - /// <summary> - /// Adds the parts. - /// </summary> - /// <param name="enhancers">The enhancers.</param> - void AddParts(IEnumerable<IImageEnhancer> enhancers); - - /// <summary> - /// Gets the supported enhancers. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="imageType">Type of the image.</param> - /// <returns>IEnumerable{IImageEnhancer}.</returns> - IImageEnhancer[] GetSupportedEnhancers(BaseItem item, ImageType imageType); + /// <param name="path">Path to the image file.</param> + /// <returns>BlurHash.</returns> + string GetImageBlurHash(string path); /// <summary> /// Gets the image cache tag. @@ -71,16 +57,10 @@ namespace MediaBrowser.Controller.Drawing /// <param name="image">The image.</param> /// <returns>Guid.</returns> string GetImageCacheTag(BaseItem item, ItemImageInfo image); - string GetImageCacheTag(BaseItem item, ChapterInfo info); - /// <summary> - /// Gets the image cache tag. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="image">The image.</param> - /// <param name="imageEnhancers">The image enhancers.</param> - /// <returns>Guid.</returns> - string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers); + string GetImageCacheTag(BaseItem item, ChapterInfo chapter); + + string? GetImageCacheTag(User user); /// <summary> /// Processes the image. @@ -95,36 +75,20 @@ namespace MediaBrowser.Controller.Drawing /// </summary> /// <param name="options">The options.</param> /// <returns>Task.</returns> - Task<(string path, string mimeType, DateTime dateModified)> ProcessImage(ImageProcessingOptions options); - - /// <summary> - /// Gets the enhanced image. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="imageType">Type of the image.</param> - /// <param name="imageIndex">Index of the image.</param> - /// <returns>Task{System.String}.</returns> - Task<string> GetEnhancedImage(BaseItem item, ImageType imageType, int imageIndex); + Task<(string path, string? mimeType, DateTime dateModified)> ProcessImage(ImageProcessingOptions options); /// <summary> /// Gets the supported image output formats. /// </summary> - /// <returns>IReadOnlyCollection{ImageOutput}.</returns> + /// <returns><see cref="IReadOnlyCollection{ImageOutput}" />.</returns> IReadOnlyCollection<ImageFormat> GetSupportedImageOutputFormats(); /// <summary> /// Creates the image collage. /// </summary> /// <param name="options">The options.</param> - void CreateImageCollage(ImageCollageOptions options); - - /// <summary> - /// Gets a value indicating whether [supports image collage creation]. - /// </summary> - /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value> - bool SupportsImageCollageCreation { get; } - - IImageEncoder ImageEncoder { get; set; } + /// <param name="libraryName">The library name to draw onto the collage.</param> + void CreateImageCollage(ImageCollageOptions options, string? libraryName); bool SupportsTransparency(string path); } |
