diff --git a/src/ImageSharp/Configuration.cs b/src/ImageSharp/Configuration.cs index a9322467cb..b0291dec56 100644 --- a/src/ImageSharp/Configuration.cs +++ b/src/ImageSharp/Configuration.cs @@ -76,6 +76,11 @@ public Configuration(params IConfigurationModule[] configurationModules) /// public ParallelOptions ParallelOptions { get; } = new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount }; + /// + /// Gets the currently registered s. + /// + public IEnumerable ImageFormats => this.imageFormats; + /// /// Gets the maximum header size of all the formats. /// @@ -96,11 +101,6 @@ public Configuration(params IConfigurationModule[] configurationModules) /// internal IEnumerable> ImageEncoders => this.mimeTypeEncoders; - /// - /// Gets the currently registered s. - /// - internal IEnumerable ImageFormats => this.imageFormats; - #if !NETSTANDARD1_1 /// /// Gets or sets the fielsystem helper for accessing the local file system. @@ -195,29 +195,12 @@ public void AddImageFormatDetector(IImageFormatDetector detector) this.SetMaxHeaderSize(); } - /// - /// Creates the default instance with the following s preregistered: - /// - /// - /// - /// - /// - /// The default configuration of - internal static Configuration CreateDefaultInstance() - { - return new Configuration( - new PngConfigurationModule(), - new JpegConfigurationModule(), - new GifConfigurationModule(), - new BmpConfigurationModule()); - } - /// /// For the specified mime type find the decoder. /// /// The format to discover /// The if found otherwise null - internal IImageDecoder FindDecoder(IImageFormat format) + public IImageDecoder FindDecoder(IImageFormat format) { Guard.NotNull(format, nameof(format)); if (this.mimeTypeDecoders.TryGetValue(format, out IImageDecoder decoder)) @@ -233,7 +216,7 @@ internal IImageDecoder FindDecoder(IImageFormat format) /// /// The format to discover /// The if found otherwise null - internal IImageEncoder FindEncoder(IImageFormat format) + public IImageEncoder FindEncoder(IImageFormat format) { Guard.NotNull(format, nameof(format)); if (this.mimeTypeEncoders.TryGetValue(format, out IImageEncoder encoder)) @@ -244,6 +227,23 @@ internal IImageEncoder FindEncoder(IImageFormat format) return null; } + /// + /// Creates the default instance with the following s preregistered: + /// + /// + /// + /// + /// + /// The default configuration of + internal static Configuration CreateDefaultInstance() + { + return new Configuration( + new PngConfigurationModule(), + new JpegConfigurationModule(), + new GifConfigurationModule(), + new BmpConfigurationModule()); + } + /// /// Sets the max header size. ///