image_creator

package
v0.0.0-...-8a19e1c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBackgraundColor = "#FFF"
	DefaultImageWigth      = 640
	DefaultImageHeight     = 480
	DefaultText            = "Image Generator"
	DefaultTextColor       = "#000"
	DefaultFontFile        = "assets/Raleway-Bold.ttf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Image      *image.RGBA
	Properties ImageProperties
}

func (*Image) AddText

func (img *Image) AddText()

func (*Image) CreateImage

func (img *Image) CreateImage() (*bytes.Buffer, error)

type ImageProperties

type ImageProperties struct {
	BackgroundImage *image.Image
	BackgraundColor *hex2rgb.Hex
	ImageWigth      int
	ImageHeight     int
	Text            string
	TextColor       *hex2rgb.Hex
	LabelFontFile   string
}

func (*ImageProperties) InitImageProperties

func (imageProperties *ImageProperties) InitImageProperties(keys map[string][]string)

Jump to

Keyboard shortcuts

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