Documentation ¶
Index ¶
- Variables
- func ApplyFn(img *image.RGBA, fn func(float32) float32, chanel Chanel) *image.RGBA
- func Ceil(img *image.RGBA, threshold float32, chanels Chanel) *image.RGBA
- func DrawLine(img *image.RGBA, p1, p2 math.Vector2[int], c color.RGBA, thickness int)
- func DrawPoint(img *image.RGBA, point math.Vector2[int], c color.RGBA, size int)
- func DrawRectOutline(img *image.RGBA, rect math.Box2D[int], c color.RGBA, thickness int)
- func Filter(img *image.RGBA, kernel [][]float32, chanels Chanel) *image.RGBA
- func Floor(img *image.RGBA, threshold float32, chanels Chanel) *image.RGBA
- func RgbaFromFile(file string) (*image.RGBA, error)
- func SaveRgba(image *image.RGBA, filename string) error
- func Scale(img *image.RGBA, f float32, chanels Chanel) *image.RGBA
- type Chanel
Constants ¶
This section is empty.
Variables ¶
View Source
var KernelGaussian3x3 = [][]float32{
{0.0625, 0.1250, 0.0625},
{0.1250, 0.2500, 0.1250},
{0.0625, 0.1250, 0.0625},
}
View Source
var KernelLaplacian = [][]float32{
{0.0, 1.0, 0.0},
{1.0, -4.0, 1.0},
{0.0, 1.0, 0.0},
}
View Source
var KernelXAngle = [][]float32{
{0, 0, 0},
{-1, 0, 1},
{0, 0, 0},
}
View Source
var KernelYAngle = [][]float32{
{0, -1, 0},
{0, 0, 0},
{0, 1, 0},
}
Functions ¶
func DrawRectOutline ¶
Draw a rectangular outline
func RgbaFromFile ¶
Load an image file (only pngs for now)
Types ¶
type Chanel ¶
type Chanel uint8 // red, green, blue and alpha
const ( RED_CHANEL Chanel = 1 GREEN_CHANEL Chanel = 2 BLUE_CHANEL Chanel = 4 ALPHA_CHANEL Chanel = 8 RGB_CHANEL Chanel = RED_CHANEL | GREEN_CHANEL | BLUE_CHANEL RGBA_CHANEL Chanel = RED_CHANEL | GREEN_CHANEL | BLUE_CHANEL | ALPHA_CHANEL )
Click to show internal directories.
Click to hide internal directories.