Squeezing GIFs Into Even Tighter Spaces

Showing images on a TFT or OLED display with a small AVR microcontroller can be a challenge as it requires significant storage space. One solution is to compress the images, but then you need more RAM to decompress it, and that’s a whole other problem. [David Johnson-Davies] of Technoblogy couldn’t find a GIF decoder that fit his needs, so he started writing his own.

We had previously seen a minimal GIF decoder aimed at a Cortex-M0+ that required 24 K of RAM, but this technique is running on an AVR with just 12 K of RAM. Along the way, [David] uses little tricks to shave down the requirements. Since the TFT he targets is a 5-6-5 color space, those 3-byte colors become 2 bytes. The LZW lookup table is encoded as 12-bit pointers to earlier entries plus an additional pixel. However, these savings come at a cost. Animated, local color tables, transparency, interlacing, or GIF87a formatted images aren’t supported. But he ports it over to the PyBadge, which is ATSAMD51 based.

[David] provides some sample code to display a GIF from program memory and an SD card. All the code is on GitHub under a CC By 4.0 license.

Trinocular Lens Makes Digital Wigglegrams Easier To Take

Everyone likes a good animated GIF, except for some Hackaday commenters who apparently prefer to live a joyless existence. And we can’t think of a better way to celebrate moving pictures than with a 3D printed trinocular camera that makes digital Wigglegrams a snap to create.

What’s a Wigglegram, you say? We’ve seen them before, but the basic idea is to take three separate photographs through three different lenses at the same time, so that the parallax error from each lens results in three slightly different perspectives. Stringing the three frames together as a GIF later results in an interesting illusion of depth and motion. According to [scealux], the inspiration for building this camera came from photographer [Kirby Gladstein]’s work, which we have to admit is pretty cool.

While [Kirby] uses a special lenticular film camera for her images, [scealux] decided to start his build with a Sony a6300 mirrorless digital camera. A 3D printed lens body with a focusing mechanism holds three small lenses which were harvested from disposable 35 mm film cameras — are those still a thing? Each lens sits in front of a set of baffles to control the light and ensure each of the three images falls on a distinct part of the camera’s image sensor.

The resulting trio of images shows significant vignetting, but that only adds to the charm of the finished GIF, which is created in Photoshop. That’s a manual and somewhat tedious process, but [scealux] says he has some macros to speed things up. Grainy though they may be, we like these Wigglegrams; we don’t even hate the vertical format. What we’d really like to see, though, is to see everything done in-camera. We’ve seen a GIF camera before, and while automating the post-processing would be a challenge, it seems feasible.

Continue reading “Trinocular Lens Makes Digital Wigglegrams Easier To Take”

Shake Up Your Magic 8-Ball With GIFs

When you need quick answers to life’s burning yes or no questions, most reasonable people reach for a Magic 8-Ball. But since we all have most of those answers memorized at this point, has the Magic 8-Ball sunk to a cliche and become less useful in the present day? Signs point to yes. Yeah, maybe.

Not to worry, because [DJ Harrigan] has given the Magic 8-Ball a modern makeover by redesigning it to serve up suitable GIFs instead. Inside that beautifully-engineered snap-together shell lives a Raspberry Pi 3, and it displays the GIFs on a 240 x 240 IPS LCD screen. [DJ] wanted to use a round screen, but couldn’t find one with a good enough refresh rate. Maybe someday. We love this build either way.

Our favorite part is probably the power button, which is incorporated as the period in the ‘.gif’ logo. Although it takes a bit longer to get this 8-Ball ready to answer questions, it’s worth the wait. And besides, the splash screen is nice.

Once it’s booted up and ready to go, you still have to shake it — for this, [DJ] used a simple DIY spring-based tilt switch. Check out the demo and build video after the break. If you want to build one for yourself, the files are up on the project site.

Need decision-making support on the go? This Magic 8-Ball business card should fit in your wallet.

Continue reading “Shake Up Your Magic 8-Ball With GIFs”

Optimizing GIF Playback For Microcontrollers

Despite being cooked up by Compuserve back in the late 1980s, GIFs have seen a resurgence on the modern internet, mostly because they’re fun. However, all our small embedded systems are getting color screens these days, and they’d love to join in the party. [Larry Bank] has whipped up a solution for just that reason, letting embedded systems play back short animated GIFs with limited resources.

[Larry] does a great job of explaining how the GIF format works, using LZW compression and variable-length codes. He talks about how the design of the format presents challenges, particularly when working with microcontrollers. Despite this, the final code works well, and is able to work with most animated GIFs of the right dimensions and construction. 24K of RAM is required, and image width is limited to 320 pixels. Images can be loaded from flash, memory, or SD cards, and he notes that best performance is gained with a microcontroller with fast SPI for writing to screens quickly.

It’s a great piece of software that promises to add a lot of charm, or silliness, to microcontroller projects. It also simplifies the use of animations, which can now be designed on computers rather than by using onboard graphics libraries. GIF really is the format that never seems to die; we’ve featured cameras dedicated to the form before. Video after the break.

Continue reading “Optimizing GIF Playback For Microcontrollers”

3D Printed GIFs For Stop Motion Memes

Lithophanes are nothing new, with examples going back to the 1800s. But they’ve become popular again thanks to the ease of which these pieces of artwork can be 3D printed. While the Internet would be more than happy to see somebody press a 3D image of their cat into a thin piece of translucent porcelain ready to have a light shone through it, that’s quite a bit harder than just firing up the Monoprice.

But since the machine is doing all the work for you, why stop at one? That’s precisely the sort of thinking that lead [The Mad Maker] to recreate animated GIFs with stop motion photography and a stack of printed lithophanes. Now all your favorite reaction memes can make the leap to the physical world…and then go right back into the computer.

The method here is pretty simple: [The Mad Maker] disassembles his favorite GIF to get the individual frame images, converts each one of those into a lithophane STL via an online tool, prints it out, photographs it, and then stitches all those photographs back into a new GIF. Given the incredibly time consuming nature of this process you’ll want to limit it to short animations, and even then, probably do only every 2nd or 3rd frame to preserve your sanity.

In the video after the break you can see the entire process, as well as check out the final result. While there weren’t really any technical hurdles to overcome in this project, we did like seeing how [The Mad Maker] experimented to find the ideal position for the backlight and camera. The wooden frame he came up with to hold everything in position should make subsequent meme conversions a lot easier, now he just needs to add a little color. Continue reading “3D Printed GIFs For Stop Motion Memes”

Low-Resolution Display Provides High-Nostalgia Animations

High-definition displays are the de facto standard today, and we’ve come to expect displays that show every pore, blemish, and bead of sweat on everything from phones to stadium-sized Jumbotrons. Despite this,  low-resolution displays continue to have a nostalgic charm all their own.

Take this 32 x 16 display, dubbed PixelTimes, for instance. [Dominic Buchstaller] has gone a step beyond his previous PixelTime, a minimalist weather clock and home hub built around the same P10 RGB matrix. The previous build was a little involved, though, with a nice wood frame that took some time and skill to create.

Building your own version of PixelTimes is really approachable. The case is mostly 3D-printed, and the acrylic parts [Dominic] laser cut could just as easily be cut with a saw. And that P10 board can be source for peanuts direct from Chine. The software for the project has been upgraded since the original version, supporting flicker-free animations. Everything runs on a NodeMCU, and there are even scripts to convert your favorite GIF to an animation. Oh, and it still displays the weather too.

This looks great and seems like a lot of fun, and [Dominic] kindly provides all the files you’ll need to build your own. It shouldn’t take more than an hour to build once you’ve got all the parts.

A Gif-Playing Top Hat For FRC 2018!

In gearing up to mentor a team at the 2018 FIRST Robotics Competition, redditor [dd0626] wanted to do something cool that resonated with this year’s 8-bit gaming theme. Over the course of a few days, they transformed a top hat into a thematically encapsulating marquee: a LED matrix display loaded with gifs!

The display is actually a sleeve — made from shipping foam, a pillow case, and an old t-shirt — that fits over the hat, leaving it intact and wearable for future events. A Teensy3.6 displays the gifs on four WS2812 16×16 RGB LED matrices, and while a sheer black fabric diffuses the light, it’s still best viewed from several feet away. This is decidedly not intended to be a stealthy hat display.

To mitigate current draw, [dd0626] is using a 5V 30A DC/DC converter and keeping the brightness at a minimum — otherwise, each panel can pull up to 15A! To offset any dip in performance, they’ve bundled in a massive 22,400mAh, 24V battery pack to keep the hat running for a while. Despite all the hardware, the hat weighs under two pounds — eminently wearable for a long day of competition. Continue reading “A Gif-Playing Top Hat For FRC 2018!”