1. Home >
  2. Internet & Security

BPG: A new, superior image format that really ought to kill off JPEG

For all of the massive technological advances that we've seen over the last few years, there are still a number of dinosaurs from a bygone era that -- rather unfortunately -- just won't die. JPEG is one of the most prominent examples: It was created more than 20 years ago, and yet its antiquated, bloated, blocky algorithm still dominates the web. Now, however, there's a replacement in town -- it's called BPG, and it's awesome.
By Sebastian Anthony
JPEG vs. BPG, image quality

For all of the massive technological advances that we've seen over the last few years, there are still a number of dinosaurs from a bygone era that, rather unfortunately, just won't die. JPEG is one of the most prominent examples: It was created more than 20 years ago, and yet its antiquated, bloated, blocky algorithm still dominates the web. You would think, with the modern web being so image-oriented, that we would replace JPEG with something better -- but no, it's 2014 and JPEGs (and multi-megabyte GIFs!) still reign supreme.

It's not like people haven't tried to replace JPEG -- but, much like MP3 or ZIP, it's very hard to unseat an incumbent file format (or, more accurately, a compression technology). The fact is, despite any misgivings we might have about JPEGs or GIFs, almost every computer system in the world can display them -- and generally, in the grand scheme of communication, it's much more important to make sure that your message was seen at all, rather than making sure the message is as small and as optimized as possible. Yes, ExtremeTech could start using a JPEG alternative, and revel in our smaller and faster page loads -- but our excitement would be rather short-lived when we discover that, for 99.9% of our readers, the site looks like ass.

JPEG (left) vs. WebP (right) image qualityJPEG (left) vs. WebP (right) image quality. As you can see, WebP is slightly better -- but nothing compared to BPG (below)

One of the most famous attempts to replace JPEG was attempted by Google, with its WebP format -- but four years on, and it's still nothing more than a niche file format that hasn't gained much widespread support outside of Google's products and services. (The recent trend towards replacing animated GIFs with WebP is pleasing to see, however.) More recently, Mozilla started experimenting with mozjpeg, which reduces file sizes slightly (~10%) while still retaining JPEG compatibility (a big plus). And now, from the creator of FFMPEG and QEMU, Fabrice Bellard, we have BPG!

Short for Better Portable Graphics(Opens in a new window), BPG offers around the same image quality as JPEG, but at half the file size. To perform such witchcraft, BPG simply uses a newer codec -- x265, the open-source implementation of HEVC/H.265. In essence, a BPG image is the same thing as taking a single frame out of an x265/H.265 video stream. We've talked about H.265 at length in the past, but basically it's just a much better algorithm than JPEG -- or MPEG-2 or H.264. Furthermore, BPG also has H.265's ability to render 14 bits per color channel (JPEG is just 8), plus BPG also brings an alpha channel (transparency). Lossless compression is available (though I haven't seen how it compares to PNG).

Image quality comparison: Mozjpeg left, BPG rightImage quality comparison: Mozjpeg left, BPG right. (Looking at it on ExtremeTech isn't the best idea - use the link below to compare image quality properly).

To see how BPG compares to JPEG and WebP, head on over to the image comparison site(Opens in a new window). Move your mouse left and right and marvel at how bad JPEG is. The differences will be less pronounced if you go up to "medium" or "large" file sizes, but that's because the window is very small -- plus, with the shift towards mobile computing, it's highly compressed images that are most important right now. BPG isn't just for mobile users, though: 14-bit color, which allows for a much higher dynamic range than 8-bit JPEG or WebP, is perfectly suited to newer cameras and displays.

But, of course, at the end of the day, BPG is still just another file format/codec that has a grand total of no native support anywhere. For now, the only way of rendering a BPG file is with a BPG decoder written in JavaScript -- about 71 kilobytes of JS, to be exact. Obviously, if you're trying to cut down the footprint of a mobile website, downloading and executing yet more JavaScript kind of defeats the point. (On desktop PCs, though, the performance hit from using the JavaScript decoder will be minimal.) There is an open-source BPG library that browser makers and other software developers can build into their apps, but obviously mass integration will take months or years.

There is one other interesting aspect of BPG, too: Because it's based on HEVC/H.265, any device with hardware decode support for H.265 can also decode BPGs in hardware. This is a big deal, because more advanced compression methods tend to require more computation (and thus power) to decode -- which is a no-no on mobile devices. Hardware-decoded BPG would be better than JPEG in every which way -- now we just have to pray for adoption by software developers.

Now read: H.265 benchmarked: Does the next-generation video codec live up to expectations?

Tagged In

Webp Developers Gif Image Quality Jpeg

More from Internet & Security

Subscribe Today to get the latest ExtremeTech news delivered right to your inbox.
This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of use(Opens in a new window) and Privacy Policy. You may unsubscribe from the newsletter at any time.
Thanks for Signing Up