image_conversions

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const MAX_VAL float32 = 65535

For each individual element of imgSet in ConvertToASCIISlice()

Variables

This section is empty.

Functions

func ConvertToAsciiDetailed

func ConvertToAsciiDetailed(imgSet [][]uint32) [][]string

Converts the 2D uint32 slice of image data (each value representing each pixel of image) to a 2D string slice with each string having an ASCII character corresponding to the original uint32 value.

Values are compared to 69 ASCII characters

func ConvertToAsciiSimple

func ConvertToAsciiSimple(imgSet [][]uint32) [][]string

Converts the 2D uint32 slice of image data (each value representing each pixel of image) to a 2D string slice with each string having an ASCII character corresponding to the original uint32 value.

Values are compared to 10 ASCII characters

func ConvertToTerminalSizedSlices

func ConvertToTerminalSizedSlices(img image.Image, dimensions []int) [][]uint32

This function shrinks the passed image according to passed dimensions or terminal size if none are passed. It turns each pixel into grayscale to simplify getting numeric data for ASCII character comparison.

The returned 2D uint32 slice contains each corresponding pixel's value ranging from 0 to 65535.

Types

This section is empty.

Jump to

Keyboard shortcuts

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