images

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

These encoding hints are currently only relevant for Webp.

View Source
var ImageFilters = map[string]gift.Resampling{
	strings.ToLower("NearestNeighbor"):   gift.NearestNeighborResampling,
	strings.ToLower("Box"):               gift.BoxResampling,
	strings.ToLower("Linear"):            gift.LinearResampling,
	strings.ToLower("Hermite"):           hermiteResampling,
	strings.ToLower("MitchellNetravali"): mitchellNetravaliResampling,
	strings.ToLower("CatmullRom"):        catmullRomResampling,
	strings.ToLower("BSpline"):           bSplineResampling,
	strings.ToLower("Gaussian"):          gaussianResampling,
	strings.ToLower("Lanczos"):           gift.LanczosResampling,
	strings.ToLower("Hann"):              hannResampling,
	strings.ToLower("Hamming"):           hammingResampling,
	strings.ToLower("Blackman"):          blackmanResampling,
	strings.ToLower("Bartlett"):          bartlettResampling,
	strings.ToLower("Welch"):             welchResampling,
	strings.ToLower("Cosine"):            cosineResampling,
}

Functions

func AddColorToPalette

func AddColorToPalette(c color.Color, p color.Palette) color.Palette

AddColorToPalette adds c as the first color in p if not already there. Note that it does no additional checks, so callers must make sure that the palette is valid for the relevant format.

func ColorToHexString

func ColorToHexString(c color.Color) string

ColorToHexString converts a color to a hex string.

func HexStringToColor

func HexStringToColor(s string) (color.Color, error)

func ReplaceColorInPalette

func ReplaceColorInPalette(c color.Color, p color.Palette)

ReplaceColorInPalette will replace the color in palette p closest to c in Euclidean R,G,B,A space with c.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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