#include #include extern void *stb_image_zig_malloc(uint32_t amount); extern void *stb_image_zig_realloc(void *mem, uint32_t amount); extern void stb_image_zig_free(void *mem); #define STB_IMAGE_IMPLEMENTATION #define STBI_NO_STDIO #define STBI_ONLY_PNG #define STB_IMAGE_STATIC #include "stb_image.h" void zig_stbi_image_free(void *retval_from_stbi_load) { return stbi_image_free(retval_from_stbi_load); } stbi_uc *zig_stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) { return stbi_load_from_memory(buffer, len, x, y, comp, req_comp); }