image

package
v0.0.0-...-b4ea12c Latest Latest
Warning

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

Go to latest
Published: May 20, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ASCII is the 16 darkness levels of characters
	ASCII = "@ND8OZ$7I?+=~:,  "
)
View Source
const (
	// TempOutputFile is the location of the temp file.
	// ideally this should be an actual /tmp/file but had issues with
	// it for weird reasons so this will have to do for now.
	// MULTITHREADED WILL NOT WORK WITH THIS
	TempOutputFile = "local-file-output.png"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Banner struct {
	Input string
	// contains filtered or unexported fields
}

Banner struct object

func (Banner) Execute

func (b Banner) Execute() (*Image, error)

Execute method to create a string of text to a banner image. The idea for this is to create a banner of text for a dot matrix printer to print out.

type Converter

type Converter interface {
	Execute(f io.Reader) (*Image, error)
}

Converter interface

type Image

type Image struct {
	Converter   `json:"-"`
	Data        string `json:"string"`
	ImageHeight int    `json:"-"`
	ImageWidth  int    `json:"-"`
}

Image data describing the image

func (*Image) Execute

func (*Image) Execute(f io.Reader, w, h int) (*Image, error)

Execute image conversion to ascii represenation

Jump to

Keyboard shortcuts

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