The OpenD Programming Language

Image.identifyFormatFromFile

Identify the format of an image by minimally reading it. Read first bytes of a file to identify it. You can use a filename, a memory location, or your own IOStream.

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

Return Value

Its ImageFormat, or ImageFormat.unknown in case of identification failure or input error.

Meta