IImageEncoder.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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="width">The width.</param>
  30. /// <param name="height">The height.</param>
  31. /// <param name="quality">The quality.</param>
  32. /// <param name="options">The options.</param>
  33. /// <param name="outputFormat">The output format.</param>
  34. void EncodeImage(string inputPath, string outputPath, int width, int height, int quality, ImageProcessingOptions options, ImageFormat outputFormat);
  35. /// <summary>
  36. /// Creates the image collage.
  37. /// </summary>
  38. /// <param name="options">The options.</param>
  39. void CreateImageCollage(ImageCollageOptions options);
  40. /// <summary>
  41. /// Gets the name.
  42. /// </summary>
  43. /// <value>The name.</value>
  44. string Name { get; }
  45. /// <summary>
  46. /// Gets a value indicating whether [supports image collage creation].
  47. /// </summary>
  48. /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value>
  49. bool SupportsImageCollageCreation { get; }
  50. /// <summary>
  51. /// Gets a value indicating whether [supports image encoding].
  52. /// </summary>
  53. /// <value><c>true</c> if [supports image encoding]; otherwise, <c>false</c>.</value>
  54. bool SupportsImageEncoding { get; }
  55. }
  56. }