sixel

package
v0.24.2 Latest Latest
Warning

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

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

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