Skip to main content

Module encode

Module encode 

Source
Expand description

PNG export. Scenes have at most 255 colours, so stills are written as indexed (paletted) PNGs, which are much smaller than RGBA.

Functionsยง

encode_png
Writes an indexed PNG.
save_png
Writes an indexed PNG to a file.
to_rgba
Expands palette indices to RGBA8 (for tests, previews and GPU upload).