imageprocessing

package
v0.0.0-...-78f70d7 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorAtoi

func ColorAtoi(s string) uint8

func GenerateColorGrid

func GenerateColorGrid(img image.Image, threadColors []common.ThreadColor, getNearestColor bool) [][]common.ThreadColor

func GenerateGrid

func GenerateGrid(img image.Image, threadColors []common.ThreadColor) [][]string

func GetPartialPalette

func GetPartialPalette(img image.Image, threadColors []common.ThreadColor, k int) []common.ThreadColor

func LoadImage

func LoadImage(filePath string) (image.Image, error)

LoadImage loads an image from the specified file path.

func LoadThreadColors

func LoadThreadColors(filePath string) ([]common.ThreadColor, error)

func ReduceColors

func ReduceColors(img image.Image, palette []common.ThreadColor) image.Image

func ResizeImage

func ResizeImage(img image.Image, newHeight int) image.Image

ResizeImage resizes the image to the specified height while maintaining aspect ratio.

func SaveImage

func SaveImage(filePath string, img image.Image) error

SaveImage saves an image to the specified file path with the given format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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