The GIF player does not scale images. If they’re a little bit smaller or larger than the LED matrix, they’ll be centered or cropped to fit. Some GIFs do fine with a little cropping…but if they’re much larger than the matrix, as most GIFs you’ll find on the internet are, they’ll still play but won’t make any sense with such a small area clipped out. You may have to do some prep work…

These techniques have already been covered in other guides. Rather than repeat ourselves, we’ll link to those guides and provide some commentary with how things may be different when using an LED matrix.

A similar project for the original PyPortal (like a MatrixPortal with an LCD display) explains the use of an online tool — EZGIF — for resizing and optimizing GIF images, so you don’t need to own any special image editing software (opens in new window).

Use 64 and 32 for the width and height settings (rather than 320 and 240) if that’s what matches your matrix. Keep the other settings as recommended in that guide. With the smaller pixel dimensions of the LED matrix, the Optimize and Reduce Frames steps can be ignored. It’s no trouble decoding these small GIFs at full speed!

GIFs played on the LED matrix may appear overly bright and washed-out. A different guide explains how to adjust for this (opens in new window). Rather than an online tool, this guide uses software installed on your computer to make the adjustment. This approach does require some command-line chops…but…since this can handle the same scaling and cropping options as the EZGIF method above, you don’t need to run your image through multiple tools, it’s a quicker one-stop solution.

IMPORTANT NOTE: the AnimatedGIF library does not handle interlaced GIFs (this is a tradeoff for handling arbitrarily long/complex animations). When saving or converting GIF images, be certain that interlacing is OFF.

If using ImageMagick for conversion, this can be done with the -interlace None option, as shown in the matrix guide linked above.

This guide was first published on Oct 24, 2020. It was last updated on Oct 24, 2020.

This page (Prepare GIFs) was last updated on Apr 17, 2021.

Text editor powered by tinymce.