quantisers

package
v0.0.0-...-b8e17cf Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BLACK = color.Gray{Y: 0}
	WHITE = color.Gray{Y: 255}
)

Functions

func ColourPaletteImage

func ColourPaletteImage(c color.Palette, size int) image.Image

Returns image of the colour palette, which each colour represented as a square. The size of the square in pixels is also specified.

func ImageFromPalette

func ImageFromPalette(img image.Image, c color.Palette, ditherType DitherType) (image.Image, error)

Recreates image from colour palette. If one greyscale colour is specified then the image is recreated in black and white with the split between them at the specified input colour

Types

type DitherType

type DitherType int
const (
	NoDither DitherType = iota
	FloydSteinberg
	FloydSteinbergSerpentine
	Bayer2x2
	Bayer4x4
	Bayer8x8
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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