diff --git a/README.md b/README.md index 1481fb2..cccd3d4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ import ( func main() { gify := gifenc.Config{} - // Decode + // Decode var gif *gif.GIF // Provide a gif imgs, err := gify.Decode(gif) if err != nil { diff --git a/decode.go b/decode.go index 8fe93fd..4d32189 100644 --- a/decode.go +++ b/decode.go @@ -7,6 +7,7 @@ import ( "image/gif" ) +// Decode a gif. This will split the GIF into multiple images. func (config Config) Decode(gif *gif.GIF) ([]*image.RGBA, error) { imgs, err := split(gif, config.Width, config.Height) if err != nil { diff --git a/encode.go b/encode.go index 353e21d..92daa5e 100644 --- a/encode.go +++ b/encode.go @@ -7,6 +7,7 @@ import ( "image/gif" ) +// Encode a GIF. Provide an array of image to be combined into a GIF. func (config Config) Encode(images []image.Image) (*gif.GIF, error) { animated := gif.GIF{ LoopCount: 0,