processing

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

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertImage

func ConvertImage(input image.Image, p Processor) image.Image

ConvertImage using provided processor

Types

type HexReader

type HexReader struct{}

HexReader reads palette from file containing RGB values in hex one color per line

func (*HexReader) Read

func (hr *HexReader) Read(file *os.File) (color.Palette, error)

type PaletteReader

type PaletteReader interface {
	Read(file *os.File) color.Palette
}

PaletteReader reads palette from file

type Processor

type Processor interface {
	Convert(color color.Color) color.Color
	ConvertImage(image image.Image) image.Image
}

Processor provides image processing methods

func NewKdTreeProcessor

func NewKdTreeProcessor(palette color.Palette) Processor

NewKdTreeProcessor initialized with palette

func NewNaiveProcessor

func NewNaiveProcessor(palette color.Palette) Processor

NewNaiveProcessor initialized with palette

Jump to

Keyboard shortcuts

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