Skip to content

QOI image format encoder/decoder for LÖVE.

License

Notifications You must be signed in to change notification settings

ReFreezed/SloppyQOI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!