Documentation ¶
Overview ¶
Package imgutil offers some useful general functions for working with images within the dither module.
Index ¶
- func ImageToPixels(img image.Image) *[][]color.Color
- func OpenImage(path string) (image.Image, error)
- func PixelsToImage(pixels *[][]color.Color) *image.RGBA
- func SaveGIF(img image.Image, name string)
- func SaveJPEG(img image.Image, name string, quality int)
- func SavePNG(img image.Image, name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageToPixels ¶
ImageToPixels converts an image.Image instance into a column-major array
More specifically, a pointer to a [][]color.Color array is returned, indexed like so: color @ (x, y) -> (*return)[x][y] where x indexes the outer slice, selecting one column, and y indexes those slices
func PixelsToImage ¶
PixelsToImage creates an image.RGBA from the given slice of color.Color slices
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.