Sunday, March 02, 2008

Mapguide 2.0 Released - PNG8 Goodness

I have really enjoyed helping test on the new Mapguide 2.0.0 Release, it's a bit slower than the previous release, but that's not so much an issue if your caching everything heavy using tiled maps.

One of the new features is support for PNG8 images. You can configure the tile service to use PNG8 in the serverconfig.ini under the [TileServiceProperties] Imageformat parameter, the header comments don't mention it yet, here's my patch.

It would be nice in the future for the tile format to be configurable in the Map Definition per Base Layer Group, rather than a server wide setting.

Here is a True Marble Tile using PNG8 (36.98 kB)

The same tile as a 24 bit PNG (135.26 kB)

You can barely visually tell the difference, basically there is loss of detail of a black shadow next to the coastline, but there is 100kB difference in file size per tile.

That adds up to well over 1 MB saving per map, depending on you map size. That's 1GB over 1000 page impressions for a page containing this map. That is a huge improvement ! I will investigate later the savings for non-raster tiles

There is also the Fusion framework for doing flexible layouts which also includes the Native Mapguide Layer support for OpenLayers which rocks!


Lucio said...

Zac, Thanks for your post, I don't know why but I've changed on serverconfig.ini - [TileServiceProperties] - Imageformat to PNG8, and I'm still getting 32-Bit PNG images!!! (just in case, yes, I'm restarting the service after changing the line,I have MapGuide 2 over Windows), any ideas please?
Thanks for your help,

Zac Spitzer / Fastmovingtarget said...

You probably need to flush the tilecache... which you can do by either deleting the files from the cache directory

C:\Program Files\MapGuideOpenSource2.0\Server\Repositories\TileCache

or editing a layer in your map or changing the map definition will force a flush of the tilecache

Lucio said...

Did that Zac, still getting 32bit PNG. I've just posted the issue on Nabble. Tks a lot.