Graphics Extensions for Solar2D

I’ve tested this extension with a png image and a qoi image.
The result is that loading the qoi is much slower than loading the png.

1x time

100x times

local gfxe = require('plugin.gfxe')
local asset_reader = require('plugin.AssetReader')

function valueDisplay(value, x, y, time)
    local txt = display.newText(value, x, y, native.systemFont, 32)
    txt:setFillColor(1, 0, 0, 0.75)

    timer.performWithDelay(time or 30000, function()
        txt:removeSelf()
    end)
end

 
local group = display.newGroup()
local w = 800 * 0.35
local h = 600 * 0.35
local name = "dice"
local prevTime = system.getTimer()

for i=1, 100 do
    local b = gfxe.newStaticImage(
        {
            filename = string.format("images/qoi_test_images/%s.qoi", name),
            width = w, height = h
        }
    )
    b:translate(display.contentWidth - w * 0.5, display.contentCenterY)
    group:insert(b)
end

local currentTime = system.getTimer()
valueDisplay("qoi:" .. (currentTime - prevTime), display.contentWidth - w * 0.5, display.contentCenterY + h * 0.55, 200000)

prevTime = system.getTimer()

for i=1, 100 do
    local tex = graphics.newTexture({type="image", filename = string.format("images/qoi_test_images/%s.png", name)})
    local a = display.newImageRect(tex.filename, tex.baseDir, w, h)
    a:translate(w * 0.5, display.contentCenterY)
    tex:releaseSelf()
    group:insert(a)
end

currentTime = system.getTimer()
valueDisplay("png:" .. (currentTime - prevTime), w * 0.5, display.contentCenterY + h * 0.55, 200000)
[test_plugin_gfxe.zip|attachment](upload://l1t7JsDZ1AEIzVhDKiUTqq7CJl0.zip) (1014.4 KB)