What is HEIC (HEIF), plus a brief timeline of image formats featuring JPEG, GIF, PNG, WebP, BPG
Last year Apple announced that it will support the HEIF (HEIC) image format and HEVC video format in newer OSes starting with macOS High Sierra and iOS 11. The main reason for this move is that the new formats save images and videos in better quality at much lower file size, thus addressing the need for extra storage space most users have these days.
In this article, we'll focus more on the image format and not the video one, so let's start by saying that a better image format is long overdue across the entire internet.
What is HEIF (HEIC) and how good is it?
The format was developed by the Moving Picture Experts Group (MPEG), with the first version being finalized in 2015. It only now starts to gain some momentum due to Apple's adoption within their newer Operating Systems. HEIF comes with two possible file extensions: heic and heif - Apple decided on using the .heic version for its image files.
The HEIC format is quite good and you can see here a comparison between HEIF files and JPEG/GIF. In short, the same image in the HEIC format is twice smaller in size compared with the same image in the JPEG format, while maintaining the picture quality. Now where did we hear something similar before? Hint: Google's WebP format.
HEIC is a lossy format, meaning, much like JPEG does, it throws away parts of the information from a picture, parts that the human eye won't notice they're gone, thus minifying the size of the photo. It reduces the file size even further by comparing data blocks in an image and saving the difference between them, rather then saving every piece of information like JPEG does (this would be the not so technical explanation).
A High Efficiency Image File Format (HEIF) file acts as a container for other files. Inside it, it can contain one or several images, their properties and thumbnails, image derivations and sequences, metadata files like EXIF or XMP. It can display Apple's live photos for example, or HDR images. In the future, it can tackle augmented reality scenarios as well, by storing extra data like how far away each part of a scene is from the camera when it took the photo.
When doing basic editing tasks such as rotating or cropping an image, the HEIF container will keep the original image as it was, with no re-encoding (thus maintaining the original quality), and will store the rotation or cropping information alongside it, in the HEIF container.
The downsides with this new format are that it demands more on the system's processing power and of course, the lack of extensive hardware and platform support at this time (although a 3rd party solution for native support in Windows already exists and you can convert HEIC to JPG online for backward compatibility), which all new formats inevitably encounter at start.
Will HEIC catch on? Possibly
It could spread across all devices, but at the same time, it could get stuck like JPEG2000, JPEG-XR, BPG and even WebP has. The formats come with Apple's market force behind them, so an aggressive push from Apple will help with cross-platform support, but at the same time, the HVEC technology behind the format(s) is heavily patented, which will make things way more difficult, unless a transparent patent scheme is put forward - to be honest, an open format stands better chances of internet-wide adoption than a patented one, no matter how aggressively it's being promoted.
Looking back at Apple's decisions when it comes to standardization, things like choosing the lightning connector instead of the Type-C USB plug makes you wonder if this new format (with a non-free license at the moment) won't just add to the noise, instead of making for a universally adopted better image format.
But why (HEIF) HEIC and not another modern image format contender? Well, for starters, the HEVC codec patents are hold by MPEG LA (not the same as the MPEG group), a group of companies which includes Apple.
Let's continue with a short resume of the "older" formats, JPEG, GIF, PNG, followed by the newer image formats with similar aspirations as HEIC.
JPEG, GIF, PNG - A brief history
Speaking of patented formats, let's talk a bit about JPEG, GIF, and PNG.
JPEG is a lossy image compression standard, released almost 26 years ago (Sept 18, 1992) by the Joint Photographic Experts Group. Today, is the internet standard we all use for images due to it's mainstream support. Probably 99.99% of all devices and apps handling images support the JPEG format. That's what makes it so popular. The JPEG format is free to use, although in its early years a few patent claims had to be addressed in courts. The problem with JPEG is that nowadays, the way image data can be compressed is much more efficient, by achieving faster results, with better picture quality and smaller file sizes.
GIF was first released in 1987 and the latest version of the standard came in 1989 - that's 29 years ago. As opposed to JPEG, GIF is a lossless format, which can do simple animations (video) as well. Being lossless, like PNG is, GIF can display text much better than JPEG. GIF used a compression method that UNISYS had patented and they were asking everybody for (huge) fees in order to use the GIF format. Enter PNG.
With the patents held by UNISYS being a nuisance to everybody, the PNG lossless format was released as a non-patented replacement for GIF in 1996, 21 years ago. It took a while to catch on, but it is now widely spread and the most used lossless image compression format on the Internet, with good support across all platforms and devices.
When releasing PNG, it was thought that the way GIF handled animation was inefficient and a proper way to use animation was to simply use a video codec, therefore PNG was released without animation support. Although APNG and MNG standards were released as well, both supporting animation, they never achieved mainstream support.
When containing animation, GIF simply stores every frame, entirely, as an image, which is highly inefficient. Modern formats which display animation (like HEIC or WebP for example) work differently: they use keyframes (think of them as start frame and end frame of a sequence), then only store the information which describes what happens between these keyframes (like things moving, changing shapes).
When the GIF patents expired in 2004, the Internet users' needs have evolved as well. Users wanted an easy way to express themselves through short animations (think "memes" for instance). Since PNG did not offere animation, APNG and MNG were not widely supported, using videos codecs with video software was not a straightforward process for everybody, GIF made a comeback! GIF was basically universally supported and offered an easy (although technically inefficient) way to create short animations. It was the easy solution and went mainstream again.
But what are the modern, technically efficient, alternatives? Before we get to Google's WebP, let's see what other formats have tried their best so far.
JPEG-XR, BPG, WebP
JPEG-2000 appeared in the early 2000's, but its performance issues combined with licensing problems stopped it for being too widely supported.
Microsoft's JPEG-XR is a lossy and lossless format, released under a free license in 2009, after being first announced in 2006. Although the technology behind it is not bad at all, it did not catch on outside of Microsoft's own ecosystem. Some other applications support it but Microsoft never seemed to push it forward too aggressively.
BPG (Better Portable Graphics) is a lossy and lossless bitmap image format released in 2014 by Fabrice Bellard, an independent author. BPG does really well in terms of speed, compression, size, but comes with the patented technology behind it, specifically HEVC, which includes a lot of patents managed by MPEG LA, the exact group that is behind HEIC's patents as well.
We've talked about WebP before. Released with a free license, WebP is also a JPEG replacement contender and it's Google's own lossy and lossless format, based on their WebM/VP8 codec. Besides Google's own ecosystem, WebP is supported by Opera and a few more, while others like Apple and Facebook have experimented with it. Acceptance for it grew to some extent in the last years, but WebP did not went mainstream (yet?).
Instead of a Conclusion
Which format will go mainstream and replace JPEG? To be honest, no format can replace JPEG any time soon, as so many of Today's internet images are already stored in JPEG format. Out of all the formats out there, JPEG and TXT will probably live as long as the Internet will.
However, in order to go mainstream alongside JPEG, any of these new formats - with WebP (free license) and HEIC (patented license) being the top contenders in my opinion - will have to achieve critical mass, and by that I mean support from the majority of platforms and devices. We'll see how things progress in the next years as we'll look at Firefox, Microsoft, Apple, and even Facebook to have a saying in this matter. Support from any of these major players will have a big impact on when the rest of the Internet will start supporting a new, long overdue, JPEG-replacement format.
Or will FLIF surprise us all instead? What's your take on this "war" of image formats, from which all Internet users should come off victorious?