[Tilecache] Where in TC code is metatile cutting?
Ivan Mincik
ivan.mincik at gista.sk
Wed Jan 20 02:37:39 EST 2010
---------- Forwarded Message ----------
Subject: Re: [Tilecache] Where in TC code is metatile cutting?
Date: Monday 18 January 2010
From: Mark Deneen <mdeneen+tiles at saucontech.com>
To: Ivan Mincik <ivan.mincik at gmail.com>
Ivan Mincik wrote:
> On Sun, Jan 17, 2010 at 10:49 AM, Guillaume Sueur
> <no-reply at neogeo-online.net> wrote:
>
>> Hi,
>>
>> What about using image-magick
>> (http://www.assembla.com/wiki/show/pythonmagickwand) to crop the
>> MetaTile image ?
>>
>> It's maybe worth a try.
>>
>
> So, I did test with following code:
>
> #!/usr/bin/python
>
> from pythonmagickwand.image import Image
> i = Image('test.png', '8-bit')
> i.format = 'PNG'
> i.save('out.png')
>
> Test image is here: http://gista.sk/dl/test.png
>
> Input 'test.png' is 8bit palleted image, but resulting 'out.png' is
> RGBA . Any idea what to change to get same image type in output?
>
> Ivan
>
Ivan,
Using PythonMagick, I was able to create the following image:
http://img35.imageshack.us/img35/6583/testyi.png
using this code:
import PythonMagick
import urllib
data = urllib.urlopen("http://gista.sk/dl/test.png")
blob = PythonMagick.Blob(data.read())
image = PythonMagick.Image(blob);
image.quantizeColors(256)
image.quantizeDither(False)
image.quantize()
image.write("/tmp/test.png")
PythonMagick can be somewhat difficult to unstall, although it was
trivial on Ubuntu server as a package already exists for it.
I plan on using PythonMagick to quantize to 64 colors and to clamp the
values to a particular color map such that adjacent tiles do not have
different colors.
You appear to have better results with MapServer and indexed RGB
output. I was never able to get the fonts looking good, hence the
post-processing to reduce the color depth with ImageMagick. Can you
share your OUTPUTFORMAT section of your map file?
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.osgeo.org/pipermail/tilecache/attachments/20100120/068d59ab/attachment.bin
More information about the Tilecache
mailing list