quantize

package
v0.0.0-...-1c0905f Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationType

type AggregationType uint8

AggregationType specifies the type of aggregation to be done

const (
	Mode AggregationType = iota // pick the highest priority value
	Mean                        // weighted average all values
)

type MedianCutQuantizer

type MedianCutQuantizer struct {
	// The type of Aggregation to be used to find final colors
	Aggregation AggregationType
	// The Weighting function to use on each pixel
	Weighting func(image.Image, int, int) uint32
	// Whether need to add a transparent entry after conversion
	ReserveTransparent bool
}

MedianCutQuantizer implements the go draw.Quantizer interface using the Median Cut method

func (*MedianCutQuantizer) QuantizeMultiple

func (q *MedianCutQuantizer) QuantizeMultiple(p color.Palette, m []image.Image) color.Palette

QuantizeMultiple quantizes several images at once to a palette and returns the palette

Jump to

Keyboard shortcuts

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