This article is more than 1 year old

QEMU, FFMPEG guru unleashes JPEG-slaying graphics compressor

BPG format outputs smaller images at higher quality

Noted software wizard Fabrice Bellard has devised a new raster image format that he says offers superior quality to JPEG at similar file sizes.

Bellard – who is known for creating the QEMU virtualization hypervisor and the FFMPEG multimedia libraries, among other achievements – says the new format, called Better Portable Graphics (BPG), is designed to replace JPEG "when quality or file size is an issue."

It's based on a subset of the HEVC open video compression standard, a successor to the H.264/MPEG-4 AVC format that's used for Blu-Ray discs.

Among BPG's advantages are a high compression ratio and support for up to 14 bits per channel – compared to 8 bits per channel for most other image formats – including an alpha channel for transparency.

It supports all of the same chroma formats as JPEG to make it easier to convert images, plus it also supports the RGB, YCgCo, and CMYK color spaces. It also supports an optional lossless compression method.

The trick, of course, will be getting client software to support it. Because BPG is brand-new, no desktop or mobile web browsers support decoding BPG images natively, so far.

To kick start adoption of the format, however, Bellard has released a JavaScript decoder polyfill that should execute in most modern web browsers.

The decoder was written in C and compiled to ASM.js, so it benefits from ASM.js acceleration in Mozilla Firefox. Users of other browsers may experience a brief delay before BPG images are displayed on web pages.

In the long term, though, Bellard hopes browser makers will build in native support for BPG, and to that end he has made available open source C code for a BPG encoder and decoder for Linux and Windows. The code is released under a combination of the BSD and LGPL licenses.

What's more, Bellard says BPG images can be decoded using the native HEVC support that's already being baked into some chipsets.

That's handy, because relying on hardware to do image decoding could be one way for software makers to skirt around the patent licensing issues that inevitably arise when implementing multimedia codecs.

HEVC itself is controlled by the MPEG Licensing Authority (MPEG LA), which has pegged the licensing fee for the codec at 20 cents per unit sold (after the first 100,000 units, which are royalty-free). Even those few pennies will likely be too dear for the likes of Mozilla, however, which distributes its browser as free software.

BPG isn't the only JPEG challenger on the market, either. Google has been pushing its own format called WebP, which it says can reduce the size of graphics-heavy web pages by as much as 40 per cent. Mozilla, meanwhile, has been working on reducing the size of JPEG images by releasing a superior encoding library, with financial support from Facebook. Bellard says BPG should offer superior results than either of these methods, however.

A full specification of the BPG format, along with some sample images, are available at the project's homepage, here. ®

More about


Send us news

Other stories you might like