Class ImageFormatManager
Collection of Image Formats to be used in Configuration class.
Inherited Members
Namespace: SixLabors.ImageSharp.Formats
Assembly: SixLabors.ImageSharp.dll
Syntax
public class ImageFormatManagerConstructors
| Improve this Doc View SourceImageFormatManager()
Initializes a new instance of the ImageFormatManager class.
Declaration
public ImageFormatManager()Properties
| Improve this Doc View SourceImageFormats
Gets the currently registered IImageFormats.
Declaration
public IEnumerable<IImageFormat> ImageFormats { get; }Property Value
| Type | Description | 
|---|---|
| IEnumerable<IImageFormat> | 
Methods
| Improve this Doc View SourceAddImageFormat(IImageFormat)
Registers a new format provider.
Declaration
public void AddImageFormat(IImageFormat format)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageFormat | format | The format to register as a known format. | 
AddImageFormatDetector(IImageFormatDetector)
Adds a new detector for detecting mime types.
Declaration
public void AddImageFormatDetector(IImageFormatDetector detector)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageFormatDetector | detector | The detector to add | 
ClearImageFormatDetectors()
Removes all the registered image format detectors.
Declaration
public void ClearImageFormatDetectors()FindDecoder(IImageFormat)
For the specified mime type find the decoder.
Declaration
public IImageDecoder FindDecoder(IImageFormat format)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageFormat | format | The format to discover | 
Returns
| Type | Description | 
|---|---|
| IImageDecoder | The IImageDecoder if found otherwise null | 
FindEncoder(IImageFormat)
For the specified mime type find the encoder.
Declaration
public IImageEncoder FindEncoder(IImageFormat format)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageFormat | format | The format to discover | 
Returns
| Type | Description | 
|---|---|
| IImageEncoder | The IImageEncoder if found otherwise null | 
FindFormatByFileExtension(String)
For the specified file extensions type find the e IImageFormat.
Declaration
public IImageFormat FindFormatByFileExtension(string extension)Parameters
| Type | Name | Description | 
|---|---|---|
| String | extension | The extension to discover | 
Returns
| Type | Description | 
|---|---|
| IImageFormat | The IImageFormat if found otherwise null | 
FindFormatByMimeType(String)
For the specified mime type find the IImageFormat.
Declaration
public IImageFormat FindFormatByMimeType(string mimeType)Parameters
| Type | Name | Description | 
|---|---|---|
| String | mimeType | The mime-type to discover | 
Returns
| Type | Description | 
|---|---|
| IImageFormat | The IImageFormat if found; otherwise null | 
SetDecoder(IImageFormat, IImageDecoder)
Sets a specific image decoder as the decoder for a specific image format.
Declaration
public void SetDecoder(IImageFormat imageFormat, IImageDecoder decoder)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageFormat | imageFormat | The image format to register the encoder for. | 
| IImageDecoder | decoder | The decoder to use, | 
SetEncoder(IImageFormat, IImageEncoder)
Sets a specific image encoder as the encoder for a specific image format.
Declaration
public void SetEncoder(IImageFormat imageFormat, IImageEncoder encoder)Parameters
| Type | Name | Description | 
|---|---|---|
| IImageFormat | imageFormat | The image format to register the encoder for. | 
| IImageEncoder | encoder | The encoder to use, |