summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index e6cabb68e..69ac55493 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -628,6 +628,23 @@ Result is more like what you'd expect if you put a color on top of another
color, meaning white surfaces get a lot of your new color while black parts
don't change very much.
+#### `[png:<base64>`
+
+Embed a base64 encoded PNG image in the texture string.
+You can produce a valid string for this by calling
+`minetest.encode_base64(minetest.encode_png(tex))`,
+refer to the documentation of these functions for details.
+You can use this to send disposable images such as captchas
+to individual clients, or render things that would be too
+expensive to compose with `[combine:`.
+
+IMPORTANT: Avoid sending large images this way.
+This is not a replacement for asset files, do not use it to do anything
+that you could instead achieve by just using a file.
+In particular consider `minetest.dynamic_add_media` and test whether
+using other texture modifiers could result in a shorter string than
+embedding a whole image, this may vary by use case.
+
Hardware coloring
-----------------