IImageEncoder.cs 2.2 KB

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