usage: require("image")
this library allows you to load images in bmp, scimg, scimg8 format and save images in scimg, scimg8 format
you can get images from the camera and process it
the image can be changed in real time and rendered on the display
bmp - currently, the library supports only 32 and 24 bit bmp
scimg - a 24-bit image format created specifically for SComputers. does not support transparency
scimg8 - a 8-bit image format created specifically for SComputers. does not support transparency


methods:


scimg methods:


slow image draw example:

            --this code does not render the image from the disk immediately so that the computer does not crash
local disk = getComponent("disk")
local display = getComponent("display")
display.reset()

local image = require("image")

--local img = assert(image.load(disk, "/colorbox64.bmp"))
local img = assert(image.load(disk, "/colorbox128.bmp"))
--local img = assert(image.load(disk, "/colorbox256.bmp"))
--local img = assert(image.load(disk, "/lighthouse64.bmp"))
--local img = assert(image.load(disk, "/lighthouse128.bmp"))
--local img = assert(image.load(disk, "/lighthouse256.bmp"))
--local img = assert(image.load(disk, "/mandelbulb64.bmp"))
--local img = assert(image.load(disk, "/mandelbulb128.bmp"))
--local img = assert(image.load(disk, "/mandelbulb256.bmp"))

display.clear()
display.flush()

local drw = img:drawForTicks(display, 40 * 5)
function callback_loop()
    if _endtick then
        display.clear()
        display.flush()
        return
    end

    if drw then
        if drw() then
            drw = nil
        end
        display.flush()
    end
end
        

image draw example:

            local disk = getComponent("disk")
local display = getComponent("display")
display.reset()

local image = require("image")

--local img = assert(image.load(disk, "/colorbox64.bmp"))
local img = assert(image.load(disk, "/colorbox128.bmp"))
--local img = assert(image.load(disk, "/colorbox256.bmp"))
--local img = assert(image.load(disk, "/lighthouse64.bmp"))
--local img = assert(image.load(disk, "/lighthouse128.bmp"))
--local img = assert(image.load(disk, "/lighthouse256.bmp"))
--local img = assert(image.load(disk, "/mandelbulb64.bmp"))
--local img = assert(image.load(disk, "/mandelbulb128.bmp"))
--local img = assert(image.load(disk, "/mandelbulb256.bmp"))

display.clear()
display.flush()

img:draw(display)
function callback_loop()
    if _endtick then
        display.clear()
        display.flush()
        return
    end
end