lab

package
v0.0.0-...-5476b4c Latest Latest
Warning

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

Go to latest
Published: May 18, 2014 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const RefX float64 = 95.047

Observer = 2°, Illuminant = D65

View Source
const RefY float64 = 100.000
View Source
const RefZ float64 = 108.883

Variables

View Source
var ColorModel color.Model = color.ModelFunc(labModel)

Functions

func Lab2rgb

func Lab2rgb(l, a, b float64) (R, G, B uint8)

func Rgb2lab

func Rgb2lab(R, G, B uint8) (l, a, b float64)

Types

type Color

type Color struct {
	L, A, B float64
}

func (Color) RGBA

func (p Color) RGBA() (uint32, uint32, uint32, uint32)

type Image

type Image struct {
	Pix    []float64
	Stride int
	Rect   image.Rectangle
}

func ImageToLab

func ImageToLab(img image.Image) Image

func NewImage

func NewImage(r image.Rectangle) *Image

NewRGBA returns a new RGBA with the given bounds.

func (*Image) At

func (p *Image) At(x, y int) color.Color

func (*Image) Bounds

func (p *Image) Bounds() image.Rectangle

func (*Image) ColorModel

func (p *Image) ColorModel() color.Model

func (*Image) PixOffset

func (p *Image) PixOffset(x, y int) int

PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).

func (*Image) Set

func (p *Image) Set(x, y int, c color.Color)

func (*Image) SetLAB

func (p *Image) SetLAB(x, y int, c Color)

func (*Image) SubImage

func (p *Image) SubImage(r image.Rectangle) image.Image

SubImage returns an image representing the portion of the image p visible through r. The returned value shares pixels with the original image.

Jump to

Keyboard shortcuts

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