mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 19:19:21 +01:00
Updated Image API (markdown)
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
|
||||
```lua
|
||||
local result, reason = image.load("test.pic")
|
||||
|
||||
if result then
|
||||
-- Do your stuff like GUI.image(1, 1, result)
|
||||
else
|
||||
@ -44,6 +45,7 @@ Returns `true` if image was saved successfully, `false` and an `reason` if not (
|
||||
|
||||
```lua
|
||||
local success, reason = image.load("test.pic")
|
||||
|
||||
if success then
|
||||
-- Image was saved
|
||||
else
|
||||
@ -66,12 +68,12 @@ image.toString(myImage)
|
||||
> A03200BEAA0051...
|
||||
```
|
||||
|
||||
### image.**fromString**(*string* image): *table* result
|
||||
### image.**fromString**(*string* string): *table* result
|
||||
|
||||
Deserializes string as picture table.
|
||||
Deserializes `string` as table
|
||||
|
||||
```lua
|
||||
image.from("A03200BEAA0051...")
|
||||
image.fromString("A03200BEAA0051...")
|
||||
```
|
||||
```lua
|
||||
> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user