~pierrec/hare-qoi

QOI lossless image format
update README and comments
Add the encode() and decode() functions

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~pierrec/hare-qoi
read/write
git@git.sr.ht:~pierrec/hare-qoi

You can also use your local clone with git send-email.

#hare-qoi

This package provides an implementation of the Quite OK Image Format (QOI).

https://qoiformat.org/

#Installation

#System-wide installation

make install

#Vendoring

git subtree -P vendor/hare-qoi/ add https://git.sr.ht/~pierrec/hare-qoi main

#Usage

#Encoding

use image::qoi;
use io;

fn run(src: io::handle, width: u32, height: u32) (void | io::error) = {
        const h = qoi::header {
                width = width,
                height = height,
                channels = qoi::channels::RGBA,
                ...
        };
        qoi::encode(src, h, pixels)?;
};

#Decoding

use image::qoi;
use io;

fn run(src: io::handle) (void | qoi::error) = {
        const img = qoi::decode(src)?;
};