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 | Static Public Member Functions | List of all members
epaper::ImageIO Class Reference

Utilities for loading/saving images and converting formats. More...

#include <image_io.hpp>

Classes

struct  ImageResult
 

Static Public Member Functions

static auto load_image (std::string_view path, int desired_channels=0) -> std::expected< ImageResult, Error >
 
static auto save_png (std::string_view path, std::size_t width, std::size_t height, int channels, std::span< const std::uint8_t > data) -> std::expected< void, Error >
 
template<FramebufferLike FB>
static auto framebuffer_to_rgb (const FB &fb) -> std::vector< std::uint8_t >
 

Detailed Description

Utilities for loading/saving images and converting formats.

Static-only utility class - all methods are static, no instantiation needed.

Design Philosophy:

See also
stb_image.h, stb_image_write.h (third_party)

Member Function Documentation

◆ framebuffer_to_rgb()

template<FramebufferLike FB>
auto epaper::ImageIO::framebuffer_to_rgb ( const FB &  fb) -> std::vector<std::uint8_t>
static
Examples
/mnt/nas/libepaper/include/epaper/core/display.hpp, and /mnt/nas/libepaper/include/epaper/io/image_io.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_image()

auto epaper::ImageIO::load_image ( std::string_view  path,
int  desired_channels = 0 
) -> std::expected<ImageResult, Error>
static

◆ save_png()

auto epaper::ImageIO::save_png ( std::string_view  path,
std::size_t  width,
std::size_t  height,
int  channels,
std::span< const std::uint8_t >  data 
) -> std::expected<void, Error>
static
Examples
/mnt/nas/libepaper/include/epaper/core/display.hpp, and /mnt/nas/libepaper/include/epaper/io/image_io.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: