From f83578fdc9264019a1a1cef8c5484a161167d3dd Mon Sep 17 00:00:00 2001 From: t Date: Tue, 7 Jul 2026 11:26:32 -0600 Subject: initial commit, moved libpanto over from the pantograph repo --- src/cdeps/image_impl.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/cdeps/image_impl.c (limited to 'src/cdeps/image_impl.c') diff --git a/src/cdeps/image_impl.c b/src/cdeps/image_impl.c new file mode 100644 index 0000000..6266630 --- /dev/null +++ b/src/cdeps/image_impl.c @@ -0,0 +1,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" -- cgit v1.3