Gif Maker for Monogame

I was playing around with some graphics code and wanted to share it and was tired of going through the huge convoluted process of recording my screenplay and generating a gif (or using a gif making tool). I wanted something that would be there always. Being that I could not find a solid library somewhere which takes Monogame screen data and outputs a gif, I decided to write one myself!


I created a small library which I’m calling screentools which has a few utilities for creating screenshots and generating gifs. Included in the library is a test project with example usage.

Full Source here
Test App controls: F12 for Gif (hold and release when done), F9 for screenshot, one per keypress.

I intend to improve it as needed as I wrap it back into my game code. The immediate improvements I plan to add are multi-threading and compression. Exploring the problem space made me realize that I could write a more efficient Monogame specific gif maker. For now, it uses .NET’s System.Drawing to bootstrap the process and .NET’s Gif codecs to output. That improvement would be a longer-term one unless I find that someone else has already done it.

This small library was an impulse build so.. expect bugs.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.