#include #define STB_IMAGE_IMPLEMENTATION #define STBI_ONLY_JPEG #define STBI_NO_STDIO #define STBI_NO_HDR #define STBI_NO_LINEAR #define STBI_MALLOC(sz) heap_caps_malloc(sz, MALLOC_CAP_SPIRAM) #define STBI_REALLOC(p,newsz) heap_caps_realloc(p, newsz, MALLOC_CAP_SPIRAM) #define STBI_FREE(p) free(p) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #include "stb_image.h" #pragma GCC diagnostic pop