IImageEncoder.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Drawing;
  4. namespace MediaBrowser.Controller.Drawing
  5. {
  6. public interface IImageEncoder
  7. {
  8. /// <summary>
  9. /// Gets the supported input formats.
  10. /// </summary>
  11. /// <value>The supported input formats.</value>
  12. IReadOnlyCollection<string> SupportedInputFormats { get; }
  13. /// <summary>
  14. /// Gets the supported output formats.
  15. /// </summary>
  16. /// <value>The supported output formats.</value>
  17. IReadOnlyCollection<ImageFormat> SupportedOutputFormats { get; }
  18. /// <summary>
  19. /// Gets the display name for the encoder.
  20. /// </summary>
  21. /// <value>The display name.</value>
  22. string Name { get; }
  23. /// <summary>
  24. /// Gets a value indicating whether [supports image collage creation].
  25. /// </summary>
  26. /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value>
  27. bool SupportsImageCollageCreation { get; }
  28. /// <summary>
  29. /// Gets a value indicating whether [supports image encoding].
  30. /// </summary>
  31. /// <value><c>true</c> if [supports image encoding]; otherwise, <c>false</c>.</value>
  32. bool SupportsImageEncoding { get; }
  33. /// <summary>
  34. /// Get the dimensions of an image from the filesystem.
  35. /// </summary>
  36. /// <param name="path">The filepath of the image.</param>
  37. /// <returns>The image dimensions.</returns>
  38. ImageDimensions GetImageSize(string path);
  39. /// <summary>
  40. /// Encode an image.
  41. /// </summary>
  42. string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat);
  43. /// <summary>
  44. /// Create an image collage.
  45. /// </summary>
  46. /// <param name="options">The options to use when creating the collage.</param>
  47. void CreateImageCollage(ImageCollageOptions options);
  48. }
  49. }