34,982
stars
+6+54+175
8,115
forks
629
watchers
879
prs
987
issues
0
releases
109
discussions
README
stb === single-file public domain (or MIT licensed) libraries for C/C++ Several projects have been moved to their own repositories: image resize: stb_image_resize sprintf: stb_sprintf This project discusses security-relevant bugs in public in Github Issues and Pull Requests, and it may take significant time for security fixes to be implemented or merged. If this poses an unreasonable risk to your project, do not use stb libraries. Noteworthy: image loader: stb_image.h image writer: stb_image_write.h image resizer: stb_image_resize2.h font text rasterizer: stb_truetype.h typesafe containers: stb_ds.h Most libraries by stb, except: stb_dxt by Fabian "ryg" Giesen, original stb_image_resize by Jorge L. "VinoBS" Rodriguez, and stb_image_resize2 and stb_sprintf by Jeff Roberts. library | latest version | category | LoC | description --------------------- | ---- | -------- | --- | -------------------------------- stb_vorbis.c | 1.22 | audio | 5584 | decode ogg vorbis files from file/memory to float/16-bit signed output stb_hexwave.h | 0.5 | audio | 680 | audio waveform synthesizer stb_image.h | 2.30 | graphics | 7988 | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC stb_truetype.h | 1.26 | graphics | 5079 | parse, decode, and rasterize characters from truetype fonts stb_image_write.h | 1.16 | graphics | 1724 | image writing to disk: PNG, TGA, BMP stb_rect_pack.h | 1.01 | graphics | 623 | simple 2D rectangle packer with decent quality stb_perlin.h | 0.5 | graphics | 428 | perlin's revised simplex noise w/ different seeds stb_ds.h | 0.67 | utility | 1895 | typesafe dynamic array and hash tables for C, will compile in C++ stb_textedit.h | 1.14 | user interface | 1429 | guts of a text editor for games etc implementing them from scratch stb_voxel_render.h | 0.89 | 3D graphics | 3807 | Minecraft-esque voxel rendering "engine" with many more features stb_dxt.h | 1.12 | 3D graphics | 719 | Fabian "ryg" Giesen's real-time DXT compressor stb_easy_font.h | 1.1 | 3D graphics | 305 | quick-and-dirty easy-to-deploy bitmap font for printing frame rate, etc stb_tilemap_editor.h | 0.42 | game dev | 4187 | embeddable tilemap editor stb_herringbone_wa... | 0.7 | game dev | 1221 | herringbone Wang tile map generator stb_c_lexer.h | 0.12 | parsing | 941 | simplify writing parsers for C-like languages stb_divide.h | 0.94 | math | 433 | more useful 32-bit modulus e.g. "euclidean divide" stb_connected_comp... | 0.96 | misc | 1049 | incrementally compute reachability on grids stb_leakcheck.h | 0.6 | misc | 194 | quick-and-dirty malloc/free leak-checking stb_include.h | 0.02 | misc | 295 | implement recursive include support, particularly for GLSL Total libraries: 19 Total lines of C code: 38581 FAQ --- What's the license? These libraries are in the public domain. You can do anything you want with them. You have no legal obligation to do anything else, although I appreciate attribution. They
Top issues
#1933stb_vorbis: integer overflow in codebook multiplicands allocation15 comments · 2026-04-10#1831STBI 2.30 - BMP doesn't load correctly12 comments · 2025-08-19#1329stb_vorbis: Replace plain int with int64_t at offset/length related values11 comments · 2022-05-21#1753Ignore C499610 comments · 2025-02-26#1977stb_vorbis: inverse_mdct produces garbage output for legal block sizes 64 and 1289 comments · 2026-07-13#1421Failed to run make under tests9 comments · 2022-12-19#1446stb_image_write: warning C4996: ... Consider using sprintf_s ...8 comments · 2023-02-03#915Animated GIF frame decode bug. background not clear8 comments · 2020-02-19
Discussions
#1986GNU compiler warning0 comments · 2026-08-10#1945stb_image: Support for POWER SIMD2 comments · 2026-05-04#1910Confusion with stbtt_GetFontBoundingBox functionality or documentation1 comments · 2026-03-10#1864How to handle transparent layer?1 comments · 2025-12-12#1842`stbi_write_png()` function subtleties when writing a file1 comments · 2025-09-29#1840stbi_load an image, then write it back out generates access violation1 comments · 2025-09-24#1835STBI not loading image despite giving the right directory for absolutely no reason7 comments · 2025-09-01#1826Expected range for stb_perlin_fbm_noise34 comments · 2025-08-03