Skip to content

alanmcgovern/QoiSharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QoiSharp
QoiSharp

Project status: active. What does it mean?

QoiSharp is an implementation of the QOI format for fast, lossless image compression

Supported functionality:

  • Encoding
  • Decoding

Installation

Install stable releases via Nuget

Package Name Release (NuGet)
QoiSharp NuGet

API

Encoding

byte[] data = GetRawPixels();
int width = 1920;
int height = 1080;
var channels = Channels.RgbWithAlpha;
byte[] qoiData = QoiEncoder.Encode(new QoiImage(data, width, height, channels));

Decoding

var qoiImage = QoiDecoder.Decode(qoiData);
Console.WriteLine($"Width: {qoiImage.Width}");
Console.WriteLine($"Height: {qoiImage.Height}");
Console.WriteLine($"Channels: {qoiImage.Channels}");
Console.WriteLine($"Color space: {qoiImage.ColorSpace}");
Console.WriteLine($"Data length: {qoiImage.Pixels.Length}");

Usage example

TODOs

  • Streams
  • Benchmarks
  • CLI

License

QoiSharp is licensed under the MIT license.

About

QoiSharp is an implementation of the QOI https://github.com/phoboslab/qoi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%