imageprocessor

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b []byte) (d image.Image, err error)

func EncodeJpeg

func EncodeJpeg(img *image.Image, q int) ([]byte, error)

func Set404Image

func Set404Image(path string, w uint, h uint, c color.Color, maxW uint, maxH uint) ([]byte, error)

Types

type Image

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

func DecodeImage

func DecodeImage(bin []byte) (*Image, error)

DecodeImage is return image.Image

func (*Image) Crop added in v1.2.0

func (i *Image) Crop(w uint, h uint)

func (*Image) GetImg

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

func (*Image) ResizeAndFill

func (i *Image) ResizeAndFill(w uint, h uint, c color.Color, maxW uint, maxH uint)

Jump to

Keyboard shortcuts

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