From 6a5bf9cc780c6cd878be4c5111d64226208f0597 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Fri, 22 Feb 2013 19:44:20 -0500 Subject: extracted more interfaces --- .../Providers/IImageEnhancer.cs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 MediaBrowser.Controller/Providers/IImageEnhancer.cs (limited to 'MediaBrowser.Controller/Providers/IImageEnhancer.cs') diff --git a/MediaBrowser.Controller/Providers/IImageEnhancer.cs b/MediaBrowser.Controller/Providers/IImageEnhancer.cs new file mode 100644 index 0000000000..24296b6641 --- /dev/null +++ b/MediaBrowser.Controller/Providers/IImageEnhancer.cs @@ -0,0 +1,55 @@ +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.Drawing; +using MediaBrowser.Model.Entities; +using System; +using System.Drawing; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Providers +{ + public interface IImageEnhancer + { + /// + /// Return true only if the given image for the given item will be enhanced by this enhancer. + /// + /// The item. + /// Type of the image. + /// true if this enhancer will enhance the supplied image for the supplied item, false otherwise + bool Supports(BaseItem item, ImageType imageType); + + /// + /// Gets the priority or order in which this enhancer should be run. + /// + /// The priority. + MetadataProviderPriority Priority { get; } + + /// + /// Return the date of the last configuration change affecting the provided baseitem and image type + /// + /// The item. + /// Type of the image. + /// Date of last config change + DateTime LastConfigurationChange(BaseItem item, ImageType imageType); + + /// + /// Gets the size of the enhanced image. + /// + /// The item. + /// Type of the image. + /// Index of the image. + /// Size of the original image. + /// ImageSize. + ImageSize GetEnhancedImageSize(BaseItem item, ImageType imageType, int imageIndex, ImageSize originalImageSize); + + /// + /// Enhances the image async. + /// + /// The item. + /// The original image. + /// Type of the image. + /// Index of the image. + /// Task{Image}. + /// + Task EnhanceImageAsync(BaseItem item, Image originalImage, ImageType imageType, int imageIndex); + } +} \ No newline at end of file -- cgit v1.2.3