NullImageEncoder.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Controller.Drawing;
  4. using MediaBrowser.Model.Drawing;
  5. namespace Emby.Drawing
  6. {
  7. /// <summary>
  8. /// A fallback implementation of <see cref="IImageEncoder" />.
  9. /// </summary>
  10. public class NullImageEncoder : IImageEncoder
  11. {
  12. /// <inheritdoc />
  13. public IReadOnlyCollection<string> SupportedInputFormats
  14. => new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "png", "jpeg", "jpg" };
  15. /// <inheritdoc />
  16. public IReadOnlyCollection<ImageFormat> SupportedOutputFormats
  17. => new HashSet<ImageFormat>() { ImageFormat.Jpg, ImageFormat.Png };
  18. /// <inheritdoc />
  19. public string Name => "Null Image Encoder";
  20. /// <inheritdoc />
  21. public bool SupportsImageCollageCreation => false;
  22. /// <inheritdoc />
  23. public bool SupportsImageEncoding => false;
  24. /// <inheritdoc />
  25. public ImageDimensions GetImageSize(string path)
  26. => throw new NotImplementedException();
  27. /// <inheritdoc />
  28. public string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)
  29. {
  30. throw new NotImplementedException();
  31. }
  32. /// <inheritdoc />
  33. public void CreateImageCollage(ImageCollageOptions options)
  34. {
  35. throw new NotImplementedException();
  36. }
  37. }
  38. }