[OSM-dev] .bpg tiles

andrzej zaborowski balrogg at gmail.com
Tue Mar 17 11:21:56 UTC 2015


BPG is an image format by Fabrice Bellard that was in the news a few
months ago as "the JPEG replacement".  Its lossy compression mode
seems to work well for OSM tiles because the artifacts are of a
different type than in JPEG.  Here are some results for a small test
area for different compression ratios (percentages of size saved
against PNG).

51% at default level (-q 28) -- I could see no artifacts in the test area

62% at -q 32 -- minor deterioration can be seen, you can browse a
small area at c.tile.openstreetmap.pl/viewer.bpg.xhtml

89% at -q 40 -- linear features and labels still readable but
low-contrast elements disappear, ugly but no problems at tile seams.

Unfortunately the stock encoder is slow when compared to PNG.  I'm not
sure if it makes sense to use for tiles rendered on-demand because the
compression time adds to the rendering time.  It would work well for
static or low-zoom tiles though.  I imagine compression would also be
improved with bigger tiles but I'm not sure if 8x8 metatiles at
512x512 pixels is not too heavy for a tileserver -- is anyone
generating such tiles with mod_tile?

You can use this Leaflet plugin to support .bpg tiles:

There's also a hacky integration attempt for mod_tile:


More information about the dev mailing list