import "github.com/muesli/sticker"
var ( // ErrInvalidDimensions gets returned when the requested image has an invalid width or height ErrInvalidDimensions = errors.New("values for width or height must be positive") // ErrMissingFontOption gets returned when there's no font specified in the options ErrMissingFontOption = errors.New("no font option specified") )
type ImageGenerator struct {
// contains filtered or unexported fields
}
ImageGenerator lets you generate images & placeholders
func NewImageGenerator(options Options) (*ImageGenerator, error)
NewImageGenerator returns a new ImageGenerator
NewPlaceholder returns a placeholder image with the given text, width & height
type Options struct { TTFPath string TTF []byte Foreground color.RGBA Background color.RGBA BackgroundImage image.Image MarginRatio float64 }
Options contains all the settings for an ImageGenerator
Package sticker imports 9 packages (graph). Updated 2019-08-31. Refresh now. Tools for package owners.