1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Add a simple PNG image encoder with Lua API (#11485)

* Add a simple PNG image encoder with Lua API
Add ColorSpec to RGBA converter
Make a safety wrapper for the encoder
Create devtest examples

Co-authored-by: hecktest <>
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
hecks
2021-07-29 05:10:10 +02:00
committed by GitHub
parent 2866918f32
commit 80d12dbedb
9 changed files with 278 additions and 1 deletions

View File

@@ -104,6 +104,12 @@ private:
// colorspec_to_colorstring(colorspec)
static int l_colorspec_to_colorstring(lua_State *L);
// colorspec_to_bytes(colorspec)
static int l_colorspec_to_bytes(lua_State *L);
// encode_png(w, h, data, level)
static int l_encode_png(lua_State *L);
public:
static void Initialize(lua_State *L, int top);
static void InitializeAsync(lua_State *L, int top);