aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Drawing/NullImageEncoder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Jellyfin.Drawing/NullImageEncoder.cs')
-rw-r--r--src/Jellyfin.Drawing/NullImageEncoder.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/Jellyfin.Drawing/NullImageEncoder.cs b/src/Jellyfin.Drawing/NullImageEncoder.cs
new file mode 100644
index 000000000..171128bed
--- /dev/null
+++ b/src/Jellyfin.Drawing/NullImageEncoder.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using MediaBrowser.Controller.Drawing;
+using MediaBrowser.Model.Drawing;
+
+namespace Jellyfin.Drawing;
+
+/// <summary>
+/// A fallback implementation of <see cref="IImageEncoder" />.
+/// </summary>
+public class NullImageEncoder : IImageEncoder
+{
+ /// <inheritdoc />
+ public IReadOnlyCollection<string> SupportedInputFormats
+ => new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "png", "jpeg", "jpg" };
+
+ /// <inheritdoc />
+ public IReadOnlyCollection<ImageFormat> SupportedOutputFormats
+ => new HashSet<ImageFormat>() { ImageFormat.Jpg, ImageFormat.Png };
+
+ /// <inheritdoc />
+ public string Name => "Null Image Encoder";
+
+ /// <inheritdoc />
+ public bool SupportsImageCollageCreation => false;
+
+ /// <inheritdoc />
+ public bool SupportsImageEncoding => false;
+
+ /// <inheritdoc />
+ public ImageDimensions GetImageSize(string path)
+ => throw new NotImplementedException();
+
+ /// <inheritdoc />
+ public string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat)
+ {
+ throw new NotImplementedException();
+ }
+
+ /// <inheritdoc />
+ public void CreateImageCollage(ImageCollageOptions options, string? libraryName)
+ {
+ throw new NotImplementedException();
+ }
+
+ /// <inheritdoc />
+ public void CreateSplashscreen(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops)
+ {
+ throw new NotImplementedException();
+ }
+
+ /// <inheritdoc />
+ public string GetImageBlurHash(int xComp, int yComp, string path)
+ {
+ throw new NotImplementedException();
+ }
+}