IImageEncoder.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using MediaBrowser.Controller.Drawing;
  2. using MediaBrowser.Model.Drawing;
  3. using System;
  4. namespace Emby.Drawing
  5. {
  6. public interface IImageEncoder : IDisposable
  7. {
  8. /// <summary>
  9. /// Gets the supported input formats.
  10. /// </summary>
  11. /// <value>The supported input formats.</value>
  12. string[] SupportedInputFormats { get; }
  13. /// <summary>
  14. /// Gets the supported output formats.
  15. /// </summary>
  16. /// <value>The supported output formats.</value>
  17. ImageFormat[] SupportedOutputFormats { get; }
  18. /// <summary>
  19. /// Crops the white space.
  20. /// </summary>
  21. /// <param name="inputPath">The input path.</param>
  22. /// <param name="outputPath">The output path.</param>
  23. void CropWhiteSpace(string inputPath, string outputPath);
  24. /// <summary>
  25. /// Encodes the image.
  26. /// </summary>
  27. /// <param name="inputPath">The input path.</param>
  28. /// <param name="outputPath">The output path.</param>
  29. /// <param name="autoOrient">if set to <c>true</c> [automatic orient].</param>
  30. /// <param name="width">The width.</param>
  31. /// <param name="height">The height.</param>
  32. /// <param name="quality">The quality.</param>
  33. /// <param name="options">The options.</param>
  34. /// <param name="outputFormat">The output format.</param>
  35. void EncodeImage(string inputPath, string outputPath, bool autoOrient, int width, int height, int quality, ImageProcessingOptions options, ImageFormat outputFormat);
  36. /// <summary>
  37. /// Creates the image collage.
  38. /// </summary>
  39. /// <param name="options">The options.</param>
  40. void CreateImageCollage(ImageCollageOptions options);
  41. /// <summary>
  42. /// Gets the name.
  43. /// </summary>
  44. /// <value>The name.</value>
  45. string Name { get; }
  46. /// <summary>
  47. /// Gets a value indicating whether [supports image collage creation].
  48. /// </summary>
  49. /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value>
  50. bool SupportsImageCollageCreation { get; }
  51. /// <summary>
  52. /// Gets a value indicating whether [supports image encoding].
  53. /// </summary>
  54. /// <value><c>true</c> if [supports image encoding]; otherwise, <c>false</c>.</value>
  55. bool SupportsImageEncoding { get; }
  56. }
  57. }