SixPix 0.2.0
dotnet add package SixPix --version 0.2.0
NuGet\Install-Package SixPix -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SixPix" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SixPix --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SixPix, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SixPix as a Cake Addin #addin nuget:?package=SixPix&version=0.2.0 // Install SixPix as a Cake Tool #tool nuget:?package=SixPix&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SixPix.NET
Sixel image encoding and decoding library.
Namespace: SixPix
Encoding ( 🎨 Image → 🆎 Sixiel string)
Encode to Sixel string from SixLabors.ImageSharp's Image data.
from Stream
Syntax:
public static ReadOnlySpan<char> SixPix.Sixel.Encode(Stream stream)
Example:
using SixPix;
using var fileStream = new FileStream(@"path/to/image.png");
ReadOnlySpan<char> sixelString = Sixel.Encode(fileStream);
Console.Out.WriteLine(sixelString);
from Image
Syntax:
public static ReadOnlySpan<char> SixPix.Sixel.Encode(Image<Rgb24> img)
Example:
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixPix;
using Image<Rgb24> image = new Image<Rgb24>(width, height);
// drawing image ...
ReadOnlySpan<char> sixelString = Sixel.Encode(image);
Console.Out.WriteLine(sixelString);
Decoding ( 🆎 Sixel string → 🎨 Image)
Decode to SixLabors.ImageSharp's Image from Sixel string data.
from Stream
Syntax:
public static Image<Rgb24> Sixel.Decode(Stream stream)
Example:
using SixLabors.ImageSharp.Formats.Png;
using SixPix;
using var fileStream = new FileStream(@"path/to/sixeldata");
using var image = Sixel.Decode(fs);
using var writeStream = new FileStream(@"path/to/sixel_image.png", FileMode.Create);
image.Save(writeStream, new PngEncoder());
from string
Syntax:
public static Image<Rgb24> Sixel.Decode(String sixelString)
Example:
using SixLabors.ImageSharp.Formats.Png;
using SixPix;
var sixelString = "\x1bP7;1;q\"1;1;12;12"
+ "#0;2;100;0;0"
+ "#0!12~-"
+ "#0!12~"
+ "\x1b\\";
using Image<Rgb24> image = Sixel.Decode(sixelString);
using var writeStream = new FileStream(@"path/to/sixel_image.png", FileMode.Create);
image.Save(writeStream, new PngEncoder());
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- SixLabors.ImageSharp (>= 3.1.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.2.0 | 141 | 10/18/2024 |