Documentation ¶
Index ¶
- func CalcCompositionBoxes(imgR image.Image)
- type Box
- type ColorHSL
- type ImageColors
- func (ic *ImageColors) AddColor(x, y int, cf colorful.Color)
- func (ic *ImageColors) AddHSL(x, y int, hsl ColorHSL)
- func (ic ImageColors) MeanHue() (float64, float64)
- func (ic ImageColors) MeanLightness() (float64, float64)
- func (ic ImageColors) MeanSaturation() (float64, float64)
- func (ic *ImageColors) ProminentColors(limit float64) ProminentColors
- func (ic ImageColors) QuantileLightness() float64
- func (ic ImageColors) QuantileSaturation() float64
- type MaterialColor
- type ProminentColor
- type ProminentColors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcCompositionBoxes ¶
CalcCompositionBoxes - Experimental
Types ¶
type Box ¶
type Box struct { Rect image.Rectangle Focused float64 Score float64 MeanL float64 StdL float64 SkewL float64 // contains filtered or unexported fields }
Box - x1, y1, x2, y2 int
func ThirdsBoxes ¶
ThirdsBoxes - Create boxes for thirds composition. 4 Boxes with centers at 1/3 and 2/3 horizontal and vertical.
func (*Box) FocusedPixels ¶
FocusedPixels - Create ImageColors array from an image
func (Box) ImageEdges ¶
ImageEdges -
type ColorHSL ¶
type ColorHSL [3]float64
ColorHSL - Color defined in the HSL colorspace (Hue, Saturation, Value)
func NewColorHSL ¶
func NewColorHSL(cf colorful.Color) ColorHSL
NewColorHSL - Create ColorHSL from colorful.Color
func (ColorHSL) Distance ¶
Distance is the equludian distance between 2 Colors in the HSL colorspace (Hue, Saturation, Lightness)
func (ColorHSL) DistanceHue ¶
DistanceHue is the distance between 2 Hues on the HSL colorspace (Hue, Saturation, Lightness)
type ImageColors ¶
type ImageColors [][]ColorHSL
ImageColors - Array of ColorHSL
func GetImageColors ¶
func GetImageColors(m image.Image) *ImageColors
GetImageColors - Create ImageColors array from an image
func (*ImageColors) AddColor ¶
func (ic *ImageColors) AddColor(x, y int, cf colorful.Color)
AddColor - Add Color to ColorHSL in ImageColors with Coords x and y
func (*ImageColors) AddHSL ¶
func (ic *ImageColors) AddHSL(x, y int, hsl ColorHSL)
AddHSL - Add ColorHSL to Coordinates x and y of ImageColors
func (ImageColors) MeanLightness ¶
func (ic ImageColors) MeanLightness() (float64, float64)
MeanLightness -
func (ImageColors) MeanSaturation ¶
func (ic ImageColors) MeanSaturation() (float64, float64)
MeanSaturation -
func (*ImageColors) ProminentColors ¶
func (ic *ImageColors) ProminentColors(limit float64) ProminentColors
ProminentColors - Return Prominent Colors (limit) percentage limit of promiment colors to return
func (ImageColors) QuantileLightness ¶
func (ic ImageColors) QuantileLightness() float64
QuantileLightness -
func (ImageColors) QuantileSaturation ¶
func (ic ImageColors) QuantileSaturation() float64
QuantileSaturation -
type MaterialColor ¶
type MaterialColor uint8
MaterialColor -
func (MaterialColor) String ¶
func (mc MaterialColor) String() string
String - format MaterialColor as a String
type ProminentColor ¶
type ProminentColor struct { Color MaterialColor W float64 }
ProminentColor - Prominent Color Color and Weight
func (ProminentColor) String ¶
func (p ProminentColor) String() string
type ProminentColors ¶
type ProminentColors struct { Colors []ProminentColor Hue [2]float64 Saturation [2]float64 Lightness [2]float64 Colorfulness float64 Qlightness float64 }
ProminentColors - Slice of ProminentColor
func (ProminentColors) Len ¶
func (pc ProminentColors) Len() int
func (ProminentColors) Less ¶
func (pc ProminentColors) Less(i, j int) bool
func (ProminentColors) Swap ¶
func (pc ProminentColors) Swap(i, j int)