convert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

The convert package convert a image to ascii string or matrix

The resize package resize the image to expected size base on the ratio, for the most matched display

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Image2ASCIIMatrix

func Image2ASCIIMatrix(image image.Image, imageConvertOptions *Options) []string

Convert a image to ascii matrix

func Image2ASCIIString

func Image2ASCIIString(image image.Image, options *Options) string

Convert a image to ascii matrix, then concat the matrix value to a long string for easy display

func ImageFile2ASCIIString

func ImageFile2ASCIIString(imageFilename string, option *Options) string

Convert a image file to ascii string

func ScaleImage

func ScaleImage(image image.Image, options *Options) (newImage image.Image)

Resize the convert to expected size base on the ratio

Types

type Options

type Options struct {
	Ratio          float64
	ExpectedWidth  int
	ExpectedHeight int
	FitScreen      bool
	Colored        bool
}

Jump to

Keyboard shortcuts

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