[Tilesathome] color-reducing
Frederik Ramm
frederik at remote.org
Wed Aug 6 23:20:18 BST 2008
Hi,
> ImageMagick's convert knows a -map option with which one can specify a
> sample image from which it will take the colour palette and apply it
> to the image to be converted. This should ensure uniform colors
> across the map. The tradeoff is a potentially less optimal colour
> conversion for each individual tile. But I think uniform colours are
> more important.
I'm currently doing some work on OSM animations (with Mapnik rendered
images). I have had good success by combining a number of wildly
different tiles into one image and then running
convert sample.png -depth 8 -colors 256 -unique-colors colormap.png
on it. The resulting colormap.png has one pixel per color. It could
still be tweaked manually if need be, and then you run
convert tile.png -colors 256 -depth 8 -map colormap.png output.png
on the payload images. The resulting file size is, in my case, slightly
smaller than a corresponding GIF image, and running an extra pngcrush on
the resultant file gives only one or two percent additional saving.
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the Tilesathome
mailing list