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.

GetExtension(ImageOutputFormat)

The canonical extension of an output format, lowercase and dot-prefixed (for example ".jpg").

public static string GetExtension(ImageOutputFormat format)

Parameters

format ImageOutputFormat

Returns

string
Share