yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::util::PngImage Struct Reference

A decoded PNG: palette indices for indexed files, RGBA otherwise. More...

#include <indexed_png.h>

Public Attributes

int width = 0
 
int height = 0
 
bool indexed = false
 
std::vector< uint8_t > indices
 
std::vector< std::array< uint8_t, 4 > > palette
 
std::vector< uint8_t > rgba
 

Detailed Description

A decoded PNG: palette indices for indexed files, RGBA otherwise.

Indexed PNGs (color type 3, bit depth 1/2/4/8) keep their palette and per-pixel indices, so art drawn with an 8-color palette round-trips index for index. 8-bit grayscale, gray+alpha, RGB and RGBA PNGs decode to RGBA. 16-bit and interlaced PNGs are rejected.

Definition at line 21 of file indexed_png.h.

Member Data Documentation

◆ width

◆ height

◆ indexed

bool yaze::util::PngImage::indexed = false

◆ indices

std::vector<uint8_t> yaze::util::PngImage::indices

◆ palette

std::vector<std::array<uint8_t, 4> > yaze::util::PngImage::palette

◆ rgba

std::vector<uint8_t> yaze::util::PngImage::rgba

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