stitch

package
v0.0.0-...-8892a6d Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package stitch is a simple wrapper around the standard libraries gif.GIF type that enables easy combination of multiple source files into a single merged animation. The source files can also be looped multiple times if required.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

File represents a single GIF to be added to the final product. The full GIF will be added at least once, but possibly more depending on the arguments supplied to the Create function.

type FileList

type FileList []File

FileList is a list of Files to process.

type GIF

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

GIF is a wrapper around a gif.GIF from the standard library.

func Create

func Create(files []string, loops []int) (GIF, error)

Create takes a list of files and a list of loop counts. If the list of loop counts is empty, each file will be added to the final product exactly once. Otherwise, the number of loop counts must equal the number of files, and each file will be added a number of times equal to its loop count.

func (*GIF) Add

func (g *GIF) Add(f File) error

Add adds the provided file to the GIF a number of times equal to its loop count.

func (*GIF) Encode

func (g *GIF) Encode(w io.Writer) error

Encode outputs the GIF to the supplied io.Writer.

func (*GIF) Save

func (g *GIF) Save(fn string) error

Save outputs the GIF to the file with the name specified.

Jump to

Keyboard shortcuts

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