generator

package
v0.0.0-...-0486809 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BilinearScale

func BilinearScale(src image.Image, dstWidth, dstHeight int) *image.RGBA

BilinearScale performs bilinear interpolation to resize an image

func GenerateFromImage

func GenerateFromImage(ctx context.Context, cfg *config.Config, imagePath string, index int, outputPath string) error

func GeneratePattern

func GeneratePattern(ctx context.Context, cfg *config.Config, camo config.CamoColors, index int, outputPath string) error

Types

type BlobGenerator

type BlobGenerator struct{}

func (*BlobGenerator) Generate

func (bg *BlobGenerator) Generate(ctx context.Context, cfg *config.Config, colors []color.RGBA) (image.Image, error)

type BoxGenerator

type BoxGenerator struct{}

func (*BoxGenerator) Generate

func (bg *BoxGenerator) Generate(ctx context.Context, cfg *config.Config, colors []color.RGBA) (image.Image, error)

type Generator

type Generator interface {
	Generate(ctx context.Context, cfg *config.Config, colors []color.RGBA) (image.Image, error)
}

type ImageGenerator

type ImageGenerator struct {
	InputFile string
}

func (*ImageGenerator) Generate

func (ig *ImageGenerator) Generate(ctx context.Context, cfg *config.Config, _ []color.RGBA) (image.Image, []color.RGBA, error)

Jump to

Keyboard shortcuts

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