Method GetMimeType
GetMimeType(string)
Resolves a file extension to the MIME type of the image format it belongs to.
public static string GetMimeType(string extension)
Parameters
extensionstringThe extension to resolve, with or without the leading dot, any casing (for example
".png","JPEG").
Returns
- string
The MIME type (for example
image/png), ornullwhen the extension does not belong to a known image format.
GetMimeType(ImageOutputFormat)
The MIME type of an output format (for example image/jpeg).
public static string GetMimeType(ImageOutputFormat format)
Parameters
formatImageOutputFormat