covers

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 15 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 BuildFolderName added in v0.9.0

func BuildFolderName(text string) string

func MaybeApplyFilters

func MaybeApplyFilters(source image.Image) image.Image

Types

type Builder

type Builder struct {
	Text        string
	Width       int
	Height      int
	ColorPallet sources.ColorPallet
	Font        *truetype.Font
	FontSize    float64
	Background  image.Image
	Footer      image.Image
	Filters     []Filter
}

func (Builder) Build

func (g Builder) Build() image.Image

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