Documentation
¶
Overview ¶
Package artwork decodes covers and derives the color and low-resolution backdrop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Blur ¶
blurImage returns img shrunk and blurred, more saturated, to fill a backdrop behind what plays, scaled up as smooth as it is.
func DominantColor ¶
dominantColor returns the most vivid color that covers much of img: the hue that its saturated pixels share most, at their mean.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache loads covers on goroutines and keeps them, up to artLimit bytes: their pixels on the GPU while they show, and on the CPU only their data, which takes a fraction of the pixels. Its methods run on the main thread; post runs a function there.
type CachedImage ¶
type CachedImage struct {
// contains filtered or unexported fields
}
CachedImage is a cover, decoded and ready to draw, with what the player derives from it: its color, and a blurred copy to fill a backdrop.
func (*CachedImage) Bitmap ¶
func (art *CachedImage) Bitmap() *ui.Bitmap
func (*CachedImage) Blurred ¶
func (art *CachedImage) Blurred() *ui.Bitmap
func (*CachedImage) Failed ¶
func (art *CachedImage) Failed() bool
func (*CachedImage) Tint ¶
func (art *CachedImage) Tint() ui.Color