webbukkit/dynmap — Issue #612: Render tiles as JPEG or 8-bit PNG rather than 24-bit PNG?
Author: amatecha
Created: 2012-02-17 01:17:13+00:00
State: open

Any possibility of allowing the rendering of map tiles using JPEG (or 8-bit PNG) compression rather than 24-bit PNG? The bandwidth usage of this plugin is very high - I was looking at a server's Dynmap page, clicked the + sign to zoom in twice, and I had downloaded 7.3mb of data from the server. That's without any panning or anything - I just connected, zoomed in twice. Tile graphics (128x128 pixels) ranged from 7.5kb to 28.5kb , with most of them in the 20's and higher.

I've noticed that the tiles are 24-bit color depth PNGs, which is about the worst possible choice for these type of graphics. It's fine for empty land tiles that are mostly solid colors, but as soon as you start getting any kind of detail (trees, buildings, diff types of tiles), PNG is basically the worst type of compression to use.

Even changing to 8-bit PNGs would reduce the file size by half for any given graphic, typically. Even better, I took a 28.5kb tile graphic and it was reduced to 4.4kb when saved as a JPEG at 65% quality. Pretty huge savings (85%), and I can assure you that owners of smaller MC servers with limited monthly bandwidth usage would absolutely prefer to save that bandwidth if possible. :)