img2ascii

package
v0.0.0-...-b5c236b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IMAGE_HEIGHT_REDUCTION = 0.45
)

Variables

This section is empty.

Functions

func ConvertToPNG

func ConvertToPNG(text string, width, height int) ([]byte, error)

Types

type AsciiConverter

type AsciiConverter struct {
	Image    image.Image
	Scale    float64
	Detailed bool
	Width    int
	Height   int
	GScaled  *image.Gray
}

func NewAsciiConverter

func NewAsciiConverter(img image.Image, detailed bool, scale float64) *AsciiConverter

func (*AsciiConverter) Convert

func (c *AsciiConverter) Convert() string

func (AsciiConverter) GetHeight

func (c AsciiConverter) GetHeight() int

func (AsciiConverter) GetScale

func (c AsciiConverter) GetScale() float64

func (AsciiConverter) GetScaledDims

func (c AsciiConverter) GetScaledDims() (int, int)

func (AsciiConverter) GetWidth

func (c AsciiConverter) GetWidth() int

func (*AsciiConverter) WithDetailed

func (c *AsciiConverter) WithDetailed(detailed bool) *AsciiConverter

func (*AsciiConverter) WithScale

func (c *AsciiConverter) WithScale(scale float64) *AsciiConverter

Jump to

Keyboard shortcuts

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