Image

Functions

sg_image binocle_image_load(const char *filename)

an image

Loads an image file (.png or .jpg) through stb image. It applies linear filtering by default.

Parameters

filename – the full filename of the image we want to load

Returns

the actual image data

sg_image binocle_image_load_with_filter(const char *filename, sg_filter filter)

Loads an image file (.png or .jpg) through stb image.

Parameters
  • filename – the full filename of the image we want to load

  • filter – the filter to use (linear or nearest)

Returns

the actual image data

void binocle_image_destroy(sg_image image)

Frees the memory allocated for the image.

Parameters

image – the image to destroy