Table of Contents

Method GetExtension

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

GetExtension(string)

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

public static string GetExtension(string mimeType)

Parameters

mimeType string

The MIME type to resolve, any casing; accepted aliases resolve too (for example image/heif resolves alongside image/heic).

Returns

string

The canonical extension, lowercase and dot-prefixed (for example ".jpg" for image/jpeg), or null when the MIME type does not identify a known image format.

Share