filter

package
v0.0.0-...-9fc8a72 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFilterNotFound         = errors.New("filter not found")
	ErrBadFilterParameter     = errors.New("bad filter parameter")
	ErrMissingFilterParameter = errors.New("missing filter parameter")
)

Functions

func Init

func Init(ctx context.Context, cfg []config.FilterConfig, m map[string]FilterBuilder)

func ParseDimensions

func ParseDimensions(str string) (int, int, error)

func ParseModifier

func ParseModifier(str string, allowed string) (byte, string)

func ParseRect

func ParseRect(str string) (int, int, int, int, error)

Types

type Chain

type Chain []Filter

func Parse

func Parse(ctx context.Context, m map[string]FilterBuilder, str string) (Chain, error)

func (Chain) Apply

func (c Chain) Apply(ctx context.Context, i img.Img) (img.Img, error)

type Filter

type Filter interface {
	Apply(img.Img) (img.Img, error)
}

type FilterBuilder

type FilterBuilder func(parts []string) (Filter, int, error)

type Image

type Image interface{}

Jump to

Keyboard shortcuts

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