Page MenuHomePhabricator

PNGs are sent as 32-bit RGBA
Closed, ResolvedPublic

Description

PNGs from https://maps.wikimedia.org/osm-intl are sent as 32-bit RGBA. This is not ideal, as the map tiles contain no transparency and don't generally need 32-bit colour.

The least that should be done is setting the Mapnik format to "png32:t=0" which is 3 8-bit channels, no alpha.

We can probably farther and use paletted png256. Because each tile is paletted individually, the quality is maintained, and tile size is 50% of full-colour PNGs. tile.osm.org uses png256 and has a style which makes much more use of colour.

Event Timeline

Pnorman created this task.Dec 8 2016, 10:23 PM
Restricted Application added a project: Discovery. · View Herald TranscriptDec 8 2016, 10:23 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Yurik moved this task from All map-related tasks to Map-Styles on the Maps board.Dec 8 2016, 10:24 PM
Yurik edited projects, added Maps (Map-Styles); removed Maps.
Restricted Application edited projects, added Maps; removed Maps (Map-Styles). · View Herald TranscriptDec 8 2016, 10:24 PM
Pnorman edited projects, added Maps (Kartotherian); removed Maps.Dec 8 2016, 10:25 PM

This is great @Pnorman , can't wait for the experiment.

Yurik added a subscriber: Yurik.Mar 30 2017, 10:14 PM

Done in upstream -- Added special handling for this in @kartotherian/server. Basic test on California coast showed a drop from 1.8MB to 855KB.

Done in upstream -- Added special handling for this in @kartotherian/server. Basic test on California coast showed a drop from 1.8MB to 855KB.

That's a great improvement

Pnorman claimed this task.Jul 10 2018, 4:47 PM

I'll check if we've got this in production and close if so.

Jhernandez triaged this task as Normal priority.Jul 10 2018, 4:49 PM
Mholloway closed this task as Resolved.Nov 20 2018, 9:02 PM
Mholloway added a subscriber: Mholloway.
wmf1256:Desktop mholloway$ curl -sO https://maps.wikimedia.org/osm-intl/1/1/1.png
wmf1256:Desktop mholloway$ file 1.png 
1.png: PNG image data, 256 x 256, 8-bit colormap, non-interlaced