From 912e75b0c7f99c0db67e387fcce8b14144eb35a3 Mon Sep 17 00:00:00 2001 From: IgorTimofeev <11760002+IgorTimofeev@users.noreply.github.com> Date: Sun, 14 Feb 2021 21:04:40 +0300 Subject: [PATCH] Updated Image API (markdown) --- Image-API.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Image-API.md b/Image-API.md index c604ef1..98616ba 100644 --- a/Image-API.md +++ b/Image-API.md @@ -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 > {