GitHunt
RE

ReFreezed/SloppyQOI

QOI image format encoder/decoder for LÖVE.

SloppyQOI


SloppyQOI is a small QOI image format encoder and decoder library for the LÖVE game framework.
The library is a single file with no external dependencies other than LÖVE.
MIT license.

I mostly just made this for fun, but it seems using QOI and this library actually may be beneficial.

Usage

local qoi         = require("qoi")
local playerImage = qoi.load("images/player.qoi")
love.graphics.draw(playerImage)

See the top of qoi.lua for documentation.

Stats

Running the library on the 2848 images in qoi_benchmark_suite.tar (on my crappy computer) reveals these things:

  • Both decoding and encoding QOI files is for the most part a fair bit faster than decoding and encoding PNGs.
  • QOI files are mostly somewhere between 0 and 1 times larger than (optimized) PNGs, but sometimes a lot more.

Not perfect, but not bad!

Languages

Lua100.0%

Contributors

MIT License
Created April 22, 2022
Updated January 8, 2025
ReFreezed/SloppyQOI | GitHunt