filter

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(size int) image.Image

Create creates a new RGBA image with the provided size.

func Crop

func Crop(icon transfer.RenderIcon, source image.Image, _ transfer.Layer) image.Image

Crop will cut out the middle of the source to get the desired size of the icon.

func Expand

func Expand(icon transfer.RenderIcon, source image.Image, _ transfer.Layer) image.Image

Expand applies additional padding to the source, so it definitively exceeds the desired size of the icon. Note that the image will most likely be too large afterward.

func Offset

func Offset(icon transfer.RenderIcon, source image.Image, layer transfer.Layer) image.Image

Offset applies the offset values of the layer to the source.

func RemoveMipMaps

func RemoveMipMaps(_ transfer.RenderIcon, source image.Image, layer transfer.Layer) image.Image

RemoveMipMaps is the filter for removing the mip maps of the source, only keeping the highest resolution of it.

func ResizeToOutput

func ResizeToOutput(icon transfer.RenderIcon, source image.Image) image.Image

ResizeToOutput will resize the source to the output size specified in the properties.

func Scale

func Scale(icon transfer.RenderIcon, source image.Image, layer transfer.Layer) image.Image

Scale applies the scaling value of the layer to the source.

func TintedBlendFilter

func TintedBlendFilter(_ transfer.RenderIcon, destination, source image.Image, layer transfer.Layer) image.Image

TintedBlendFilter blends the source onto the destination while applying the tint of the layer.

Types

type BlendFilter

type BlendFilter func(icon transfer.RenderIcon, destination, source image.Image, layer transfer.Layer) image.Image

BlendFilter blends the current layer image onto the image which has been generated so far.

type CreateFilter

type CreateFilter = func(size int) image.Image

CreateFilter is a filter which creates a new (empty) image with the provided size.

type LayerFilter

type LayerFilter func(icon transfer.RenderIcon, source image.Image, layer transfer.Layer) image.Image

LayerFilter manipulates the current layer image of the icon.

func ChainLayerFilters

func ChainLayerFilters(layerFilters ...LayerFilter) LayerFilter

ChainLayerFilters creates a new LayerFilter by chaining together the provided ones.

type ResizeFilter

type ResizeFilter func(icon transfer.RenderIcon, source image.Image) image.Image

ResizeFilter resizes the final image.

Jump to

Keyboard shortcuts

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