Ok, will let you know what I come up with. Am still testing the TC code to see what it actually does with PIL. I'm not fully convinced that PIL cannot be made to correctly read the palette info of the incoming metatile. It appears this has been explored already, but I need to convince myself first. ;)<br>
--<br><br><div class="gmail_quote">On Thu, Jan 14, 2010 at 12:10 AM, Guillaume Sueur <span dir="ltr"><<a href="mailto:no-reply@neogeo-online.net">no-reply@neogeo-online.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've also pointed out previously that PIL is generated default jpeg<br>
images, i.e. with 75 % compression. If the wms server itself sends 75%<br>
compressed images, that can give pretty ugly images, and make people<br>
wonder why the quality is different when using metatile or not. As this<br>
should be avoided I've suggested to use a 95 % compression (100 %<br>
doesn't even quantize, and produces fat images). Here is the diff on<br>
Layer.py :<br>
<br>
406a407,408<br>
> elif self.extension == 'jpeg':<br>
> subimage.save(<br>
buffer,<br>
self.extension,<br>
quality=95,<br>
optimize=True<br>
)<br>
<br>
Regards,<br>
<br>
Guillaume<br>
<br>
<br>
Le jeudi 14 janvier 2010 à 08:09 +0100, Ivan Mincik a écrit :<br>
<div><div></div><div class="h5">> On Thursday 14 January 2010, Roger André wrote:<br>
> > Hi All,<br>
> ><br>
> > I'd like to take a stab at fixing the problem TileCache has with cutting up<br>
> > 8-bit quantized metatiles. I'm trying to find where in the code PIL is<br>
> > invoked to do this, but can't seem to put my finger on it. Can someone<br>
> > save me a bit of time and tell me where I can find this?<br>
><br>
> Hi Roger,<br>
> I am very happy that someone is trying to solve this (if we mean the same problem). I have spend lot of time trying to<br>
> fix this. By my opinion, it is PIL issue which can not be done without hacking PIL code. You can find my post in PIL<br>
> mailinglist - with no help, but I am not very skilled programmer, more GIS person, so maybe You can make it easily.<br>
><br>
> Here You can find my ticket with all info, code sample and test file.<br>
> <a href="http://hg.effbot.org/pil-2009-raclette/issue/8/corrupting-images-in-palette-mode" target="_blank">http://hg.effbot.org/pil-2009-raclette/issue/8/corrupting-images-in-palette-mode</a><br>
><br>
> Good luck and give us know about Your progress, even if not successfull.<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Tilecache mailing list<br>
> <a href="mailto:Tilecache@openlayers.org">Tilecache@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
<br>
<br>
_______________________________________________<br>
Tilecache mailing list<br>
<a href="mailto:Tilecache@openlayers.org">Tilecache@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
</div></div></blockquote></div><br>