imager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Jpg string = "jpg"
	Png string = "png"
	Gif string = "gif"
)

Variables

View Source
var (
	ErrInvalidImageSize   = errors.New("width and height must be at least 1")
	ErrInvalidImageFormat = errors.New("specify a format in jpg, png, or gif")
)
View Source
var Formats formats = []string{Jpg, Png, Gif}

Functions

func Generate

func Generate(input Input) (*image.RGBA, error)

Generate the placeholder image

Types

type Input

type Input struct {
	Width  uint16
	Height uint16
	Format string
	Text   string
	Color  uint32
}

Jump to

Keyboard shortcuts

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