1
0
Fork 0
stb libraries I use
Find a file
2025-10-30 18:42:03 -05:00
c refactor, fix missing files, start c++ implementations 2025-10-28 12:18:58 -05:00
cpp update easyfont 2025-10-30 18:42:03 -05:00
img move img to root 2025-10-30 18:39:55 -05:00
tests add rect rotation, node merging, adaptive quantization to rect_pack 2025-10-30 09:44:04 -05:00
.gitignore finish truetype 2025-10-30 08:05:05 -05:00
easyfont.hpp update easyfont 2025-10-30 18:42:03 -05:00
README.md begin split of img library 2025-10-30 13:54:00 -05:00
STYLE.md scaffold truetype.hpp 2025-10-29 11:12:21 -05:00
TODO.md split tga, simplify bmp 2025-10-30 14:53:08 -05:00

STB Libraries

Just the stb header files I use in my projects. They're copied in their entirety, copyright notices included. The GitHub repo for them is here.

The c files are in c/, but cpp/ contains refactored versions for C++17 and beyond. These include the author name and date but all are assumed to be MIT/Public Domain by default.

C++

The C++ conversions are as faithful API-wise as is possible. However, I am making internal changes to improve these libraries to fit more use cases and be as efficient as can be. They retain their original spirit and the credit goes entirely to Sean Barrett for their creation.

Image Processing

The image processing library takes from stb_image.h directly. It uses all the same techniques and technical implementations, just converted to C++17 and namespaced; this way we have opt-in formats rather than opt-out. This also splits helpers and image formats, which can help with compilation speed. The image library is under the sel::img namespace.

img::util

The util namespace contains helper functions that are shared among the image processing formats. Context management, memory management, byte utilities, error handling, etc. The util.hpp file is a prerequisite for including any of the image formats.

img::bmp

The bmp namespace provides functions for handling bitmap images; this is primarily bit manipulation and mask handling.

img::tga

The tga namespace is for TGA format images. For the most part this is just RLE decoding and 16-bit RGB conversion.

img::hdr