Preparing GIFs

Most 32x32-64x64 pixel GIF should play using this sketch. If you find one that doesn't play, let us know by opening an Issue on GitHub with your GIF attached so we can troubleshoot.

We haven't actively looked for the longest GIF that will play using this sketch, but we did try a 15 MB 32x32 GIF that is long enough to break OSX's preview application, but plays on the Teensy 3.2 without problems.

So, where can you find GIFs to run on your display?

The library comes with a few samples, navigate to your Arduino sketch folder, then "libraries\SmartMatrix\Examples\AnimatedGIFs\gifs".

We have a collection of GIFs that we converted and other SmartMatrix users have shared here at the SmartMatrix Community.

Google image search can be filtered down to look for an exact size and type of image. This search query is looking for "GIF" with size 32x32 and type "Animated":

Google Image Search - 32x32 pixel Animated

There are online tools to take existing video or animated GIFs and resize and crop them down to the size you need.  Some of the sample animations were made using the crop and resize tools provided by ezgif.com.  Use "gifsicle" not "imagemagik" for the best results, and crop the animation to a large square (or rectangle matching your display's aspect ratio) before resizing down to 32x32 or the size you need.

There are many sources for GIF content online.  Here are a couple to get you started:

There are both free and commercial software and online tools to convert video to GIF.  A lot of the tools drop the frame rate when converting.  For best results use a tool that keeps a frame rate that matches your source video, usually 30 fps.

  • The "Video" demo was made using GIFBrewery on the Mac.

You can make your own GIFs using GIMP, Photoshop, or other image editing tools.

You can export a Processing sketch to a GIF using the gif-animation library.

This is the Processing Sketch that produced the "Pattern" demo in the video:

Github Gist - RingsGif.pde

We have another tutorial on Adafruit Learning System on how to create GIFs

If you make a cool animation you want to share online, please post it to the SmartMatrix Community forum, where community members have been building up a collection.

Loading GIFs onto MicroSD card

The card must be formatted in FAT16 or FAT32.  If you just bought the card, it should be ready to go.  The GIFs must use 8.3 format file names, with the name eight characters or shorter, and the extension ".gif".  

More details can be found in the Arduino SD Library notes.

After your card is formatted, create a new folder called "gifs" in the root of the card and copy your gifs there.

Playing GIFs

Here are some examples of GIFs playing on the display.  These GIFs are all included with the library.

It's hard to see subtle variations in color using just a bare display.  The display on the right has the light diffused using a specialty frosted acrylic made for lighting applications.  There are other options for diffusing the LEDs, and a piece of white copy paper in front of the LEDs can work in a pinch.

This guide was first published on Oct 16, 2014. It was last updated on Oct 16, 2014. This page (GIFs) was last updated on Dec 03, 2018.