Documentation
¶
Index ¶
- func ExtractDominantPalette(img image.Image, k int) []colorful.Color
- func ExtractKMeansPalette(img image.Image, k int) []colorful.Color
- func ExtractPalette(img image.Image, k int, method PaletteMethod) []colorful.Color
- func ReadImage(path string) image.Image
- func SaveGrayImages(images []*image.Gray, dir string) error
- func SaveImage(img image.Image, filename string) error
- func SavePalette(palette []colorful.Color, tileSize int, filename string) error
- func SaveRgbaImages(images []*image.NRGBA, dir string) error
- func SelectDiverseWeightedColors(cands []weightedColor, k int) []colorful.Color
- func SortPaletteByBrightness(palette []colorful.Color)
- type PaletteMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPalette ¶
func SortPaletteByBrightness ¶
SortPaletteByBrightness orders colors from darkest to brightest. The first palette entry becomes the darkest color (background).
Types ¶
type PaletteMethod ¶
type PaletteMethod int
const ( PaletteMethodDominantColor PaletteMethod = iota PaletteMethodKMeans )
func (PaletteMethod) String ¶
func (m PaletteMethod) String() string
Click to show internal directories.
Click to hide internal directories.