icholy/ttygif — pull request #19 by michaeldfallen (2014-02-22 17:19:10+00:00)
Title: Fixed handling of delays

TTYGif calculates the delay between the previous image and the current image and then adds that to the filename of the current gif.

Imagemagick on the other hand accepts a delay as the time to display the current image for.

This means that if I wait 10 seconds before typing `exit` I will instead get a gif that types `e` then waits 10 seconds. To fix this I have stored the current image filepath in `prev_img` at the end of each loop. An example is attached below.

While at it I also made some changes to the concat script to make it work for both gifs and pngs, so only one script is needed for every platform.

Before:
![before](https://f.cloud.github.com/assets/1446145/2238226/6a81802a-9be3-11e3-8439-9bffd82dd9e7.gif)

After:
![after](https://f.cloud.github.com/assets/1446145/2238228/71f66302-9be3-11e3-8b69-728f508e30f1.gif)