diff options
| author | Andrew Rabert <ar@nullsum.net> | 2018-12-27 18:27:57 -0500 |
|---|---|---|
| committer | Andrew Rabert <ar@nullsum.net> | 2018-12-27 18:27:57 -0500 |
| commit | a86b71899ec52c44ddc6c3018e8cc5e9d7ff4d62 (patch) | |
| tree | a74f6ea4a8abfa1664a605d31d48bc38245ccf58 /MediaBrowser.Controller/Drawing/IImageProcessor.cs | |
| parent | 9bac3ac616b01f67db98381feb09d34ebe821f9a (diff) | |
Add GPL modules
Diffstat (limited to 'MediaBrowser.Controller/Drawing/IImageProcessor.cs')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/IImageProcessor.cs | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs new file mode 100644 index 000000000..fdf10e223 --- /dev/null +++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs @@ -0,0 +1,118 @@ +using System; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Drawing; +using MediaBrowser.Model.Entities; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Drawing +{ + /// <summary> + /// Interface IImageProcessor + /// </summary> + public interface IImageProcessor + { + /// <summary> + /// Gets the supported input formats. + /// </summary> + /// <value>The supported input formats.</value> + string[] SupportedInputFormats { get; } + + /// <summary> + /// Gets the image enhancers. + /// </summary> + /// <value>The image enhancers.</value> + IImageEnhancer[] ImageEnhancers { get; } + + ImageSize GetImageSize(string path); + + /// <summary> + /// Gets the size of the image. + /// </summary> + /// <param name="info">The information.</param> + /// <returns>ImageSize.</returns> + ImageSize GetImageSize(BaseItem item, ItemImageInfo info); + + ImageSize GetImageSize(BaseItem item, ItemImageInfo info, bool allowSlowMethods, 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); + + /// <summary> + /// Gets the image cache tag. + /// </summary> + /// <param name="item">The item.</param> + /// <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); + + /// <summary> + /// Processes the image. + /// </summary> + /// <param name="options">The options.</param> + /// <param name="toStream">To stream.</param> + /// <returns>Task.</returns> + Task ProcessImage(ImageProcessingOptions options, Stream toStream); + + /// <summary> + /// Processes the image. + /// </summary> + /// <param name="options">The options.</param> + /// <returns>Task.</returns> + Task<Tuple<string, string, DateTime>> 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); + + /// <summary> + /// Gets the supported image output formats. + /// </summary> + /// <returns>ImageOutputFormat[].</returns> + 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; } + + bool SupportsTransparency(string path); + } +} |
