Skip to content
/ QOI.Net Public

A C# implementation of the Quite OK Image Format for Fast, Lossless Compression

License

Notifications You must be signed in to change notification settings

rkm/QOI.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ae8deb6 · Jan 29, 2024
Dec 29, 2021
Dec 29, 2021
Mar 21, 2022
Dec 29, 2021
Dec 29, 2021
Dec 29, 2021
Feb 6, 2023
Dec 29, 2021
Dec 29, 2021
Dec 29, 2021
Jan 29, 2024
Dec 31, 2021
Dec 27, 2021
Dec 29, 2021
Dec 29, 2021

Repository files navigation

main pre-commit.ci status Nuget GitHub

QOI.Net

A C# implementation of the Quite OK Image Format for Fast, Lossless Compression.

Installation

$ dotnet add package Rkm.QOI.Net

Usage

Encoder

var data = File.ReadAllBytes("scotland-edinburgh-castle-day.bin");

var qoi = QOIEncoder.Encode(
    data,
    width: 730,
    height: 487,
    channels: 4,
    colourSpace: 1,
    out var outLen
);

Decoder

var qoi = File.ReadAllBytes("scotland-edinburgh-castle-day.qoi");

var decoded = QOIDecoder.Decode(
    qoi,
    out var width,
    out var height,
    out var channels,
    out var colourSpace
);

Development

pre-commit

This repo uses pre-commit to manage and automatically run a series of linters and code formatters. After cloning the repo and changing into the directory, run this once to setup pre-commit.

$ pip install pre-commit
$ pre-commit install

This will then run the checks before every commit. It can also be run manually at any time:

$ pre-commit run [<hook>] (--all-files | --files <file list>)