A Single Frame
Before anything can move it has to be a picture. How much of one frame can be taken away before the eye objects?
A photograph on a screen is a grid of dots. This one is 768 across and 512 down, and each dot holds three numbers, for red, green and blue.
Written out in full that is 1.18 MB. A lossless format using the ideas from the first room brings it to 590 kB, and can go no further.
To the right of the line is a copy that takes 11.6 kB, which is 102 times smaller than the dots written out. Move the pointer across the picture to slide the line, and zoom in to hunt for the join.
Every picture format that throws detail away rests on one move, and it begins by cutting the picture into squares of eight dots by eight.
Click anywhere on the photograph to pick a square.
Each square is then described as a mixture of 64 patterns. One is flat, a few are broad, and most are fine.
The brighter a pattern is drawn, the more of it this square contains. In an ordinary photograph the broad ones carry nearly everything.
Now round the faint patterns down to nothing and do not store them. Drag the slider.
This is JPEG, from 1992, at work on the photograph inside your browser.
Pushed far enough, each square is left with a single flat pattern. These are the blocks everybody has seen in a bad JPEG.
The newest format, AVIF, keeps the idea and changes the details. Its squares grow and shrink to fit what is in them. It guesses each one from its neighbours before it stores anything, and afterwards it smooths over its own seams.
On the left is JPEG at 9.05 kB. On the right is AVIF at 7.96 kB.
Now squeeze it yourself. Drag the dial and watch what gives way first.
Engineers draw the bargain as a curve. Along the bottom is the size of the file. Up the side is a score for how closely the copy resembles the original, where 90 is as good as identical and 30 is poor.
To score 70 on this photograph, which counts as high quality, JPEG needs 33.4 kB and AVIF 16.5 kB. That is 51 per cent less.
The saving depends on the picture. Across the 5 photographs in this room it runs from 36 to 51 per cent.
Knowing which is which makes differences easy to imagine. A blind test takes the knowledge away. X is secretly either A, the original, or B, AVIF q40. Look at all three as often as you like, then say which one X is.
This version climbs. It begins with the smallest file and moves up each time you prove you can tell it from the original. It stops at the first file you cannot tell apart. That is your own limit, on your own equipment.
Each format was asked for the smallest file it could make. The whole photograph now fits in about 3.15 kB, the length of a few paragraphs of text.
They fail in character. JPEG loses its colour and its shapes. AVIF goes soft and keeps the scene.
For engineers, these are the other controls the encoder offers, changed one at a time while everything else is held still.
Choose a row to open that file in the viewer.
An AVIF file is in fact one frame of a film, saved on its own. Everything it does was worked out for video first.
The next room sets it moving.