effect

package
v0.0.0-...-bbf78bc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adjust

func Adjust(rules ...strategy.MappingRule) func(image.Image) image.Image

Adjust returns a function that applies the given MappingRules on an image

func Convolution

func Convolution(edgeHandling strategy.EdgeHandling, kernel utils.Kernel) func(image.Image) image.Image

Convolution returns a function that applies the given kernel on an image with respect to the given Edgehandling strategy

func Difference

func Difference(diff strategy.ColorDifference) func(image.Image, image.Image) image.Image

Difference returns a function that compares 2 images with the given strategy

func Distortion

func Distortion(edgeHandling strategy.EdgeHandling, lens strategy.Lens) func(image.Image) image.Image

Distortion applies the Vectors obtained from the given lens to an image, with respect to the EdgeHandling strategy given

func Flip

func Flip(img image.Image, strategy FlipperStrategy) image.Image

Flip returns a function that applies the given FlipperStrategy on an image

func FlipHorizontal

func FlipHorizontal(img image.Image) image.Image

FlipHorizontal returns a function that applies HorizontalFlipper on an image

func FlipVertical

func FlipVertical(img image.Image) image.Image

FlipVertical returns a function that applies VerticalFlipper on an image

func HorizontalFlipper

func HorizontalFlipper(x, y int, bounds image.Rectangle) (int, int)

HorizontalFlipper returns the given position flipped horizontally

func Jitter

func Jitter(radius int) func(image.Image) image.Image

Jitter returns a function that applies a jitter effect with the given radius on an image

func Median

func Median(eval strategy.ColorEvaluation, edgeHandling strategy.EdgeHandling, windowRadius int) func(image.Image) image.Image

Median returns a function that applies a Median effects with respect to the given ColorEvaluation strategy, EdgeHandling strategy and window radius to an image

func MultiConvolution

func MultiConvolution(edgeHandling strategy.EdgeHandling, merge strategy.ColorMerger, kernels ...utils.Kernel) func(image.Image) image.Image

MultiConvolution returns a function that applies the given kernels on an image with respect to the given Edgehandling strategy, merging results with the given ColorMerge strategy

func Scale

func Scale(colorSamplingStrategy strategy.ColorSampling) func(image.Image, int, int) image.Image

Scale returns a function that uses the given ColorSampling strategy in order to resize an image to the required dimensions

func VerticalFlipper

func VerticalFlipper(x, y int, bounds image.Rectangle) (int, int)

VerticalFlipper returns the given position flipped vertically

Types

type FlipperStrategy

type FlipperStrategy func(int, int, image.Rectangle) (int, int)

FlipperStrategy returns the flipped position for a given position in the bounds of the image

Jump to

Keyboard shortcuts

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