IImageEncoder.cs 2.2 KB

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