"The phone storage space is full, please clean it up in time." Every time we clean up the phone memory, we will find that half of the 256G space is not a large game or movie, but a picture cache for surfing.
Pictures of hundreds of KB may not seem to be many, but when accumulated, the size is still very considerable.
Among them, JPEG is the most common picture format, but it is outdated in terms of compression efficiency and quality. If you can switch to a more efficient picture format, it may be a good way to free up storage space.
Will the latest AVIF format supported by Android 12 be a new standard that can replace JPEG?
Why do we need more advanced image formats?
This band poster picture with a strong "old age" flavor may be the first picture uploaded to the Internet. It was uploaded to the Internet by Tim Berners Lee, the "Father of the Internet" in 1992. , The format of the picture is Gif.
From then on, the world of the Internet began to become colorful. The appearance of online pictures enriched the colors of the Internet world and brought more meaning to the Internet.
People can use pictures to create and share more content that cannot be conveyed by words, such as expressing emotions by chatting with emoticons.
Since then, a variety of image formats have become the cornerstone of every netizen’s Internet surfing. You may not know it, but you can’t do without it.
At present, common image formats are often divided into lossy compression format (JPEG) and lossless compression format (PNG). Regardless of loss or loss, compression is an important responsibility of each format (except RAW and other formats).
Why should the picture be compressed? Each photo is composed of pixels. According to calculations, a photo with 20 million pixels and 8 Bit color depth is approximately 60 MB. The large space is also stretched.
At this time, for the classification and integration of pixels, it is particularly important to compress the data size. The compression process is like the "simplification" technique we use when doing math problems. The repeated similar pixel data is simplified by "merging similar items" (the compression principle is very complicated, so I won't expand it here), and finally get the picture. Compressed images with basically the same quality, but significantly thinner data size.
Since there are lossless compression formats, why is the most popular lossy compression format like JPEG?
From the perspective of usage and browsing, the loss rate of compressed pictures seems to be very important. However, in the early days of the Internet, due to high traffic charges and slow transmission rates, the size of the picture data determines the user's loading speed and directly affects the user's Internet surfing. Experience.
Also in 1992, the Joint Photographic Experts Group (Joint Photographic Experts Group) proposed a lossy compression standard for photo images, which can compress the picture size as much as possible without losing the picture resolution.
Although this will cause the loss of detailed color information, the high compression of JPEG meets the needs of the network environment at that time, and has received extensive support and promotion.
Today, the rapid development of network construction has made transmission no longer a shackle of color, and clearer pictures have become a more urgent need for netizens. Therefore, the promotion of a picture format with more efficient compression and lower picture loss rate has been promoted. Is more important.
Where is AVIF?
On December 14, 2018, Netflix released the first AVIF image. Compared with the 26-year-old JPEG, AVIF is like a small bud at the feet of giants, but in the eyes of Internet giants, this bud may be Can grow to exceed the height of a giant.
In a technical podcast released by Netflix, it defines AVIF as the "next generation image encoding algorithm" and claims that AVIF is the best choice to replace the JPEG format for the world's largest streaming media website.
Images are as important to Netflix as videos, because before users order a movie, the beauty of the cover poster will greatly affect their choice.
Therefore, Netflix needs a picture encoding format with richer colors, higher compression efficiency, more complete detail retention, and stronger multi-device compatibility to replace JPEG.
▲ JPEG format, 81 KB
▲ AVIF format, 76 KB
In this blog, Netflix used multiple posters in JPEG format and AVIF format to compare. It can be seen that the AVIF format can retain more details when the file size is similar, while the JPEG format has appeared visible to the naked eye. Bands, noise, and jagged edges also appeared around the text.
▲ JPEG format, 20.7 KB
▲ AVIF format, 18.2 KB
In Jake Archibald's blog , he compressed both JPEG and AVIF images to a similar level to compare the pros and cons of the two graphics encoding methods. Pay attention to the details of the picture and you will find that the 20 KB JPEG F1 car has basically no details at all, and the picture is full of smearing, discoloration and jaggedness of large color blocks.
And when you see the 18 KB AVIF F1 car, it’s like wearing glasses for myopia: a smooth track, a car with natural color transitions, a helmet that preserves details, and what’s even more incredible is that this one is very clear. Many AVIF pictures are even smaller than JPEG.
In addition to the loss of picture details due to compression, JPEG color distortion is also a point of criticism. For example, the phenomenon of "electronic patina" in early emoticons is due to the color distortion caused by constant compression when emoticons are transmitted between users (the green patina is because of a bug in the compressed image before Android 7).
This kind of "electronic package paste" may be an honor for emoticons (meaning popular and widely spread), but for product display images, color distortion will cause a lot of unnecessary trouble.
Video blogger Jon Sneyers compared a JPEG image with an AVIF image before and after compression 1000 times. From the results, JPEG has changed beyond recognition, and AVIF is still brand new. This is another victory for AVIF.
So what format is AVIF? Before that, we must first understand what AV1 is. AV1 is an open source video codec, proposed by the Development Media Alliance, its purpose is to compress videos and images to reduce the space occupied, but the quality is consistent.
Although video codecs are mainly developed for video, the intra-frame coding tools in video codecs are not very different from image compression tools. In view of the huge compression progress of video codecs, they are used as image encoding The format can also get excellent results.
▲ Poster in JPEG format, 69 KB
▲ AVIF format poster, 40 KB
And AVIF represents the AV1 image file format. In other words, it is the AV1 image format. By drawing lessons from the next generation of video compression technology, the various indicators of the AVIF format have surpassed JPEG, with higher compression efficiency, support for lossless compression, support for animation, and up to 12 bit color depth.
Among JPEG challengers, AVIF is the most aggressive one
After comparison, it can be found that there is a big gap between JPEG and AVIF in terms of compression efficiency, but JPEG has an advantage that AVIF is difficult to match-JPEG has amazing compatibility, and you can hardly find a device that cannot open JPEG format. .
▲ High Efficiency Image File Format, HEIF; also known as High Efficiency Image File Format
It is not an easy task for users and manufacturers to accept and promote a new image format. Before AVIF, JPEG has faced many challengers, among which HEIF format may be the one that impresses you the most.
Since Apple added support for HEIF on iOS 11 in 2017, it has opened the "Blast Mode".
Apple announced that the pictures taken by the iPhone will be stored in HEIF format instead of the past JPEG format. For a while, the mobile phone circle has adopted the function of "supporting HEIF format photo storage" as a trend, and they have followed up.
The reason why HEIF can be favored by Apple is naturally due to its excellent performance: it has higher compression efficiency than JPEG, supports lossless compression, supports animation, and supports up to 16 bit color depth (JPEG only 8 bit). Does it sound familiar? The characteristics of AVIF are basically the same as HEIF, because AVIF is an open source version developed against HEIF, and there is a "love and hatred" between the two.
In addition to Apple, some camera manufacturers have also announced support for HEIF format shooting. For example, Canon's 1D X Mark iii also announced support for HEIF format output. James Artaius of DCW commented: "Excellent HEIF makes JPG quite redundant. Actually use it. There is almost no practical significance."
▲ Red means no support, green means support, HEIF all red
However, it is obviously too early to bring HEIF to the altar. As far as browser format compatibility is concerned, HEIF currently does not even support Apple's own Safari, and it is still a long way from popularization.
Such an efficient image format is not widely supported. One of the important reasons is the patent licensing issue of HEIF itself. HEIF is an image file standard based on the new generation of video coding format HEVC (H.265), which is a new version released by MPEG to update the mainstream H.264 coding standard.
Everything is fine with HEVC with the new algorithm. The HEVC standard of video with the same size is much clearer than H.264, but at the same time it also charges a very expensive license fee . If you want to use HEVC encoding technology on a new device, the manufacturer must charge a license fee to MPEG for every device it launches, just like a wild goose.
▲ You can see many familiar figures on this list, including BAT
This intangible cost obviously caused a lot of obstacles to the promotion of the new standard, which also prompted the birth of the development media alliance- a joint formation of Netflix, Google, Facebook, Microsoft, Samsung, Huawei, Tencent and other technology giants. "Avengers" has launched an AV1 encoding technology that matches the indicators of HEIF, and does not charge any license fees, open source for developers to use.
And AVIF is another challenge signal sent by the "Avengers" to MPEG.
What's interesting is that, as a firm supporter of HEIF, Apple is also an important member of the Development Media Alliance to jointly develop AV1 encoding technology and AVIF standards. Apple has not responded to this, and has not announced its support for AV1 and AVIF standards. The ambiguous attitude is worthy of fun.
Open source standards seem to be more easily supported by websites and devices. Driven by Google and other giants, AVIF is currently supported by browsers such as Chrome, Opera, and Firfox, and the native support of Android 12 also means AVIF will likely be popularized in hundreds of millions of devices in the future.
From this point of view, can AVIF, which is both open source and efficient, overturn the dominance of JPEG? Regrettably, before the full popularity of content and devices, in the next few years or even longer, inefficient JPEG will still be the most common image format.
However, for HEIF's unfulfilled lofty ambitions, AVIF is likely to be realized first. After all, in the Internet world, free ones are the best.
#Welcome to follow Aifaner's official WeChat account: Aifaner (WeChat ID: ifanr), more exciting content will be provided to you as soon as possible.