quantizer

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxIterations       int     = 10
	MinMovementDistance float64 = 3.0
)

Variables

This section is empty.

Functions

func QuantizeWu

func QuantizeWu(input pixels, maxColor int) pixels

func QuantizeWuWithContext

func QuantizeWuWithContext(
	ctx context.Context,
	input pixels,
	maxColor int,
) (pixels, error)

Types

type QuantizedMap

type QuantizedMap = map[color.ARGB]int

func QuantizeCelebi

func QuantizeCelebi(input pixels, maxColor int) QuantizedMap

func QuantizeCelebiWithContext

func QuantizeCelebiWithContext(ctx context.Context, input pixels, maxColor int) (QuantizedMap, error)

func QuantizeMap

func QuantizeMap(input pixels) QuantizedMap

QuantizeMap takes a slice of []color.Color and returns Quantized

func QuantizeWsMeans

func QuantizeWsMeans(
	input pixels,
	startingClusters []color.Lab,
	maxColors int,
) QuantizedMap

func QuantizeWsMeansWithContext

func QuantizeWsMeansWithContext(
	ctx context.Context,
	input pixels,
	startingClusters []color.Lab,
	maxColors int,
) (QuantizedMap, error)

Jump to

Keyboard shortcuts

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