Class FormatUtilities
Contains various helper methods based on the given configuration.
Inherited Members
Namespace: SixLabors.ImageSharp.Web
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public sealed class FormatUtilities
Constructors
| Improve this Doc View SourceFormatUtilities(IOptions<ImageSharpMiddlewareOptions>)
Initializes a new instance of the FormatUtilities class.
Declaration
public FormatUtilities(IOptions<ImageSharpMiddlewareOptions> options)
Parameters
Type | Name | Description |
---|---|---|
IOptions<ImageSharpMiddlewareOptions> | options | The middleware options. |
Methods
| Improve this Doc View SourceGetExtensionFromContentType(String)
Gets the correct extension for the given content type (mime-type).
Declaration
public string GetExtensionFromContentType(string contentType)
Parameters
Type | Name | Description |
---|---|---|
String | contentType | The content type (mime-type). |
Returns
Type | Description |
---|---|
String | The String. |
GetExtensionFromUri(String)
Gets the file extension for the given image uri.
Declaration
public string GetExtensionFromUri(string uri)
Parameters
Type | Name | Description |
---|---|---|
String | uri | The full request uri. |
Returns
Type | Description |
---|---|
String | The String. |