mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add colorspec_to_table to the Lua API
This commit is contained in:
parent
c54f5a2137
commit
f9c0354af1
5 changed files with 42 additions and 0 deletions
|
@ -5655,6 +5655,10 @@ Utilities
|
|||
* `minetest.colorspec_to_bytes(colorspec)`: Converts a ColorSpec to a raw
|
||||
string of four bytes in an RGBA layout, returned as a string.
|
||||
* `colorspec`: The ColorSpec to convert
|
||||
* `minetest.colorspec_to_table(colorspec)`: Converts a ColorSpec into RGBA table
|
||||
form. If the ColorSpec is invalid, returns `nil`. You can use this to parse
|
||||
ColorStrings.
|
||||
* `colorspec`: The ColorSpec to convert
|
||||
* `minetest.encode_png(width, height, data, [compression])`: Encode a PNG
|
||||
image and return it in string form.
|
||||
* `width`: Width of the image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue