pkg

package
v0.0.0-...-fd65385 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDither

func ApplyDither(grayScale [][]int, factor int)

func GetSupportedEncodings

func GetSupportedEncodings() map[string]EncodeFunc

func IntToUInt8

func IntToUInt8(value int) uint8

func JPEGEncode

func JPEGEncode(w io.Writer, m image.Image) error

func NewGreyScale

func NewGreyScale(bounds image.Rectangle) [][]int

func PNGEncode

func PNGEncode(w io.Writer, m image.Image) error

func ReadGreyScale

func ReadGreyScale(src ReadableImage, dst [][]int)

func WriteGrayScale

func WriteGrayScale(src [][]int, dst WritableImage)

Types

type EncodeFunc

type EncodeFunc func(w io.Writer, m image.Image) error

type ReadableImage

type ReadableImage interface {
	At(x, y int) color.Color
	Bounds() image.Rectangle
}

type WritableImage

type WritableImage interface {
	ReadableImage
	Set(x, y int, c color.Color)
}

Jump to

Keyboard shortcuts

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