Documentation ¶
Index ¶
- func ChangeValue(col color.Color, value float64) color.Color
- func ColorDiff(col1 color.Color, col2 color.Color) float64
- func DetectMaxLum(img image.Image) float64
- func DetectMinLum(img image.Image) float64
- func Diff(img1 image.Image, img2 image.Image) (float64, error)
- func ForEachPixel(img image.Image, f pixelFunc)
- func GetForegroundAndBackground(img image.Image) (color.Color, color.Color, error)
- func GetPNG(filePath string) (image.Image, error)
- func LevelImage(img image.Image, min float64, max float64) image.Image
- func Lightness(col color.Color) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeValue ¶ added in v0.1.3
ChangeValue will convert the color to HSV() space, and return a color with V set to value
func ColorDiff ¶
ColorDiff uses the euclidiean distance in the CIEL*a*b* colorsace to measure color difference.
func DetectMaxLum ¶
DetectMaxLum returns the largest pixel Luminance found in the image.
func DetectMinLum ¶
DetectMinLum returns the smallest pixel Luminance found in the image.
func Diff ¶
Diff uses the average euclidiean distance in the CIEL*a*b* colorsace to measure image difference.
func ForEachPixel ¶
ForEachPixel performs pixelFunc on every pixel in the image, going left to right, top to bottom.
func GetForegroundAndBackground ¶
GetForegroundAndBackground guesses the foreground and background color.
func LevelImage ¶
LevelImage linearly scales the luminance of pixels in an image, such that pixels which had luminance min are now black, and pixels which had luminance max are now white.
Types ¶
This section is empty.