[OSM-dev] Optimising PNGs / Colour reduction

Artem Pavlenko artem.mapnik at googlemail.com
Wed Nov 28 19:45:59 GMT 2007


Hello,


On 20 Nov 2007, at 15:53, Grant Slater wrote:

> Robert (Jamie) Munro wrote:
>> Why are we compressing the image as a 24 bit PNG, then  
>> uncompressing it
>> inside the convert command, reducing the colour pallette and  
>> compressing
>> again? Can't we save as an uncompressed format, and only make it  
>> into a
>> PNG once?
>>
>
> The original script was a quick hack I understand, the code is not  
> clean
> but works. Patches accepted. :-)
>
> A post process is required because Mapnik (currently) can only save in
> 24 bit. mod_tile also has a post process step.


I implemented colour reduction based on oct-tree. It produces good  
results (despite rather simple approach), fast and is very light on  
memory.  I'm also looking at using different color depths. Someone  
suggested 6-bit is enough for our maps, does it really work ?

Cheers,
Artem


>
> Grant
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev





More information about the dev mailing list