[Tilecache] Regarding getting 8-bit png from TileCache

Frederic Junod frederic.junod at camptocamp.com
Thu Apr 23 10:15:13 EDT 2009


Hi,

For WMS and MapServer, if you set:
extension=png

TC will transform this to FORMAT=image/png and give it to mapserver.
Then mapserver will search for an output type that have this value
(MIMETYPE option).

For your case, make sure you have (in your mapfile) an outputformat
that looks like:
OUTPUTFORMAT
  NAME png
  DRIVER "AGG/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGBA
  EXTENSION "png"
  FORMATOPTION "INTERLACE=OFF"
  FORMATOPTION "QUANTIZE_FORCE=ON"
  FORMATOPTION "QUANTIZE_DITHER=OFF"
  FORMATOPTION "QUANTIZE_COLORS=256"
END

If you need it, you can (in tilecache.cfg) precisely set the mime type
by setting the mime_type option.
The default is "image/" + extension

Hope this is clear enough ...

fredj

On Thu, Apr 23, 2009 at 3:17 PM, gautamvs <gautamvs at gmail.com> wrote:
>
> Hi
>
> My requirement is to get 8 bit png from Tilecache, Mapserver with AGG
> support.
> I have checked with mapserver(with AGG) the out put for 8 bit png is very
> good for my application. But when I include mapserver layer in tilecache
> config file, the out put image is of 24bit.
> How to specify output image type (i.e. bit depth) in tilecache config ?
>
> I am using  Tilecache-2.10, Mapserver 5.2.1, AGG 2.5, Python 2.4 on CentOS.
>
> Thanks
> Gautam

-- 
Frédéric Junod
Camptocamp SA



More information about the Tilecache mailing list