Documentation
¶
Overview ¶
Package encoder responsible for merging multi frames to a gif or video
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEncodeOptions = EncodeOptions{ Options: convert.DefaultOptions, Delay: time.Duration(100) * time.Millisecond, }
DefaultEncodeOptions is default and recommend options for encoding
Functions ¶
This section is empty.
Types ¶
type EncodeOptions ¶
EncodeOptions define the required options to encode
type Encoder ¶
type Encoder interface { Encode(writer io.Writer, frames []image.Image, progress chan<- int) error EncodeToFile(filename string, frames []image.Image, progress chan<- int) error }
Encoder interface is used to encode the multi frames to a gif file or encode frames to a video
func NewEncoder ¶
NewEncoder is a factory method to create a new encoder by file type
type GifEncoder ¶
type GifEncoder struct { }
GifEncoder is responsible for encode the frames into gif
type ImageEncoder ¶
type ImageEncoder struct {
Filename string
}
ImageEncoder is responsible for encoding image
Source Files
¶
- encoder.go
- gif_encoder.go
- image_encoder.go
Click to show internal directories.
Click to hide internal directories.