[Tilecache] Where in TC code is metatile cutting?

Ivan Mincik ivan.mincik at gmail.com
Sun Jan 17 15:24:39 EST 2010


On Sun, Jan 17, 2010 at 7:36 PM, Stephen Woodbridge
<woodbri at swoodbridge.com> wrote:
> 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')
>
> Just a wild guess with no knowledge but does something like this work?
> does the save method have any options or are there in attributes that you
> can set to control output format on the Image object?
>
> i.save('out.png', '8-bit')
>
> -Steve

No, 'save' method does not accept any other parameters than filename.
When creating Image object You can specify type:
def __init__(self, image=None, type=None):

'8-bit' value is just my guess which probably doesn't work .

Ivan



More information about the Tilecache mailing list