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); } }