esp32-stb-image is a stripped-down PlatformIO package that ships only the pieces of stb_image.h and stb_image_write.h needed in embedded ESP32 projects. The goal is simple: avoid the extra files and dependency noise from the full stb repository, while keeping image decode and encode functionality available on constrained hardware.
Key Features
- ESP32-focused packaging: The repository includes only the headers needed for image decoding and writing, which avoids the common PlatformIO build issues caused by unrelated files in the upstream
stbtree. - Progressive JPEG support: It makes it possible to decode image formats that typical e-paper display pipelines struggle with, especially Progressive JPEGs served by modern web APIs.
- Baseline JPEG conversion: Decoded image data can be re-encoded into standard Baseline JPEG output for display libraries that do not handle Progressive JPEG input.
- PlatformIO-friendly install path: The library is designed to be dropped directly into
lib_depsfor ESP32 Arduino or ESP-IDF projects. - Built for real device constraints: The README explicitly documents the PSRAM-heavy nature of the conversion flow and shows how to wire
stballocation into ESP32 memory primitives.
Why This Project Exists
A lot of embedded image pipelines fall apart on real-world web content. APIs often return Progressive JPEGs, while many ESP32 display libraries only accept Baseline JPEGs. That gap is exactly where esp32-stb-image is useful: it gives embedded projects a clean way to decode an incoming image buffer and re-encode it into something their display stack can actually render.
This repository was built to support Inky Renderer, but it stands on its own as a reusable utility for any ESP32 project that needs broader image-format compatibility without dragging the whole upstream stb repository into a PlatformIO build.
Stack
- C/C++ headers from stb packaged for embedded use
- PlatformIO for dependency integration
- ESP32 + PSRAM-oriented usage for memory-intensive image conversion workflows
Credits
This package is a focused redistribution of the original stb image libraries by Sean Barrett and contributors. If you want the upstream source, documentation, or the broader single-header collection, start with:
This project packages those headers for smoother ESP32 and PlatformIO use, but the core image decoding and writing functionality comes from the upstream stb project.
For ESP32 projects dealing with arbitrary remote images, esp32-stb-image is the thin compatibility layer that keeps the rendering pipeline moving.