diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-02-06 21:31:41 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-02-06 22:58:12 +0100 |
| commit | 70c85925af31ee341f87fced39a67ab7fb4eed77 (patch) | |
| tree | 1e4e2116733b444a9024f922369aeaf0575c91c9 /Emby.Drawing/NullImageEncoder.cs | |
| parent | 0ef2b46106937c8acbab8e2a6a1e08affb823d31 (diff) | |
Move some arrays to generics
Diffstat (limited to 'Emby.Drawing/NullImageEncoder.cs')
| -rw-r--r-- | Emby.Drawing/NullImageEncoder.cs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Emby.Drawing/NullImageEncoder.cs b/Emby.Drawing/NullImageEncoder.cs index 14f0424ac..fc4a5af9f 100644 --- a/Emby.Drawing/NullImageEncoder.cs +++ b/Emby.Drawing/NullImageEncoder.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using MediaBrowser.Controller.Drawing; using MediaBrowser.Model.Drawing; @@ -6,15 +7,11 @@ namespace Emby.Drawing { public class NullImageEncoder : IImageEncoder { - public string[] SupportedInputFormats => - new[] - { - "png", - "jpeg", - "jpg" - }; - - public ImageFormat[] SupportedOutputFormats => new[] { ImageFormat.Jpg, ImageFormat.Png }; + public IReadOnlyCollection<string> SupportedInputFormats + => new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "png", "jpeg", "jpg" }; + + public IReadOnlyCollection<ImageFormat> SupportedOutputFormats + => new HashSet<ImageFormat>() { ImageFormat.Jpg, ImageFormat.Png }; public void CropWhiteSpace(string inputPath, string outputPath) { |
