Skip to content

akgats/qoi

Repository files navigation

qoi

A QOI image encoder and decoder.

Usage

First, A FOIFile type is defined with sturcture as below.

export declare type QOIFile = {
    width: number;
    height: number;
    channels: number;
    colorspace: number;
    pixels: Uint8Array;
};

Then the encode function accept the raw binary data(rgba or rgb) and returns the QOI image binary data.

export declare const encode: (qoiFile: QOIFile) => Uint8Array;

Lastly, a decode function is provded for decoding QOI image data into raw binary data.

export declare const decode: (qoiBytes: Uint8Array) => QOIFile;

See index.html file for details.

Steps

  1. Install
$ npm install
  1. Build
$ npm run build
  1. Test
$ npm test

References

About

A QOI image encoder and decoder.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors