ߏߔߌ߲ߛߑߕߙߌߕߑߡߊߔ ߛߌ߲ߞߐ߲ OpenStreetMap

Optimizing PNG tiles

ߊ߬ ߟߊߦߟߍ߬ߣߍ߲߬ ߦߋ߫ adaviel ߓߟߏ߫ 11 August 2009 ߦߋ߫ English ߟߋ߬ ߘߐ߫

I stumbled across optipng (for Linux) recently, and wondered whether it would be worth running this on the OSM tiles (or rather, incorporating the algorithm into newly generated ones).

It seems to get maybe 25% size reduction on "empty" tiles (ocean, fields) but only 2-3% on "busy" urban tiles.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ andrewpmk ߟߊ߫ 11 August 2009 at 00:18 ߘߐ߫

It would probably take far too much CPU power to be worth running on the tile server.

ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ Falcorian ߟߊ߫ 11 August 2009 at 00:51 ߘߐ߫

And of course optipng isn't the only compression program, pngout for example generally gets smaller files at the cost of more processing time.

ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ adaviel ߟߊ߫ 11 August 2009 at 01:03 ߘߐ߫

I remember I used to get significant reduction in GIFs by reducing the palette size, before everyone had broadband. With people getting images over cell data networks (and maybe paying per kb) there may be some point to it again.

On a related topic, I forget whether I saw it on OSM or Maemo Mapper - is there any scheme to save downloads by redirecting all requests for "empty blue tile" to the same URL ?

ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ Firefishy ߟߊ߫ 14 August 2009 at 08:56 ߘߐ߫

The OSM Mapnik tiles are 256 colour PNGs to improve their size.
The tile server is CPU bound and currently bandwidth usage is not a problem.

ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ adaviel ߟߊ߫ 15 August 2009 at 03:18 ߘߐ߫

I tried pngout. Much slower than optipng, at least on the maybe 1.5Mpixel image I used.
I was thinking about bandwidth on mobile clients, not the server.

ߌ ߜߊ߲߬ߞߎ߲߫ ߞߊ߬ ߛߋ߫ ߡߙߌߣߊ߲ ߦߌ߬ߘߊ߬ ߟߊ߫