The OpenD Programming Language

Image.identifyFormatFromFileName

Identify the format of an image by looking at its extension.

struct Image
nothrow @nogc @safe static
identifyFormatFromFileName
(
const(char)* filename
)

Return Value

Its ImageFormat, or ImageFormat.unknown in case of identification failure or input error. Maybe then you can try identifyFormatFromFile instead, which minimally reads the input.

Meta