blob: 6266630b9e441ec2efbf56115f6fe8346ce12b9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Single translation unit that compiles the implementations of the
// vendored single-header image libraries. Keeping the implementation
// macros confined to one .c file avoids duplicate-symbol errors.
#define STB_IMAGE_IMPLEMENTATION
// We only decode raster formats we detect via magic bytes. Disable the
// formats we never feed in to shrink code size and attack surface.
#define STBI_NO_HDR
#define STBI_NO_LINEAR
#define STBI_NO_PSD
#define STBI_NO_PIC
#define STBI_NO_PNM
#define STBI_NO_TGA
#include "stb_image.h"
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "stb_image_resize2.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
// We feed jebp bytes from memory only; no file I/O needed.
#define JEBP_NO_STDIO
#define JEBP_IMPLEMENTATION
#include "jebp.h"
|