diff options
author | hecks <42101236+hecktest@users.noreply.github.com> | 2021-07-29 05:10:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 05:10:10 +0200 |
commit | 80d12dbedb67191a5eb3e4f3c36b04baed1f8afb (patch) | |
tree | ca8346be45852e0c08f444f8a8eb6c0cdfd37e39 /src/script/lua_api/l_util.h | |
parent | 2866918f3293c486609ff46ad0bfa5ce833aaaf2 (diff) | |
download | minetest-80d12dbedb67191a5eb3e4f3c36b04baed1f8afb.tar.gz minetest-80d12dbedb67191a5eb3e4f3c36b04baed1f8afb.tar.bz2 minetest-80d12dbedb67191a5eb3e4f3c36b04baed1f8afb.zip |
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>
Diffstat (limited to 'src/script/lua_api/l_util.h')
-rw-r--r-- | src/script/lua_api/l_util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/lua_api/l_util.h b/src/script/lua_api/l_util.h index 6943a6afb..54d2be619 100644 --- a/src/script/lua_api/l_util.h +++ b/src/script/lua_api/l_util.h @@ -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); |