Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageToText ¶
ImageToText takes an image.Image and returns that image represented by characters of differing "brightness". pixPerCharX/Y represent how many pixels each character covers. Given 0 or less these paramters default to 1, meaning one character to represent each pixel. Invert is a flag that will invert the level of "brightness" of each character.
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter is a helper struct for those who like chaining function calls
func NewConverter ¶
NewConverter returns a Converter for a given image with default values
func (*Converter) Convert ¶
Convert returns the text for the given Converter struct create to this point.
func (*Converter) Invert ¶
Invert will invert the brightness characters presetn in the converted text. Calling Invert an even number of times does nothing. There's no reason to do that as that'd be silly.
func (*Converter) PixelsPerCharacterHeight ¶
PixelsPerCharacterHeight sets the number of pixels covered by each character from top to bottom
func (*Converter) PixelsPerCharacterWidth ¶
PixelsPerCharacterWidth sets the number of pixels covered by each character across