Table of Contents

Method GetMimeType

Namespace
LMKit.Media.Image
Assembly
LM-Kit.NET.dll

GetMimeType(string)

Resolves a file extension to the MIME type of the image format it belongs to.

public static string GetMimeType(string extension)

Parameters

extension string

The extension to resolve, with or without the leading dot, any casing (for example ".png", "JPEG").

Returns

string

The MIME type (for example image/png), or null when the extension does not belong to a known image format.

Share