jellyfin/MediaBrowser.Controller/Drawing/IImageEncoder.cs

71 lines
2.6 KiB
C#
Raw Normal View History

#pragma warning disable CS1591
2020-08-31 07:35:37 -07:00
#nullable enable
using System;
2019-02-06 13:31:41 -07:00
using System.Collections.Generic;
2018-12-27 16:27:57 -07:00
using MediaBrowser.Model.Drawing;
namespace MediaBrowser.Controller.Drawing
{
public interface IImageEncoder
{
/// <summary>
/// Gets the supported input formats.
/// </summary>
/// <value>The supported input formats.</value>
2019-02-06 13:31:41 -07:00
IReadOnlyCollection<string> SupportedInputFormats { get; }
2018-12-27 16:27:57 -07:00
/// <summary>
/// Gets the supported output formats.
/// </summary>
/// <value>The supported output formats.</value>
2019-02-06 13:31:41 -07:00
IReadOnlyCollection<ImageFormat> SupportedOutputFormats { get; }
2018-12-27 16:27:57 -07:00
/// <summary>
/// Gets the display name for the encoder.
2018-12-27 16:27:57 -07:00
/// </summary>
/// <value>The display name.</value>
2018-12-27 16:27:57 -07:00
string Name { get; }
/// <summary>
/// Gets a value indicating whether [supports image collage creation].
/// </summary>
/// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value>
bool SupportsImageCollageCreation { get; }
/// <summary>
/// Gets a value indicating whether [supports image encoding].
/// </summary>
/// <value><c>true</c> if [supports image encoding]; otherwise, <c>false</c>.</value>
bool SupportsImageEncoding { get; }
/// <summary>
/// Get the dimensions of an image from the filesystem.
/// </summary>
/// <param name="path">The filepath of the image.</param>
/// <returns>The image dimensions.</returns>
ImageDimensions GetImageSize(string path);
2020-03-23 12:05:49 -07:00
/// <summary>
/// Gets the blurhash of an image.
2020-03-23 12:05:49 -07:00
/// </summary>
/// <param name="xComp">Amount of X components of DCT to take.</param>
/// <param name="yComp">Amount of Y components of DCT to take.</param>
2020-03-23 12:05:49 -07:00
/// <param name="path">The filepath of the image.</param>
/// <returns>The blurhash.</returns>
string GetImageBlurHash(int xComp, int yComp, string path);
2020-03-23 12:05:49 -07:00
/// <summary>
/// Encode an image.
/// </summary>
string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat);
/// <summary>
/// Create an image collage.
/// </summary>
/// <param name="options">The options to use when creating the collage.</param>
/// <param name="libraryName">Optional. </param>
void CreateImageCollage(ImageCollageOptions options, string? libraryName);
2018-12-27 16:27:57 -07:00
}
}