The OpenD Programming Language

Image.identifyFormatFromMemory

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
identifyFormatFromMemory
(
const(ubyte)[] bytes
)

Return Value

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

Meta