Documentation ¶
Overview ¶
Package imagext provides functions for images. It's written for fast prototyping. Results may depend on format.
Index ¶
- func Gray(r, g, b uint8) uint8
- func LoadImage(path string) image.Image
- func NewGray(img image.Image) *image.Gray
- func SaveImage(path string, img image.Image) error
- func ToAvarage(img *image.Gray, size uint)
- func ToMedian(img *image.Gray, size uint)
- func ToMonochrome(img *image.Gray, threshold uint8)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGray ¶
NewGray converts argument img to a new image of grayscale and returns it. Result differes depending on image format.
func SaveImage ¶
SaveImage saves image to file. Format is recognized from extension in path. Default is PNG.
func ToAvarage ¶
ToAvarage sets avarage values for each pixel in its area size*size, e.g. avarage value of {9, 5, 16} is 10.
func ToMedian ¶
ToMedian sets median values for each pixel in its area size*size, e.g median value in {9, 5, 17} is 9.
func ToMonochrome ¶
ToMonochrome convertes image to black and white. Higher threshold means darker image.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.