FLIF is a New Free Lossless Image Format That Raises the Compression Bar

flifheader

Every so often, a new image format comes to town and attempts to overthrow the established order of how images (and photos) are saved and shared. In 2010, Google announced a new format called WebP, which promised to speed up the Web by shrinking file sizes without hurting quality. Last year, well-known programmer Fabrice Bellard unveiled a format of his own called BPG that claimed to pack the same quality of JPEGs at just half the size.

Now there’s a new contender that raises the bar (and shrinks file size) even more. It’s called FLIF, which stands for Free Lossless Image Format.

On paper, the new format looks impressive. When its compression was compared to other popular formats, it was (on average) 35% smaller than typical PNG files, 37% smaller than lossless JPEG 2000, 15% smaller than lossless WebP, and 22% smaller than lossless BPG.

comparisonall

Features of the format include grayscale/RGB/RGBA, 16-bit color depth, interlaced/non-interlaced, and support for animation.

One of the big advantages of FLIF is that unlike other lossless formats, FLIF works well on any kind of image.

“You are supposed to know that PNG works well for line art, but not for photographs,” the FLIF website says. “For regular photographs where some quality loss is acceptable, JPEG can be used, but for medical images you may want to use lossless JPEG 2000. And so on. It can be tricky for non-technical end-users.”

“FLIF does away with knowing what image format performs the best at any given task […] FLIF beats anything else in all categories.”

comparisonphotos

Another interesting attribute of FLIF is that it’s lossless and progressive. You only need to download the first part of the file for a reasonable preview of an image. Downloading the rest adds more and more quality to the image. Here’s a video of what a FLIF image looks like as it’s being downloaded slowly (and it’s compared to an Adam7 PNG):

What this means is that FLIF is responsive by design — great for mobile and low-bandwidth uses. If you need a smaller and lower-quality version of a photo, you can simply partially load the file and then resize in the browser.

responsive

Finally, FLIF is completely free. It’s released under the GNU General Public License, and is royalty-free and not encumbered by software patents.

In terms of downsides, one thing that isn’t clear yet is how the format’s speed compares to competitors. “Encoding and decoding speeds are not blazingly fast,” the site says, “but they are in the right ballpark.”

Researcher Jon Sneyers, the co-developer of the format, says that FLIF is still a work in progress and that the format hasn’t been finalized yet. Features that are lacking include metadata support, additional color spaces, lossy compression, and web browser support.

If you’d like to find out more about it, you can do so on the official website or by downloading the source code of the format from GitHub.

Discussion