image

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeValue added in v0.1.3

func ChangeValue(col color.Color, value float64) color.Color

ChangeValue will convert the color to HSV() space, and return a color with V set to value

func ColorDiff

func ColorDiff(col1 color.Color, col2 color.Color) float64

ColorDiff uses the euclidiean distance in the CIEL*a*b* colorsace to measure color difference.

func DetectMaxLum

func DetectMaxLum(img image.Image) float64

DetectMaxLum returns the largest pixel Luminance found in the image.

func DetectMinLum

func DetectMinLum(img image.Image) float64

DetectMinLum returns the smallest pixel Luminance found in the image.

func Diff

func Diff(img1 image.Image, img2 image.Image) (float64, error)

Diff uses the average euclidiean distance in the CIEL*a*b* colorsace to measure image difference.

func ForEachPixel

func ForEachPixel(img image.Image, f pixelFunc)

ForEachPixel performs pixelFunc on every pixel in the image, going left to right, top to bottom.

func GetForegroundAndBackground

func GetForegroundAndBackground(img image.Image) (color.Color, color.Color, error)

GetForegroundAndBackground guesses the foreground and background color.

func GetPNG

func GetPNG(filePath string) (image.Image, error)

GetPNG is able to load a PNG file from the disk into memory.

func LevelImage

func LevelImage(img image.Image, min float64, max float64) image.Image

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.

func Lightness

func Lightness(col color.Color) float64

Lightness uses L in HSL.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL