util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AVGWeights = rgbWeights{
	// contains filtered or unexported fields
}
View Source
var BT601Weights = rgbWeights{
	// contains filtered or unexported fields
}
View Source
var BT709Weights = rgbWeights{
	// contains filtered or unexported fields
}

Functions

func NewAvgWeights

func NewAvgWeights() rgbWeights

func NewBT601Weights

func NewBT601Weights() rgbWeights

func NewBT709Weights

func NewBT709Weights() rgbWeights

Types

type ColorIndex

type ColorIndex uint16

type GrayScaleMatrix

type GrayScaleMatrix struct {
	// contains filtered or unexported fields
}

GrayScaleMatrix is a matrix containing colorIndices

func CreateGrayscaleMap

func CreateGrayscaleMap(image image.Image, weights rgbWeights) GrayScaleMatrix

func NewMatrix

func NewMatrix(width int, height int) GrayScaleMatrix

NewMatrix creates a new GrayScaleMatrix with specified sizes

func (*GrayScaleMatrix) GetAt

func (m *GrayScaleMatrix) GetAt(x int, y int) ColorIndex

GrayScaleMatrix.GetAt gets a grayscale index at a matrix position

func (*GrayScaleMatrix) SetAt

func (m *GrayScaleMatrix) SetAt(x int, y int, idx ColorIndex)

GrayScaleMatrix.SetAt sets a grayscale index at a matrix position

Jump to

Keyboard shortcuts

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