ascii

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultASCIIPalette = "@%#*+=-:. "

DefaultASCIIPalette contains the default palette used for the ascii encoding

Source from http://paulbourke.net/dataformats/asciiart/

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

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

Image converts images to pseudo greyscale text reprosentation

func NewImage

func NewImage() *Image

NewImage creates new ASCII image encoder using the default palette

func NewImageCustomPalette

func NewImageCustomPalette(palette string) *Image

NewImageCustomPalette creates new ASCII image encoder using custom palette

func (Image) Encode

func (i Image) Encode(out io.Writer, img image.Image) error

Encode converts image to text and writes it to out

func (Image) GetFontRatio

func (i Image) GetFontRatio() float64

GetFontRatio returns the font ratio

Jump to

Keyboard shortcuts

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