Documentation ¶
Index ¶
- Constants
- func ClampF64(value float64, min float64, max float64) float64
- func ClampInt(value int, min int, max int) int
- func CompareGrayImages(t *testing.T, expected *image.Gray, actual *image.Gray)
- func CompareGrayImagesWithOffset(t *testing.T, expected *image.Gray, actual *image.Gray, offset uint16)
- func CompareRGBAImages(t *testing.T, expected *image.RGBA, actual *image.RGBA)
- func CompareRGBAImagesWithOffset(t *testing.T, expected *image.RGBA, actual *image.RGBA, offset uint16)
- func ForEachGrayPixel(img *image.Gray, f func(pixel color.Gray))
- func ForEachPixel(size image.Point, f func(x int, y int))
- func ForEachRGBAAlphaPixel(img *image.RGBA, f func(r uint8))
- func ForEachRGBABluePixel(img *image.RGBA, f func(r uint8))
- func ForEachRGBAGreenPixel(img *image.RGBA, f func(r uint8))
- func ForEachRGBAPixel(img *image.RGBA, f func(pixel color.RGBA))
- func ForEachRGBARedPixel(img *image.RGBA, f func(r uint8))
- func GetMax(v []uint64) uint64
- func IsEqualFloat64(x float64, y float64) bool
- func ParallelForEachPixel(size image.Point, f func(x int, y int))
- func PrintGray(t *testing.T, gray *image.Gray)
- func PrintRGBA(t *testing.T, rgba *image.RGBA)
Constants ¶
const MaxUint16 = ^uint16(0)
MaxUint16 - maximum value which can be held in an uint16
const MaxUint8 = ^uint8(0)
MaxUint8 - maximum value which can be held in an uint8
const MinUint16 = 0
MinUint16 - minimum value which can be held in an uint8
const MinUint8 = 0
MinUint8 - minimum value which can be held in an uint8
Variables ¶
This section is empty.
Functions ¶
func ClampF64 ¶
ClampF64 returns min if value is lesser then min, max if value is greater them max or value if the input value is between min and max.
func ClampInt ¶
ClampInt returns min if value is lesser then min, max if value is greater them max or value if the input value is between min and max.
func CompareGrayImages ¶
CompareGrayImages Compares two Gray images and prints out if there is a difference between the pixels
func CompareGrayImagesWithOffset ¶
func CompareGrayImagesWithOffset(t *testing.T, expected *image.Gray, actual *image.Gray, offset uint16)
CompareGrayImagesWithOffset Compares two Gray images within a given interval (pixel +/- offset) and prints out if there is a difference between the pixels
func CompareRGBAImages ¶
CompareRGBAImages Compares two RGBA images and prints out if there is a difference between the pixels
func CompareRGBAImagesWithOffset ¶
func CompareRGBAImagesWithOffset(t *testing.T, expected *image.RGBA, actual *image.RGBA, offset uint16)
CompareRGBAImagesWithOffset Compares two RGBA images within a given interval (pixel +/- offset) and prints out if there is a difference between the pixels
func ForEachGrayPixel ¶
ForEachGrayPixel loops through the image and calls f functions for each gray pixel.
func ForEachPixel ¶
ForEachPixel loops through the image and calls f functions for each [x, y] position.
func ForEachRGBAAlphaPixel ¶
ForEachRGBAAlphaPixel loops through the image and calls f functions for alpha component of each RGBA pixel
func ForEachRGBABluePixel ¶
ForEachRGBABluePixel loops through the image and calls f functions for blue component of each RGBA pixel.
func ForEachRGBAGreenPixel ¶
ForEachRGBAGreenPixel loops through the image and calls f functions for green component of each RGBA pixel.
func ForEachRGBAPixel ¶
ForEachRGBAPixel loops through the image and calls f functions for each RGBA pixel.
func ForEachRGBARedPixel ¶
ForEachRGBARedPixel loops through the image and calls f functions for red component of each RGBA pixel.
func IsEqualFloat64 ¶
IsEqualFloat64 Compares 2 float values and returns true if they are inside of the interval of [-eps, +eps]
func ParallelForEachPixel ¶
ParallelForEachPixel loops through the image and calls f functions for each [x, y] position. The image is divided into N * N blocks, where N is the number of available processor threads. For each block a parallel Goroutine is started.
Types ¶
This section is empty.