covers

package
v0.7.3-beta Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAdjustGamma

func ApplyAdjustGamma(source image.Image) image.Image

func ApplyBlur

func ApplyBlur(source image.Image) image.Image

func ApplyFilters

func ApplyFilters(source image.Image, list []Filter) image.Image

func ApplySharpen

func ApplySharpen(source image.Image) image.Image

func MaybeApplyFilters

func MaybeApplyFilters(source image.Image) image.Image

Types

type Builder

type Builder struct {
	Text       string
	Width      int
	Height     int
	Color      color.Color
	Font       font.Face
	Background image.Image
	Footer     image.Image
	Filters    []Filter
}

func (Builder) Build

func (g Builder) Build() image.Image

func (Builder) TextColor

func (g Builder) TextColor() color.Color

func (Builder) TextShaddowColor

func (g Builder) TextShaddowColor() color.Color

func (Builder) WithSize

func (g Builder) WithSize(size Size) Builder

type Filter

type Filter func(source image.Image) image.Image

func RandomFilters

func RandomFilters() []Filter

type GeneratorSource

type GeneratorSource struct {
	Sources   sources.Sources
	Width     int
	Height    int
	FontSize  float64
	FooterSRC string
	Text      string
}

func (GeneratorSource) Random

func (g GeneratorSource) Random() (Builder, error)

type Size

type Size struct {
	Width  int
	Height int
}

func BuildSizes

func BuildSizes(lines []string) []Size

func ParseSize

func ParseSize(raw string) Size

func ParseSizes

func ParseSizes(raw string) []Size

func (Size) String

func (s Size) String() string

Jump to

Keyboard shortcuts

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