converter

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BrailleBaseRune is the Unicode code point for the first braille character (empty)
	BrailleBaseRune = '\u2800'
)

Variables

This section is empty.

Functions

func CreateBrailleChar

func CreateBrailleChar(pixels [2][4]bool) rune

CreateBrailleChar creates a braille character from a 2x4 grid of pixels Pixels marked as true will be represented as dots in the braille character

func InvertBraillePattern

func InvertBraillePattern(pattern [2][4]bool) [2][4]bool

InvertBraillePattern inverts all pixels in a braille pattern

Types

type Converter

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

Converter handles the image to braille conversion

func NewConverter

func NewConverter(cfg *config.Config) *Converter

NewConverter creates a new Converter with the given configuration

func (*Converter) Convert

func (c *Converter) Convert() (string, error)

Convert processes the input image and converts it to braille ASCII art

func (*Converter) ConvertToFile

func (c *Converter) ConvertToFile(writer io.Writer) error

ConvertToFile converts the image and writes the result to the specified writer

Jump to

Keyboard shortcuts

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