Flattery for FLIF File Format Fanfare
Apart from being fun to say, FLIF is a new compressed image file format announced earlier this month. So far, it sounds quite impressive. But will it matter?
No doubt you're already familiar with the JPEG file format. It's been around for years and is everywhere. Most images on the internet are jpeg image files. Cameras pretty much all can save in the format. Chances are, if you have images saved on your computer, a lot of them are in jpeg format. Indeed, for the common man, the term "jpeg" has become almost synonymous with "image file," as if there were no other.
But such was not always the case. Way back in the dark ages of computer file formats, nearly all images were stored in a format called BMP, or "Bit MaP." The content of a BMP was straightforward enough, consisting simply of a stream of bytes representing consecutive pixel color values. A BMP file wasn't compressed and took very little computer horsepower to create, and very little to decode and display. That fit in well with early computers that were themselves quite limited in terms of horsepower. But since they weren't in any way compressed, they took up a lot of space, and space was also at a premium in early computer technology. As such, most everything back then was character based, and images were a luxury.
Things changed again when the internet started to penetrate beyond the Defense Department and a select tier of large universities to where the rest of us could dial a phone number and log on (yes, that's how it used to be done). Those early CompuServe and AOL pioneers had a love/hate relationship with images. As crude as they were, they were a novelty that everyone loved. But downloading an image over a slow phone line modem took forever. CompuServe thought they could solve the problem and gain a competitive advantage by introducing GIF ("Graphic Interchange File"), the first commonly available compressed image format. But GIF had a great many limitations, not least of which was CompuServe's efforts to get everyone else to pay to use the format.
A few years later, an industry group unveiled the now ubiquitous JPEG image format. Originally, JPG stood for the group that created format, the "Joint Photographic Experts Group" and the format was called JFIF ("JPEG File Interchange Format)," but that distinction has become blurred over the years and now everyone called the images themselves JPEG. JPEG used math to compress images so they took less space to store and less time to transmit. The compression was "lossy" meaning that at least some detail was sacrificed in order to achieve smaller file sizes. Back when computer monitors were fairly low resolution devices though, jpeg images looked great and they took over the internet. GIF images became relegated to animated thumbnails for cartoon characters and other annoying depictions, overuse of which was a sure sign of an inexperienced web designer.
There have been countless other image formats over the years, but the next significant one worth mentioned here would be PNG, the "Portable Network Graphics" format. PNG was created as an open source alternative to CompuServe's licensing fee restrictions on the use of the GIF format. At the same time though, the new format more than held its own against JPEG as a compressed format for photographic images. Eventually, CompuServe (and its successors) abandoned their efforts to extract money from GIF users, but PNG had already been born. Had they given up sooner, history may have played out differently, but at this point we'll never know for sure.
Regardless, PNG truly is a flexible and functional format for many different imaging purposes. And yet, JPEG and even GIF retain a strong foothold in their user base. All those people who think of JPEG means the same thing as "image," a mention of "PNG" will result in at best a head scratch and quizzical expression. Many such users have seen PNG images on the web without ever being aware of it. They still call them JPEG's. JPEG is too deeply ingrained in the public consciousness to be cast aside without effort.
All this took place during the eighties and nineties and thus may be pre-history to some readers, but it serves as the backdrop for where we are at today. Suffice it to say, the landscape for general purpose imaging formats has stayed relatively the same for some time now. Surely, the various raw and now high dynamic range image formats have had an impact, but they seem destined to specific niche purposes. Into this situation comes the new FLIF image format. The acronym stands for "Free Lossless Image Format," and from this you can already tell a lot about what it aims to be, and why all this ancient history stuff is relevant to the discussion at hand.
FLIF is an open source project hosted on github. If you're into open source software, you already know what gitub is. If you're not, don't worry about github, it's not the website you're looking for. More relevant is the site set up for the project at flif.info. It's here you should begin your investigation of all things FLIF. The FLIF format is based on MANIAC ("Meta-Adaptive Near-zero Integer Arithmetic Coding"), which is in turn a variant of CABAC ("Context-Adaptive Binary Arithmetic Coding"). Never mind the details of what these actually are, but suffice it to say there's a lot of computer science that's gone into FLIF.
FLIF comes with no royalties, no fees, and no patents. Yes, it's free. You can even download the source code if you are so inclined. FLIF files are claimed to be 35% smaller than typical PNG files, and work on most any kind of image. As the name implies, FLIF compression is also lossless, meaning that they don't suffer from the sometimes annoying JPEG artifact problem and retain all the detail they started with. This is something that is becoming increasingly important in this era of high resolution monitors and Retina displays. Clearly, FLIF takes more compute power to handle, but that's far less of a concern that it once was. Display of FLIF images proceeds in a progressive fashion too, meaning that the user sees the full image relatively quickly, with increasing detail becoming apparent as rendering continues. Older images were drawn either in a single pass from top to bottom, or as two interlaced frames of even and odd scan lines, with neither method providing a very satisfying user experience.
FLIF supports grayscale and RGB images equally, and also supports RGBA images (RGB plus an Alpha transparency channel). It can handle up to 16-bits per pixel as opposed to JPEG that is limited to 8-bit. It even supports animation for those obsessed with GIF images. A single FLIF image can be used for responsive web design on multiple output devices and purposes.
Before you rush to download FLIF, you should be aware of a few things. Being brand new, FLIF is still a work-in-progress at this point, and the format isn't entirely finalized yet. Notably, it doesn't yet offer any support for web browsers. Support for lossy compression is supposed to be added for situations when you want to save even more space, but that feature hasn't been released yet either. FLIF also doesn't yet support EXIF or IPTC, a serious drawback for photographers who rely on such metadata storage. Color models such as CMYK and YCbCr haven't been added yet either. Yes, this is a work in progress if ever there was one. Still, FLIF seems more attractive than other formats that have come and gone over the past couple of decades. Anyone remember JPEG2000?
Which brings me to my final topic for today. Will FLIF ever see any degree of actual use? It's been years now since PNG entered general support in the marketplace, yet JPEG images still rule the day. Inertia isn't an easy force to overcome. No matter how wonderful FLIF is now, and no matter how super-wonderful it may be in its final release, will most people ever notice? Most of us have high speed internet connections these days, so download speeds are less of a concern than they once were. Disk drive costs have been plummeting as capacities go through the roof. How many of us can honestly say we need to save disk space?
If I were a betting man, I'd wager that sooner or later JPEG will give way. All things surely must pass in time. And it will be resolution and quality that dictate the future. Just as all of us used to be satisfied with VHS tapes but readily adopted the superior DVD format once it became economically viable, are now replacing everything again on Blu-ray, and will likely jump into 4K Ultra-HD format eventually to support ever greater display resolution, we all surely must keep up with the drive for better and better photo resolution and image quality. Once people get a taste for what is possible, they want it. Will the future belong to FLIF? I can't say, and neither can anyone else. But the future is coming. There have been other recent attempts at defining the future of imaging including WebP and BPG. But right now my money would be on FLIF or something derived from it. Thankfully, FLIF is completely free so I don't need to wager a bet. But some sort of image file format evolution is a certainty, sooner or later.
Even if we all do keep using JPEG for the time being.