using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Entities;
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 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<(string path, string mimeType, DateTime dateModified)> 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);
}
}