From skimming through the code just now and what I recall of how Animated GIFs work, I don’t think it’s possible for the decoder to redraw an entire frame. This buffer stores pixel data, but it’s stored with an indexed color palette, not RGB, and that palette can change mid-GIF.
uint8_t imageData[maxGifWidth * maxGifHeight];
I’d suggest modifying the
drawPixelCallback() function to draw to another rgb24 buffer, and you can then move that buffers position around on the screen. If you really want to get fancy, you could modify the SmartMatrix Library to allow a
Layer object to accept an x,y offset, so when the refresh code calls the Layer’s
fillRefreshRow() method, it can apply the offset.
Not sure if it’s helpful, but I thought about what I might do to fill the empty space on the shirt. Depending on the GIF content I might consider tiling the GIF so it appears at least partially multiple times on the screen. I might dim or blur the outside repeated tiles, like you see on portrait video content shown on a landscape video.
I might sample the pixels and apply an Ambilight effect around the content
I’m not sure how practical it is to work around, but I’m actually not a fan of the “screen” look or seeing bare pixels for my LED projects. I would try to hide the panel under the shirt or a diffuser (or using the shirt material as a diffuser), so the amount of bare screen showing around smaller content wouldn’t stand out so much. The focus could be more on the content, regardless of the size, rather than the screen.
Hope that helps