The missing method gif.Encode in Go's library
Switch branches/tags
Clone or download
Pull request Compare This branch is 2 commits behind boppreh:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The Go language has support for a lot of things in its library, including images. Unfortunately half of the GIF package is missing: you can only decode files, not encode them. This repository aims to provide the Encode and EncodeAll functions to complete the functionality.

Has support for static images and animations (use Encode for static images and EncodeAll for animations), variable delay between frames and infinite looping.

I've tested the output in a few different viewers and they all rendered it correctly, except for HoneyView. I'm still not sure why, and any help is welcome.

All information on the GIF format was taken from the Wikipedia page on GIF