From a86b71899ec52c44ddc6c3018e8cc5e9d7ff4d62 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 27 Dec 2018 18:27:57 -0500 Subject: Add GPL modules --- MediaBrowser.Controller/Drawing/IImageProcessor.cs | 118 +++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 MediaBrowser.Controller/Drawing/IImageProcessor.cs (limited to 'MediaBrowser.Controller/Drawing/IImageProcessor.cs') 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 +{ + /// + /// Interface IImageProcessor + /// + public interface IImageProcessor + { + /// + /// Gets the supported input formats. + /// + /// The supported input formats. + string[] SupportedInputFormats { get; } + + /// + /// Gets the image enhancers. + /// + /// The image enhancers. + IImageEnhancer[] ImageEnhancers { get; } + + ImageSize GetImageSize(string path); + + /// + /// Gets the size of the image. + /// + /// The information. + /// ImageSize. + ImageSize GetImageSize(BaseItem item, ItemImageInfo info); + + ImageSize GetImageSize(BaseItem item, ItemImageInfo info, bool allowSlowMethods, bool updateItem); + + /// + /// Adds the parts. + /// + /// The enhancers. + void AddParts(IEnumerable enhancers); + + /// + /// Gets the supported enhancers. + /// + /// The item. + /// Type of the image. + /// IEnumerable{IImageEnhancer}. + IImageEnhancer[] GetSupportedEnhancers(BaseItem item, ImageType imageType); + + /// + /// Gets the image cache tag. + /// + /// The item. + /// The image. + /// Guid. + string GetImageCacheTag(BaseItem item, ItemImageInfo image); + string GetImageCacheTag(BaseItem item, ChapterInfo info); + + /// + /// Gets the image cache tag. + /// + /// The item. + /// The image. + /// The image enhancers. + /// Guid. + string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers); + + /// + /// Processes the image. + /// + /// The options. + /// To stream. + /// Task. + Task ProcessImage(ImageProcessingOptions options, Stream toStream); + + /// + /// Processes the image. + /// + /// The options. + /// Task. + Task> ProcessImage(ImageProcessingOptions options); + + /// + /// Gets the enhanced image. + /// + /// The item. + /// Type of the image. + /// Index of the image. + /// Task{System.String}. + Task GetEnhancedImage(BaseItem item, ImageType imageType, int imageIndex); + + /// + /// Gets the supported image output formats. + /// + /// ImageOutputFormat[]. + ImageFormat[] GetSupportedImageOutputFormats(); + + /// + /// Creates the image collage. + /// + /// The options. + void CreateImageCollage(ImageCollageOptions options); + + /// + /// Gets a value indicating whether [supports image collage creation]. + /// + /// true if [supports image collage creation]; otherwise, false. + bool SupportsImageCollageCreation { get; } + + IImageEncoder ImageEncoder { get; set; } + + bool SupportsTransparency(string path); + } +} -- cgit v1.2.3