aic_package

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 19 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertImage

func ConvertImage(imagePath string, flags map[string]interface{}) (string, error)

ConvertImage takes an image path/url as its first argument and a map of flags as the second argument, with which it alters the returned ascii art string.

The "flags" argument should be declared as follows before passing:

 flags := map[string]interface{}{
 	"complex": bool, // Pass true for using complex character set
 	"dimensions": []int, // Pass 2 integer dimensions. Pass nil to ignore
	"saveTxtPath": string, // System path to save the ascii art string as a .txt  file. Pass "" to ignore
	"saveImagePath": string, // System path to save the ascii art string as a .txt  file. Pass "" to ignore
 	"negative": bool, // Pass true for negative color-depth ascii art
 	"colored": bool, // Pass true for returning colored ascii string
 	"customMap": string, // Custom map of ascii chars e.g. " .-+#@" . Nullifies "complex" flag. Pass "" to ignore.
 	"flipX": bool, // Pass true to return horizontally flipped ascii art
 	"flipY": bool, // Pass true to return vertically flipped ascii art
 }

func DefaultFlags

func DefaultFlags() map[string]interface{}

Return default configuration for flags

Types

This section is empty.

Jump to

Keyboard shortcuts

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