imageFromPng

The return value should be casted to indexed or truecolor depending on what the file is. You can also use getAsTrueColorImage to forcibly convert it if needed.

To get an image from a png file, do something like this:

auto i = cast(TrueColorImage) imageFromPng(readPng(cast(ubyte)[]) std.file.read("file.png")));

imageFromPng
()
Suggestion Box / Bug Report