libepaper 2.0.0
A C++23 library for controlling Waveshare e-paper displays on Raspberry Pi, featuring transparent sleep/wake management and a fluent builder API.
Loading...
Searching...
No Matches
Classes | Namespaces
image_io.hpp File Reference

Image loading/saving utilities using stb_image library. More...

#include "epaper/color/color_manager.hpp"
#include "epaper/core/errors.hpp"
#include "epaper/core/framebuffer_concepts.hpp"
#include "epaper/core/types.hpp"
#include <cstddef>
#include <expected>
#include <span>
#include <string_view>
#include <vector>
Include dependency graph for image_io.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  epaper::ImageIO
 Utilities for loading/saving images and converting formats. More...
 
struct  epaper::ImageIO::ImageResult
 

Namespaces

namespace  epaper
 

Detailed Description

Image loading/saving utilities using stb_image library.

Provides high-level interface for loading images from disk and saving framebuffers as PNG files. Uses stb_image for format support.

Supported Formats:

Loading (stb_image):
├─ PNG (Portable Network Graphics) - lossless, alpha support
├─ JPEG/JPG (Joint Photographic Experts Group) - lossy, no alpha
├─ BMP (Windows Bitmap) - uncompressed
├─ TGA (Truevision Targa) - gaming formats
├─ GIF (Graphics Interchange Format) - animation (first frame only)
├─ PSD (Photoshop Document) - composited image only
└─ HDR (Radiance RGBE) - high dynamic range
Saving (stb_image_write):
└─ PNG (Portable Network Graphics) - lossless, alpha support

Pixel Format Conversions:

Input Image → RGB/RGBA → Color Enum → DisplayMode → Framebuffer
↓ ↓ ↓ ↓ ↓
PNG/JPG stb_image ColorManager PixelCodec set_pixel()

Channel Modes:

Framebuffer Export:

Use Cases:

Error Handling: