Module: image
Synopsis
#include <core/image.h>
Load images from disk or memory and convert them as textures.
Functions
image_open
Load the image from path
on disk and convert it as a texture into tex
.
Returns false on errors, in this case tex
remains uninitialized and must not
be used.
bool
image_open(struct texture *tex, const char *path)
image_openmem
Load the image from memory pointed by buffer
of size size
and convert it as
a texture into tex
. Returns false on errors, in this case tex
remains
uninitialized and must not be used.
Note
The argument buffer
must stay valid until the font is no longer used.
bool
image_openmem(struct texture *tex, const void *buffer, size_t size)