image

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Raw    image.Image
	Format string
	// contains filtered or unexported fields
}

Image is the internal image struct

func NewImage added in v0.2.0

func NewImage(raw image.Image, format string) (*Image, error)

NewImage return the image from buffer

func NewImageFromBuffer

func NewImageFromBuffer(data []byte) (*Image, error)

NewImageFromBuffer return the image from buffer

func NewImageFromPath

func NewImageFromPath(path string) (*Image, error)

NewImageFromPath return the image from path

func (*Image) Compress

func (i *Image) Compress(quality int) (*Image, error)

Compress the image

func (*Image) Resize

func (i *Image) Resize(width int, height int) (*Image, error)

Resize the image

func (*Image) WaterMark added in v0.2.0

func (i *Image) WaterMark(texture *Image, x string, y string) (*Image, error)

WaterMark the image

func (*Image) Write

func (i *Image) Write(fn string) error

Write the image into filename

Jump to

Keyboard shortcuts

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