sixel

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT, MIT, Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sixel encodes and decodes DEC sixel images.

Portions of this package are adapted from github.com/mattn/go-sixel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder decodes sixel format into an image.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder returns a new Decoder.

func (*Decoder) Decode

func (e *Decoder) Decode(img *image.Image) error

Decode decodes a sixel device control string into img.

type Encoder

type Encoder struct {

	// Width is the maximum width to draw to.
	Width int
	// Height is the maximum height to draw to.
	Height int

	// Colors sets the maximum number of sixel color registers. If the value is
	// below 2, then 255 is used. One register is reserved for transparent
	// pixels, so 255 allows a 254 color palette.
	Colors int
	// contains filtered or unexported fields
}

Encoder encodes an image to sixel format.

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

NewEncoder returns a new Encoder.

func (*Encoder) Encode

func (e *Encoder) Encode(img image.Image) error

Encode writes img as a sixel device control string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL