engine

package
v0.0.0-...-fae07df Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Transform(img image.Image, o *ImageOptions) (image.Image, error)
	Resize(img image.Image, w, h int, fit bool) (image.Image, error)
}

func New

func New() Engine

type ImageEngine

type ImageEngine struct {
}

func (ImageEngine) Resize

func (e ImageEngine) Resize(img image.Image, w, h int, fit bool) (image.Image, error)

func (ImageEngine) Transform

func (e ImageEngine) Transform(img image.Image, o *ImageOptions) (image.Image, error)

type ImageOptions

type ImageOptions struct {
	Width      int     `cache:"wi"`
	Height     int     `cache:"he"`
	Fit        bool    `cache:"ft"`
	Fill       bool    `cache:"fl"`
	Blur       float64 `cache:"bl"`
	Sharpen    float64 `cache:"sh"`
	Gamma      float64 `cache:"ga"`
	Contrast   float64 `cache:"co"`
	Brightness float64 `cache:"br"`
}

func (*ImageOptions) TagMap

func (opt *ImageOptions) TagMap() map[string]string

Jump to

Keyboard shortcuts

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