WebP vs BPG

    For a very long time, the most popular formats remain: JPEG - for lossy compression, PNG - for lossless compression and GIF for animation. These formats are supported by all browsers and web applications.

    But the more pictures are uploaded to the Internet, the more acute is the need for a better format. To save server space, to speed up page loading and to save designer time.

    If you measure the weight of all the photos on the page - sometimes you can get a heart attack. The more photos, the more the page weighs and the longer it takes to load.

    Several formats have already been created that have every chance of replacing both JPEG and GIF and PNG. Very good results show Google WebP and "free" BPG .

    Both formats are based on compression of key frames in video codecs. WebP uses VP8 technology, and BPG uses HEVC (H.265).

    What is BPG?

    BPG is based on HEVC (H.265) video codec coding technology. Splits the image into blocks of different sizes, depending on the content. Supports 14 bit / channel, transparency, metadata, can compress with loss and without. Here is the BPG specification on the developer's site.

    What is WebP?

    Based on the encoding technology of key frames of the VP8 video codec from Google. How WebP works is described in detail here .

    It supports lossy and lossless compression, transparency, metadata and animation and has the ability to compress the picture without compressing the alpha channel.

    Comparison of BPG and WebP

    Visual comparison

    Comparison was made using this tool. Sample: 10 pictures of different sizes. The experiment showed that BPG compresses on average 20% better than WebP. Although the spread is quite large from 42% to 0% . Sometimes the difference was only 1 kb , and sometimes much more . At the same time, the visual quality of the picture remained the same.

    If you click all the pictures on this resource , then in the small, medium and large modes, the small details on the BPG look even clearer. In tiny mode, the visual quality of the picture is better in WebP format, and BPG blurs the fine details.

    Browser support

    BPG is an open source, but it is built on the basis of HEVC, which has many related patents. There are so many holders of these patents that they even created a group called MPEG-LA. This group includes Apple and Microsoft. This explains why they still haven't adopted the WebP format.

    BPG is not supported by any browser. The first could be Safari, and possibly IE. WebP is licensed under the BSD and has support in Chrome, Opera, and Android web applications.
    LicenseBSDOpensource + patents
    SupportChrome, Opera, Android-


    To implement BPG on the site, you need to connect a js decoder . You can convert from JPEG to BPG using ImageMagick:

    convert image.jpeg image.bpg

    You can convert from other formats to WebP using a special utility - cwebp and vice versa - the dwebp decompressor :

    cwebp -q 85 -lossless input.png -o output.webp

    dwebp input_file.webp -o output.png

    Also, the utility can perform simple image editing: crop and resize.

    This article was written thanks to one of the comments on WebP device .


    1. BPG is encoded using H.265 video codec technology, and WebP is encoded using VP8.
    2. BPG compresses better by an average of 5-10%.
    3. WebP has partial browser support, BPG is not yet supported at all.
    4. You can embed BPG on the site using JS.

    Also popular now: