RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_image_codec_t Struct Reference

Immutable decoder descriptor. More...

#include <image.h>

Data Fields

const char * name
int(*) sniff (const uint8_t *bytes, size_t length)
int(*) decode (rmgui_fb_t *out, const uint8_t *bytes, size_t length, const rmgui_image_limits_t *limits)

Detailed Description

Immutable decoder descriptor.

sniff returns 1 for matching magic, 0 otherwise; it must tolerate NULL and arbitrary lengths without reading outside bytes. decode follows rmgui_image_decode_png's ownership and refusal contract. The descriptor and its name must outlive every registry holding it.

Field Documentation

◆ name

const char* rmgui_image_codec_t::name

◆ sniff

int(*) rmgui_image_codec_t::sniff(const uint8_t *bytes, size_t length)

◆ decode

int(*) rmgui_image_codec_t::decode(rmgui_fb_t *out, const uint8_t *bytes, size_t length, const rmgui_image_limits_t *limits)

The documentation for this struct was generated from the following file: