For almost three decades, the JPEG format dominated the Internet. In fact, the only alternative was the even older GIF format, whose only feature was support for animation. In the world of photography there were no alternatives, unless you consider raw formats without compression, which were of interest only to professionals. In place of the GIF format came PNG, which is not only superior to it in all respects, but also solved the problem with licensing. JPEG format was luckier, the alternatives in the form of JPEG 2000 and WEBP have not received widespread support.
Key features of HEIC Converter Plus
- Decode both HEIC/AVIF Formats
- Convert to JPEG/PNG Formats
- EXIF and ICC profile support
- Convert Live Photos to a series of images
- Optimized for multi-core CPUs
The situation started to change back in 2017, when Apple started using the HEIC format in its mobile platforms. That was a trial balloon, but the really serious alternatives came a little later, in 2019. At the beginning of the year, the final specifications for the AVIF format came out, and in the summer, the final approved JPEG XL format. Now we will try to compare these formats and evaluate their ability to knock JPEG off the pedestal.
1 Format Definitions
HEIC (High Efficiency Image File Format) uses the HEVC video codec for image compression. This makes it the best format for storing full-color photos. Apple was the first to appreciate the benefits of the new format and made it the default format for iPhones in 2017 with the debut of iOS 11 and macOS High Sierra. In addition, some Canon and Sony cameras can also save images in HEIC format. Despite problems with backward compatibility, this format continues to gain popularity, but not as quickly as we'd like. More often than not, it requires the installation of additional extensions, not always free of charge. Perhaps the most significant disadvantage of the format, is the complicated licensing scheme.
AVIF is an image file format developed by the Alliance for Open Media in 2019. Like the HEIC format, it is based on a modern video codec, but here AV1 is used. We have already compared the performance of these video codecs and so we can immediately assume that this image format will have better parameters. The second significant advantage of the format is that it is free and there is reference software to work with it. Most likely this is the format that will become dominant for web delivery. However, there is another strong competitor for photo storage.
JPEG XL is a royalty-free raster-graphics file format developed by Joint Photographic Experts Group, Google and Cloudinary. Thanks to its lossy and lossless compression capabilities, it is intended to surpass existing bitmap formats and become their universal replacement. Thus it claims to replace not only JPEG, but also PNG. Unlike the first two formats, this one has nothing to do with video codecs and is a further evolution of the JPEG format, which has grown into a revolution. This gives it some features unique to image formats, such as progressive decoding.
2 Technical Specifications
|Format||Maximum Image Dimensions
(in a Single Code Stream)
|Maximum Bit Depth,
Maximum Number of Channels
|JPEG||4,294 megapixels (65,535 x 65,535)||8-bit, three channels (or four for CMYK)|
|HEIC||35 megapixels (8,192 x 4,320)||16-bit, three channels (alpha or depth as separate image)|
|AVIF||33 megapixels (7,680 x 4,320 pixels)||12-bit, three channels (alpha or depth as separate image)|
|JPEG XL||1,152,921,502,459 megapixels (1,073,741,823 x 1,073,741,824)||24-bit (integer) or 32-bit (float),up to 4,100 channels|
HEIC and AVIF can handle larger images but not directly in a single code stream. You must decompose the image into a grid of independently encoded tiles, which could cause discontinuities at the grid boundaries.
3 Compression Ratio
It is not so easy to evaluate the compression ratio because the same settings of different codecs give a big difference not only in the file size, but also in the visible quality of the image. We tried to choose the settings at which the detail was at the same level and there were no block artifacts and color banding. Of course, these parameters are quite subjective, so we will not give exact numbers, but will limit ourselves to the relative balance of power.
Both formats, which are derived from video codecs, behave roughly the same and allow you to get a noticeable gain in file size here and now without unnecessary steps. The difference between them is not significant enough to take it into account, but in all cases AVIF is ahead of HEIC. For applications for which bandwidth, storage reduction, or both of those factors are the main concern, i.e., they are more important than image fidelity, AVIF and HEIC might come in handy.
The first thing that catches your eye is the significant loss of JPEG XL compression when using the default settings. This is because JPEG XL defaults to a visually near-lossless setting. If we focus on comparable visual quality, the situation changes dramatically. It is safe to say that at low quality settings (1 bpp or lower) AVIF is in the lead, but at higher quality settings JPEG XL wins.
Since video codecs have absolutely no algorithms to compress the image with a color palette, JPEG XL wins with a huge margin on such images.
In terms of performance the picture is absolutely unambiguous - JPEG XL wins with a huge gap both in encoding speed and in decoding images. Even replacing the libaom reference codec with the highly optimized svt-av1 codec will leave a significant difference. The outsider in this discipline is HEIC, which uses x265 library. Surprisingly, JPEG XL is even faster than vanilla JPEG.
HEIC has been used in Apple's operating systems since the 2017 release of the iPhone 7 and iOS 11 and macOS 10.13 (High Sierra). Support was later added to Windows 10, Android 9, and Ubuntu 20.04.
AVIF is supported in current Chrome, Firefox, and Opera. Support was added to WebKit in 2021, but it still has not made its way into Safari. It also works in newer VLC, GIMP, Windows, Android, etc.
JPEG XL is still in the final stages of standardization, however, and does not yet work in browsers. However, test builds of Firefox and Chrome with JPEG XL support already exist, which is really good news. On Windows and MacOS platforms, this format is supported by installing plug-ins.
In general, we can expect JPEG XL and AVIF to receive a much wider level of support as open and royalty-free formats.
In general, we can say that any of these codecs can claim to replace JPEG. The choice will largely depend on your personal preferences.
In the Apple ecosystem, HEIC is the native format and is the obvious choice. In addition to still images, this format is used for famous live photos. At the same time, web designers on the Apple platform may prefer the AVIF format because of its better support in web browsers. For photographers, JPEG XL is a clear favorite due to its killer feature - the ability to repackage old JPEG images without loss of quality.
After all, why did everyone decide that there should be only one winner? All formats are standardized and different organizations are responsible for their development. Competition will only spur further progress and this promises benefits to all end users.