ImageSharp contains a Configuration class designed to allow the configuration of application wide settings. This class provides a range of configuration opportunities that cover format support, memory and parallelization settings and more.
Default is a shared singleton that is used to configure the default behavior of the ImageSharp library but it is possible to provide your own instances depended upon your required setup.
The Configuration class can be injected in several places within the API to allow overriding global values. This provides you with the means to apply fine grain control over your processing activity to cater for your environment.
- The Image and Image<TPixel> constructors.
- The Load methods and variants.
- The Mutate and Clone methods.
As mentioned in Image Formats it is possible to configure your own format collection for the API to consume. For example, if you wanted to restrict the library to support a specific collection of formats you would configure the library as follows:
var configuration = new Configuration( new PngConfigurationModule(), new JpegConfigurationModule(), new GifConfigurationModule(), new BmpConfigurationModule(), new TgaConfigurationModule() new CustomFormatConfigurationModule());