IImageEncoder.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. /// Gets the size of the image.
  20. /// </summary>
  21. /// <param name="path">The path.</param>
  22. /// <returns>ImageSize.</returns>
  23. ImageSize GetImageSize(string path);
  24. /// <summary>
  25. /// Crops the white space.
  26. /// </summary>
  27. /// <param name="inputPath">The input path.</param>
  28. /// <param name="outputPath">The output path.</param>
  29. void CropWhiteSpace(string inputPath, string outputPath);
  30. /// <summary>
  31. /// Encodes the image.
  32. /// </summary>
  33. /// <param name="inputPath">The input path.</param>
  34. /// <param name="outputPath">The output path.</param>
  35. /// <param name="width">The width.</param>
  36. /// <param name="height">The height.</param>
  37. /// <param name="quality">The quality.</param>
  38. /// <param name="options">The options.</param>
  39. void EncodeImage(string inputPath, string outputPath, int width, int height, int quality, ImageProcessingOptions options);
  40. /// <summary>
  41. /// Creates the image collage.
  42. /// </summary>
  43. /// <param name="options">The options.</param>
  44. void CreateImageCollage(ImageCollageOptions options);
  45. /// <summary>
  46. /// Gets the name.
  47. /// </summary>
  48. /// <value>The name.</value>
  49. string Name { get; }
  50. }
  51. }