img

package
v0.0.0-...-1688700 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: GPL-2.0 Imports: 7 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 {
	sync.RWMutex
	Interface
	Sync   sync.WaitGroup
	Ext    string
	Name   string
	Img    image.Image
	Bounds image.Rectangle
}

Image image information.

func NewImage

func NewImage(name string, bounds image.Rectangle) *Image

NewImageInfo return ImageInfo struct.

func (*Image) Grayscale

func (i *Image) Grayscale() image.Image

Grayscale make an image gray.

func (*Image) Read

func (i *Image) Read() color.RGBA

Read pixel by pixel and return RGBA array.

func (*Image) Save

func (i *Image) Save(folder string) error

Save save image to output file.

func (*Image) Scale

func (i *Image) Scale(size int) image.Image

Scale re-scale image t given size.

type Interface

type Interface interface {
	Save(f string) error
	Scale() image.Image
	Grayscale() (image.Image, error)
	Read() ([]string, error)
}

Interface

Jump to

Keyboard shortcuts

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