Class Configuration
Provides configuration which allows altering default behaviour or extending the library.
Inherited Members
Namespace: SixLabors.ImageSharp
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class Configuration
Constructors
| Improve this Doc View SourceConfiguration()
Initializes a new instance of the Configuration class.
Declaration
public Configuration()
Configuration(IConfigurationModule[])
Initializes a new instance of the Configuration class.
Declaration
public Configuration(params IConfigurationModule[] configurationModules)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationModule[] | configurationModules | A collection of configuration modules to register |
Properties
| Improve this Doc View SourceDefault
Gets the default Configuration instance.
Declaration
public static Configuration Default { get; }
Property Value
Type | Description |
---|---|
Configuration |
ImageFormats
Gets the currently registered IImageFormats.
Declaration
public IEnumerable<IImageFormat> ImageFormats { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IImageFormat> |
ImageFormatsManager
Gets or sets the ImageFormatManager that is currently in use.
Declaration
public ImageFormatManager ImageFormatsManager { get; set; }
Property Value
Type | Description |
---|---|
ImageFormatManager |
MaxDegreeOfParallelism
Gets or sets the maximum number of concurrent tasks enabled in ImageSharp algorithms configured with this Configuration instance. Initialized with ProcessorCount by default.
Declaration
public int MaxDegreeOfParallelism { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
MemoryAllocator
Gets or sets the MemoryAllocator that is currently in use.
Declaration
public MemoryAllocator MemoryAllocator { get; set; }
Property Value
Type | Description |
---|---|
MemoryAllocator |
Properties
Gets a set of properties for the Congiguration.
Declaration
public IDictionary<object, object> Properties { get; }
Property Value
Type | Description |
---|---|
IDictionary<Object, Object> |
Remarks
This can be used for storing global settings and defaults to be accessable to processors.
ReadOrigin
Gets or sets the position in a stream to use for reading when using a seekable stream as an image data source.
Declaration
public ReadOrigin ReadOrigin { get; set; }
Property Value
Type | Description |
---|---|
ReadOrigin |
StreamProcessingBufferSize
Gets or sets the size of the buffer to use when working with streams. Intitialized with SixLabors.ImageSharp.Configuration.DefaultStreamProcessingBufferSize by default.
Declaration
public int StreamProcessingBufferSize { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceClone()
Creates a shallow copy of the Configuration.
Declaration
public Configuration Clone()
Returns
Type | Description |
---|---|
Configuration | A new configuration instance. |
Configure(IConfigurationModule)
Registers a new format provider.
Declaration
public void Configure(IConfigurationModule configuration)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationModule | configuration | The configuration provider to call configure on. |