[MapProxy] more opacity questions

Oliver Tonnhofer olt at omniscale.de
Sun Jan 8 07:35:11 EST 2012


Hi Marco,

On 07.01.2012, at 20:27, DeDuikertjes wrote:
> Here you can find some example images in different shades of black-opaque:
> 
> http://178.63.74.185/hosting/demo/demo1.png
> http://178.63.74.185/hosting/demo/demo2.png
> http://178.63.74.185/hosting/demo/demo3.png

So you have a layer that already has transparency and you want the filled areas to be semi-transparent. The image blending function of PIL does not support the alpha channel. The transparent areas in your image are blended over with your opacity value, but even if these areas are transparent they still have color value, and in your case they are either black or white.

It should be possible to work around that with some image processing during the blending, but that would require more than just a single line patch…


Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt | @oltonn




More information about the MapProxy mailing list