Qoi.NetStandard
1.0.0
dotnet add package Qoi.NetStandard --version 1.0.0
NuGet\Install-Package Qoi.NetStandard -Version 1.0.0
<PackageReference Include="Qoi.NetStandard" Version="1.0.0" />
paket add Qoi.NetStandard --version 1.0.0
#r "nuget: Qoi.NetStandard, 1.0.0"
// Install Qoi.NetStandard as a Cake Addin #addin nuget:?package=Qoi.NetStandard&version=1.0.0 // Install Qoi.NetStandard as a Cake Tool #tool nuget:?package=Qoi.NetStandard&version=1.0.0
Qoi.NetStandard
This is an implementation of QOI format (https://github.com/phoboslab/qoi) written in .Net Standard 2.0 and therefore compatible with all modern versions of .Net, including .Net Framework 4.6.1+, Net Core 2.0+, NET 5, NET 6, and Xamarin (iOS 10.14+ and Android 8.0+).
Sample usage
Decoding a .qoi image
From a file:
// Decode a .qoi image from a file
byte[] colorBytes = Qoi.NetStandard.QoiEncoder.DecodeQoi(fileName, out Qoi.NetStandard.QoiHeader header);
// THAT'S ALL!
// Now you can use the decoded pixels to create an
// image that can be displayed anywhere
Bitmap image = BitmapFromPixels(colorBytes, header);
pictureBox1.BackgroundImage = image;
Alternatively you can decode from streams or from bytes array.
From a stream:
// Decode a .qoi image from a stream
byte[] colorBytes = Qoi.NetStandard.QoiEncoder.DecodeQoi(stream, out Qoi.NetStandard.QoiHeader header);
...
From a bytes array:
// Decode a .qoi image from a bytes array
byte[] colorBytes = Qoi.NetStandard.QoiEncoder.DecodeQoi(qoiFileByes, out Qoi.NetStandard.QoiHeader header);
...
Encoding a .qoi image
The main thing to take into account is that [decodedBytes] are the actual bytes of the image, so the (A)RGB information, not the bytes of the image file itself.
byte[] qoiFileBytes = Qoi.NetStandard.QoiEncoder.EncodeToQoi(pngImage.Width,
pngImage.Height,
decodedBytes,
hasAlpha,
linearAlpha);
// THAT'S ALL!
// You can now write all these bytes as a .qoi file.
File.WriteAllBytes("myQoiImage.qoi", qoiFileBytes);
...
List of compatible .Net implementations:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Qoi.NetStandard:
Package | Downloads |
---|---|
Nejman.PixiEditor.Parser.Skia
Extensions for encoding and decoding PixiParser's layers using SkiaSharp |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 866 | 12/27/2021 |
Initial release.