Updated Image API (markdown)

IgorTimofeev 2021-02-14 21:04:40 +03:00
parent 1dd859c029
commit 912e75b0c7

@ -29,6 +29,7 @@ Try to load an image from file system by given `path`. If loading was successful
This method applies **24bit to 8bit** color compression and color grouping methods for better HDD usage This method applies **24bit to 8bit** color compression and color grouping methods for better HDD usage
```lua ```lua
local result, reason = image.load("test.pic") local result, reason = image.load("test.pic")
if result then if result then
-- Do your stuff like GUI.image(1, 1, result) -- Do your stuff like GUI.image(1, 1, result)
else else
@ -44,6 +45,7 @@ Returns `true` if image was saved successfully, `false` and an `reason` if not (
```lua ```lua
local success, reason = image.load("test.pic") local success, reason = image.load("test.pic")
if success then if success then
-- Image was saved -- Image was saved
else else
@ -66,12 +68,12 @@ image.toString(myImage)
> A03200BEAA0051... > A03200BEAA0051...
``` ```
### image.**fromString**(*string* image): *table* result ### image.**fromString**(*string* string): *table* result
Deserializes string as picture table. Deserializes `string` as table
```lua ```lua
image.from("A03200BEAA0051...") image.fromString("A03200BEAA0051...")
``` ```
```lua ```lua
> { > {