pixels

package
v0.0.0-...-2d15020 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImgToPix

func ImgToPix(src *image.NRGBA) []uint8

ImgToPix converts an image to an 1D uint8 pixel array. In order to preserve the color information per pixel we need to reconstruct the array to a specific format.

func LoadImage

func LoadImage(path string) (string, error)

LoadImage load the source image and encodes it to base64 format.

func PixToImage

func PixToImage(pixels []uint8, rect image.Rectangle) image.Image

PixToImage converts the pixel data to an image.

func RgbaToGrayscale

func RgbaToGrayscale(data []uint8, dx, dy int) []uint8

RgbaToGrayscale converts the pixel data to grayscale mode.

func RotateImg

func RotateImg(img *image.NRGBA, angle float64) []uint8

RotateImg rotates the image per pixel level to a certain degree and returns an image data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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