Documentation ¶
Overview ¶
Package gotermimg provides functions to convert image.Image structs to 256 color terminal compatible []string. It also provides functions to convert and "play" gif animations.
Index ¶
- func ANSI(img image.Image, trans Transformer) []string
- func PrintAnimation(ani Animation, loop KeepLooping)
- func PrintImage(img image.Image, conv Converter, trans Transformer)
- func UTF8(img image.Image, trans Transformer) []string
- type Animation
- type Converter
- type Frame
- type KeepLooping
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ANSI ¶
func ANSI(img image.Image, trans Transformer) []string
Converts image.Image img to a []string of 256 color terminal compatbile ANSI using 2 spaces as a "pixel". Applies Transformer trans to img before conversion
func PrintAnimation ¶
func PrintAnimation(ani Animation, loop KeepLooping)
Prints Animation ani to os.Stdout after clearing the terminal Does not return unless loop() returns false
func PrintImage ¶
func PrintImage(img image.Image, conv Converter, trans Transformer)
Prints image.Image img to os.Stdout using Converter with Transformer trans
Types ¶
type KeepLooping ¶
type KeepLooping func() bool
type Transformer ¶
func Resize ¶
func Resize(width, height uint) Transformer
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package terminal provides the functions and constants required for 256 color terminal output and the conversion of color.Color structs to ColorCode
|
Package terminal provides the functions and constants required for 256 color terminal output and the conversion of color.Color structs to ColorCode |
Click to show internal directories.
Click to hide internal directories.