Thanks also to the pandemic we all know them and we have begun to use them more and more frequently as “touchless” systems to show information. Visualizing menus, providing new options to consumers and with a view to a wider digitization of different services we have used these tools. In addition to saving paper material, their focus was above all on hygiene. But how have QR (Quick Response) codes evolved today, how is it possible that there are animated ones and how could they work?
Animated QR Codes: the proof
Last week youtuber Zack Freedman tweeted a repeated failure GIF that went viral . These are some frames from the music video of the famous Never Gonna Give You Up by Rick Astley.
The song is well known to the people of the internet and both the text and the video itself have often been used – even by bad guys – to troll hacked companies. We invite you to try it for yourself, because the GIF has a peculiarity, it is not just an artistic barcode but it works in all respects as a QR code.
Just frame it with the camera or with a special QR code reader; then the official video page of Never gonna give you up on YouTube will open. On the net there are online tools such as those created by QR4 and Jeroen Steeman able to create customized animated QR codes.
The birth of barcodes can be traced back to the 1950s thanks to two students from Drexel University in the United States, who patented a simple system for cataloging and retrieving product data. Tools for masking and encrypting information have evolved over the years until 1994 when the Japanese automotive company Denso Wave patented the QR code and took care of its evolution.
By definition, it is a two-dimensional barcode. Unlike the one-dimensional one that supports a maximum volume of data equal to 85 characters of text, the two-dimensional ones can store different types of information and have various mechanisms for checking and correcting errors inside them.
Two-dimensional barcodes, as the name suggests, can store data over the entire array rather than a single row (one-dimensional case). Each part of the QR code on it has a specific meaning and role to play, with the content section being only a fraction of its entirety.
Operation of animated QR Codes
The mechanisms for checking and correcting errors are useful in the sense that, if parts of the QR code were cut or corrupted, it could still continue to scan its content correctly.
This is what allows developers to get creative: managing to store functional content (such as URLs or other types of data) in small portions of the entire matrix, leaving space that will essentially serve as a blank canvas for artistic images. In the case of Freedman's GIF it seems that each frame completely changes the QR code, with the pixels rearranging themselves from time to time.
Tech Blogger BenBE explained the reason for the operation:
There are actually 3 × 3 pixel subdivisions for each of the large pixels. Processing only cares about the central pixels, so that's where the data is.
For each square in the QR code of Never Gonna Give You Up the scanner looks only at the center of each of these (which include 3 × 3 or 9 pixels in total). Within these pixels the part of the barcode content (the YouTube URL) is stored, while the rest of the pixels, as mentioned before, act as a blank canvas for animation.
How to create them
To get a fairly complex animated QR code, like the one in Rick Astley's video, you need to contact specialized design studios. In any case , it is possible to add animations to a static QR code via sites such as the aforementioned QR4 which is a free service and offers basic options for creating unique codes.
Or you can use the QRpicture generator , whose source code is available on GitHUb.
The generator allows you to create fully functional QR codes that resemble real images as closely as possible and even animate them at will.
Article by Antonio Aversano