image2ascii

package module
v0.0.0-...-7438835 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2018 License: MIT Imports: 1 Imported by: 0

README

go-image2ascii

Provides functions to convert image to ascii art.

Usage

sample

convert image to ascii

image2ascii.Convert(img)

change mapping between luminance values and ascii

image2ascii.SetConf([]image2ascii.LumAsciiMap{
    {0.0, 'a'},
    {0.1, 'b'},
    {0.2, 'c'},
    {0.3, 'd'},
    {0.4, 'e'},
    {0.5, 'f'},
    {0.6, 'g'},
    {0.7, 'h'},
    {0.8, 'i'},
    {0.9, 'j'},
    {1.0, 'k'},
})

Author

buchy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(img image.Image) string

func SetConf

func SetConf(userConf []LumAsciiMap)

Types

type LumAsciiMap

type LumAsciiMap struct {
	Luminance float64
	Ascii     byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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