2020-01-26 14:41:43 +03:00
|
|
|
#define STB_IMAGE_IMPLEMENTATION
|
2021-12-08 01:31:37 +03:00
|
|
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
2023-06-19 18:14:26 +03:00
|
|
|
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
2022-10-11 15:19:36 +03:00
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
extern void * stbi__callback_malloc(size_t size);
|
|
|
|
extern void * stbi__callback_realloc(void *ptr, size_t size);
|
|
|
|
extern void stbi__callback_free(void *ptr);
|
|
|
|
|
|
|
|
#define STBI_MALLOC(sz) stbi__callback_malloc(sz)
|
|
|
|
#define STBI_REALLOC(p,newsz) stbi__callback_realloc(p,newsz)
|
|
|
|
#define STBI_FREE(p) stbi__callback_free(p)
|
|
|
|
#define STBIW_MALLOC(sz) stbi__callback_malloc(sz)
|
|
|
|
#define STBIW_REALLOC(p,newsz) stbi__callback_realloc(p,newsz)
|
|
|
|
#define STBIW_FREE(p) stbi__callback_free(p)
|
|
|
|
|
2020-01-26 14:41:43 +03:00
|
|
|
#include "stb_image.h"
|
2021-12-08 01:31:37 +03:00
|
|
|
#include "stb_image_write.h"
|
2023-06-19 18:14:26 +03:00
|
|
|
#include "stb_image_resize.h"
|
2021-12-08 01:31:37 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
void set_png_compression_level(int level);
|
|
|
|
void write_force_png_filter(int level);
|
|
|
|
void write_tga_with_rle(int level);
|
|
|
|
*/
|
|
|
|
|
|
|
|
void set_png_compression_level(int level) {
|
|
|
|
stbi_write_png_compression_level = level;
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_force_png_filter(int level){
|
|
|
|
stbi_write_force_png_filter = level;
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_tga_with_rle(int level) {
|
|
|
|
stbi_write_tga_with_rle = level;
|
2022-10-11 15:19:36 +03:00
|
|
|
}
|
|
|
|
|