goimage

package module
v0.0.0-...-1230da9 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: MIT Imports: 10 Imported by: 0

README

goimage

Easy generation and manipulation of 2D PNG images (NRGBA)

Documentation

Check goimage_test.go for examples on how to use goimage

License

goimage is made available under the MIT license. However goimage is made possible thanks to the following libraries:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// contains filtered or unexported fields
}

func NewImage

func NewImage(width, height int) Image

NewImage creates and returns a new goimage image

func (Image) AddImage

func (g Image) AddImage(path string, x, y int) error

AddImage adds an image to the main goimage

func (Image) AddUniformImage

func (g Image) AddUniformImage(width, height int, color color.Color, x, y int)

AddUniformImage adds an uniform image with the given color and size

func (Image) Encode

func (g Image) Encode(dst io.Writer) error

Encode encodes the image into the given writer

func (Image) Save

func (g Image) Save(path string) error

Save saves the goImage to the given path

func (*Image) SetBackGroundImage

func (g *Image) SetBackGroundImage(path string) error

SetBackGroundImage adds an image to the main goImage with the goImage bounds

func (Image) WriteText

func (g Image) WriteText(txt string, color color.Color, size float64, x, y int) error

WriteText writes the given text using the Go font

func (Image) WriteTextFont

func (g Image) WriteTextFont(fontFile, txt string, color color.Color, size float64, x, y int) error

WriteTextFont writes the given text using the given font

Jump to

Keyboard shortcuts

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