nothings /stb

stb single-file public domain libraries for C/C++

★ 34,982⑂ 8,115👁 629⑃ 879● 987▤ 0◈ 109
CNOASSERTIONCreated 2014-05-25nothings.org
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

Discussions

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON