jellyfin/MediaBrowser.Controller/Drawing/IImageProcessor.cs

87 lines
3.0 KiB
C#
Raw Normal View History

2013-09-18 18:49:06 +00:00
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Entities;
using System;
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 image enhancers.
/// </summary>
/// <value>The image enhancers.</value>
IEnumerable<IImageEnhancer> ImageEnhancers { get; }
/// <summary>
/// Gets the size of the image.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>ImageSize.</returns>
ImageSize GetImageSize(string path);
/// <summary>
/// Gets the size of the image.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="imageDateModified">The image date modified.</param>
/// <returns>ImageSize.</returns>
ImageSize GetImageSize(string path, DateTime imageDateModified);
/// <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>
2013-12-19 21:51:32 +00:00
IEnumerable<IImageEnhancer> GetSupportedEnhancers(IHasImages item, ImageType imageType);
2013-09-18 18:49:06 +00:00
/// <summary>
/// Gets the image cache tag.
/// </summary>
/// <param name="item">The item.</param>
2014-02-07 20:30:41 +00:00
/// <param name="image">The image.</param>
2013-09-18 18:49:06 +00:00
/// <returns>Guid.</returns>
2014-05-08 20:09:53 +00:00
string GetImageCacheTag(IHasImages item, ItemImageInfo image);
2013-09-18 18:49:06 +00:00
/// <summary>
/// Gets the image cache tag.
/// </summary>
/// <param name="item">The item.</param>
2014-06-18 15:12:20 +00:00
/// <param name="image">The image.</param>
2013-09-18 18:49:06 +00:00
/// <param name="imageEnhancers">The image enhancers.</param>
/// <returns>Guid.</returns>
2014-06-18 15:12:20 +00:00
string GetImageCacheTag(IHasImages item, ItemImageInfo image, List<IImageEnhancer> imageEnhancers);
2013-09-18 18:49:06 +00:00
/// <summary>
/// Processes the image.
/// </summary>
2013-09-19 15:12:28 +00:00
/// <param name="options">The options.</param>
2013-09-18 18:49:06 +00:00
/// <param name="toStream">To stream.</param>
/// <returns>Task.</returns>
2013-09-19 15:12:28 +00:00
Task ProcessImage(ImageProcessingOptions options, Stream toStream);
/// <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>
2013-12-19 21:51:32 +00:00
Task<string> GetEnhancedImage(IHasImages item, ImageType imageType, int imageIndex);
2013-09-18 18:49:06 +00:00
}
}