gifutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeAndSaveToFile

func EncodeAndSaveToFile(g *gif.GIF, path string) error

func ImagesToGIF

func ImagesToGIF(delay int, imgs ...image.Image) (*gif.GIF, error)

Images must be of the same size

Types

type MakeFuncResult

type MakeFuncResult struct {
	GIF               *gif.GIF
	PerformanceReport MakePerformanceReport
}

type MakePerformanceReport

type MakePerformanceReport struct {
	PixelsPerMillisecond    int
	FrameGenerationDuration time.Duration
	FrameEncodingDuration   time.Duration
}

type Maker

type Maker interface {
	Make(image.Image, int) MakeFuncResult
}

type PerlinNoiseGIFMaker

type PerlinNoiseGIFMaker struct {
	// contains filtered or unexported fields
}

func NewPerlinNoiseGIFMaker

func NewPerlinNoiseGIFMaker(config PerlinNoiseGIFMakerConfig) *PerlinNoiseGIFMaker

func (*PerlinNoiseGIFMaker) Generate

func (pngm *PerlinNoiseGIFMaker) Generate(img image.Image, numFrames int) MakeFuncResult

type PerlinNoiseGIFMakerConfig

type PerlinNoiseGIFMakerConfig struct {
	FrameDelay               int
	OutOfFrameFallbackColor  color.RGBA
	MaxAmplitude             float64
	Generator                random.PerlinNoiseGenerator
	ImageModificationOptions imgutil.ImageModificationOptions
	PositionGapDivider       float64
}

Jump to

Keyboard shortcuts

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