[MapProxy] Multi-layer transparency problem

Dejan Gambin dejan.gambin at coin.hr
Thu Jan 26 03:58:56 EST 2012


Just for the information,

Everything is working as expected (same as when accessing theimages directly from MapServer WMS) if using Cairo instead of PIL for multi-layer alpha compositing

regards, dejan
On 17. sij. 2012., at 12:52, Oliver Tonnhofer wrote:

> 
> On 16.01.2012, at 09:45, Dejan Gambin wrote:
>> Do you think writing some code as a workaround would be complicated? Which part of code should be affected?
> 
> 
> You need to implement real alpha compositing[0]. You can implement that with the PIL API, but it will be slow because you can only do one operation (multiply, add, etc) at one time (so maybe 20 operations on your complete image, if you count for each channel). The right solution is improve PIL and implement an alpha compositing function in C. I already worked on the PIL code and this is doable, but it requires a bit of coding and testing.
> 
> [0] http://en.wikipedia.org/wiki/Alpha_compositing
> 
> 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