Convert MPO to animated GIF
based on
https://gist.github.com/878450