processor

package
v0.0.0-...-85abc24 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ASCIIfy

func ASCIIfy(ASCIIchars []string, img *image.Image, cols, rows uint, filename string)

ASCIIfy converts an image.Image into ASCII art

func GetChar

func GetChar(chars []string, pixelBrightness int) string

GetChar returns a char from chars corresponding to the pixel brightness

func GetImage

func GetImage(pathToFile string) (*image.Image, error)

GetImage returns image.Image from a filepath

func ResizeImage

func ResizeImage(img image.Image, newWidth uint, newHeight uint) image.Image

ResizeImage takes an image.Image and returns a resized one using https://github.com/nfnt/resize

func SaveImage

func SaveImage(filename string, img *image.Image) error

SaveImage takes an image.Image and saves it to a file

Types

type DataForAscii

type DataForAscii struct {
	Img      *image.Image
	Width    uint
	Height   uint
	Filename string
}

Jump to

Keyboard shortcuts

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