NullImageEncoder.cs 1.4 KB

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