grayscale

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grayscale

type Grayscale struct{}

Grayscale produces a grayscaled version of the image.

func (Grayscale) Apply

func (f Grayscale) Apply(repl *caddy.Replacer, img image.Image) (image.Image, error)

Apply applies the image filter to an image and returns the new image.

type GrayscaleFactory

type GrayscaleFactory struct{}

GrayscaleFactory creates Grayscale instances.

func (GrayscaleFactory) Name

func (ff GrayscaleFactory) Name() string

Name returns the name of the filter, which is also the directive used in the image filter block.

func (GrayscaleFactory) New

func (ff GrayscaleFactory) New(args ...string) (imagefilter.Filter, error)

New initialises and returns a configured Grayscale instance.

Syntax:

grayscale

no parameters.

func (GrayscaleFactory) Unmarshal

func (ff GrayscaleFactory) Unmarshal(data []byte) (imagefilter.Filter, error)

Unmarshal decodes JSON data and returns a Grayscale instance.

Jump to

Keyboard shortcuts

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