Documentation
¶
Overview ¶
Package extractor extracts the dominant color or a representative color palette from an image.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor represents the color palette extractor instance associated with a single image.
func NewExtractor ¶
NewExtractor returns a new instance of an Extractor. The provider filename parameter can contain a path, and must include the file extension. The provided quality parameter behaves in the following manner: the bigger the number, the faster a color will be returned but the greater the likelihood that it will not be the visually most dominant color. 1 then refers the highest quality.
func (*Extractor) GetColor ¶
GetColor selects the dominant color. It corresponds to the first color in the palette. The color is returned as [r g b].
Source Files
¶
- box.go
- color_map.go
- extractor.go
- mmcq.go
- priority_queue.go
- utility.go
