module lib.stb.image

Public interface to stb_image.h, implementation in stb_image.volt.

Code Map

//! Public interface to stb_image.h, implementation in stb_image.volt.
module lib.stb.image;


enum STBI_default;
enum STBI_grey;
enum STBI_grey_alpha;
enum STBI_rgb;
enum STBI_rgb_alpha;

alias stbi_uc = u8;

struct stbi_io_callbacks
{
public:
	read: fn (void*, stbi_uc*, i32) (i32);
	skip: fn (void*, i32) (void);
	oef: fn (void*) (i32);
}

fn stbi_info_from_memory(data: const(void)[], x: i32, y: i32, comp: i32) i32 { }
fn stbi_load_from_memory(data: const(void)[], x: i32, y: i32, comp: i32, req_comp: i32) stbi_uc* { }
fn stbi_failure_reason() const(char)*;
fn stbi_set_flip_vertically_on_load(flag_true_if_should_flip: i32);
fn stbi_info_from_memory(buffer: const(stbi_uc)*, len: i32, x: i32*, y: i32*, comp: i32*) i32;
fn stbi_info_from_callbacks(c: const(stbi_io_callbacks)*, user: void*, x: i32*, y: i32*, comp: i32*) i32;
fn stbi_load_from_memory(buffer: const(stbi_uc)*, len: i32, x: i32*, y: i32*, comp: i32*, req_comp: i32) stbi_uc*;
fn stbi_load_from_callbacks(clbk: const(stbi_io_callbacks)*, user: void*, x: i32*, y: i32*, comp: i32*, req_comp: i32) stbi_uc*;
fn stbi_image_free(retval_from_stbi_load: stbi_uc*);